/* DRC Sleep Lab shared styles.
   Layout: one long night. Pages run from deep night at the top toward dawn gold, like the videos. Single dark look by choice. */
:root {
  --night: #081628;      /* logo background, page ground */
  --night-deep: #050d1c;
  --night-raised: #0e1d36;
  --line: rgba(150,190,255,.16);
  --cream: #FFECC8;
  --cream-soft: rgba(255,236,200,.72);
  --cream-faint: rgba(255,236,200,.5);
  --rain: #96BEFF;
  --dawn: #FFBE6E;
  --paper: #FDFDFC;
  --ink: #1a2d4d;
  --f-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--night); color: var(--cream); font: 400 16px/1.7 var(--f-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(8,22,40,.92); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-head); text-wrap: balance; margin: 0; line-height: 1.15; }
p { margin: 0; }
.eyebrow { font: 500 12px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--rain); }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(8,22,40,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand span { font: 400 19px/1 var(--f-serif); letter-spacing: .04em; }
.brand small { display: block; font: 500 10px/1 var(--f-body); letter-spacing: .3em; margin-top: 5px; color: var(--cream-soft); }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav ul a { text-decoration: none; color: var(--cream-soft); }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--cream); }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 14px/1 var(--f-body); padding: 14px 22px; border-radius: 999px; background: var(--dawn); color: var(--night-deep); transition: transform .2s, background .2s; }
.btn:hover { background: #ffcb8a; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(255,236,200,.35); }
.btn.ghost:hover { background: rgba(255,236,200,.08); }
.btn.sm { padding: 10px 16px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 36px 88px; }
.hero h1 { font-weight: 600; font-size: clamp(38px, 5.6vw, 64px); letter-spacing: -.01em; margin: 18px 0 22px; }
.hero h1 em { font: italic 400 1em/1 var(--f-serif); color: var(--dawn); }
.hero .lede { font-size: 18px; color: var(--cream-soft); max-width: 46ch; font-weight: 300; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero .logo { justify-self: center; width: min(100%, 440px); height: auto; aspect-ratio: 1 / 1; filter: drop-shadow(0 0 60px rgba(150,190,255,.12)); }

/* Featured video */
section { padding-block: 96px; }
.sec-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; }
.sec-head p { color: var(--cream-soft); font-weight: 300; }

.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--night-raised); }
.screen { position: relative; aspect-ratio: 16/9; max-width: 100%; background:
    linear-gradient(105deg, #0b2550 0%, #0a1a38 34%, #000 46%, #000 70%, #6b4a20 86%, #f0b768 100%); }
.screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 9px, rgba(150,190,255,.07) 9px 10px); mask-image: linear-gradient(90deg, #000 0 38%, transparent 46%); -webkit-mask-image: linear-gradient(90deg, #000 0 38%, transparent 46%); }
.screen .t { position: absolute; left: 22px; top: 18px; z-index: 1; font: 700 clamp(15px, 2vw, 22px)/1.1 var(--f-head); }
.screen .t span { display: block; color: var(--cream); font-size: .7em; margin-top: 4px; }
.screen .badge { position: absolute; left: 22px; bottom: 18px; z-index: 1; font: 600 11px/1 var(--f-body); letter-spacing: .08em; padding: 8px 12px; border-radius: 8px; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.thumb { position: relative; display: block; align-self: center; background: #000; }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.thumb .play { position: absolute; right: 16px; bottom: 16px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--dawn); color: var(--night-deep); box-shadow: 0 6px 24px rgba(0,0,0,.45); transition: transform .2s; }
.thumb .play svg { width: 22px; height: 22px; margin-left: 3px; }
.thumb:hover .play { transform: scale(1.08); }
.feature .info { padding: 36px 36px 32px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.feature h3 { font-size: 22px; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 12px/1 var(--f-body); padding: 7px 11px; border-radius: 999px; background: rgba(150,190,255,.1); color: var(--rain); }
.feature .info p { color: var(--cream-soft); font-weight: 300; font-size: 15px; }

/* Night timeline */
.night { margin-top: 64px; }
.night h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.night > p { color: var(--cream-soft); font-weight: 300; font-size: 15px; margin-bottom: 26px; }
.bar { display: flex; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.bar div { position: relative; min-width: 0; }
.bar div + div { border-left: 1px solid rgba(8,22,40,.6); }
.storm-dots { position: absolute; inset: 0; }
.hours { display: flex; justify-content: space-between; font: 500 11px/1 var(--f-body); color: var(--cream-faint); margin-top: 10px; font-variant-numeric: tabular-nums; }
.chapters { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chapters li { background: var(--night); padding: 18px 20px; display: grid; gap: 4px; }
.chapters time { font: 600 13px/1 var(--f-body); font-variant-numeric: tabular-nums; color: var(--dawn); display: flex; align-items: center; gap: 8px; }
.chapters time i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chapters b { font-weight: 600; font-size: 15px; }
.chapters span { color: var(--cream-soft); font-size: 14px; font-weight: 300; line-height: 1.55; }

/* How we research and build */
.research { border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; position: relative; padding: 26px 20px 0 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 300 34px/1 var(--f-head); color: var(--dawn); font-variant-numeric: tabular-nums; }
.steps b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.steps p { color: var(--cream-soft); font-size: 14px; font-weight: 300; line-height: 1.6; }
.table-head { display: grid; gap: 6px; margin-bottom: 20px; }
.table-head h3 { font-size: 20px; font-weight: 600; }
.table-head p { color: var(--cream-soft); font-weight: 300; font-size: 15px; }
.rtable { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rrow { display: grid; grid-template-columns: 1.25fr .8fr 1.25fr; gap: 28px; padding: 20px 24px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.rrow > * { min-width: 0; margin: 0; }
.rrow:nth-child(even) { background: rgba(150,190,255,.035); }
.rhead { border-top: 0; background: var(--night-raised); padding-block: 14px; font: 600 11px/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--rain); }
.rrow p:first-child { color: var(--cream); }
.rrow p:last-child { color: var(--cream-soft); font-weight: 300; }
.rrow .src { color: var(--cream-faint); font-size: 13px; }
.rrow .src a { color: var(--rain); text-decoration-color: rgba(150,190,255,.4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.rrow .src a:hover { text-decoration-color: var(--rain); }
.disclaimer { margin-top: 24px; font-size: 13px; color: var(--cream-faint); }

/* How it's built */
.built { background: var(--night-deep); border-block: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.fact { padding: 28px 24px 0 0; display: grid; gap: 10px; align-content: start; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact .n { font: 300 clamp(36px, 4.4vw, 52px)/1 var(--f-head); color: var(--rain); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fact .n small { font-size: .42em; margin-left: 4px; color: var(--cream-soft); }
.fact b { font-weight: 600; font-size: 15px; }
.fact p { color: var(--cream-soft); font-size: 14px; font-weight: 300; line-height: 1.6; }
.credits { margin-top: 56px; display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--cream-soft); font-weight: 300; }
.credits .eyebrow { padding-top: 4px; }
.credits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }

/* Dawn band */
.dawn { background: linear-gradient(180deg, var(--night) 0%, #1d2a4a 30%, #6a5466 62%, #e9a96a 92%, var(--dawn) 100%); padding-block: 120px 32px; }
.about { background: var(--paper); color: var(--ink); border-radius: 22px; box-shadow: 0 18px 50px rgba(40,25,10,.25); padding: 56px 56px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about img { width: 100%; max-width: 480px; height: auto; aspect-ratio: 880 / 338; justify-self: center; }
.about .eyebrow { color: #5a7aa5; }
.about h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; margin: 12px 0 16px; color: var(--ink); }
.about p { color: #3e5170; font-weight: 300; }
.about p + p { margin-top: 12px; }

footer { background: var(--paper); color: #3e5170; border-top: 1px solid #e3e7ee; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-block: 28px; font-size: 13px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; color: var(--ink); font-weight: 500; }
footer a:hover { text-decoration: underline; }

@media (max-width: 880px) {
  .nav .wrap { flex-wrap: wrap; row-gap: 8px; }
  .nav ul { order: 3; flex: 1 0 100%; gap: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; white-space: nowrap; }
  .nav ul::-webkit-scrollbar { display: none; }
  .hero .wrap { grid-template-columns: 1fr; padding-block: 28px 64px; gap: 24px; }
  .hero .logo { width: 200px; order: -1; justify-self: start; }
  .feature { grid-template-columns: 1fr; }
  .feature .info { padding: 26px 22px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact { padding-bottom: 28px; }
  .credits { grid-template-columns: 1fr; gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 20px 0; border-left: 0; grid-template-columns: 44px 1fr; column-gap: 12px; }
  .steps li + li { border-top: 1px solid var(--line); }
  .steps li::before { grid-row: span 2; font-size: 28px; }
  .rhead { display: none; }
  .rrow { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .rrow:first-of-type + .rrow { border-top: 0; }
  .rrow p::before { content: attr(data-l); display: block; font: 600 10px/1.4 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--rain); margin-bottom: 2px; }
  .about { grid-template-columns: 1fr; padding: 36px 24px 40px; gap: 28px; }
  section { padding-block: 64px; }
  .dawn { padding-block: 80px 24px; }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .brand span { font-size: 16px; }
  .nav .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Home: link from the shared process to each video's own research */
.steps.flush { margin-bottom: 0; }
.more { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.textlink { color: var(--rain); text-decoration: none; font-weight: 500; font-size: 15px; }
.textlink:hover { text-decoration: underline; text-underline-offset: 4px; }
.feature .row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Video page header (same layout for every video page) */
.vhead { padding-block: 32px 72px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--cream-faint); margin: 0 0 20px; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { color: var(--rain); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.vhead h1 { font-weight: 600; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.01em; margin-bottom: 12px; }
.vhead .sub { color: var(--cream-soft); font-weight: 300; font-size: 18px; max-width: 60ch; margin-bottom: 40px; }
.night-sec { border-top: 1px solid var(--line); }
.night-sec .night { margin-top: 0; }
@media (max-width: 880px) { .vhead { padding-block: 24px 56px; } }


/* ---------- Tools: questionnaire and sleep log ---------- */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool { display: grid; gap: 12px; align-content: start; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--night-raised); text-decoration: none; transition: border-color .2s, transform .2s; }
.tool:hover { border-color: rgba(255,190,110,.5); transform: translateY(-2px); }
.tool h3 { font-size: 21px; font-weight: 600; }
.tool p { color: var(--cream-soft); font-weight: 300; font-size: 15px; }
.tool .go { color: var(--dawn); font-weight: 600; font-size: 14px; }

.page-head { padding-block: 32px 40px; }
.page-head h1 { font-weight: 600; font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.01em; margin: 14px 0 14px; }
.page-head .sub { color: var(--cream-soft); font-weight: 300; font-size: 17px; max-width: 62ch; }
.page-head .sub + .sub { margin-top: 10px; }
.narrow { max-width: 820px; }

/* Questionnaire */
.qpart { padding-block: 8px 40px; }
.qpart > h2 { font-size: 22px; font-weight: 600; margin: 8px 0 6px; }
.qpart > p { color: var(--cream-soft); font-weight: 300; font-size: 15px; margin-bottom: 20px; }
.q { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 20px; margin: 0 0 12px; background: rgba(14,29,54,.55); transition: border-color .2s; }
.q.missing { border-color: var(--dawn); }
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 500; font-size: 16px; line-height: 1.45; }
.q legend span { color: var(--dawn); font-variant-numeric: tabular-nums; margin-right: 10px; font-weight: 600; }
.q legend small { display: block; color: var(--cream-faint); font-weight: 300; font-size: 13px; margin-top: 4px; }
.opts { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-block; padding: 9px 15px; border-radius: 999px; font-size: 14px; line-height: 1.3; color: var(--cream-soft); box-shadow: inset 0 0 0 1px rgba(255,236,200,.25); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.opt span:hover { box-shadow: inset 0 0 0 1px rgba(255,236,200,.55); color: var(--cream); }
.opt input:checked + span { background: var(--dawn); color: var(--night-deep); box-shadow: none; font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--dawn); outline-offset: 3px; }
.submit-bar { position: sticky; bottom: 0; z-index: 4; background: rgba(8,22,40,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.submit-bar .wrap { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-block: 14px; }
.count { font-size: 14px; color: var(--cream-soft); font-variant-numeric: tabular-nums; }
.meter { height: 4px; width: 160px; max-width: 40vw; background: var(--line); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 12px; }
.meter i { display: block; height: 100%; background: var(--dawn); width: 0; transition: width .2s; }
button.btn { border: 0; cursor: pointer; }

/* Results */
.results { padding-block: 56px 80px; border-top: 1px solid var(--line); }
.profile { border: 1px solid var(--line); border-radius: 20px; padding: 32px; background: var(--night-raised); display: grid; gap: 14px; }
.profile h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; }
.profile > p { color: var(--cream-soft); font-weight: 300; max-width: 62ch; }
.matches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.match { font-size: 13px; padding: 7px 12px; border-radius: 999px; background: rgba(150,190,255,.1); color: var(--cream); }
.match b { color: var(--rain); font-weight: 500; margin-left: 6px; }
.notes { display: grid; gap: 12px; margin-top: 24px; }
.note { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 20px; border-radius: 14px; border: 1px solid rgba(255,190,110,.35); background: rgba(255,190,110,.06); }
.note .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--dawn); color: var(--night-deep); font-weight: 700; font-size: 15px; }
.note.info { border-color: var(--line); background: rgba(150,190,255,.05); }
.note.info .ic { background: var(--rain); }
.note b { display: block; font-weight: 600; margin-bottom: 2px; }
.note p { color: var(--cream-soft); font-weight: 300; font-size: 15px; }
.note a { color: var(--rain); }
.recs-head { margin: 48px 0 18px; display: grid; gap: 6px; }
.recs-head h3 { font-size: 22px; font-weight: 600; }
.recs-head p { color: var(--cream-soft); font-weight: 300; font-size: 15px; }
.recs { display: grid; gap: 12px; }
.rec { display: grid; grid-template-columns: 170px 1fr auto; gap: 20px; align-items: start; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; }
.rec .role { font: 600 11px/1.4 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--rain); padding-top: 3px; }
.rec h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.rec h4 small { font-weight: 400; color: var(--cream-faint); font-size: 13px; margin-left: 8px; }
.rec p { color: var(--cream-soft); font-weight: 300; font-size: 14px; }
.rec p + p { margin-top: 6px; }
.rec .min { min-width: 0; }
.pill { display: inline-block; white-space: nowrap; font: 600 12px/1 var(--f-body); padding: 7px 11px; border-radius: 999px; }
.pill.live { background: var(--dawn); color: var(--night-deep); }
.pill.soon { box-shadow: inset 0 0 0 1px rgba(255,236,200,.3); color: var(--cream-soft); }
.rec .acts { display: grid; gap: 8px; justify-items: end; }
.tips { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.tips div { padding: 22px 22px 0 0; }
.tips div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.tips b { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.tips p { color: var(--cream-soft); font-weight: 300; font-size: 14px; }
.after { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Sleep log */
.log-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: var(--night-raised); min-width: 0; }
.panel > h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.panel > .hint { color: var(--cream-faint); font-size: 13px; margin-bottom: 20px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fgrid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 500; color: var(--cream-soft); }
.field small { font-size: 12px; color: var(--cream-faint); font-weight: 300; }
.field input, .field select, .field textarea { width: 100%; font: 400 15px/1.4 var(--f-body); color: var(--cream); background: var(--night); border: 1px solid rgba(150,190,255,.25); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--dawn); box-shadow: 0 0 0 3px rgba(255,190,110,.18); }
.field input[aria-invalid="true"] { border-color: #ff9d8a; }
.scale { display: flex; gap: 6px; }
.scale .opt span { padding: 8px 0; width: 40px; text-align: center; }
.scale-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--cream-faint); max-width: 224px; }
.calc { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: rgba(150,190,255,.08); font-size: 14px; color: var(--cream-soft); }
.calc b { color: var(--cream); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.err { color: #ffb4a6; font-size: 13px; margin-top: 10px; }
details.more-fields { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.more-fields summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--rain); }
details.more-fields .fgrid { margin-top: 14px; }
.form-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }
.saved { font-size: 13px; color: var(--rain); }
.btn.quiet { background: transparent; color: var(--cream-soft); box-shadow: none; padding-inline: 8px; }
.btn.quiet:hover { color: var(--cream); background: transparent; }
.btn.danger { background: transparent; color: #ffb4a6; box-shadow: inset 0 0 0 1px rgba(255,180,166,.45); }
.btn.danger:hover { background: rgba(255,180,166,.08); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.tile { background: var(--night); padding: 16px 16px 14px; display: grid; gap: 4px; min-width: 0; }
.tile .k { font-size: 12px; color: var(--cream-faint); }
.tile .v { font: 500 24px/1.1 var(--f-head); font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; color: var(--cream-faint); font-weight: 400; margin-left: 3px; }
.badge-ex { display: inline-block; font: 600 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; background: rgba(255,190,110,.15); color: var(--dawn); }
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-box .tip { position: absolute; pointer-events: none; background: var(--night-deep); border: 1px solid rgba(150,190,255,.3); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5; color: var(--cream-soft); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.chart-box .tip b { color: var(--cream); font-size: 13px; }
.sub-h { font-size: 15px; font-weight: 600; margin: 28px 0 10px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-weight: 500; color: var(--cream-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--night); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--cream-soft); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; }
table.t td .rowbtn { font: 500 12px/1 var(--f-body); background: none; border: 0; color: var(--rain); cursor: pointer; padding: 4px 6px; }
table.t td .rowbtn.del { color: #ffb4a6; }
.banner { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,190,110,.4); background: rgba(255,190,110,.07); font-size: 14px; color: var(--cream-soft); margin-bottom: 20px; }
.banner .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--dawn); color: var(--night-deep); font-weight: 700; font-size: 13px; }
.data-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: #ffb4a6; }
.privacy { margin-top: 18px; font-size: 13px; color: var(--cream-faint); line-height: 1.6; }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.howto div { padding: 18px 20px 0 0; }
.howto div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.howto b { display: block; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.howto p { color: var(--cream-soft); font-weight: 300; font-size: 14px; }

@media (max-width: 880px) {
  .tools { grid-template-columns: 1fr; }
  .rec { grid-template-columns: 1fr; gap: 10px; }
  .rec .acts { justify-items: start; grid-auto-flow: column; justify-content: start; }
  .tips, .howto { grid-template-columns: 1fr; }
  .tips div, .tips div + div, .howto div, .howto div + div { padding: 16px 0; border-left: 0; }
  .tips div + div, .howto div + div { border-top: 1px solid var(--line); }
  .log-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .profile { padding: 24px 20px; }
  .panel { padding: 22px 18px; }
}
@media (max-width: 480px) {
  .fgrid { grid-template-columns: 1fr; }
  .scale .opt span { width: 36px; }
}

/* Home: how it works (our part -> your part) */
.flow-sec { padding-block: 72px; }
.flow-sec .sec-head { margin-bottom: 32px; }
.flow { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: stretch; }
.flow .side { border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 18px; background: var(--night-raised); min-width: 0; }
.flow .side.yours { border-color: rgba(255,190,110,.4); background: linear-gradient(180deg, rgba(255,190,110,.07), rgba(255,190,110,.02)); }
.flow .who { font: 600 11px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--rain); }
.flow .yours .who { color: var(--dawn); }
.flow h3 { font-size: 22px; font-weight: 600; margin: 10px 0 14px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; }
.flow li + li { border-top: 1px solid var(--line); }
.flow li a { display: grid; gap: 2px; padding: 12px 0; text-decoration: none; }
.flow li b { font-weight: 600; font-size: 15px; }
.flow li a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.flow li span { color: var(--cream-soft); font-weight: 300; font-size: 14px; line-height: 1.55; }
.flow .arrow { display: grid; place-items: center; color: var(--dawn); }
.flow .arrow svg { width: 26px; height: 26px; }
.eyebrow + h2 { margin-top: 0; }
@media (max-width: 880px) {
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { height: 44px; transform: rotate(90deg); }
  .flow-sec { padding-block: 56px; }
}
