@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f5f3ee;
  --bg-2: #efece5;
  --surface: #fdfcfa;
  --ink: #1c1b18;
  --ink-2: #4a473f;
  --muted: #858074;
  --line: #e4e0d6;
  --line-2: #d6d1c4;
  --accent: #b4532a;
  --accent-soft: #f3e3d8;
  --ok: #3f7a52;
  --danger: #b23a2e;
  --danger-soft: #f6e1dd;
  --btn: #1c1b18;
  --btn-ink: #f8f6f1;
  --focus: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent);
  --shadow: 0 1px 0 rgba(28,27,24,.03), 0 12px 40px -16px rgba(28,27,24,.14);
  --radius: 14px;
  --serif: "Fraunces", "Iowan Old Style", Charter, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110f; --bg-2: #181715; --surface: #1b1a17; --ink: #ecebe5; --ink-2: #c3c0b6; --muted: #8d897e;
    --line: #2a2824; --line-2: #37342e; --accent: #e08a5f; --accent-soft: #3a2519; --ok: #7fb38e;
    --danger: #ec7f71; --danger-soft: #3a1d19; --btn: #ecebe5; --btn-ink: #12110f;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 16px 48px -20px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12110f; --bg-2: #181715; --surface: #1b1a17; --ink: #ecebe5; --ink-2: #c3c0b6; --muted: #8d897e;
  --line: #2a2824; --line-2: #37342e; --accent: #e08a5f; --accent-soft: #3a2519; --ok: #7fb38e;
  --danger: #ec7f71; --danger-soft: #3a1d19; --btn: #ecebe5; --btn-ink: #12110f;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 16px 48px -20px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
::selection { background: var(--accent-soft); }

/* ---------- Logo ---------- */
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font: 500 19px/1 var(--serif); letter-spacing: 0; flex: none; }
.mark.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 28px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 19px/1 var(--serif); letter-spacing: -0.01em; }

/* ---------- Auth split layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.split-aside {
  position: relative; overflow: hidden; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg-2); border-right: 1px solid var(--line);
}
.split-aside::after {
  content: ""; position: absolute; inset: auto -20% -35% auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.aside-copy { max-width: 440px; position: relative; z-index: 1; }
.aside-copy h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; margin-bottom: 18px; }
.aside-copy h2 em { font-style: italic; color: var(--accent); }
.aside-copy p { color: var(--ink-2); font-size: 16px; max-width: 380px; }
.apps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 2px; position: relative; z-index: 1; }
.apps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.apps li:last-child { border-bottom: 1px solid var(--line); }
.apps .glyph { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 500 15px/1 var(--serif);
  background: var(--surface); border: 1px solid var(--line); }
.apps b { font-weight: 500; display: block; font-size: 14.5px; }
.apps span { color: var(--muted); font-size: 13px; }
.aside-foot { color: var(--muted); font-size: 12.5px; position: relative; z-index: 1; display: flex; gap: 18px; }
.aside-foot a { text-decoration: none; }

.split-main { display: flex; flex-direction: column; padding: 28px 32px; }
.topbar-mini { display: flex; justify-content: flex-end; gap: 6px; }
.center { flex: 1; display: grid; place-items: center; padding: 32px 0; }
.form-wrap { width: 100%; max-width: 380px; }
.form-wrap h1 { font-size: 30px; line-height: 1.15; margin-bottom: 6px; }
.lede { color: var(--muted); margin-bottom: 28px; }
.lede strong { color: var(--ink); font-weight: 500; }

/* ---------- Form controls ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; }
.field label a { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.hint { font-size: 12.5px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; font: 500 14.5px/1 var(--sans); cursor: pointer; text-decoration: none;
  transition: transform .06s ease, background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-quiet { background: transparent; color: var(--ink-2); height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-quiet:hover { background: var(--bg-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .92; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; margin: 22px 0; text-transform: lowercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.alt { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.alt a { color: var(--ink); font-weight: 500; }
.legal { margin-top: 26px; font-size: 12.5px; color: var(--muted); text-align: center; }

.notice { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.notice.err { border-color: color-mix(in oklab, var(--danger) 40%, transparent); background: var(--danger-soft); color: var(--danger); }
.notice.ok { border-color: color-mix(in oklab, var(--ok) 40%, transparent); color: var(--ok); }
[hidden] { display: none !important; }

/* ---------- Icon buttons, switchers ---------- */
.iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--bg-2); color: var(--ink); }
.iconbtn svg { width: 17px; height: 17px; }
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; height: 34px; align-items: center; }
.langsw button { border: 0; background: transparent; color: var(--muted); font: 500 12px/1 var(--sans); letter-spacing: .04em; padding: 0 9px; height: 28px; border-radius: 7px; cursor: pointer; }
.langsw button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sun { display: none; }
:root[data-theme="dark"] .sun { display: block; } :root[data-theme="dark"] .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sun { display: block; } :root:not([data-theme="light"]) .moon { display: none; } }

/* ---------- Consent ---------- */
.solo { min-height: 100vh; display: flex; flex-direction: column; padding: 24px 28px; }
.solo-top { display: flex; justify-content: space-between; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.consent { width: 100%; max-width: 440px; padding: 36px; }
.pair { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 26px; }
.pair .dots { display: flex; gap: 5px; } .pair .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.appglyph { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font: 500 24px/1 var(--serif);
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 20%, transparent); overflow: hidden; }
.appglyph img { width: 100%; height: 100%; object-fit: cover; }
.consent h1 { font-size: 24px; line-height: 1.25; text-align: center; margin-bottom: 22px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 22px; }
.who .meta { flex: 1; min-width: 0; } .who .meta small { display: block; color: var(--muted); font-size: 12px; }
.who .meta b { font-weight: 500; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center;
  font: 500 14px/1 var(--sans); color: var(--ink-2); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.scopes-h { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.scopes { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.scopes li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.scopes svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.footnote { margin-top: 20px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- App shell (account / developers / legal) ---------- */
.shell-top { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(12px); background: color-mix(in oklab, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.shell-top .in { max-width: 920px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 22px; }
.shell-nav { display: flex; gap: 2px; flex: 1; }
.shell-nav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 7px 11px; border-radius: 8px; }
.shell-nav a:hover { color: var(--ink); }
.shell-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.shell-tools { display: flex; align-items: center; gap: 6px; }
.page { max-width: 920px; margin: 0 auto; padding: 48px 24px 96px; }
.page-head { margin-bottom: 36px; display: flex; align-items: center; gap: 18px; }
.page-head h1 { font-size: 34px; line-height: 1.1; }
.page-head p { color: var(--muted); margin-top: 6px; }
.section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.section-h h2 { font-size: 19px; margin-bottom: 6px; }
.section-h p { color: var(--muted); font-size: 13.5px; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 500; display: block; }
.row small { color: var(--muted); font-size: 13px; display: block; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 35%, transparent); }
.badge.accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; }
.dev-ico { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex: none; background: var(--surface); }
.dev-ico svg { width: 18px; height: 18px; }
.danger-box { border: 1px solid color-mix(in oklab, var(--danger) 30%, var(--line)); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.empty { color: var(--muted); font-size: 14px; padding: 18px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; }

/* developers */
.endpoint { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.endpoint:last-child { border-bottom: 0; }
.endpoint span { color: var(--muted); font-size: 13px; }
.endpoint code, code.inl { font: 12.5px/1.5 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
pre.code { margin: 0; padding: 18px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font: 12.5px/1.65 var(--mono); overflow-x: auto; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 12.5px/1 var(--mono); padding: 7px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }

/* legal */
.prose { max-width: 660px; }
.prose h1 { font-size: 38px; margin-bottom: 8px; }
.prose h2 { font-size: 21px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose .updated { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }
.foot { max-width: 920px; margin: 0 auto; padding: 0 24px 40px; display: flex; gap: 18px; color: var(--muted); font-size: 12.5px; }
.foot a { text-decoration: none; }

.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } .btn { transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-aside { display: none; }
  .split-main { padding: 18px 16px; }
  .mobile-brand { display: flex !important; }
  .center { place-items: start center; padding-top: 7vh; }
  .section { grid-template-columns: 1fr; gap: 16px; }
  .endpoint { grid-template-columns: 1fr auto; } .endpoint span { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .consent { padding: 26px 20px; border-radius: 16px; }
  .solo { padding: 16px; }
  .shell-top .in { padding: 0 16px; gap: 10px; }
  .shell-nav a { padding: 7px 8px; }
  .page { padding: 32px 16px 72px; }
  .page-head h1 { font-size: 28px; }
  .inline-form { flex-direction: column; }
  .hide-sm { display: none !important; }
}
.mobile-brand { display: none; align-items: center; flex: 1; }
