@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/outfit-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/outfit-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/outfit-600-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/outfit-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/outfit-700-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/outfit-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/literata-600-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/literata-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Literata;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-400i-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Literata;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-400i.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0e1114;
  --raise: #15191e;
  --surface: #1c2229;
  --ink: #f3ecdf;
  --muted: #c4bbae;
  --line: #3a424c;
  --gold: #e0b15a;
  --gold-ink: #1a1408;
  --teal: #8ecfc4;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --serif: Literata, Georgia, "Palatino Linotype", serif;
  --dock: 4.75rem;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(224, 177, 90, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
body, button, input, textarea { font-size: 16px; }
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.lang-dock {
  position: fixed;
  z-index: 140;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  display: flex;
  gap: 8px;
}
.lang-dock button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--raise);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lang-dock button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--gold-ink);
}

.gate {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 84px 16px 28px;
  overflow-x: hidden;
  overflow-y: auto;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gate-card {
  position: relative;
  width: min(480px, 100%);
  margin: auto;
  background: rgba(21, 25, 30, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 18px 18px;
}
.mark { width: 36px; height: 36px; display: block; }
.brand-row, .brand { display: flex; gap: 12px; align-items: center; }
.kicker, .brand-kicker {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}
h1, h2, h3 { font-family: var(--sans); line-height: 1.15; font-weight: 650; }
h1 { margin: 2px 0 0; font-size: 1.7rem; font-weight: 700; }
h2 { margin: 0 0 8px; font-size: 1.35rem; }
h3 { margin: 0 0 6px; font-size: 1.05rem; }
.lede, .muted { color: var(--muted); }
.lede { font-family: var(--serif); font-size: 1.05rem; line-height: 1.55; }
.pins {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.pins input {
  width: 100%;
  height: 52px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #12161b;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.25rem;
  padding: 0;
}
.split { display: grid; gap: 14px; }
.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.or::before, .or::after { content: ""; height: 1px; background: var(--line); }
.stack { display: grid; gap: 10px; }
label.field { display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

.btn, .quiet, .ghost {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  font-weight: 600;
}
.btn { background: var(--gold); color: var(--gold-ink); }
.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-row, .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wide { width: 100%; }

.shell { padding: 72px 0 24px; }
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  max-width: 1120px;
  margin: 0 auto 14px;
  padding: 0 56px 0 16px;
}
.top h1 { font-size: 1.35rem; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.mic {
  min-height: 44px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 14px;
  font-weight: 600;
}
.mic[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); }
.mic-dot {
  width: 9px; height: 9px; border-radius: 99px; background: var(--muted);
}
.mic[aria-pressed="true"] .mic-dot { background: var(--teal); }
@media (prefers-reduced-motion: no-preference) {
  .mic[aria-pressed="true"] .mic-dot { animation: pulse 1.4s ease infinite; }
}
@keyframes pulse { 50% { opacity: 0.35; } }
.mic-status, .caption {
  max-width: 1120px;
  margin: 0 auto 8px;
  padding: 0 56px 0 16px;
  color: var(--teal);
  font-size: 0.92rem;
}
.caption { font-family: var(--serif); color: var(--ink); min-height: 0; }

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 56px 28px 16px;
}
main, .rail { min-width: 0; }
p, h1, h2, h3, pre, label { overflow-wrap: anywhere; }
.rail, .dock { display: flex; gap: 4px; }
.rail { flex-direction: column; position: sticky; top: 76px; align-self: start; }
.rail button, .dock button, .more button.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  text-align: left;
  padding: 0 10px;
  font-weight: 600;
}
.rail button[aria-current="page"], .dock button[aria-current="page"] {
  background: var(--surface);
  color: var(--gold);
}
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock {
  display: none;
  position: fixed;
  z-index: 75;
  left: 0; right: 0; bottom: 0;
  background: rgba(14, 17, 20, 0.94);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.dock button { flex-direction: column; gap: 2px; font-size: 0.72rem; min-width: 0; flex: 1; padding: 4px 2px; }
.dock button span { white-space: nowrap; }
.dock .ico { width: 22px; height: 22px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  margin-bottom: 12px;
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.85;
}
.card::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.card::after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.card > * { position: relative; }
.grid { display: grid; gap: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
textarea, input[type="text"], input[type="time"], input[type="search"], input[type="password"] {
  width: 100%;
  background: #12161b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--serif);
  line-height: 1.55;
}
textarea { min-height: 96px; resize: vertical; }
.quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  margin: 0;
  padding-left: 12px;
}
.nudge {
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  background: #221c12;
  border-radius: 14px;
  margin-bottom: 12px;
}
.rungs { display: grid; gap: 6px; }
.rung, .chip {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #12161b;
  color: var(--ink);
  text-align: left;
  padding: 8px 12px;
}
.rung small, .chip small { display: block; color: var(--muted); font-weight: 500; }
.rung[aria-pressed="true"] { border-color: var(--gold); background: #2a2418; }
.rung.next { border-color: var(--teal); }
.rung.dim { opacity: 0.45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.path {
  font-family: var(--serif);
  line-height: 1.6;
}
.step-box {
  background: #12161b;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--teal);
}
.meta { color: var(--muted); font-size: 0.85rem; }
.list { display: grid; gap: 8px; }
.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
pre.prompt {
  white-space: pre-wrap;
  font-family: var(--serif);
  line-height: 1.55;
  background: #12161b;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}
.dots { display: flex; gap: 6px; }
.dot {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 0.72rem; font-weight: 700;
}
.dot.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.week { display: flex; gap: 6px; flex-wrap: wrap; }
.ring { width: 72px; height: 72px; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 6; }
.ring-val { fill: none; stroke: var(--gold); stroke-width: 6; transform: rotate(-90deg); transform-origin: 36px 36px; }
.ring text { fill: var(--ink); font-size: 16px; font-family: var(--sans); font-weight: 700; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heat i {
  display: block; height: 28px; border-radius: 8px; background: #12161b; border: 1px solid var(--line);
}
.heat i.on { background: var(--gold); border-color: var(--gold); }
.modes { display: grid; gap: 8px; }
.mode {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #12161b;
  text-align: left;
  min-height: 44px;
}
.mode[aria-pressed="true"] { border-color: var(--teal); }
.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(var(--dock) + 12px);
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 24px));
  background: var(--ink);
  color: var(--gold-ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(8, 9, 11, 0.72);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-card {
  width: min(520px, 100%);
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.plan-tab {
  position: fixed;
  z-index: 70;
  right: 0;
  top: 42%;
  min-height: 44px;
  border: 1px solid var(--gold);
  border-right: 0;
  background: var(--raise);
  color: var(--gold);
  border-radius: 12px 0 0 12px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 12px 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.drawer {
  position: fixed;
  z-index: 85;
  top: 64px;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--raise);
  border-left: 1px solid var(--line);
  overflow: auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
}
.more {
  position: fixed;
  z-index: 86;
  left: 12px; right: 12px;
  bottom: calc(var(--dock) + env(safe-area-inset-bottom));
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
}
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; }
.shake { animation: shake 0.35s ease; }
@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; padding: 0 48px 108px 14px; }
  .top, .mic-status, .caption { padding-left: 14px; padding-right: 14px; }
  .rail { display: none; }
  .dock { display: flex; }
  .top { align-items: flex-start; }
  .plan-tab { top: auto; bottom: calc(var(--dock) + env(safe-area-inset-bottom) + 8px); }
  .drawer { top: 60px; bottom: 0; }
  .toast { bottom: calc(var(--dock) + env(safe-area-inset-bottom) + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
