/* Family Table prototype. Mobile-first.
   Brand: PNC Private Bank design language (annaboyle-design.com/pncpb-designsystems): navy chrome, orange accent,
   DIN-style type (Barlow), triangle-line motif, notification colours. Patterns borrowed from consumer finance and
   mobility apps: one big number first, a trip-style progress track, a single search-style entry point, list rows,
   bottom sheets. */
:root {
  --navy: #10214D; --navy-2: #1A2B5C; --navy-3: #2A3D74;
  --orange: #EF6A00; --orange-700: #B84F00; --orange-50: #FFF3E9;
  --bg: #FFFFFF; --surface: #F4F5F7; --line: #E6E8EC; --line-2: #D5D9DF;
  --text: #1F2430; --sub: #5E646E; --faint: #8A9099;
  --link: #2A6EBB;
  --green: #6F9A4B; --slate: #424B5A; --blue: #6593C9; --purple: #6D4AA0; --purple-50: #F1EDF7;
  --pos: #2E7D32; --pos-50: #EAF4EA; --warn: #A87C00; --warn-50: #FDF6E1; --neg: #C8352E; --neg-50: #FBEFEF; --info-50: #E8F0FA;
  --sans: "Barlow", "DIN Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 12px; --r-sm: 8px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%233A4C82' stroke-opacity='.55'%3E%3Cpath d='M0 0 L28 0 L28 28 Z'/%3E%3Cpath d='M28 28 L56 28 L56 56 Z'/%3E%3Cpath d='M28 0 L56 28'/%3E%3Cpath d='M0 28 L28 56 L0 56 Z'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
a { color: var(--link); text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }

/* ---------- app bar ---------- */
.appbar { position: sticky; top: 0; z-index: 20; height: 52px; background: var(--navy-2); color: #fff; }
.appbar .in { height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand small { font-weight: 400; color: rgba(255,255,255,.6); font-size: 13px; display: none; }
.tabs { display: none; }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; font-weight: 500; padding: 4px 4px 4px 10px; border-radius: 20px; background: rgba(255,255,255,.08); }
.me .av { width: 28px; height: 28px; font-size: 11px; }
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; }

/* ---------- layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 0 16px 112px; }
.cols { display: grid; gap: 28px; }
.col-main, .col-side { min-width: 0; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section-head h2 { font-size: 19px; font-weight: 600; color: var(--navy); }
.section-head .aside { font-size: 14px; color: var(--sub); }
.section-head button.aside { color: var(--link); font-weight: 500; }
.muted { color: var(--sub); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.micro { font-size: 12.5px; }

/* ---------- hero: one big number first ---------- */
.hero { padding: 24px 0 8px; }
.hero .label { font-size: 15px; color: var(--sub); font-weight: 500; }
.hero .value { font-size: 46px; line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; color: var(--navy); margin-top: 4px; }
.hero .value .unit { font-size: 22px; font-weight: 500; color: var(--sub); letter-spacing: 0; margin-left: 6px; }
.hero .caption { font-size: 15px; color: var(--sub); margin-top: 6px; }
.delta { font-size: 15px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.delta.up { color: var(--orange-700); } .delta.down { color: var(--pos); }
.hello { font-size: 15px; color: var(--sub); }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-radius: var(--r-sm); padding: 3px; margin-top: 18px; }
.seg button { padding: 9px 6px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--sub); min-height: 40px; }
.seg button.on { background: var(--bg); color: var(--navy); box-shadow: 0 1px 2px rgba(16,33,77,.14); }

/* trip-style progress */
.trip { margin-top: 20px; }
.trip .bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.trip .bars i { height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.trip .bars i.done { background: var(--navy); }
.trip .bars i.now::after { content: ""; position: absolute; inset: 0; width: 55%; background: var(--orange); border-radius: 2px; }
.trip .now-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; }
.trip .now-line b { font-weight: 600; color: var(--navy); }
.trip .now-line span { color: var(--sub); white-space: nowrap; }
.trip .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.trip .steps .cur { color: var(--orange-700); font-weight: 600; }

/* search-style entry point */
.askbar { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 22px; padding: 0 16px; height: 52px; background: var(--surface); border-radius: var(--r); color: var(--sub); font-size: 16px; font-weight: 500; text-align: left; }
.askbar svg { color: var(--navy); flex: none; }
.askbar .kbd { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .04em; }

/* ---------- rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: inherit; width: 100%; text-align: left; }
.rows > .row:last-child { border-bottom: 0; }
.row .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--navy); }
.row .ic.o { background: var(--orange-50); color: var(--orange-700); }
.row .ic.p { background: var(--purple-50); color: var(--purple); }
.row .ic.g { background: var(--pos-50); color: var(--pos); }
.row .ic.r { background: var(--neg-50); color: var(--neg); }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-weight: 600; font-size: 16px; color: var(--text); }
.row .tx span { display: block; font-size: 14px; color: var(--sub); }
.row .tx em { display: block; font-style: normal; font-size: 13.5px; color: var(--purple); font-weight: 500; margin-top: 2px; }
.row .rt { flex: none; text-align: right; font-size: 15px; font-weight: 600; color: var(--navy); }
.row .rt small { display: block; font-weight: 500; font-size: 13px; }
.row .chev { color: var(--faint); flex: none; }
a.row:hover, button.row:hover { background: linear-gradient(90deg, transparent, var(--surface) 8%, var(--surface) 92%, transparent); }
.badge { font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge.o { background: var(--orange-50); color: var(--orange-700); }
.badge.g { background: var(--pos-50); color: var(--pos); }
.badge.r { background: var(--neg-50); color: var(--neg); }
.badge.p { background: var(--purple-50); color: var(--purple); }
.badge.n { background: var(--surface); color: var(--sub); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--bg); }
.panel + .panel { margin-top: 14px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--neg-50); margin-top: 18px; }
.alert.info { background: var(--info-50); }
.alert b { display: block; font-weight: 600; }
.alert span { font-size: 14.5px; color: var(--sub); }
.alert svg { flex: none; margin-top: 2px; color: var(--neg); }
.alert.info svg { color: var(--link); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-sm); background: var(--orange); color: #fff; font-weight: 600; font-size: 16px; }
.btn.navy { background: var(--navy); }
.btn.ghost { background: var(--bg); color: var(--navy); border: 1px solid var(--line-2); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.done { background: var(--pos-50); color: var(--pos); }
.btn[disabled] { opacity: .6; cursor: default; }
.sticky-cta { position: sticky; bottom: 64px; padding: 12px 0; background: var(--bg); margin-top: 8px; box-shadow: 0 -10px 14px -10px rgba(16,33,77,.12); }

/* ---------- viz ---------- */
.viz { display: block; width: 100%; height: auto; }
.chart { margin-top: 14px; }
.chart-x { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--navy); transition: width .3s ease; }
.weight { width: 64px; }
.table-viz { display: grid; place-items: center; padding: 6px 0 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--sub); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.ring { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

.wf { display: grid; margin-top: 6px; }
.wf .r { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.wf .r:last-child { border-bottom: 0; }
.wf .r b { font-weight: 600; text-align: right; }
.wf .r.minus b { color: var(--sub); font-weight: 500; }
.wf .r.cont, .wf .r.cont b { color: var(--purple); font-weight: 500; }
.wf .r.net span, .wf .r.net b { font-weight: 700; color: var(--navy); font-size: 17px; }
.wf .track { grid-column: 1 / -1; height: 6px; position: relative; }
.wf .track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--slate); }
.wf .minus .track i { background: var(--line-2); }
.wf .cont .track i { background: repeating-linear-gradient(90deg, var(--purple) 0 4px, transparent 4px 7px); }
.wf .net .track i { background: var(--navy); }

.alloc { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin-top: 12px; }
.alloc i { display: block; height: 100%; }

.gap-row { display: grid; grid-template-columns: 1fr 170px 44px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.gap-row:last-child { border-bottom: 0; }
.gap-row b { text-align: right; font-weight: 600; }
.gap-row.high b { color: var(--orange-700); }
.spread { position: relative; height: 20px; }
.spread .axis { position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.spread .range { position: absolute; top: 7px; height: 6px; border-radius: 3px; background: var(--line-2); }
.gap-row.high .spread .range { background: #F8C9A3; }
.spread .pt { position: absolute; top: 5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--slate); box-shadow: 0 0 0 2px #fff; }

.claim { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.seat { width: 56px; height: 56px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 600; line-height: 1.15; flex: none; }
.claimants { display: flex; }
.claimant { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; margin-left: -6px; box-shadow: 0 0 0 3px #fff; }
.claimant:first-child { margin-left: 0; }

/* check-in */
.q { padding: 18px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q h3 { font-size: 17px; font-weight: 600; color: var(--navy); line-height: 1.35; }
.q textarea { width: 100%; min-height: 104px; margin-top: 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; font: 16px/1.5 var(--sans); color: var(--text); background: var(--bg); resize: vertical; }
.q textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(16,33,77,.1); }
.themes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; align-items: center; font-size: 13px; }
.themes .lab { color: var(--faint); margin-right: 2px; }
.theme { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface); color: var(--navy); }
.theme.flag { background: var(--neg-50); color: var(--neg); }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.switch-row .tx { flex: 1; }
.switch-row .tx b { display: block; font-weight: 600; font-size: 15px; }
.switch-row .tx span { display: block; font-size: 13.5px; color: var(--sub); }
.switch { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--line-2); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--pos); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.quote { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--pos); background: var(--pos-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 15.5px; animation: fade .3s; }
.quote small { display: block; font-size: 12.5px; color: var(--pos); font-weight: 600; margin-bottom: 2px; }
.sealed { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--purple); background: var(--purple-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14.5px; color: var(--purple); display: flex; gap: 8px; align-items: center; }

/* options */
input[type=range] { width: 100%; accent-color: var(--orange); height: 28px; margin: 6px 0 0; }
.range-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); }
.note-box { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); font-size: 15px; color: var(--text); }
.note-box small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 4px; }

/* documents */
.file { width: 36px; height: 44px; border-radius: 4px; background: var(--neg); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: end center; padding-bottom: 6px; flex: none; position: relative; }
.file.scan { background: var(--slate); }
.conf { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-top: 10px; }
.conf .bar { width: 80px; }
.conf .bar i { background: var(--purple); }

/* ---------- bottom nav ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bnav a { display: grid; justify-items: center; gap: 3px; padding: 8px 4px 10px; font-size: 12px; font-weight: 600; color: var(--faint); position: relative; }
.bnav a svg { width: 22px; height: 22px; }
.bnav a.on { color: var(--navy); }
.bnav a.on::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; background: rgba(16,33,77,.42); z-index: 40; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--bg); border-radius: 16px 16px 0 0; max-height: 88vh; display: flex; flex-direction: column; animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; }
.sheet header { padding: 10px 16px 12px; display: flex; align-items: center; gap: 12px; }
.sheet header h2 { font-size: 19px; font-weight: 600; color: var(--navy); flex: 1; }
.sheet .x { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--sub); }
.sheet .body { overflow-y: auto; padding: 0 16px 16px; flex: 1; }
.sheet .foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.model-seg { display: inline-grid; grid-auto-flow: column; background: var(--surface); border-radius: 8px; padding: 3px; }
.model-seg button { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--sub); }
.model-seg button.on { background: var(--bg); color: var(--navy); box-shadow: 0 1px 2px rgba(16,33,77,.14); }
.msg-user { display: flex; justify-content: flex-end; margin-top: 16px; }
.msg-user p { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; max-width: 85%; font-size: 15.5px; }
.steps-list { margin-top: 14px; display: grid; gap: 6px; }
.steps-list div { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sub); animation: fade .25s; }
.steps-list div svg { color: var(--pos); flex: none; }
.steps-list code { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.answer { margin-top: 12px; font-size: 16.5px; line-height: 1.5; }
.answer .src { display: block; font-size: 12.5px; color: var(--faint); font-weight: 600; margin-bottom: 4px; }
.mini { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--sub); }
.checks span { display: inline-flex; align-items: center; gap: 4px; }
.checks svg { color: var(--pos); }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- picker ---------- */
.splash { background: var(--navy) var(--pattern); color: #fff; padding: 32px 0 36px; }
.splash .in { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.splash h1 { font-size: 32px; font-weight: 500; line-height: 1.15; max-width: 20ch; }
.splash p { color: rgba(255,255,255,.8); margin-top: 10px; max-width: 56ch; font-size: 16px; }
.people { display: grid; }

/* ---------- story cards (video) ---------- */
body.story .appbar, body.story .bnav { display: none; }
.storycard { min-height: 100vh; display: grid; place-items: center; padding: 48px 24px; background: var(--navy) var(--pattern); color: #fff; }
.storycard .inner { max-width: 1400px; width: 100%; }
.storycard .eyebrow { font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: #F7A766; font-weight: 600; }
.storycard h1 { font-size: clamp(36px, 5vw, 72px); font-weight: 400; line-height: 1.1; max-width: 22ch; margin-top: 18px; }
.storycard .sub { font-size: clamp(20px, 2.2vw, 30px); font-weight: 300; color: rgba(255,255,255,.85); max-width: 46ch; margin-top: 20px; }
.storycard .rule { width: 72px; height: 4px; background: var(--orange); margin-top: 26px; }
.stats { display: grid; gap: 20px; margin-top: 40px; }
.stat { background: rgba(255,255,255,.07); border-top: 4px solid var(--orange); padding: 22px; }
.stat b { display: block; font-size: clamp(48px, 5vw, 80px); font-weight: 500; line-height: 1; }
.stat p { font-size: clamp(17px, 1.6vw, 22px); margin-top: 12px; color: rgba(255,255,255,.9); }
.stat small { display: block; margin-top: 10px; font-size: 14px; color: rgba(255,255,255,.6); }
.cast { display: grid; gap: 14px; margin-top: 36px; }
.cast div { background: rgba(255,255,255,.07); padding: 16px 18px; border-left: 4px solid var(--c); }
.cast b { font-size: 22px; font-weight: 500; display: block; }
.cast span { font-size: 15px; color: rgba(255,255,255,.75); }

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  .brand small { display: inline; }
  .page { padding: 0 32px 64px; }
  .appbar .in, .splash .in { padding: 0 32px; }
  .hero .value { font-size: 56px; }
  .stats, .cast { grid-template-columns: repeat(3, 1fr); }
  .people { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
@media (min-width: 1024px) {
  .tabs { display: flex; gap: 26px; align-self: stretch; margin-left: 12px; }
  .tabs a { display: flex; align-items: center; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; padding-top: 3px; }
  .tabs a.on { color: #fff; border-bottom-color: var(--orange); }
  .bnav { display: none; }
  .cols { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
  .cols.wide-side { grid-template-columns: 300px minmax(0, 1fr); }
  .col-side { padding-top: 24px; }
  .sticky-cta { bottom: 0; }
  .sheet { left: auto; right: 24px; bottom: 24px; width: 440px; border-radius: 16px; max-height: 80vh; box-shadow: 0 12px 40px rgba(16,33,77,.25); }
  .sheet .grab { display: none; }
  .scrim { background: rgba(16,33,77,.18); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
