/* Deskhand web styles. One family (Archivo, self-hosted); headlines use its expanded width. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/static/archivo.woff2) format('woff2-variations'), url(/static/archivo.woff2) format('woff2');
}

:root {
  --paper: #f2f4f1;
  --paper-raised: #fbfcfa;
  --ink: #1a2b24;
  --ink-soft: #3d4f47;
  --muted: #5f6e67;
  --line: #d5dbd6;
  --line-strong: #b8c2bb;
  --green: #1f5c47;
  --green-hover: #174a39;
  --green-wash: #e3ece7;
  --brass: #b8862e;
  --glow: #f5c451;
  --glow-wash: rgba(245, 196, 81, 0.22);
  --danger: #a8352b;
  --danger-wash: #f7e4e1;
  --console: #17251f;
  --console-ink: #dfe8e2;
  --console-dim: #8fa69a;
  --on-green: #f6f8f5;
  --focus: #b8862e;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121b17;
    --paper-raised: #18241f;
    --ink: #e4ebe6;
    --ink-soft: #c3cec8;
    --muted: #97a69f;
    --line: #2b3a33;
    --line-strong: #3d5047;
    --green: #6cc2a0;
    --green-hover: #87d3b4;
    --green-wash: #1d3129;
    --brass: #d9ab55;
    --glow: #ffd36b;
    --glow-wash: rgba(255, 211, 107, 0.16);
    --danger: #f08c80;
    --danger-wash: #3a2220;
    --console: #0d1512;
    --console-ink: #dfe8e2;
    --console-dim: #84998e;
    --on-green: #0f1a15;
    --focus: #ffd36b;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--green);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--green-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 {
  font-size: 36px;
  font-weight: 760;
  font-stretch: 112%;
}
h2 {
  font-size: 24px;
  font-weight: 700;
  font-stretch: 108%;
}
h3 {
  font-size: 18px;
  font-weight: 650;
}
p {
  margin: 0 0 12px;
}
code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  /* Sides only, so sections can set their own top and bottom spacing. */
  padding-left: 24px;
  padding-right: 24px;
}
.narrow {
  max-width: 460px;
}
.reading {
  max-width: 720px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Header and footer ─────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 118%;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--ink);
}
.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-nav .who {
  color: var(--muted);
  font-size: 14px;
  margin-right: 4px;
  overflow-wrap: anywhere;
}
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer a {
  color: var(--muted);
}
.site-footer .spacer {
  margin-left: auto;
}

/* ── Buttons and forms ─────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--on-green);
  font: inherit;
  font-weight: 620;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  color: var(--on-green);
}
.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.button.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.button.quiet:hover {
  background: var(--green-wash);
  color: var(--ink);
  border-color: var(--line-strong);
}
.button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--line-strong);
}
.button.danger:hover {
  background: var(--danger-wash);
  border-color: var(--danger);
}
.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}
.button.large {
  min-height: 52px;
  padding: 0 26px;
  font-size: 17px;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
form.inline {
  display: inline;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-weight: 600;
  font-size: 15px;
}
.field .hint {
  font-size: 14px;
  color: var(--muted);
}
input[type='email'],
input[type='password'],
input[type='text'] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
}
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: var(--green);
}
input.code-input {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.notice {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 20px;
  background: var(--green-wash);
  color: var(--ink);
}
.notice.error {
  background: var(--danger-wash);
  color: var(--ink);
  border-left: 4px solid var(--danger);
}
.notice.warn {
  background: var(--glow-wash);
  border-left: 4px solid var(--brass);
}
.notice p:last-child {
  margin-bottom: 0;
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */

.auth {
  padding: 64px 0 0;
}
.auth h1 {
  margin-bottom: 8px;
}
.auth .lede {
  color: var(--muted);
  margin-bottom: 28px;
}
.auth form .button {
  width: 100%;
}
.auth .switch {
  margin-top: 22px;
  font-size: 15px;
  color: var(--muted);
}
.key-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  margin: -4px 0 20px;
}
.key-note svg {
  flex: none;
  margin-top: 2px;
}

/* ── Landing ───────────────────────────────────────────────────────────── */

.hero {
  padding-top: 72px;
  padding-bottom: 40px;
}
.hero h1 {
  font-size: clamp(42px, 7.2vw, 80px);
  font-weight: 860;
  font-stretch: 125%;
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.hero .lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 26px 0 30px;
}
.hero .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.demo {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 20px;
  align-items: stretch;
}
.ask {
  align-self: start;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 4px;
  padding: 18px 20px;
  font-size: 17px;
  line-height: 1.45;
}
.ask .from {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.console {
  background: var(--console);
  color: var(--console-ink);
  border-radius: 12px;
  padding: 16px 18px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  overflow-x: auto;
  min-height: 230px;
}
.console .bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.console .bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #33463d;
}
.console .line {
  white-space: pre;
}
.console .dim {
  color: var(--console-dim);
}
.console .ok {
  color: #7fd1a6;
}
.console .app {
  color: #8cc8e8;
}
.console .lamp {
  color: var(--glow);
}
.console .tool {
  font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .console.play .line {
    opacity: 0;
    animation: appear 0.01s forwards;
  }
  .console.play .line:nth-of-type(1) { animation-delay: 0.2s; }
  .console.play .line:nth-of-type(2) { animation-delay: 0.9s; }
  .console.play .line:nth-of-type(3) { animation-delay: 1.8s; }
  .console.play .line:nth-of-type(4) { animation-delay: 2.5s; }
  .console.play .line:nth-of-type(5) { animation-delay: 3.6s; }
  .console.play .line:nth-of-type(6) { animation-delay: 4.1s; }
  .console.play .line:nth-of-type(7) { animation-delay: 4.7s; }
  .console.play .line:nth-of-type(8) { animation-delay: 6.4s; }
}
@keyframes appear {
  to {
    opacity: 1;
  }
}

.section {
  padding-top: 88px;
}
.section > h2 {
  margin-bottom: 28px;
  font-size: 30px;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 40px;
  font-weight: 860;
  font-stretch: 125%;
  line-height: 1;
  margin-bottom: 14px;
  color: var(--green);
}
.steps h3 {
  margin-bottom: 8px;
}
.steps p {
  color: var(--ink-soft);
}

.abilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}
.abilities h3 {
  margin-bottom: 6px;
}
.abilities p {
  color: var(--ink-soft);
  margin: 0;
}

.control {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}
.control ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.control li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.control li:first-child {
  padding-top: 0;
}
.control li strong {
  display: block;
  margin-bottom: 2px;
}
.control li span {
  color: var(--ink-soft);
}

/* ── Command and address boxes ─────────────────────────────────────────── */

.copybox {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-raised);
  overflow: hidden;
  margin: 8px 0 14px;
}
.copybox code {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  overflow-x: auto;
  white-space: pre;
  font-size: 14px;
  line-height: 1.5;
}
.copybox button {
  flex: none;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}
.copybox button:hover {
  background: var(--green-wash);
}

/* ── Dashboard ─────────────────────────────────────────────────────────── */

.dash {
  padding-top: 40px;
}
.dash-section {
  margin-top: 56px;
}
.dash-section:first-child {
  margin-top: 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-head .aside {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.devices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.device {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-raised);
  padding: 20px 20px 16px;
  display: grid;
  gap: 4px;
}
.device.online {
  border-color: var(--brass);
  box-shadow: 0 0 0 4px var(--glow-wash);
}
.device .top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.device h3 {
  font-size: 19px;
  font-stretch: 108%;
  overflow-wrap: anywhere;
}
.pilot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
  border: 2px solid var(--paper-raised);
  outline: 1px solid var(--line-strong);
}
.online .pilot {
  background: var(--glow);
  outline-color: var(--brass);
  box-shadow: 0 0 10px 2px var(--glow);
}
.device .status {
  font-weight: 600;
}
.online .status {
  color: var(--ink);
}
.device .detail {
  color: var(--muted);
  font-size: 14px;
}
.device .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tag {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--ink-soft);
}
.tag.warn {
  background: var(--glow-wash);
}
.device .actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.device details summary {
  cursor: pointer;
  color: var(--green);
  font-size: 14px;
  list-style: none;
}
.device details summary::-webkit-details-marker {
  display: none;
}
.device details form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.device details input {
  min-height: 34px;
  padding: 4px 10px;
}

.setup {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: var(--paper-raised);
}
.setup h3 {
  margin-bottom: 4px;
}
.setup .os {
  margin-top: 18px;
}
.setup .os:first-of-type {
  margin-top: 12px;
}

.apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}
.apps ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.apps li {
  margin-bottom: 6px;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.rows li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.rows .main {
  flex: 1;
  min-width: 200px;
}
.rows .main strong {
  display: block;
}

.table-scroll {
  overflow-x: auto;
}
table.activity {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.activity th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.activity td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.activity td.tool {
  font-family: var(--mono);
  font-size: 13px;
}
table.activity .fail {
  color: var(--danger);
  font-weight: 600;
}
table.activity .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.usage {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.usage strong {
  font-size: 36px;
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 24px;
  color: var(--ink-soft);
}

/* ── Pairing and consent ───────────────────────────────────────────────── */

.facts {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.big-code {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.choice {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.choice .button {
  flex: 1 1 160px;
}
.consent-scope {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.consent-scope li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.consent-scope li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brass);
}

.prose h2 {
  margin: 36px 0 12px;
  font-size: 22px;
}
.prose p,
.prose li {
  color: var(--ink-soft);
  max-width: 68ch;
}

/* ── Small screens ─────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .demo,
  .control,
  .apps {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .abilities {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header-nav .wide-only {
    display: none;
  }
  h1 {
    font-size: 30px;
  }
  .hero {
    padding-top: 48px;
  }
  .header-nav .who {
    display: none;
  }
  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .section {
    padding-top: 64px;
  }
}

.more-computers {
  margin-top: 20px;
}
.more-computers .setup {
  margin-top: 14px;
}
.connect-steps {
  margin-top: 24px;
}
.prose {
  padding-top: 48px;
}
.mark .shade {
  fill: var(--green);
}
.mark .rim {
  fill: var(--brass);
}
.mark .light {
  fill: var(--glow);
}
