/* MILO — design tokens
   ink    #0F1B3D  deep navy (primary, hero, text)
   chalk  #F3F4EF  page background (cool warm-white)
   signal #3F7BFF  action blue
   sky    #C9DAFF  soft blue
   grow   #1FAF6B  progress / free
   sun    #F5A524  time & warnings only
   Signature: every opportunity is a "ticket" — a pass to your day — with a colored stub. */
:root {
  --ink: #0F1B3D; --ink-2: #22315F; --ink-3: #5A6484;
  --chalk: #F3F4EF; --paper: #FFFFFF; --line: #DCDFE6;
  --signal: #3F7BFF; --signal-d: #2A5FDB; --sky: #C9DAFF;
  --grow: #1FAF6B; --sun: #F5A524; --rose: #E2577B;
  --r-lg: 22px; --r-md: 14px; --r-sm: 9px;
  --f-head: 'Rubik', system-ui, sans-serif;
  --f-body: 'Assistant', system-ui, sans-serif;
  --rail: 92px;
  --shadow: 0 1px 0 rgba(15,27,61,.06), 0 12px 30px -18px rgba(15,27,61,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--f-body); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--chalk); -webkit-font-smoothing: antialiased;
  padding-inline-start: var(--rail);
}
body.bare { padding: 0; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 .6em; }
a { color: var(--signal-d); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 99; }
.skip:focus { inset-inline-start: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav rail (desktop) / tab bar (mobile) ---------- */
.rail {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--rail);
  background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: 18px 0; gap: 6px; z-index: 40;
}
body.bare .rail { display: none; }
.rail .logo { font-family: var(--f-head); font-weight: 900; font-size: 1.35rem; letter-spacing: .02em; margin-bottom: 18px; color: #fff; text-decoration: none; }
.rail .logo i { display: block; width: 26px; height: 4px; background: var(--grow); border-radius: 2px; margin: 4px auto 0; font-style: normal; }
.rail .tab {
  border: 0; background: none; cursor: pointer; font-family: inherit;
  display: grid; justify-items: center; gap: 2px; width: 76px; padding: 10px 0; border-radius: 14px;
  color: #AEB8D6; text-decoration: none; font-size: .78rem; font-weight: 600;
}
.rail .tab svg { width: 24px; height: 24px; }
.rail .tab[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.rail .tab:hover { color: #fff; }
.rail .spacer { flex: 1; }
.rail .tab.ask { color: #fff; }
.rail .tab.ask svg { width: 38px; height: 38px; padding: 7px; border-radius: 50%; background: var(--grow); color: #fff; margin-top: -4px; }
.rail .tab.small { font-size: .72rem; }

/* ---------- layout ---------- */
#view { min-height: 100vh; outline: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 32px 120px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin: 6px 0 0; }
.row-title { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 12px; }
.row-title a { font-weight: 700; text-decoration: none; }
.muted { color: var(--ink-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 340px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.scroller > * { scroll-snap-align: start; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; cursor: pointer;
  background: var(--signal); color: #fff; text-decoration: none; min-height: 46px; transition: transform .12s, background .12s;
}
.btn:hover { background: var(--signal-d); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.grow { background: var(--grow); }
.btn.dark { background: var(--ink); }
.btn.sm { padding: 8px 14px; min-height: 38px; font-size: .92rem; }
.btn.block { display: flex; width: 100%; max-width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--chalk); display: grid; place-items: center; cursor: pointer; font-size: 1.15rem; }
.icon-btn[aria-pressed="true"] { background: #FFE3EA; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px;
  cursor: pointer; font-weight: 600; font-size: .95rem; display: inline-flex; gap: 6px; align-items: center;
}
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chalk); color: var(--ink-2); }
.tag.ok { background: #DDF5E8; color: #11704A; }
.tag.warn { background: #FFF1D6; color: #8A5A00; }
.tag.demo { background: #ECEDF1; color: #555E78; }
.tag.spons { background: #EDE6FF; color: #5B3BC4; }

/* price toggle (segmented) */
.seg { display: inline-flex; background: var(--paper); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 2px var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button.free[aria-pressed="true"] { background: var(--grow); }

/* ---------- ticket card (signature) ---------- */
.ticket {
  --c: var(--signal);
  position: relative; display: grid; grid-template-columns: 86px 1fr; background: var(--paper);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; min-height: 210px;
  text-decoration: none; color: inherit;
}
.ticket .stub {
  background: var(--c); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 16px 6px; position: relative;
}
.ticket .stub::after { /* perforation */
  content: ''; position: absolute; inset-block: 10px; inset-inline-end: -1px; width: 2px;
  background-image: radial-gradient(circle, var(--paper) 2px, transparent 2.5px); background-size: 2px 10px;
}
.ticket .stub .emoji { font-size: 2.2rem; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.ticket .stub .when { font-family: var(--f-head); font-weight: 800; text-align: center; line-height: 1.05; font-size: .95rem; }
.ticket .stub .when b { display: block; font-size: 1.7rem; }
.ticket .notch { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--chalk); inset-inline-start: 75px; }
.ticket .notch.t { top: -11px; } .ticket .notch.b { bottom: -11px; }
.ticket .body { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ticket .org { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.ticket .org a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ticket h3 { font-size: 1.08rem; }
.ticket h3 a { color: inherit; text-decoration: none; }
.ticket h3 a::after { content: ''; position: absolute; inset: 0; } /* whole card clickable */
.ticket .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ticket .why { font-size: .86rem; color: #11704A; font-weight: 600; }
.ticket .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 2; }
.price { font-family: var(--f-head); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.price.free { color: var(--grow); }
.price s { color: var(--ink-3); font-weight: 500; font-size: .85rem; margin-inline-start: 4px; }
.price.unk { font-size: .9rem; color: var(--ink-3); font-weight: 700; }
.ticket .actions { display: flex; gap: 6px; }
.ticket .actions .icon-btn { width: 40px; height: 40px; }

/* ---------- welcome / hero ---------- */
.hero { position: relative; min-height: 100svh; background: radial-gradient(120% 90% at 70% 20%, #1E3270 0%, var(--ink) 55%, #070E24 100%); color: #fff; overflow: hidden; display: grid; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .inner { position: relative; z-index: 2; max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 32px 40px; display: grid; grid-template-rows: auto 1fr auto; }
.hero .top { display: flex; justify-content: space-between; align-items: center; }
.brand { font-family: var(--f-head); font-weight: 900; font-size: 1.6rem; letter-spacing: .03em; }
.brand::after { content: ''; display: inline-block; width: 10px; height: 10px; background: var(--grow); border-radius: 50%; margin-inline-start: 6px; }
.hero .copy { align-self: center; max-width: 700px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .98; }
.hero h1 .broken { display: block; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.75); }
.hero .sub { font-size: 1.25rem; color: #C9D3F2; margin: 20px 0 28px; max-width: 30ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { margin-top: 14px; color: #9FAAD0; font-size: .95rem; }
.hero .bottom { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; color: #AEB8D6; font-size: .95rem; }
.hero .bottom a { color: #fff; }
.hero .legend { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-inline-end: 6px; }

/* ---------- onboarding ---------- */
.onb { min-height: 100svh; display: grid; grid-template-columns: 1fr minmax(320px, 460px); }
.onb .side { background: var(--ink); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.onb .side .big { font-family: var(--f-head); font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; }
.onb .main { padding: 40px; display: flex; flex-direction: column; gap: 22px; background: var(--paper); }
.progress { height: 6px; background: var(--chalk); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grow); transition: width .3s; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { border: 2px solid var(--line); border-radius: var(--r-md); padding: 16px; background: #fff; cursor: pointer; text-align: start; font-weight: 700; }
.opt small { display: block; font-weight: 500; color: var(--ink-3); }
.opt[aria-pressed="true"] { border-color: var(--ink); background: #EEF3FF; }
.onb .nav { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.input, select.input, textarea.input { width: 100%; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; background: #fff; }
.input:focus { border-color: var(--signal); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.err { color: #B42318; font-weight: 600; font-size: .9rem; }

/* ---------- home ---------- */
.window-banner {
  background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 24px 28px; display: grid;
  grid-template-columns: 1fr auto; gap: 18px; align-items: center; overflow: hidden; position: relative;
}
.window-banner .days { font-family: var(--f-head); font-weight: 900; font-size: 4.2rem; line-height: .9; color: var(--sun); }
.window-banner p { color: #C9D3F2; margin: 6px 0 0; }
.window-banner .bar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; }
.window-banner .bar i { height: 10px; border-radius: 3px; background: rgba(255,255,255,.18); }
.window-banner .bar i.on { background: var(--sun); }
.support-link { display: inline-flex; gap: 8px; align-items: center; border: 0; background: #E7F6EF; color: #11704A; font-weight: 700; padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 18px 0 4px; }

/* ---------- discover ---------- */
.discover { display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: start; }
.filters { position: sticky; top: 20px; background: var(--paper); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 18px; box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow: auto; }
.filters h3 { font-size: 1rem; margin-bottom: 8px; }
.filters .chips .chip { font-size: .85rem; padding: 5px 11px; }
.search { position: relative; }
.search input { padding-inline-start: 44px; border-radius: 999px; height: 52px; font-size: 1.05rem; }
.search::before { content: '⌕'; position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-52%); font-size: 1.4rem; color: var(--ink-3); }
.empty { text-align: center; padding: 50px 20px; background: var(--paper); border-radius: var(--r-lg); border: 2px dashed var(--line); }
.empty .big { font-size: 3rem; }
.filter-toggle { display: none; }

/* ---------- detail / org ---------- */
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.detail .cover { border-radius: var(--r-lg); padding: 34px; color: #fff; background: var(--c); position: relative; overflow: hidden; min-height: 220px; display: flex; flex-direction: column; justify-content: end; }
.detail .cover .emoji { position: absolute; inset-inline-end: 24px; top: 10px; font-size: 7rem; opacity: .9; transform: rotate(-8deg); }
.detail .cover h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 22ch; }
.panel { background: var(--paper); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.facts div { background: var(--chalk); border-radius: var(--r-md); padding: 12px 14px; }
.facts b { display: block; font-size: .8rem; color: var(--ink-3); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.contact-grid a, .contact-grid button { justify-content: center; }
.sticky-cta { display: none; }
.price-break { display: grid; gap: 8px; }
.price-break div { display: flex; justify-content: space-between; }
.org-head { display: flex; gap: 18px; align-items: center; }
.org-logo { width: 74px; height: 74px; border-radius: 20px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--f-head); font-weight: 900; font-size: 1.9rem; flex: none; }

/* ---------- build my day ---------- */
.day-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.timeline { background: var(--paper); border-radius: var(--r-lg); padding: 18px 18px 18px 18px; box-shadow: var(--shadow); position: relative; }
.timeline .hours { position: relative; }
.hour-line { display: flex; gap: 10px; align-items: flex-start; height: 56px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.day-block {
  position: absolute; inset-inline-start: 58px; inset-inline-end: 8px; border-radius: 14px; padding: 10px 14px;
  color: #fff; background: var(--c, var(--signal)); display: flex; gap: 10px; align-items: flex-start; justify-content: space-between;
  overflow: hidden; box-shadow: 0 8px 18px -12px rgba(0,0,0,.5);
}
.day-block.rest { background: repeating-linear-gradient(-45deg, #E9ECF4, #E9ECF4 10px, #F2F4F9 10px, #F2F4F9 20px); color: var(--ink); }
.day-block.family { background: #FFE6EE; color: #8A1C3F; }
.day-block.conflict { outline: 3px solid #E5484D; }
.day-block .t { font-family: var(--f-head); font-weight: 800; font-size: .95rem; }
.day-block .ctl { display: flex; gap: 4px; flex: none; }
.day-block .ctl button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,.25); color: inherit; cursor: pointer; font-weight: 800; }
.day-block.rest .ctl button, .day-block.family .ctl button { background: rgba(15,27,61,.08); }
.day-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.day-sum div { background: var(--chalk); border-radius: var(--r-md); padding: 12px 6px; }
.day-sum b { display: block; font-family: var(--f-head); font-size: 1.5rem; }
.dial { width: 100%; max-width: 280px; display: block; margin: 0 auto 8px; }

/* ---------- me / admin ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tabs .count { background: var(--rose); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 7px; margin-inline-start: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi { background: var(--paper); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.kpi b { display: block; font-family: var(--f-head); font-size: 2.2rem; font-weight: 900; line-height: 1; }
.kpi span { color: var(--ink-3); font-weight: 600; font-size: .9rem; }
.list { display: grid; gap: 10px; }
.item { background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.item .t { font-weight: 700; }
.status { font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--chalk); }
.status.pending { background: #FFF1D6; color: #8A5A00; }
.status.approved { background: #DDF5E8; color: #11704A; }
.status.rejected { background: #FDE2E2; color: #9B1C1C; }
.status.changes { background: #E5EDFF; color: #2A4FB5; }
.heat { display: grid; gap: 4px; }
.heat .r { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: .9rem; }
.heat .r i { display: block; height: 14px; border-radius: 4px; background: var(--signal); }
.review { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.mail { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.mail .sim { color: #8A5A00; font-weight: 700; font-size: .8rem; }
.journey { display: grid; gap: 0; border-inline-start: 3px solid var(--sky); padding-inline-start: 18px; }
.journey div { position: relative; padding: 8px 0; }
.journey div::before { content: ''; position: absolute; inset-inline-start: -26px; top: 14px; width: 13px; height: 13px; border-radius: 50%; background: var(--grow); }

/* partners page */
.partners-hero { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 42px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.partners-hero p { color: #C9D3F2; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.steps div { background: var(--paper); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.steps b { font-family: var(--f-head); font-size: 2rem; color: var(--signal); }

/* ---------- sheet / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(7,14,36,.55); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.sheet { background: #fff; border-radius: 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 26px; animation: rise .25s cubic-bezier(.2,.9,.3,1.2); }
.sheet header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 16px; }
.sheet form { display: grid; gap: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }

#toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translateX(50%) translateY(-6px); }

/* demo guide */
#demo-guide { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 70; }
.guide { background: #fff; border-radius: 18px; box-shadow: 0 20px 50px -20px rgba(7,14,36,.6); padding: 16px 18px; width: 320px; border-top: 5px solid var(--sun); }
.guide .n { font-family: var(--f-head); font-weight: 900; color: var(--sun); }
.guide .row { display: flex; gap: 8px; margin-top: 10px; }

.demo-ribbon { background: var(--sun); color: var(--ink); text-align: center; font-weight: 800; font-size: .85rem; padding: 4px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  :root { --rail: 0px; }
  body { font-size: 16px; padding-bottom: 78px; }
  body.bare { padding-bottom: 0; }
  .rail {
    inset-block: auto 0; inset-inline: 0; width: auto; height: 74px; flex-direction: row; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  }
  .rail .logo, .rail .spacer, .rail a.tab.desk { display: none; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { padding: 8px 12px; font-size: .9rem; white-space: nowrap; }
  .detail .cover { padding: 24px; min-height: 200px; }
  .detail .cover .emoji { font-size: 4.2rem; opacity: .35; top: 8px; inset-inline-end: 12px; }
  .rail .tab { width: auto; flex: 1; padding: 6px 0; font-size: .72rem; }
  .page { padding: 18px 16px 40px; }
  .grid { grid-template-columns: 1fr; }
  .scroller { grid-auto-columns: 86%; margin-inline: -16px; padding-inline: 16px; }
  .discover, .detail, .day-wrap, .review, .partners-hero { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 65; border-radius: 0; max-height: none; display: none; padding-bottom: 100px; }
  .filters.open { display: grid; align-content: start; }
  .filter-toggle { display: inline-flex; }
  .onb { grid-template-columns: 1fr; }
  .onb .side { padding: 22px 20px; }
  .onb .side .big { font-size: 1.7rem; }
  .onb .side .hide-m { display: none; }
  .onb .main { padding: 22px 20px 30px; }
  .hero .inner { padding: 18px 20px 26px; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .hero .sub { font-size: 1.08rem; }
  .hero .cta .btn { flex: 1 1 100%; }
  .sticky-cta { display: flex; position: fixed; inset-inline: 0; bottom: 74px; background: #fff; padding: 10px 14px; gap: 8px; z-index: 30; box-shadow: 0 -10px 30px -20px rgba(0,0,0,.5); }
  .sticky-cta .btn { flex: 1; }
  .detail .desk-cta { display: none; }
  .window-banner .days { font-size: 3rem; }
  .steps { grid-template-columns: 1fr; }
  .sheet { border-radius: 24px 24px 0 0; align-self: end; }
  .scrim { padding: 0; place-items: end center; }
  #demo-guide { inset-inline: 10px; bottom: 84px; }
  .who { padding: 18px; }
  .fact { bottom: 150px; inset-inline-start: 14px; }
  .guide { width: auto; }
  .heat .r { grid-template-columns: 100px 1fr 30px; }
  .opt-grid { grid-template-columns: 1fr 1fr; }
  .ticket { grid-template-columns: 74px 1fr; }
  .ticket .notch { inset-inline-start: 63px; }
}
/* ---------- who am I ---------- */
.who { background: var(--paper); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; border-top: 5px solid var(--signal); }
.who h2 { font-size: 1.5rem; }
.who-group { margin-top: 14px; }
.who-group h4 { font-family: var(--f-head); font-size: .95rem; color: var(--ink-3); margin: 0 0 8px; }
.who.compact { border-top-color: var(--grow); }
.who-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.who-head .tag { margin: 2px; }
.needs-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.needs-grid > * { scroll-snap-align: start; }
.need-card { background: var(--chalk); border-radius: var(--r-md); padding: 14px 16px; }
.need-card h4 { font-family: var(--f-head); margin: 0 0 6px; font-size: 1rem; }
.need-card ol { margin: 0; padding-inline-start: 20px; line-height: 1.7; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; margin-top: 8px; color: var(--signal-d); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- eligibility ---------- */
.elig-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--ink); color: #fff; text-decoration: none;
  border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 18px; font-size: 1.05rem; }
.elig-cta > span:first-child { font-size: 1.8rem; }
.elig-cta b { display: block; font-family: var(--f-head); font-size: 1.3rem; }
.elig-cta small { color: #C9D3F2; }
.elig-cta > span:last-child { font-size: 1.4rem; color: var(--grow); }
.elig { background: var(--paper); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); border-inline-start: 5px solid var(--grow); }
.elig.maybe { border-color: var(--sun); }
.elig-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.elig-amt { font-family: var(--f-head); color: var(--grow); font-size: 1.05rem; }

.letter { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; white-space: pre-wrap; font-family: var(--f-body); font-size: 1rem; line-height: 1.75; margin: 0; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; }
.value-hero { display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; align-items: center; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 24px; }
.value-hero b { display: block; font-family: var(--f-head); font-size: 2.2rem; font-weight: 900; }
.value-hero b.got { color: var(--grow); }
.value-hero small, .muted-l { color: #AEB8D6; font-size: .88rem; }
.meter { height: 8px; background: rgba(255,255,255,.15); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--grow); }
.item.claim.done { opacity: .75; }
.item.claim.done b { text-decoration: line-through; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; align-items: start; }
.days-big { display: grid; margin: 14px 0 6px; }
.days-big b { font-family: var(--f-head); font-size: 2.6rem; font-weight: 900; line-height: 1; }
.ms-bar { position: relative; height: 12px; background: var(--chalk); border-radius: 8px; margin: 22px 0 8px; }
.ms-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--grow); border-radius: 8px; }
.ms { position: absolute; top: -6px; width: 3px; height: 24px; background: var(--line); }
.ms.on { background: var(--ink); }
.ms em { position: absolute; top: -20px; transform: translateX(50%); font-style: normal; font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.next-ms { margin: 14px 0 6px; font-weight: 600; }
.ms-list { list-style: none; padding: 0; margin: 0 0 12px; font-size: .9rem; line-height: 1.8; color: var(--ink-3); }
.ms-list li.on { color: var(--grow); font-weight: 700; }
.rlog { display: grid; gap: 8px; }
.detail.letter-grid { grid-template-columns: 340px 1fr; }
@media (max-width: 860px) { .value-hero, .tools-grid, .detail.letter-grid { grid-template-columns: 1fr; }
  .item.claim > div { width: 100%; } .item.claim > div .btn { flex: 1; } .letter { padding: 16px; max-height: none; } }

/* ---------- did you know ---------- */
.fact { position: fixed; z-index: 55; bottom: 90px; inset-inline-start: calc(var(--rail) + 24px); width: min(360px, calc(100vw - 28px));
  background: #FFFBEA; border-radius: 18px; padding: 14px 16px; box-shadow: 0 20px 40px -18px rgba(15,27,61,.55); border-inline-start: 5px solid var(--sun);
  animation: rise .35s cubic-bezier(.2,.9,.3,1.2); }
.changes { background: #EAF7F0; border-inline-start: 5px solid var(--grow); border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; }
.changes p { margin: 6px 0 0; font-weight: 600; }
#fact-slot .fact { position: static; width: auto; margin: 0 0 18px; box-shadow: none; }
.fact.urgent { background: #FFF1F0; border-color: #E5484D; }
.fact-top { display: flex; justify-content: space-between; align-items: center; }
.fact-top b { font-family: var(--f-head); font-size: 1.05rem; }
.fact-top .icon-btn { width: 32px; height: 32px; background: transparent; }
.fact p { margin: 6px 0 10px; font-weight: 600; }
.fact-actions { display: flex; gap: 8px; margin-bottom: 6px; }

/* ---------- assistant ---------- */
.chat { display: grid; grid-template-rows: 1fr auto; height: min(70vh, 620px); }
.chat-log { overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; }
.msg.me { align-self: flex-start; background: var(--signal); color: #fff; border-end-start-radius: 4px; }
.msg.bot { align-self: flex-end; background: var(--chalk); border-end-end-radius: 4px; }
.msg.bot a.res { display: block; background: #fff; border-radius: 10px; padding: 8px 10px; margin-top: 6px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.msg.bot a.res small { display: block; color: var(--ink-3); }
.chat-form { display: flex; gap: 8px; }
#chat-mic { padding: 10px 14px; }
#chat-mic.rec { background: #FDE2E2; box-shadow: inset 0 0 0 2px #E5484D; animation: breathe 1.2s infinite; }
.chat-sugg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chat-sugg button { font-size: .82rem; padding: 5px 10px; }

/* ---------- first-launch intro ---------- */
.intro { --deep: #0A1830; --teal: #0E3B43; --turq: #2EC4B6; --gold: #D9B26A;
  position: fixed; inset: 0; background: linear-gradient(180deg, var(--deep), #0B2733 60%, var(--teal)); color: #fff; display: grid; grid-template-rows: auto 1fr auto; z-index: 90; overflow: hidden; }
.intro-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; position: relative; z-index: 3; }
.intro-skip { background: rgba(255,255,255,.12); border: 0; color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.intro-viewport { overflow: hidden; touch-action: pan-y; cursor: grab; }
.intro-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.intro-slide { flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 0 6vw; height: 100%; }
.intro-visual { position: relative; height: min(70vh, 620px); border-radius: 32px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
.intro-visual > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-visual::after { content: ''; position: absolute; inset: 0; background: var(--photo) center / cover no-repeat; }
.intro-visual::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(10,24,48,.55)); pointer-events: none; }
.intro-visual.v3, .intro-visual.v4 { background: radial-gradient(120% 90% at 50% 0%, #134a54, var(--deep)); display: grid; place-items: center; }
.intro-visual.v3::after, .intro-visual.v4::after { display: none; }
.intro-text h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); line-height: 1.02; margin-bottom: 18px; }
.intro-text p { color: #C7DAE0; font-size: 1.15rem; max-width: 34ch; }
.intro-close { color: var(--gold) !important; font-weight: 700; font-family: var(--f-head); }
.intro-cta { margin-top: 18px; border: 0; border-radius: 999px; padding: 15px 30px; font-weight: 800; font-size: 1.1rem; cursor: pointer;
  background: linear-gradient(90deg, var(--turq), #5FD7C9); color: var(--deep); box-shadow: 0 12px 30px -12px rgba(46,196,182,.8); }
.intro-nav { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
.intro-arrow { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: transparent; color: #fff; font-size: 1.3rem; cursor: pointer; }
.intro-arrow.next { background: var(--turq); border-color: var(--turq); color: var(--deep); }
.intro-arrow:disabled { opacity: .3; cursor: default; }
.intro-dots { display: flex; gap: 8px; }
.intro-dots button { width: 9px; height: 9px; border-radius: 9px; border: 0; background: rgba(255,255,255,.3); padding: 0; cursor: pointer; transition: width .3s, background .3s; }
.intro-dots button[aria-selected="true"] { width: 30px; background: var(--gold); }
.intro-slide .intro-text > * { transition: opacity .6s .15s, transform .6s .15s; }
.intro-slide:not(.active) .intro-text > * { opacity: 0; transform: translateY(14px); }
.intro .sun { transform-origin: 250px 330px; animation: breathe 6s ease-in-out infinite; }
.intro .glow { transform-origin: 200px 400px; animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .85; } }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(88%, 56vh); }
.tile { aspect-ratio: 1 / .9; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; font-weight: 700; font-size: .9rem; line-height: 1.2;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 85%, #fff 0%), color-mix(in srgb, var(--c) 55%, #0A1830)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.tile span { font-size: 1.7rem; }
.intro-slide.active .tile { animation: pop .5s var(--d) both cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.phone { height: 86%; aspect-ratio: 9 / 18; border-radius: 34px; background: #050C1A; padding: 10px; box-shadow: 0 0 0 2px #2A4660, 0 30px 60px -20px #000; }
.phone-in { height: 100%; overflow: hidden; border-radius: 26px; background: #F3F4EF; color: var(--ink); padding: 18px 10px; display: grid; gap: 9px; align-content: start; font-size: .72rem; }
.ph-seg { display: flex; gap: 4px; background: #fff; border-radius: 99px; padding: 3px; }
.ph-seg b { flex: 1; text-align: center; padding: 4px 0; border-radius: 99px; color: var(--ink-3); }
.ph-seg b.on { background: var(--grow); color: #fff; }
.ph-ticket { display: grid; grid-template-columns: 38px 1fr; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.ph-ticket i { display: grid; place-items: center; font-style: normal; font-size: 1.1rem; }
.ph-ticket div { padding: 7px 9px; display: grid; }
.ph-ticket small { color: #11704A; } .ph-ticket em { font-style: normal; font-weight: 800; color: var(--grow); }
.ph-row { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 7px; font-weight: 700; }
.ph-row svg { width: 44px; height: 44px; }
.ph-btn { background: var(--signal); color: #fff; border-radius: 99px; text-align: center; padding: 8px; font-weight: 800; }
@media (max-width: 860px) {
  .intro-slide { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 18px; padding: 0 18px; align-items: stretch; }
  .intro-visual { height: auto; min-height: 0; border-radius: 26px; }
  .intro-text h1 { font-size: 1.9rem; margin-bottom: 10px; }
  .intro-text p { font-size: 1rem; margin-bottom: .4em; }
  .tiles { gap: 7px; width: min(92%, 40vh); }
  .phone { height: 92%; width: auto; } .tile { font-size: .72rem; padding: 8px; border-radius: 14px; } .tile span { font-size: 1.3rem; }
  .phone { width: min(200px, 60%); }
}
/* start-of-civilian-life checklist */
.start-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.start-step { background: var(--paper); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); border-inline-start: 5px solid var(--signal); }
.start-step.done { border-color: var(--grow); opacity: .8; } .start-step.done b { text-decoration: line-through; }
.start-step p { margin: 6px 0; }
.recovery-help { background: #E7F6EF; box-shadow: none; }
.rec-card h3 { font-size: 1.05rem; }

/* CV builder */
.detail.cv-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cv-mil { border: 2px dashed var(--line); border-radius: var(--r-md); padding: 12px; display: grid; gap: 10px; margin-bottom: 10px; }
.cv-tips summary { cursor: pointer; } .cv-tips ol { margin: 10px 0 0; padding-inline-start: 22px; line-height: 1.8; }
.cv-sheet { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 28px 30px; font-family: Arial, var(--f-body), sans-serif; font-size: .92rem; line-height: 1.5; position: sticky; top: 20px; }
.cv-sheet header { border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 10px; }
.cv-sheet h2 { font-size: 1.6rem; } .cv-sheet header p { margin: 2px 0; color: var(--ink-3); } .cv-target { font-weight: 700; color: var(--ink) !important; }
.cv-sheet h3 { font-size: .95rem; border-bottom: 1px solid var(--line); margin: 12px 0 4px; padding-bottom: 2px; }
.cv-sheet p { margin: 2px 0; } .cv-item span { float: left; color: var(--ink-3); } .cv-item ul { margin: 2px 0 6px; padding-inline-start: 18px; }
@media (max-width: 860px) { .detail.cv-grid { grid-template-columns: 1fr; } .cv-sheet { position: static; padding: 18px; } }

.site-foot { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9rem; }
.site-foot p { margin: 0 0 8px; max-width: 80ch; }
.site-foot .crisis a { font-weight: 800; color: var(--ink); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.site-foot nav a { color: var(--ink-2); font-weight: 600; }
.legal { max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin: 28px 0 8px; }
.legal p, .legal li { line-height: 1.75; }
.legal .fill { background: #FFF1D6; padding: 0 4px; border-radius: 4px; }

/* grid children may shrink below their content (prevents horizontal scroll on phones) */
.detail > *, .tools-grid > *, .discover > *, .day-wrap > *, .review > *, .opt-grid > *, .value-hero > * { min-width: 0; }
.input { min-width: 0; max-width: 100%; }
.contact-grid > * { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }
.panel { overflow-wrap: anywhere; }
.btn.block, .sticky-cta .btn { white-space: normal; text-align: center; min-width: 0; line-height: 1.2; }
@media (max-width: 860px) { .day-block .ctl button { width: 40px; height: 40px; } .opt-grid.stack-m { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
