/* ============================================================
   NAGAIKI · Member app (Phase 3) — app.css
   Layers on colors_and_type.css + site.css. Left-nav shell.
   Bio-age / biomarker figures appear ONLY on pages flagged
   data-illustrative (the "Marcus — illustrative" demo).
   ============================================================ */

body.app { background: var(--navy); }
body.app::before { opacity: 0.3; }

/* illustrative banner (populated demo only) */
.illus-banner { position: sticky; top: 0; z-index: 60; background: var(--gold); color: var(--navy); text-align: center; padding: 9px 20px; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; }

/* ── SHELL ─────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; border-right: var(--hair); background: var(--navy-mid); display: flex; flex-direction: column; padding: 26px 0; }
.side-logo { font-family: var(--font-display); font-size: 20px; font-weight: 300; color: var(--cream); letter-spacing: 0.02em; text-transform: none; padding: 0 26px 26px; }
.nl-mk { color: var(--gold); font-weight: 400; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 14px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-body); padding: 11px 14px; letter-spacing: 0.02em; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.side-nav a .gl { width: 18px; text-align: center; color: var(--gold-dim); font-family: var(--font-display); font-size: 14px; }
.side-nav a:hover { background: var(--gold-06); color: var(--cream); }
.side-nav a[aria-current] { background: var(--gold-08); color: var(--gold-light); }
.side-nav a[aria-current] .gl { color: var(--gold); }
.side-foot { padding: 18px 26px 0; border-top: var(--hair-faint); margin: 14px 14px 0; }
.badge { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-20); padding: 6px 12px; display: inline-block; }
.side-foot .who { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ── MAIN ──────────────────────────────────── */
.app-main { min-width: 0; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 44px 56px 0; flex-wrap: wrap; }
.app-head .greet { font-family: var(--font-display); font-weight: 300; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.16; color: var(--cream); padding-bottom: 2px; }
.app-head .greet em { font-style: italic; color: var(--gold); }
.app-head .sub { font-size: 13px; color: var(--text-muted); margin-top: 14px; letter-spacing: 0.02em; }
.app-body { padding: 36px 56px 96px; }
.app-mobile-top { display: none; }

/* section heads inside app */
.app-sec { margin-top: 44px; }
.app-sec > h2 { font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 18px; }

/* ── BIO-AGE HERO (demo only) ─────────────── */
.bioage { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; background: var(--navy-mid); border: var(--hair); border-top: 2px solid var(--gold); padding: 36px 40px; }
.bioage .big { font-family: var(--font-display); font-size: 72px; font-weight: 300; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.bioage .vs { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.bioage .delta { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.bioage .note { font-size: 14px; font-weight: 300; line-height: 1.7; color: var(--text-body); max-width: 48ch; }
.bioage .note b { color: var(--cream); font-weight: 400; }

/* ── TILE GRID ─────────────────────────────── */
.tiles { display: grid; gap: 2px; background: var(--gold-08); }
.tiles.t4 { grid-template-columns: repeat(4,1fr); }
.tiles.t3 { grid-template-columns: repeat(3,1fr); }
.tiles.t2 { grid-template-columns: 1fr 1fr; }
.tile { background: var(--navy); padding: 28px 26px; }
.tile .k { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 14px; }
.tile .n { font-family: var(--font-display); font-size: 34px; font-weight: 400; color: var(--cream); line-height: 1; font-variant-numeric: tabular-nums; }
.tile .n em { font-style: italic; color: var(--gold); }
.tile .d { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ── CHECK-IN LIST (stack) ─────────────────── */
.checkrow { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: var(--hair-faint); }
.checkrow:last-child { border-bottom: none; }
.checkrow .box { width: 22px; height: 22px; border: 1px solid var(--gold-30); flex-shrink: 0; display: grid; place-items: center; color: var(--gold); cursor: pointer; }
.checkrow.done .box { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.checkrow .nm { flex: 1; }
.checkrow .nm b { display: block; font-size: 15px; font-weight: 400; color: var(--cream); }
.checkrow .nm span { font-size: 12px; color: var(--text-muted); }
.checkrow .act { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); cursor: pointer; }
.checkrow.done .nm b { color: var(--text-muted); }

/* ── DATA ROWS (this week) ─────────────────── */
.metricrow { display: grid; grid-template-columns: 1fr auto auto; gap: 20px; align-items: center; padding: 16px 0; border-bottom: var(--hair-faint); }
.metricrow:last-child { border-bottom: none; }
.metricrow .lab { font-size: 14px; color: var(--text-body); }
.metricrow .val { font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--cream); font-variant-numeric: tabular-nums; }
.metricrow .chg { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.chg.up { color: var(--green); } .chg.down { color: var(--red); } .chg.flat { color: var(--text-muted); }

/* ── HALLMARK WHEEL ────────────────────────── */
.wheel-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: center; }
.wheel { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 1; }
.wheel svg { width: 100%; height: 100%; }
.wheel .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.wheel .ctr .ba { font-family: var(--font-display); font-size: 46px; font-weight: 300; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.wheel .ctr .bl { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 24px; justify-content: center; }
.legend span { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.prio { border-bottom: var(--hair-faint); padding: 18px 0; }
.prio:last-child { border-bottom: none; }
.prio .h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.prio .tag { font-size: 11px; font-weight: 500; color: var(--gold); letter-spacing: 0.06em; }
.prio .h b { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--cream); }
.prio p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── STORY (letter) ────────────────────────── */
.story-quote { font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.3; color: var(--cream); max-width: 20ch; }
.story-quote em { color: var(--gold); font-style: italic; }
.story-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; background: var(--gold-08); margin-top: 44px; }
.story-col { background: var(--navy-mid); padding: 34px 30px; }
.story-col h3 { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 18px; }
.story-col p { font-size: 15px; font-weight: 300; line-height: 1.8; color: var(--text-body); margin-bottom: 14px; }
.story-col .expand { border-bottom: 1px dotted var(--gold-30); cursor: help; color: var(--cream); }

/* ── PLAN PILLARS ──────────────────────────── */
.pillar { margin-bottom: 2px; }
.pillar-h { font-family: var(--font-display); font-size: 24px; font-weight: 400; color: var(--cream); margin: 38px 0 18px; }
.pillar-h em { font-style: italic; color: var(--gold); }
.plan-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: var(--navy-mid); border: var(--hair); padding: 22px 26px; margin-bottom: 12px; }
.plan-item h4 { font-size: 16px; font-weight: 400; color: var(--cream); margin-bottom: 6px; }
.plan-item p { font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.6; max-width: 60ch; }
.plan-item .typetag { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 10px; display: block; }
.plan-item .price { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); white-space: nowrap; }
.plan-foot { margin-top: 28px; font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.7; border-left: 2px solid var(--gold-20); padding: 4px 0 4px 16px; }

/* ── EMPTY STATES ──────────────────────────── */
.empty { max-width: 560px; margin: 40px auto; text-align: center; padding: 60px 24px; }
.empty .orbit-mini { width: 120px; height: 120px; margin: 0 auto 34px; position: relative; }
.empty .orbit-mini .r { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--gold-15); animation: spin 22s linear infinite; }
.empty .orbit-mini .r:nth-child(2){ inset: 22px; border-color: var(--gold-08); animation: spin 14s linear infinite reverse; }
.empty .orbit-mini .dot { position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); transform: translate(-50%,-50%); box-shadow: var(--shadow-glow); }
.empty h2 { font-family: var(--font-display); font-weight: 300; font-size: 32px; color: var(--cream); margin-bottom: 14px; }
.empty h2 em { font-style: italic; color: var(--gold); }
.empty p { font-size: 15px; font-weight: 300; line-height: 1.8; color: var(--text-body); margin-bottom: 28px; }
.empty .steps-mini { text-align: left; max-width: 380px; margin: 0 auto 32px; }
.empty .steps-mini .li { display: flex; gap: 14px; padding: 12px 0; border-bottom: var(--hair-faint); font-size: 14px; color: var(--text-body); }
.empty .steps-mini .li .n { color: var(--gold); font-size: 12px; font-weight: 500; min-width: 22px; }

.view-toggle { font-size: 12px; color: var(--text-muted); }
.view-toggle a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

/* ── TRENDS (chart) ────────────────────────── */
.chart-card { background: var(--navy-mid); border: var(--hair); border-top: 2px solid var(--gold); padding: 32px 36px; }
.chart-card .ttl { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--cream); }
.chart-card .ttl em { font-style: italic; color: var(--gold); }
.chart svg { width: 100%; height: auto; display: block; margin-top: 18px; }
.chart-foot { font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.7; margin-top: 18px; }
.chart-foot b { color: var(--cream); font-weight: 400; }
.devices { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.devices .d { font-size: 12px; color: var(--text-body); border: 1px solid var(--gold-20); padding: 7px 14px; }

/* ── ROADMAP (timeline) ────────────────────── */
.timeline { display: grid; grid-template-columns: repeat(5,1fr); gap: 2px; margin-top: 8px; position: relative; }
.tl-stop { background: var(--navy-mid); border: var(--hair); padding: 24px 20px; }
.tl-stop .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold-30); margin-bottom: 16px; }
.tl-stop.done .dot { background: var(--green); }
.tl-stop.now .dot { background: var(--gold); box-shadow: var(--shadow-glow); }
.tl-stop .when { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--cream); margin-bottom: 4px; }
.tl-chip { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; display: inline-block; margin-bottom: 14px; border: 1px solid var(--gold-20); color: var(--gold-light); }
.tl-chip.done { color: var(--green); border-color: rgba(76,175,138,.4); }
.tl-chip.now { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.tl-stop p { font-size: 12px; font-weight: 300; color: var(--text-muted); line-height: 1.6; }

/* ── FILTER BAR ────────────────────────────── */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 32px; }
.fchip { font-size: 12px; letter-spacing: 0.04em; color: var(--text-body); border: 1px solid var(--gold-20); padding: 9px 18px; cursor: pointer; transition: all var(--dur-2) var(--ease); }
.fchip:hover { border-color: var(--gold-30); }
.fchip.on { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 500; }

/* ── PRODUCT / PARTNER GRID ────────────────── */
.pgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.pcard { background: var(--navy-mid); border: var(--hair); padding: 26px 24px; display: flex; flex-direction: column; }
.pcard .ptype { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 14px; }
.pcard h3 { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--cream); margin-bottom: 8px; }
.pcard p { font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.6; flex: 1; }
.pcard .stat-chip { align-self: flex-start; font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--gold-20); color: var(--gold); margin-bottom: 16px; }
.pcard .stat-chip.yours { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: var(--hair-faint); }
.pcard .price { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); }
.pcard .loc { font-size: 12px; color: var(--text-muted); }
.pcard .book { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); border: 1px solid var(--gold-30); padding: 8px 16px; cursor: pointer; }
.pcard .book:hover { background: var(--gold-06); }

/* ── EXPERT (opt-in) ───────────────────────── */
.expert-quote { font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(28px,3.6vw,40px); line-height: 1.3; color: var(--cream); max-width: 22ch; }
.expert-quote em { color: var(--gold); font-style: italic; }
.expert-card { background: var(--navy-mid); border: var(--hair); border-top: 2px solid var(--gold); padding: 40px; max-width: 560px; margin-top: 36px; }
.expert-card .opt { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 16px; }
.expert-card h3 { font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--cream); margin-bottom: 10px; }
.expert-card p { font-size: 14px; font-weight: 300; color: var(--text-body); line-height: 1.75; margin-bottom: 14px; }
.expert-meta { display: flex; align-items: center; gap: 16px; margin: 24px 0; padding: 18px 0; border-top: var(--hair-faint); border-bottom: var(--hair-faint); }
.expert-meta .av { width: 44px; height: 44px; border-radius: 50%; background: var(--gold-08); display: grid; place-items: center; color: var(--gold); font-family: var(--font-display); font-size: 18px; }
.expert-meta b { display: block; font-size: 14px; color: var(--cream); font-weight: 500; }
.expert-meta span { font-size: 12px; color: var(--text-muted); }
.expert-foot { font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.7; border-left: 2px solid var(--gold-20); padding: 4px 0 4px 16px; margin-top: 28px; }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: 1fr; }
}

/* ── ACCOUNT / SETTINGS LIST ROWS ──────────── */
.listrow { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; border-bottom: var(--hair-faint); }
.listrow:last-child { border-bottom: none; }
.listrow .lr-main b { display: block; font-size: 15px; font-weight: 400; color: var(--cream); margin-bottom: 4px; }
.listrow .lr-main span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.listrow .lr-act { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); border: 1px solid var(--gold-30); padding: 8px 16px; cursor: pointer; white-space: nowrap; }
.listrow .lr-act:hover { background: var(--gold-06); }

/* toggle switch */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { position: absolute; inset: 0; background: var(--white-08); border: 1px solid var(--gold-20); border-radius: 999px; transition: all var(--dur-2) var(--ease); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: all var(--dur-2) var(--ease); }
.switch input:checked + .track { background: var(--gold-20); border-color: var(--gold); }
.switch input:checked + .track + .knob { left: 23px; background: var(--gold); }

/* ── MESSAGES (concierge) ──────────────────── */
.thread { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin-top: 8px; }
.msg { max-width: 76%; padding: 16px 20px; font-size: 14px; font-weight: 300; line-height: 1.6; }
.msg.them { background: var(--navy-mid); border: var(--hair); color: var(--text-body); align-self: flex-start; }
.msg.me { background: var(--gold-08); border: 1px solid var(--gold-20); color: var(--cream); align-self: flex-end; }
.msg .who { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 7px; }
.composer { display: flex; gap: 12px; margin-top: 28px; max-width: 680px; }
.composer input { flex: 1; background: var(--white-04); border: 1px solid var(--gold-20); color: var(--cream); padding: 14px 16px; font-family: var(--font-body); font-size: 14px; font-weight: 300; outline: none; }
.composer input:focus { border-color: var(--gold); background: var(--white-08); }

/* ── ERROR / 404 ───────────────────────────── */
.err-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 120px 24px; text-align: center; }
.err-shell .code { font-family: var(--font-display); font-size: clamp(72px, 14vw, 140px); font-weight: 300; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.err-shell h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 4vw, 40px); color: var(--cream); margin: 18px 0 14px; }
.err-shell h1 em { font-style: italic; color: var(--gold); }
.err-shell p { font-size: 15px; font-weight: 300; color: var(--text-body); line-height: 1.8; max-width: 48ch; margin: 0 auto 32px; }

/* ── MOBILE ────────────────────────────────── */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 84%; max-width: 320px; z-index: 80; transform: translateX(-100%); transition: transform var(--dur-2) var(--ease); }
  .side.open { transform: none; }
  .app-mobile-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: var(--hair); position: sticky; top: 0; background: rgba(15,28,46,.96); backdrop-filter: blur(12px); z-index: 70; }
  .app-mobile-top .side-logo { padding: 0; }
  .app-mobile-top button { background: none; border: none; color: var(--gold-light); font-size: 22px; cursor: pointer; }
  .app-head, .app-body { padding-left: 24px; padding-right: 24px; }
  .bioage { grid-template-columns: 1fr; gap: 20px; }
  .tiles.t4 { grid-template-columns: 1fr 1fr; }
  .tiles.t3, .tiles.t2, .story-cols { grid-template-columns: 1fr; }
  .wheel-wrap { grid-template-columns: 1fr; gap: 32px; }
  .plan-item { grid-template-columns: 1fr; gap: 12px; }
  .scrim { position: fixed; inset: 0; background: rgba(10,18,30,.6); z-index: 75; display: none; }
  .scrim.show { display: block; }
}

/* production: hide handoff annotations */
.wire{display:none!important}
