/* Deskthru landing page: clean white, the logo's blue as the only accent. */

:root {
  --blue: #0a47ff;
  --blue-dark: #0036cc;
  --ink: #0b0b0f;
  --text: #2b2d33;
  --muted: #6b7079;
  --line: #e7e8ec;
  --soft: #f6f7f9;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Consolas, 'Cascadia Mono', monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 16px 48px; text-align: center;
}
.hero h1 { margin: 0 0 32px; }
.logo { display: block; width: min(460px, 82vw); height: auto; }
.lede {
  max-width: 600px; margin: 0 0 36px;
  font-size: clamp(17px, 2.2vw, 19px); line-height: 1.6; color: var(--text);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { border-color: #cfd2d9; background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(10, 71, 255, .25); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible, .link:focus-visible, .copy:focus-visible, .os-switch button:focus-visible { outline: 3px solid rgba(10, 71, 255, .35); outline-offset: 2px; }
.meta { margin: 28px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Setup ---------- */
.setup { max-width: 1040px; margin: 0 auto; padding: 72px 16px 56px; border-top: 1px solid var(--line); scroll-margin-top: 0; }
.setup h2 { margin: 0 0 10px; text-align: center; font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.intro { max-width: 640px; margin: 0 auto 40px; text-align: center; color: var(--muted); text-wrap: pretty; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.steps li:target, .steps li.flash { border-color: var(--blue); }
.num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 14px;
}
.steps h3 { margin: 6px 0 0; font-size: 17px; color: var(--ink); }
.steps p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.link {
  margin-top: auto; padding: 6px 0 0; border: 0; background: none; cursor: pointer;
  color: var(--blue); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.link:hover { text-decoration: underline; }
.cmd {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--ink);
}
.cmd code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: #e9ecf2; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.copy {
  flex: none; padding: 4px 10px; border-radius: 7px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 12.5px; font-weight: 600;
}
.copy:hover { background: rgba(255, 255, 255, .24); }
.os-switch { display: inline-flex; margin-top: auto; padding: 3px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); }
.os-switch button { padding: 3px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.os-switch button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.fine { margin: 28px auto 0; max-width: 720px; text-align: center; font-size: 13.5px; color: var(--muted); }

.foot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 16px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}
.foot img { width: 110px; height: auto; filter: grayscale(1); opacity: .5; }

/* ---------- Agreement ---------- */
dialog {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0;
  border: 0; border-radius: 18px; color: var(--text);
  box-shadow: 0 30px 80px rgba(10, 20, 50, .25), 0 0 0 1px var(--line);
}
dialog[open] { display: flex; animation: pop .2s ease-out; }
dialog::backdrop { background: rgba(15, 20, 35, .35); backdrop-filter: blur(4px); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
dialog form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
dialog header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
dialog h2 { flex: 1; margin: 0; font-size: 17px; color: var(--ink); }
.x { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--soft); font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.x:hover { color: var(--ink); }
.terms { flex: 1 1 auto; min-height: 120px; max-height: 40svh; overflow: auto; padding: 8px 22px 16px; font-size: 14px; line-height: 1.6; border-bottom: 1px solid var(--line); }
.terms h3 { margin: 16px 0 4px; font-size: 14px; color: var(--ink); }
.terms p { margin: 0 0 6px; }
.terms ul { margin: 0; padding-left: 20px; }
.permissions { margin: 0; padding: 14px 22px 4px; border: 0; }
.permissions legend { padding: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.permissions label { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.permissions input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
dialog footer .btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10; max-width: calc(100vw - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2); transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .actions { flex-direction: column; width: 100%; max-width: 340px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
