/* App design system: the landing page's tokens (site/src/layouts/Base.astro, DESIGN.md) for app screens. */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: dark;
  --ground: #0b0c0e; --raise-1: #111317; --raise-2: #16191e; --raise-3: #1d2127;
  --line: #23272e; --line-strong: #30353e;
  --ink: #eceef1; --ink-2: #a9afb9; --ink-3: #858c98;
  --mint: #6ee7c5; --mint-wash: rgba(110, 231, 197, 0.09); --rose: #f08a8a;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; caret-color: var(--mint); }
::selection { background: rgba(110, 231, 197, 0.28); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-2); }
h1 { margin: 0; font-weight: 560; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-feature-settings: "zero"; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Auth shell: a lit, grained stage like the landing hero. */
.auth { position: relative; isolation: isolate; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 20px 16px; overflow: hidden; }
.auth::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -30vh; width: 140vw; max-width: 1400px; height: 80vh; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(220, 226, 235, 0.09), rgba(220, 226, 235, 0.02) 50%, transparent 72%); pointer-events: none; }
.auth::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.04; pointer-events: none; }
.auth-top { width: min(1160px, 100%); margin-inline: auto; height: 40px; display: flex; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.auth-main { display: grid; place-items: center; padding: 40px 0 56px; }
.card { position: relative; width: min(400px, 100%); padding: 32px 28px 28px; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(180deg, rgba(29, 33, 39, 0.72), rgba(17, 19, 23, 0.88)); backdrop-filter: blur(8px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.card::before { content: ""; position: absolute; top: -1px; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, rgba(236, 238, 241, 0.45), transparent); }
.card h1 { font-size: 24px; line-height: 1.2; }
.card .sub { margin-top: 8px; color: var(--ink-2); }
.card .sub b { color: var(--ink); font-weight: 560; }
.stack { display: grid; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 16px; font: 560 14.5px var(--sans); letter-spacing: -0.01em; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--raise-2); color: var(--ink); cursor: pointer; text-decoration: none; transition: background 0.2s, border-color 0.2s, transform 0.15s var(--ease-out); }
.btn:hover { background: var(--raise-3); border-color: #3e4550; }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn.primary:hover { background: #fff; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: flex; gap: 6px; padding: 5px; background: var(--raise-1); border: 1px solid var(--line-strong); border-radius: calc(var(--r) + 3px); transition: border-color 0.2s, box-shadow 0.2s; }
.field:focus-within { border-color: #3e4550; box-shadow: 0 0 0 4px rgba(110, 231, 197, 0.08); }
.field input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; font: inherit; border: 0; background: transparent; color: var(--ink); outline: none; }
.field input::placeholder { color: var(--ink-3); }
.field .btn { width: auto; height: 36px; flex: none; }
.status { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); min-height: 0; }
.status:empty { display: none; }
.status.error { color: var(--rose); }
.fine { margin-top: 22px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.fine a { color: var(--ink-2); }
.auth-foot { text-align: center; color: var(--ink-3); font-size: 12.5px; }
.auth-foot a { color: var(--ink-3); text-decoration: none; margin: 0 8px; }
.auth-foot a:hover { color: var(--ink); }

/* Sent state */
.sent { text-align: center; }
.sent .mail { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 14px; background: var(--mint-wash); color: var(--mint); border: 1px solid rgba(110, 231, 197, 0.18); }
.sent .mail svg { width: 24px; height: 24px; }
.sent .addr { display: block; margin: 2px 0; overflow-wrap: anywhere; }
.linkbtn { margin-top: 18px; background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

/* Consent: app ↔ datatomcp link */
.link { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 22px; }
.tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--raise-3); border: 1px solid var(--line-strong); font: 600 20px var(--sans); color: var(--ink); overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.wire { position: relative; width: 64px; height: 1px; margin: 0 6px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); overflow: hidden; }
.wire::after { content: ""; position: absolute; top: -1px; left: -40%; width: 40%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--mint)); animation: travel 2s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes travel { to { left: 100%; } }
.consent h1 { text-align: center; font-size: 21px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise-1); font-size: 13.5px; color: var(--ink-2); }
.who b { color: var(--ink); font-weight: 560; overflow-wrap: anywhere; }
.perms { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.perms li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.perms svg { width: 16px; height: 16px; margin-top: 3px; color: var(--mint); }
.perms small { display: block; color: var(--ink-3); font-size: 12.5px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.host { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.host code { color: var(--ink-2); font-size: 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
.card { animation: rise 0.7s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .wire::after { animation: none; opacity: 0; } }
@media (max-width: 420px) { .card { padding: 26px 20px 22px; } .field { flex-direction: column; } .field .btn { width: 100%; height: 40px; } }
