/* ==========================================================================
   Onnisoft apps · Direction A "Native": the apps continue onnisoft.site.
   Black ground, white ink, Archivo, grain gradients used once per page,
   large type instead of boxes, thin line icons (never in tiles).
   Motion: transform/opacity/clip-path only, strong ease-out, hover gated.
   ========================================================================== */

:root {
  --night: #050507;
  --tone-1: #0b0c0f;
  --tone-2: #0f1013;
  --tone-3: #121318;
  --tone-4: #191b21;
  --white: #ffffff;
  --soft: #c7cbd6;
  --muted: #a3a8b4;
  --faint: #6f7480;
  --green: #1fcb8b;
  --amber: #ffb524;
  --red: #ff5c6c;
  --accent: #1fcb8b;
  --accent-ink: #050507;
  --hero-deep: #06402e;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
.surface-hub { --accent: #1a4bff; --accent-ink: #ffffff; --hero-deep: #0b1b66; }
.surface-admin { --accent: #3d8bff; --accent-ink: #050507; --hero-deep: #0b2552; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--night); color: var(--white); font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--white); text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 4px; }
code, .mono { font: 15px/1.5 var(--mono); color: var(--soft); word-break: break-all; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; }
p { margin: 0; }
.hint, .muted { color: var(--muted); font-size: 15px; margin-top: 4px; }
.lead { color: var(--soft); max-width: 60ch; font-size: 19px; margin: 0 0 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.ico { display: inline-block; flex: 0 0 auto; vertical-align: -3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease-out); }
::view-transition-group(nav-active) { animation-duration: 340ms; animation-timing-function: var(--ease-out); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  font: 600 16px/1 var(--font); color: var(--white); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn .ico { width: 17px; height: 17px; }
.btn .arrow { transition: transform 260ms var(--ease-out); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-white, .btn-social { background: var(--white); color: var(--night); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.btn-quiet { background: transparent; color: var(--soft); padding: 0 12px; }
.btn-danger { background: rgba(255, 92, 108, 0.12); color: #ff97a1; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
  .btn-white:hover, .btn-social:hover { background: #e3e6ee; }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
  .btn-quiet:hover { color: var(--white); }
  .btn-danger:hover { background: rgba(255, 92, 108, 0.2); }
  .btn:hover .arrow { transform: translateX(4px); }
}
.link { display: inline-flex; align-items: center; gap: 7px; color: var(--white); font-size: 16px; text-decoration: none; }
.link .ico { width: 16px; height: 16px; transition: transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration: underline; } .link:hover .ico { transform: translateX(3px); } }

/* --------------------------------------------------------------- forms */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 14.5px; font-weight: 600; color: var(--soft); }
.input {
  width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 14px;
  background: var(--tone-3); color: var(--white); font: 16px var(--font);
  transition: background-color 160ms ease, box-shadow 200ms ease;
}
textarea.input { padding: 14px 18px; line-height: 1.5; resize: vertical; }
textarea.input.mono, .input.mono { font-family: var(--mono); font-size: 14px; }
select.input { appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a8b4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; }
.input[type="color"] { padding: 6px; height: 52px; cursor: pointer; }
.input:hover { background-color: var(--tone-4); }
.input:focus-visible { outline: none; background-color: var(--tone-4); box-shadow: 0 0 0 2px var(--accent); }
.input::placeholder { color: var(--faint); }
.input:disabled { opacity: 0.55; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; cursor: pointer; color: var(--soft); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: 0 0 auto; }
.c-form { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.c-search { display: flex; gap: 10px; margin-bottom: 22px; max-width: 560px; }
.h-fieldset { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 18px; }
.h-fieldset legend { font-size: 14.5px; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.h-inline { display: inline-block; width: auto; min-height: 40px; padding: 0 40px 0 14px; font-size: 14.5px; margin-right: 6px; }

/* Toggle rows */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-radius: 16px; cursor: pointer; transition: background-color 160ms ease; }
.toggle + .toggle { margin-top: 4px; }
.toggle-text { display: flex; align-items: center; gap: 16px; min-width: 0; }
.toggle-text > .ico, .toggle-text > svg { width: 22px; height: 22px; color: var(--soft); flex: 0 0 auto; }
.toggle-text strong { display: block; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.toggle-text small { display: block; color: var(--muted); font-size: 14.5px; }
.toggle input { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto; width: 46px; height: 26px; margin: 0; border-radius: 999px; background: var(--tone-4); cursor: pointer; transition: background-color 220ms ease; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #c9ccd4; transition: transform 260ms var(--ease-out), background-color 200ms ease; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(20px); background: #fff; }
.toggle input:disabled { opacity: 0.35; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .toggle:hover { background: var(--tone-2); } }

/* --------------------------------------------------------------- feedback */
.alert { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 24px; padding: 16px 20px; border-radius: 16px; background: var(--tone-2); color: var(--soft); font-size: 16px; animation: rise 420ms var(--ease-out) both; }
.alert .ico { width: 19px; height: 19px; margin-top: 2px; }
.alert-error { background: rgba(255, 92, 108, 0.1); color: #ffc4ca; }
.alert-error .ico { color: var(--red); }
.alert-ok .ico { color: var(--green); }
.alert-info .ico { color: var(--soft); }
.tag, .badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--soft); font-size: 13px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.state-ok { color: var(--green); }
.state-warn { color: var(--amber); }
.state-bad { color: #ff8a96; }

/* --------------------------------------------------------------- shell */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px 28px;
  padding: 18px 32px; background: rgba(5, 5, 7, 0.82); backdrop-filter: blur(14px) saturate(140%);
}
.top-left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variation-settings: "wdth" 112; white-space: nowrap; }
.brand-mark { display: inline-flex; color: var(--accent); }
.surface-hub .brand-mark { color: #6d8dff; }
.ctx { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); text-decoration: none; font-size: 16px; white-space: nowrap; }
.ctx .ico { width: 15px; height: 15px; }
.nav { display: flex; align-items: center; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--muted); text-decoration: none; font-size: 15.5px; font-weight: 500; white-space: nowrap; transition: color 160ms ease; }
.nav a .ico { width: 16px; height: 16px; }
.nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); view-transition-name: nav-active; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--white); } }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.who form { margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--soft); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .ico { width: 17px; height: 17px; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); } }
@media (max-width: 1100px) {
  .top { flex-wrap: wrap; padding: 14px 20px; }
  .nav { order: 3; width: 100%; }
  .who .email { display: none; }
}

.page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 8px 32px 96px; }
@media (max-width: 700px) { .page { padding: 8px 16px 72px; } }

/* --------------------------------------------------------------- hero band */
.hero {
  position: relative; isolation: isolate; overflow: hidden; margin: 8px 0 0; padding: 44px 44px 40px; border-radius: 24px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
  background: radial-gradient(90% 120% at 92% 0%, var(--accent) 0%, var(--hero-deep) 40%, var(--night) 84%);
  animation: wipe 900ms var(--ease-io) both;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: 0.32; mix-blend-mode: overlay; pointer-events: none; }
.hero-cobalt { background: linear-gradient(180deg, #050507 0%, #050a26 30%, #0b1b66 64%, #1a4bff 100%); }
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 32px; }
.hero-title { margin: 0; font-size: clamp(48px, 7.2vw, 104px); line-height: 0.92; letter-spacing: -0.045em; font-weight: 600; font-variation-settings: "wdth" 112; animation: rise 800ms var(--ease-out) 200ms both; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 18px; color: rgba(255, 255, 255, 0.86); animation: rise 800ms var(--ease-out) 280ms both; }
.hero-meta code { color: #fff; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; animation: rise 800ms var(--ease-out) 340ms both; }
.hero-statement { max-width: 24em; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.35; letter-spacing: -0.01em; animation: rise 800ms var(--ease-out) 200ms both; }
.hero-wordmark { margin: 0 0 -0.12em -0.04em; font-size: clamp(64px, 11.6vw, 172px); line-height: 0.8; letter-spacing: -0.05em; font-weight: 700; white-space: nowrap; overflow: hidden; animation: rise 900ms var(--ease-out) 260ms both; }
.hero.has-wordmark { justify-content: space-between; min-height: 300px; padding-bottom: 0; }
@keyframes wipe { from { clip-path: inset(0 0 100% 0 round 24px); } to { clip-path: inset(0 0 0 0 round 24px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Plain page heading (pages without a hero) */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 28px; padding: 36px 0 8px; }
.head-title, .c-h1 { margin: 0; font-size: clamp(40px, 4.6vw, 64px); line-height: 0.98; letter-spacing: -0.04em; font-weight: 600; font-variation-settings: "wdth" 112; animation: rise 700ms var(--ease-out) both; }
.head-desc { margin-top: 12px; max-width: 58ch; color: var(--muted); font-size: 18px; animation: rise 700ms var(--ease-out) 60ms both; }
.head .hero-actions { animation-delay: 100ms; }

/* --------------------------------------------------------------- numbers */
.numbers, .c-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 40px; margin: 0; padding: 56px 12px 8px; }
.num-value, .c-stats dd { margin: 0; font-size: clamp(56px, 6.4vw, 96px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-label, .c-stats dt { margin-top: 12px; color: var(--muted); font-size: 18px; }
.c-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.numbers > div, .c-stats > div { animation: rise 700ms var(--ease-out) both; }
.numbers > div:nth-child(2), .c-stats > div:nth-child(2) { animation-delay: 60ms; }
.numbers > div:nth-child(3), .c-stats > div:nth-child(3) { animation-delay: 120ms; }
.numbers > div:nth-child(4), .c-stats > div:nth-child(4) { animation-delay: 180ms; }

/* --------------------------------------------------------------- sections */
.section, .c-section { margin-top: 64px; animation: rise 700ms var(--ease-out) 120ms both; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 18px; }
.section h2, .c-section > h2, .h2 { margin: 0; font-size: clamp(28px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; font-variation-settings: "wdth" 112; }
.c-section > h2 { margin-bottom: 14px; }
.c-section > .hint:first-of-type { margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 72px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
@media (max-width: 960px) { .cols, .cols-2 { grid-template-columns: minmax(0, 1fr); } }
.prose-lg { font-size: 22px; line-height: 1.38; letter-spacing: -0.01em; max-width: 30em; }
.prose-lg em { font-style: normal; color: var(--accent); }
.surface-hub .prose-lg em { color: #8aa6ff; }
.facts { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; color: var(--soft); font-size: 16px; }
.facts span { display: inline-flex; align-items: center; gap: 10px; }
.facts .ico { width: 17px; height: 17px; color: var(--muted); }

/* Big rows (the site's project list) */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.row, a.bigrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 24px;
  padding: 18px 20px; border-radius: 16px; text-decoration: none; transition: background-color 180ms ease;
}
.row p { margin: 3px 0 0; }
.row > div:first-child { min-width: 0; }
.row strong { font-weight: 600; }
.bigrow-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bigrow-main > .ico, .bigrow-main > svg { width: 24px; height: 24px; color: var(--soft); flex: 0 0 auto; }
.bigrow-title { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.02em; font-weight: 500; transition: transform 320ms var(--ease-out); display: inline-block; }
.bigrow-sub { display: block; margin-top: 3px; color: var(--faint); font: 14px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bigrow-meta { color: var(--muted); font-size: 15.5px; text-align: right; white-space: nowrap; }
.rows > li:first-child > .row, .rows > .row:first-child, .bigrow.is-current { background: var(--tone-2); }
@media (hover: hover) and (pointer: fine) {
  .row:hover, a.bigrow:hover { background: var(--tone-2); }
  a.bigrow:hover .bigrow-title { transform: translateX(8px); }
}
.row-actions, .c-row-actions, .c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-actions { margin-top: 16px; }
.row-actions form, .c-row-actions form, .c-actions form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* Key/value */
.kv, .c-kv { margin: 0 0 18px; display: flex; flex-direction: column; gap: 14px; }
.kv > div, .c-kv > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.kv dt, .c-kv dt { color: var(--muted); font-size: 15.5px; }
.kv dd, .c-kv dd { margin: 0; min-width: 0; font-size: 16.5px; }
@media (max-width: 640px) { .kv > div, .c-kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Copyable value */
.copy { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; }
.copy code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; color: var(--white); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 4px 0; border: 0; background: none; color: var(--muted); font: 500 14.5px var(--font); cursor: pointer; transition: color 160ms ease; }
.copy-btn .ico { width: 15px; height: 15px; }
[data-copy] .ico-done, [data-copy] .lbl-done { display: none; }
.copy-btn.copied { color: var(--green); }
[data-copy].copied .ico-copy, [data-copy].copied .lbl-copy { display: none; }
[data-copy].copied .ico-done, [data-copy].copied .lbl-done { display: inline; }
@media (hover: hover) and (pointer: fine) { .copy-btn:hover { color: var(--white); } }
.secret { color: var(--accent) !important; }
.code, pre.code { position: relative; margin: 16px 0 0; padding: 22px 24px; border-radius: 18px; background: var(--tone-2); overflow-x: auto; }
.code code { word-break: normal; white-space: pre; font-size: 14px; color: #dfe3ea; }
.code .copy-btn { position: absolute; top: 14px; right: 18px; }

/* Tables */
.c-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 16px; }
.c-table th { text-align: left; color: var(--faint); font-weight: 500; font-size: 14px; padding: 6px 18px; white-space: nowrap; }
.c-table td { padding: 16px 18px; vertical-align: middle; background: var(--tone-1); }
.c-table td:first-child { border-radius: 14px 0 0 14px; }
.c-table td:last-child { border-radius: 0 14px 14px 0; }
.c-table tbody tr { transition: background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .c-table tbody tr:hover td { background: var(--tone-2); } }
.table-scroll { overflow-x: auto; }
@media (max-width: 760px) {
  .c-table, .c-table thead, .c-table tbody, .c-table tr, .c-table td, .c-table th { display: block; }
  .c-table thead { display: none; }
  .c-table tr { margin-bottom: 6px; border-radius: 14px; background: var(--tone-1); padding: 12px 16px; }
  .c-table td { padding: 3px 0; background: none; border-radius: 0 !important; }
}

/* Empty state: a sentence, not an illustration */
.empty { padding: 36px 20px; border-radius: 18px; background: var(--tone-1); }
.empty p { font-size: 19px; color: var(--soft); max-width: 40ch; }
.empty .btn, .empty .link { margin-top: 16px; }

/* Activity lines */
.lines { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px 24px; font-size: 17px; }
.lines time { color: var(--faint); font-variant-numeric: tabular-nums; }

details.danger { margin-top: 18px; }
details.danger summary, details.fold > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
details.danger summary { color: #ff97a1; }
details summary::-webkit-details-marker { display: none; }
.chev { transition: transform 240ms var(--ease-out); }
details[open] > summary .chev { transform: rotate(90deg); }

/* Folding provider rows (sign-in methods) */
details.fold { border-radius: 16px; transition: background-color 180ms ease; }
details.fold + details.fold { margin-top: 4px; }
details.fold > summary { display: flex; width: 100%; justify-content: space-between; padding: 18px 20px; }
details.fold > summary .bigrow-main { flex: 1; }
details.fold[open] { background: var(--tone-1); }
.fold-body { padding: 0 20px 24px 60px; animation: rise 380ms var(--ease-out) both; }
@media (hover: hover) and (pointer: fine) { details.fold:not([open]) > summary:hover { background: var(--tone-1); border-radius: 16px; } }
@media (max-width: 640px) { .fold-body { padding-left: 20px; } }

/* Product symbols in product colours */
.c-onus { color: #1fcb8b; } .c-flight { color: #3db8ff; } .c-relay { color: #ff6a2b; } .c-helen { color: #ff4766; } .c-horizon { color: #ffb524; }

/* ======================================================================
   Hosted sign-in: the site hero on the left, the form on the right
   ====================================================================== */
.surface-auth { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 540px); min-height: 100vh; }
.auth-art {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 28px 32px 0;
  background: linear-gradient(180deg, #050507 0%, color-mix(in srgb, var(--accent) 8%, #050507) 32%, color-mix(in srgb, var(--accent) 38%, #050507) 66%, var(--accent) 100%);
}
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: 0.34; mix-blend-mode: overlay; pointer-events: none; }
.auth-art-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth-art-top .brand { font-size: 20px; }
.auth-art-top a:not(.brand) { color: var(--soft); text-decoration: none; font-size: 15px; }
.auth-statement { display: flex; flex-direction: column; gap: 12px; animation: rise 800ms var(--ease-out) 160ms both; }
.auth-statement p:first-child { max-width: 15em; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; }
.auth-statement p + p { max-width: 34em; color: rgba(255, 255, 255, 0.82); font-size: 17px; }
.auth-wordmark { margin: 0 0 -0.11em -0.05em; font-size: clamp(72px, 14.2vw, 212px); line-height: 0.8; letter-spacing: -0.05em; font-weight: 700; white-space: nowrap; overflow: hidden; padding-top: 0.04em; }
.auth-wordmark span { display: inline-block; animation: letter 1200ms var(--ease-out) both; }
.auth-wordmark span:nth-child(1) { animation-delay: 200ms; } .auth-wordmark span:nth-child(2) { animation-delay: 240ms; }
.auth-wordmark span:nth-child(3) { animation-delay: 280ms; } .auth-wordmark span:nth-child(4) { animation-delay: 320ms; }
.auth-wordmark span:nth-child(5) { animation-delay: 360ms; } .auth-wordmark span:nth-child(6) { animation-delay: 400ms; }
.auth-wordmark span:nth-child(7) { animation-delay: 440ms; } .auth-wordmark span:nth-child(8) { animation-delay: 480ms; }
.auth-wordmark span:nth-child(n + 9) { animation-delay: 520ms; }
@keyframes letter { from { transform: translateY(105%); } to { transform: none; } }

.auth-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 28px clamp(24px, 4vw, 64px) 32px; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 0; display: flex; flex-direction: column; animation: rise 700ms var(--ease-out) 120ms both; }
.auth-card.wide { max-width: 640px; }
.auth-icon { margin-bottom: 22px; color: var(--accent); }
.auth-icon .ico { width: 34px; height: 34px; }
.auth-title { margin: 0; font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -0.035em; font-weight: 600; font-variation-settings: "wdth" 112; }
.auth-lead { margin: 12px 0 30px; color: var(--muted); font-size: 17px; }
.auth-or { margin: 4px 0; text-align: center; color: var(--faint); font-size: 14.5px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.auth-foot a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.auth-foot svg { color: var(--green); }
.method { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 16.5px var(--font); text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.method:active { transform: scale(0.98); }
.method .ico, .method svg { width: 19px; height: 19px; }
.method .arrow { margin-left: auto; transition: transform 260ms var(--ease-out); }
.method-main { background: var(--white); color: var(--night); }
.method-alt { background: rgba(255, 255, 255, 0.08); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .method-main:hover { background: #e3e6ee; } .method-alt:hover { background: rgba(255, 255, 255, 0.14); } .method:hover .arrow { transform: translateX(4px); } }

.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { width: 100%; height: 64px; text-align: center; font: 600 26px var(--mono); color: var(--white); border: 0; border-radius: 14px; background: var(--tone-3); caret-color: var(--accent); transition: box-shadow 200ms ease, transform 160ms var(--ease-out), background-color 160ms ease; }
.otp input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); transform: translateY(-2px); background: var(--tone-4); }
.otp input.filled { background: var(--tone-4); }

.acct-block { margin-top: 44px; }
.acct-block h2 { margin: 0 0 12px; font-size: 26px; letter-spacing: -0.025em; font-variation-settings: "wdth" 112; }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { gap: 20px; padding: 20px 20px 0; }
  .auth-statement p + p { display: none; }
  .auth-statement p:first-child { font-size: 24px; }
  .auth-wordmark { font-size: 22vw; }
  .auth-panel { padding: 8px 20px 24px; }
}

/* Centered fallback (tiny pages) */
.auth-main { flex: 1; display: flex; justify-content: center; align-items: center; padding: 64px 20px; }
.auth-col { width: 100%; max-width: 440px; }
.auth-glow { display: none; }

/* ======================================================================
   Landing pages (Onus home, Hub welcome): the site hero, full screen
   ====================================================================== */
.home {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px 32px 0;
  background: linear-gradient(180deg, #050507 0%, color-mix(in srgb, var(--accent) 7%, #050507) 30%, color-mix(in srgb, var(--accent) 36%, #050507) 64%, var(--accent) 100%);
}
.home::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: 0.32; mix-blend-mode: overlay; pointer-events: none; }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.home-copy { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; margin-top: auto; padding-bottom: 32px; }
.home-lead { max-width: 17em; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; animation: rise 900ms var(--ease-out) 700ms both; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; animation: rise 900ms var(--ease-out) 800ms both; }
.home-feats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; color: rgba(255, 255, 255, 0.82); font-size: 15px; }
.home-feats span { display: inline-flex; align-items: center; gap: 8px; }
.home-feats .ico { width: 16px; height: 16px; }
.home-word { margin: 0 0 -0.11em -0.05em; font-size: 21vw; line-height: 0.8; letter-spacing: -0.05em; font-weight: 700; white-space: nowrap; overflow: hidden; padding-top: 0.04em; }
.home-word span { display: inline-block; animation: letter 1300ms var(--ease-out) both; }
.home-word span:nth-child(1) { animation-delay: 300ms; } .home-word span:nth-child(2) { animation-delay: 350ms; } .home-word span:nth-child(3) { animation-delay: 400ms; }
.home-word span:nth-child(4) { animation-delay: 450ms; } .home-word span:nth-child(5) { animation-delay: 500ms; } .home-word span:nth-child(6) { animation-delay: 550ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  @view-transition { navigation: none; }
}
.auth-wordmark.len-m { font-size: clamp(60px, 10vw, 150px); }
.auth-wordmark.len-l { font-size: clamp(48px, 7vw, 104px); }

/* ======================================================================
   Sub-sections (Hub developers/organisation, operator console)
   ====================================================================== */
.subnav { display: flex; gap: 6px; margin: 28px 0 0; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { padding: 9px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15.5px; font-weight: 500; white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.subnav a[aria-current="page"] { background: var(--tone-3); color: var(--white); }
.subnav + .section, .subnav + .alert { margin-top: 40px; }
@media (hover: hover) and (pointer: fine) { .subnav a:not([aria-current]):hover { color: var(--white); } }

/* ======================================================================
   Product switcher (Hub): the onnisoft.site switcher with live state
   ====================================================================== */
[data-tab="onus"], .panel-onus { --p: #1fcb8b; --p-deep: #06402e; }
[data-tab="flight"], .panel-flight { --p: #3db8ff; --p-deep: #08365a; }
[data-tab="relay"], .panel-relay { --p: #ff6a2b; --p-deep: #5a2108; }
[data-tab="helen"], .panel-helen { --p: #ff4766; --p-deep: #5a0f1e; }
[data-tab="horizon"], .panel-horizon { --p: #ffb524; --p-deep: #5a3f08; }
.switch { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 40px; align-items: start; }
.switch-list { display: flex; flex-direction: column; gap: 2px; }
.switch-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; padding: 0 18px; border-radius: 14px; color: #8c8f99; text-decoration: none; transition: background-color 200ms ease, color 200ms ease; }
.switch-name { display: inline-flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.switch-name .ico { width: 24px; height: 24px; }
.switch-state { font-size: 14px; }
.switch-item[aria-selected="true"] { color: var(--white); background: color-mix(in srgb, var(--p) 13%, var(--night)); }
.switch-item[aria-selected="true"] .switch-state { color: color-mix(in srgb, var(--p) 45%, #fff); }
@media (hover: hover) and (pointer: fine) { .switch-item:hover { color: var(--white); } }
.panel {
  position: relative; isolation: isolate; overflow: hidden; min-height: 446px; border-radius: 24px; padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(85% 75% at 88% 6%, var(--p) 0%, var(--p-deep) 42%, var(--night) 80%);
  animation: panel-in 560ms var(--ease-out) both;
}
.panel[hidden] { display: none; }
.panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: 0.3; mix-blend-mode: overlay; pointer-events: none; }
.panel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 15px; font-weight: 500; }
.panel-top .ico { width: 112px; height: 112px; color: #fff; stroke-width: 1; animation: rise 700ms var(--ease-out) 80ms both; }
.panel-body { display: flex; flex-direction: column; gap: 14px; }
.panel-title { margin: 0; font-size: clamp(56px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 600; font-variation-settings: "wdth" 112; }
.panel-tagline { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.panel-text { margin: 0; max-width: 30em; font-size: 17px; line-height: 1.5; }
.panel-status { margin: 0; display: inline-flex; align-items: center; gap: 8px; color: #ffd98a; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.panel-actions form { margin: 0; }
.panel-pill { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 16px; font-weight: 600; }
.panel-pill .ico { width: 17px; height: 17px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .switch { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .switch-item { height: 60px; }
  .switch-name { font-size: 21px; }
  .panel { min-height: 380px; padding: 28px; }
  .panel-top .ico { width: 72px; height: 72px; }
}

/* ======================================================================
   News: headlines, not cards
   ====================================================================== */
.headlines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.headline, .news-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.headline-meta { font-size: 14px; color: var(--muted); }
.headline-title { font-size: clamp(22px, 2vw, 26px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; transition: transform 320ms var(--ease-out); }
.news { display: flex; flex-direction: column; gap: 4px; }
.news-item { padding: 24px 20px; border-radius: 18px; transition: background-color 180ms ease; }
.news-excerpt { color: var(--muted); max-width: 70ch; margin-top: 4px; }
@media (hover: hover) and (pointer: fine) {
  .headline:hover .headline-title, .news-item:hover .headline-title { transform: translateX(6px); }
  .news-item:hover { background: var(--tone-1); }
}
.article { max-width: 68ch; margin-top: 40px; font-size: 19px; line-height: 1.62; color: var(--soft); animation: rise 700ms var(--ease-out) 120ms both; }
.article p { margin: 0 0 20px; }
.back { margin-bottom: 18px; color: var(--muted); }
.back .ico.flip { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) { .back:hover .ico.flip { transform: scaleX(-1) translateX(3px); } }
.outlets { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.outlets .link { font-size: 20px; }
@media (max-width: 700px) { .headlines { grid-template-columns: minmax(0, 1fr); } }

.home { height: 100vh; height: 100svh; min-height: 620px; }
.home-word { font-size: min(28vw, 64svh); }
.home-word.len-s { font-size: min(37vw, 70svh); }
.home-word.len-l { font-size: min(23.5vw, 56svh); }
.home-word span:nth-child(7) { animation-delay: 600ms; } .home-word span:nth-child(8) { animation-delay: 650ms; }
.home .alert { margin-bottom: 20px; }
.hero-wordmark { font-size: clamp(36px, 11.6vw, 172px); }
.hero-wordmark.len-l { font-size: clamp(28px, 7.6vw, 116px); }
@media (max-width: 700px) { .hero { padding: 28px 24px 28px; } .hero.has-wordmark { min-height: 240px; padding-bottom: 0; } }

/* Rows adapt to the width they're given (the account panel is narrow even on desktop). */
.bigrow-text { min-width: 0; flex: 1 1 auto; }
.bigrow-title { overflow-wrap: anywhere; }
.rows { container-type: inline-size; }
@container (max-width: 620px) {
  .row, a.bigrow { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .row > .row-actions, a.bigrow > .row-actions, .row > .bigrow-meta, a.bigrow > .bigrow-meta { justify-content: flex-start; text-align: left; white-space: normal; padding-left: 40px; }
  .bigrow-sub { white-space: normal; overflow-wrap: anywhere; }
}
/* The wordmark is sized to the art column, not the viewport, so it never clips. */
.auth-art { container-type: inline-size; }
.auth-wordmark { font-size: min(23cqi, 320px); }
.auth-wordmark.len-m { font-size: min(14cqi, 220px); }
.auth-wordmark.len-l { font-size: min(9.5cqi, 150px); }

/* ======================================================================
   Docs (docs.onnisoft.site)
   ====================================================================== */
.surface-docs { --accent: #1a4bff; --accent-ink: #ffffff; --hero-deep: #0b1b66; --scalar-custom-header-height: 76px; }
.surface-docs .brand-mark { color: #6d8dff; }
.surface-docs .prose-lg em { color: #8aa6ff; }
.surface-docs .top { min-height: 76px; }
.code.prompt code { line-height: 1.5; }
.reference .section-header-label { font-variation-settings: "wdth" 112; letter-spacing: -0.03em; }
.reference h1.section-header-label { font-size: clamp(40px, 4.6vw, 64px); line-height: 0.98; letter-spacing: -0.04em; }

/* Install prompt builder */
.install { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 56px; align-items: start; }
.install-form .section:first-of-type { margin-top: 48px; }
.install-form [hidden] { display: none; }
.install-form .h-fieldset { margin-top: 6px; }
.install-out { position: sticky; top: 100px; margin-top: 48px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 124px); animation: rise 700ms var(--ease-out) 160ms both; }
.install-out-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.install-out h2 { margin: 0; font-size: clamp(28px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -0.03em; font-variation-settings: "wdth" 112; }
.install-out .hint { margin: 0; }
.install-out .hint em { font-style: normal; color: var(--white); }
.install-out .copy { width: 100%; }
.code.prompt { margin: 4px 0 0; flex: 1 1 auto; min-height: 0; overflow: auto; font-size: 13.5px; line-height: 1.55; }
.code.prompt code { white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.6; }
.input:not(:placeholder-shown):invalid { box-shadow: 0 0 0 2px var(--red); }
@media (max-width: 1000px) {
  .install { grid-template-columns: minmax(0, 1fr); }
  .install-out { position: static; max-height: none; }
  .code.prompt { max-height: 70vh; }
}

/* Scalar API reference, themed as Direction A */
.reference { min-height: calc(100vh - 76px); }
body.surface-docs.dark-mode,
.surface-docs .dark-mode {
  --scalar-font: var(--font);
  --scalar-font-code: var(--mono);
  --scalar-color-1: #ffffff;
  --scalar-color-2: #c7cbd6;
  --scalar-color-3: #8d919c;
  --scalar-color-disabled: #5d616c;
  --scalar-color-ghost: #5d616c;
  --scalar-color-accent: #8aa6ff;
  --scalar-background-1: #050507;
  --scalar-background-2: #0b0c0f;
  --scalar-background-3: #121318;
  --scalar-background-4: #191b21;
  --scalar-background-accent: rgba(26, 75, 255, 0.16);
  --scalar-border-color: #15161b;
  --scalar-color-green: #1fcb8b;
  --scalar-color-red: #ff5c6c;
  --scalar-color-yellow: #ffb524;
  --scalar-color-blue: #6d8dff;
  --scalar-color-orange: #ff8a4c;
  --scalar-color-purple: #b58cff;
  --scalar-button-1: #ffffff;
  --scalar-button-1-color: #050507;
  --scalar-button-1-hover: #e6e8ee;
  --scalar-radius: 10px;
  --scalar-radius-lg: 14px;
  --scalar-radius-xl: 18px;
  --scalar-sidebar-background-1: #050507;
  --scalar-sidebar-color-1: #ffffff;
  --scalar-sidebar-color-2: #a3a8b4;
  --scalar-sidebar-color-active: #ffffff;
  --scalar-sidebar-item-hover-background: #0f1013;
  --scalar-sidebar-item-hover-color: #ffffff;
  --scalar-sidebar-item-active-background: #121318;
  --scalar-sidebar-border-color: transparent;
  --scalar-sidebar-search-background: #0f1013;
  --scalar-sidebar-search-border-color: transparent;
  --scalar-sidebar-search-color: #a3a8b4;
}
.surface-docs .reference-onus { --scalar-color-accent: #1fcb8b; --scalar-background-accent: rgba(31, 203, 139, 0.14); }
.prompt-fold { margin-top: 20px; }
.prompt-fold .fold-body { padding-left: 20px; }
.prompt-fold .code.prompt { max-height: 520px; margin: 0; }
.c-actions .hint { display: inline-flex; align-items: center; gap: 10px; margin: 0; min-width: 0; max-width: 100%; }
