:root {
  color-scheme: dark;
  --bg: #0d1420;
  --surface: #151f2d;
  --raised: #1a2737;
  --ink: #f3f8fc;
  --muted: #a8b7c7;
  --soft: #7d92a6;
  --line: #314357;
  --control: #667c90;
  --accent: #9af0d6;
  --accent-ink: #0d1b1e;
  --focus: #90b8ff;
  --warning: #ffd184;
  --danger: #ffadaf;
  --radius: 26px;
  --gutter: clamp(16px, 3.8vw, 30px);
  --tab-height: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-offset: 0px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-block: 90px 166px; }
body {
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 800px 470px at 8% -90px, #25334d 0%, transparent 90%),
    radial-gradient(ellipse 550px 410px at 110% 15%, #211f39 0%, transparent 87%),
    var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
h1, h2, h3 { line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 7.4vw, 4.4rem); font-weight: 760; letter-spacing: -.061em; }
h2 { font-size: clamp(1.38rem, 4.7vw, 1.85rem); font-weight: 730; letter-spacing: -.035em; }
h3 { font-size: 1rem; font-weight: 720; letter-spacing: -.012em; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1:focus, h2:focus, main:focus { outline: none; }
::selection { color: var(--accent-ink); background: var(--accent); }

.shell { width: min(100%, 1120px); margin-inline: auto; padding-inline: var(--gutter); }
.symbols { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.icon {
  width: 21px; height: 21px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.sr-only, .skip-link:not(:focus) {
  position: absolute; inline-size: 1px; block-size: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; inset: 12px auto auto 12px; z-index: 9; padding: 12px 16px;
  color: var(--accent-ink); background: var(--accent); border-radius: 12px;
}

.topbar {
  padding-top: env(safe-area-inset-top, 0px);
  background: #121d2c; border-bottom: 1px solid #293b4e;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.wordmark { min-height: 46px; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.36rem; font-weight: 760; letter-spacing: -.065em; }
.wordmark img { display: block; border: 1px solid #344a5a; border-radius: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.sandbox-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px;
  color: var(--muted); background: #202e3d; font-size: .73rem; font-weight: 680; white-space: nowrap;
}
.sandbox-status i { inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--soft); }
.sandbox-status[data-ready="true"] i { background: var(--accent); box-shadow: 0 0 8px #9af0d644; }
.install-button {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 8px; background: transparent; border: 0; border-radius: 12px;
  color: var(--accent); font-size: .84rem; font-weight: 700;
}
.install-button .icon { width: 16px; height: 16px; }
.install-button:hover { background: #253849; }

.main { padding-block: clamp(24px, 6vw, 62px) calc(var(--tab-height) + var(--tab-offset) + var(--safe-bottom) + 36px); }
.has-dock .main { padding-bottom: calc(var(--tab-height) + var(--tab-offset) + var(--safe-bottom) + 114px); }
.screen { animation: screen-in 220ms cubic-bezier(.22,.61,.36,1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: grid; gap: 11px; margin-bottom: 21px; max-width: 760px; }
.eyebrow {
  color: var(--accent); font-size: .7rem; letter-spacing: .105em; font-weight: 780;
  text-transform: uppercase; line-height: 1.3;
}
.lede, .muted { color: var(--muted); line-height: 1.55; }
.lede { font-size: clamp(.96rem, 2vw, 1.09rem); max-width: 540px; }
.muted { font-size: .94rem; }
.small { color: var(--muted); font-size: .79rem; line-height: 1.5; }
.steps {
  display: flex; flex-wrap: wrap; gap: 6px 17px; list-style: none; padding: 0; margin-bottom: 20px;
  color: var(--muted); font-size: .79rem; font-weight: 690;
}
.steps li { display: inline-flex; gap: 6px; align-items: center; min-height: 29px; }
.steps li > span:first-child {
  display: grid; place-items: center; inline-size: 22px; block-size: 22px; flex-shrink: 0;
  border: 1px solid #495d73; border-radius: 50%; color: var(--muted); font-size: .71rem; line-height: 1;
}
.steps li[aria-current="step"] { color: var(--ink); }
.steps li[aria-current="step"] > span:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps li[data-complete="true"] > span:first-child { background: #1d3d3b; border-color: #528576; color: var(--accent); }
.steps .icon { width: 13px; height: 13px; }
.flow-layout, .staff-layout, .stack { display: grid; align-items: start; gap: 16px; min-width: 0; }

.event-card, .panel { min-width: 0; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.event-card { overflow: hidden; box-shadow: 0 16px 34px #070a1445; }
.poster {
  display: flex; flex-direction: column; justify-content: space-between; gap: 33px;
  min-height: clamp(174px, 53vw, 332px); padding: 14px clamp(16px, 4vw, 28px) 20px;
  background:
    linear-gradient(0deg, #08101cf0 0%, #09111d44 47%, #070e1a08 74%),
    url("/after-the-rain.svg") right center / cover no-repeat,
    #18243a;
}
.poster-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; }
.poster-top > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px;
  background: #0a1422; border: 1px solid #607387; color: var(--ink);
  font-size: .67rem; font-weight: 760; letter-spacing: .045em;
}
.poster-top .icon { width: 14px; height: 14px; color: var(--accent); }
.poster-copy { display: grid; gap: 5px; }
.poster-copy p { color: #d5e0ee; font-size: .83rem; font-weight: 670; }
.poster-copy h2 { font-size: clamp(1.94rem, 7vw, 3.4rem); letter-spacing: -.054em; color: white; }
.event-details { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; padding: 15px clamp(15px, 4vw, 25px); }
.event-details > div + div { border-left: 1px solid var(--line); padding-left: 13px; }
.event-details dt { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .72rem; font-weight: 680; }
.event-details .icon { width: 15px; height: 15px; color: var(--accent); }
.event-details dd { color: var(--ink); font-size: .9rem; line-height: 1.3; font-weight: 680; margin-top: 4px; }
.ticket-edge { height: 8px; margin: 0 15px; border-top: 1px dashed var(--control); }
.is-pass .poster { min-height: clamp(155px, 46vw, 280px); }

.panel { display: grid; gap: 12px; padding: clamp(16px, 4.25vw, 25px); }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 7px 11px; }
.panel-title > div, .request-panel > .eyebrow + h2 { min-width: 0; }
.panel-title .eyebrow, .empty-state .eyebrow { margin-bottom: 6px; }
.request-panel { gap: 8px; }
.request-panel form { margin-top: 5px; }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.needs { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 15px; background: #172535; cursor: pointer;
}
.choice:has(input:checked) { border-color: #4f7b76; background: #1a2e39; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.choice-text { display: grid; gap: 3px; flex: 1 1 auto; min-width: 0; }
.choice-text strong { font-size: .93rem; line-height: 1.25; }
.choice-text small { color: var(--muted); font-size: .79rem; line-height: 1.37; }
.choice input, .decision input {
  inline-size: 19px; block-size: 19px; flex: 0 0 auto; accent-color: var(--accent); margin: 0;
}
.row-icon {
  display: inline-grid; place-items: center; flex-shrink: 0; inline-size: 36px; block-size: 36px;
  border-radius: 12px; color: var(--accent); background: #223847;
}
.row-icon .icon { width: 18px; height: 18px; }
.access-list { display: grid; }
.access-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.access-item:last-child { border-bottom: 0; }
.access-item > div { display: grid; gap: 3px; }
.row-status { color: var(--muted); font-size: .82rem; font-weight: 720; }
.row-status[data-tone="good"] { color: var(--accent); }
.row-status[data-tone="warn"] { color: var(--warning); }
.pill {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%;
  padding: 5px 9px; border: 1px solid #3e5266; border-radius: 99px;
  color: #d0e1ed; background: #213143; font-size: .72rem; font-weight: 750; line-height: 1.25;
}
.pill .icon { width: 13px; height: 13px; }
.pill[data-tone="warn"] { color: var(--warning); background: #3c3124; border-color: #7d643e; }
.pill[data-tone="good"] { color: var(--accent); background: #1b3837; border-color: #46756a; }
.pill[data-tone="alert"] { color: var(--danger); background: #412834; border-color: #885565; }
.notice {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 13px;
  background: #213143; color: #deedf7; font-size: .84rem; line-height: 1.45;
}
.notice .icon { width: 16px; height: 16px; margin-top: 2px; }
.notice[data-tone="warn"] { background: #3c3124; color: var(--warning); }
.notice[data-tone="alert"] { background: #412834; color: var(--danger); }
.screen > .notice { margin-bottom: 14px; }
.payment-total {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 4px 11px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.payment-total span { color: var(--muted); font-size: .9rem; }
.payment-total strong, .dock-copy strong { font-variant-numeric: tabular-nums; }
.payment-total strong { font-size: 1.26rem; }
.receipt-lines { display: grid; gap: 9px; padding: 0 0 10px; }
.receipt-lines dt { color: var(--muted); font-size: .78rem; }
.receipt-lines dd { overflow-wrap: anywhere; font-size: .87rem; font-weight: 670; }

.disclosure { border-top: 1px solid var(--line); }
.disclosure summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 45px; padding: 5px 0; color: var(--muted); cursor: pointer;
  font-size: .88rem; font-weight: 690; list-style: none; border-radius: 7px;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary span { display: flex; align-items: center; gap: 7px; }
.disclosure summary .icon { width: 16px; height: 16px; }
.disclosure summary > .icon { transition: transform 140ms ease; }
.disclosure[open] summary > .icon { transform: rotate(90deg); }
.scenarios { margin-top: 5px; }
.scenarios summary span span { display: grid; gap: 1px; }
.scenarios fieldset { display: grid; gap: 7px; }
.scenarios .small { margin-top: 7px; }
.small-choice { min-height: 50px; }
.inline-actions, .view-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.inline-actions:empty { display: none; }
.view-actions { margin-bottom: 13px; }
.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; padding: 8px 13px; border: 1px solid transparent;
  font-size: .88rem; font-weight: 740; line-height: 1.2; text-align: center;
  transition: transform 130ms ease-out, background-color 130ms ease-out, border-color 130ms ease-out;
}
.button:active:not(:disabled), .tab:active:not(:disabled) { transform: scale(.97); }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover:not(:disabled) { background: #baf8e5; }
.button.secondary { background: #243548; border-color: #4d6378; color: var(--ink); }
.button.secondary:hover:not(:disabled) { background: #30455a; }
.button.text { background: transparent; color: var(--accent); }
.button.text:hover:not(:disabled) { background: #233747; }
.button .icon { width: 17px; height: 17px; }
.panel > .button { justify-self: start; }

.review-form { display: grid; gap: 13px; }
.review-block {
  padding: 11px 11px 13px; border: 1px solid var(--line); border-radius: 16px; background: #182635;
}
.review-block legend {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 4px;
  color: var(--ink); font-weight: 760; line-height: 1.18;
}
.review-block legend .row-icon { width: 31px; height: 31px; border-radius: 9px; }
.evidence-copy { display: grid; gap: 7px; margin-bottom: 11px; }
.source-stack { display: grid; gap: 6px; }
.source-quote { border-left: 2px solid #648993; border-radius: 0 10px 10px 0; padding: 8px 10px; background: #202f40; }
.source-quote figcaption { color: var(--muted); font-size: .72rem; font-weight: 740; }
.source-quote figcaption span { color: var(--accent); }
.source-quote blockquote, .notes-editor blockquote {
  color: var(--ink); margin: 2px 0 0; font-size: .88rem; line-height: 1.48;
}
.notes-editor blockquote { white-space: pre-wrap; }
.decision-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.decision {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 8px;
  background: #213143; border: 1px solid var(--control); border-radius: 10px;
  cursor: pointer; font-size: .78rem; font-weight: 690;
}
.decision:has(input:checked) { border-color: var(--accent); }
.decision-summary { display: grid; gap: 4px; color: var(--muted); font-size: .91rem; }
.decision-summary strong { color: var(--ink); }
.field { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.field textarea {
  min-width: 0; width: 100%; resize: vertical; padding: 8px 10px;
  border: 1px solid var(--control); border-radius: 11px;
  color: var(--ink); background: #111b29; font-size: 1rem; font-weight: 440;
}
.field textarea::placeholder { color: var(--soft); }
.notes-editor form { display: grid; gap: 7px; }
.notes-editor form .button { justify-self: start; }
.model-line { display: flex; align-items: center; gap: 5px; }
.model-line .icon { width: 14px; height: 14px; color: var(--accent); }
.queue-panel { min-width: 0; }
.queue-empty { padding-block: 8px; }
.fallback-queue { display: grid; gap: 6px; padding: 0; list-style: none; }
.row-button {
  display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 51px; width: 100%;
  padding: 8px 12px; border: 1px solid var(--control); border-radius: 12px; text-align: left;
  color: var(--ink); background: #223343;
}
.row-button span { display: grid; }
.row-button small { color: var(--muted); }

.tabbar {
  position: fixed; z-index: 4; inset: auto 0 var(--tab-offset);
  padding: 0 0 var(--safe-bottom); border-top: 1px solid #3c5367; background: #142031;
}
.tabbar-inner {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: var(--tab-height);
  width: min(100%, 435px); margin-inline: auto; gap: 4px; padding: 4px 8px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 50px; padding: 3px 5px; border: 0; border-radius: 15px;
  background: transparent; color: var(--muted); font-size: .71rem; font-weight: 690;
  transition: color 130ms ease-out, background-color 130ms ease-out, transform 130ms ease-out;
}
.tab[aria-current="page"] { color: var(--accent); background: #253b4b; }
.tab:hover { background: #203345; }
.tab .icon { width: 21px; height: 21px; }

.dock {
  position: fixed; z-index: 3; inset: auto 0 calc(var(--tab-height) + var(--tab-offset) + var(--safe-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 74px; padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 8px max(var(--gutter), env(safe-area-inset-left, 0px));
  background: #172436; border-top: 1px solid #3c5367;
}
.dock-copy { display: grid; min-width: 68px; flex: 0 1 auto; }
.dock-copy span { color: var(--muted); font-size: .73rem; font-weight: 680; line-height: 1.25; }
.dock-copy strong { color: var(--ink); font-size: 1.22rem; font-weight: 760; line-height: 1.17; letter-spacing: -.025em; }
.dock .button { min-height: 51px; padding-inline: clamp(10px, 4vw, 22px); flex: 0 1 auto; }
@supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
  .tabbar, .dock { background: #152236e8; backdrop-filter: blur(18px) saturate(118%); -webkit-backdrop-filter: blur(18px) saturate(118%); }
}

.empty-state { display: grid; align-items: start; gap: 10px; }
.install-sheet {
  color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: 25px;
  padding: 19px; width: min(calc(100% - 32px), 450px); max-height: 85dvh; box-shadow: 0 20px 64px #05090c90;
}
.install-sheet::backdrop { background: #080e18a0; }
.install-sheet h2 { margin: 8px 0; }
.install-sheet p:not(.eyebrow) { margin: 8px 0; color: var(--muted); }
.install-sheet .button { margin-top: 6px; }
.offline-shell { width: min(100% - 32px, 520px); margin: 18vh auto 0; }
.offline-panel { display: grid; gap: 13px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.connection-status { padding: 7px var(--gutter); color: var(--warning); background: #392e23; text-align: center; font-size: .85rem; }
.working-message.sr-only {
  position: fixed; z-index: 5; inset: max(72px, calc(env(safe-area-inset-top, 0px) + 60px)) var(--gutter) auto;
  margin: 0 auto; padding: 8px 13px; inline-size: max-content; block-size: auto;
  max-inline-size: calc(100% - 2 * var(--gutter)); overflow: visible; clip-path: none; white-space: normal;
  border-radius: 99px; border: 1px solid var(--control); background: #233447; color: var(--ink);
  font-size: .83rem; font-weight: 700; pointer-events: none;
}

@media (min-width: 720px) {
  :root { --tab-offset: 13px; --tab-height: 64px; }
  .flow-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 19px; }
  .staff-layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 19px; }
  .panel, .event-card { box-shadow: 0 14px 35px #080d1940; }
  .poster { min-height: 265px; }
  .page-heading { margin-bottom: 25px; }
  .tabbar {
    inset-inline: calc((100% - 394px) / 2); border: 1px solid #41586d; border-radius: 23px;
    box-shadow: 0 9px 25px #080b1870;
  }
  .tabbar-inner { width: 100%; }
  .dock {
    inset-inline: max(var(--gutter), calc((100% - 490px) / 2));
    bottom: calc(var(--tab-height) + var(--tab-offset) + var(--safe-bottom) + 8px);
    padding-inline: 14px; border: 1px solid #41586d; border-radius: 20px;
    box-shadow: 0 10px 26px #080b1866;
  }
}
@media (max-width: 352px) {
  .topbar-actions { gap: 2px; }
  .sandbox-status { padding-inline: 7px; }
  .steps { gap: 4px 10px; }
  .steps li { font-size: .74rem; }
  .choice .row-icon { width: 31px; height: 31px; }
  .dock .button .icon { display: none; }
}
@media (max-width: 270px), (max-height: 430px) {
  .dock, .tabbar { position: relative; inset: auto; }
  .main, .has-dock .main { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .dock, .tabbar { background: #172436; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
