@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  --bg: #0f172a; --surface: #1e293b; --surface-2: #263348; --border: #334155;
  --text: #f1f5f9; --muted: #94a3b8; --faint: #64748b;
  --accent: #06b6d4; --accent-2: #8b5cf6; --warn: #fbbf24; --danger: #f87171;
  --radius: 12px; --max: 720px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --border: #cbd5e1;
    --text: #0f172a; --muted: #475569; --faint: #64748b;
    --accent: #0e7490; --accent-2: #6d28d9; --warn: #b45309; --danger: #b91c1c;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 'Inter', system-ui, sans-serif; }
main { max-width: var(--max); margin: 0 auto; padding: 24px 16px 64px; }
.top, .foot { max-width: var(--max); margin: 0 auto; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.foot { color: var(--faint); font-size: 14px; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; letter-spacing: .02em; }
a { color: var(--accent); }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 16px; }
h2 { font-size: 20px; margin-top: 32px; }
code, .phrase, .seal-label, input[readonly] { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 0; cursor: pointer; color: #0b1120; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--danger); color: #0b1120; }
button:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; margin: 12px 0; }
input, select { font: inherit; width: 100%; padding: 10px 12px; margin-top: 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
label.check { display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; margin: 0; }
.compose-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.compose-header h1 { margin: 0; }
.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px 16px; text-align: center; background: var(--surface); cursor: pointer; }
.drop-zone.over { border-color: var(--accent); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-list { list-style: none; padding: 0; margin: 16px 0; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.options { display: grid; gap: 4px; margin: 16px 0 24px; }
progress { width: 100%; height: 12px; accent-color: var(--accent); }
.seal { display: flex; justify-content: center; margin: 16px 0 8px; cursor: pointer; }
.seal svg { max-width: 100%; height: auto; transition: transform .8s ease; }
.seal.rising svg { transform: translateY(-6px); }
.seal-label { text-align: center; font-size: 18px; letter-spacing: .04em; }
.phrase { font-size: 22px; padding: 12px; border-radius: 8px; background: var(--surface); text-align: center; }
.timeline { padding-left: 20px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.prose th, .prose td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .seal svg { transition: none; } }
.kofi { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; background: #06b6d4; color: #082f38; font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25); }
.kofi img { display: block; }
.kofi:active { transform: translateY(1px); }
body { padding-bottom: 72px; }
.add-passkey { margin-top: 32px; }
.add-passkey summary { cursor: pointer; color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); }
.diagram { display: block; width: 100%; max-width: 420px; margin: 24px auto; }
.diagram rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.diagram text { fill: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 12px; }
.diagram text.name { font-size: 15px; font-weight: 600; }
.diagram text.sub { fill: var(--muted); }
.diagram line { stroke: var(--accent); stroke-width: 2; }
.diagram marker path { fill: var(--accent); }
.prose td { vertical-align: top; }
