
body { min-height: 100dvh; display: flex; flex-direction: column; }
body > .d-layout { flex: 1 0 auto; width: 100%; }
.page { flex: 1 0 auto; width: 100%; max-width: 40rem; margin: 0 auto; padding: 3rem max(1.25rem, env(safe-area-inset-right)) 4rem max(1.25rem, env(safe-area-inset-left)); box-sizing: border-box; }
.app-page > * { max-width: 46rem; }
.context { color: var(--ink-2); margin-top: .45rem; }
.d-main > .context { margin-top: .45rem; }
.panel { padding: 1.5rem; margin-top: 1.5rem; display: grid; gap: .9rem; }
.panel p { margin: 0; }
.field { display: grid; gap: .3rem; font-weight: 700; font-size: .9rem; color: var(--ink); }
.field input { font: inherit; font-weight: 400; min-height: 44px; padding: 0 .75rem; border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--panel); color: var(--ink); max-width: 24rem; }
.alert, .notice { margin: 0 0 1rem; font-weight: 500; }
.alert { color: var(--bad); }
.notice { color: var(--good); }
.inline { display: inline; }
.after { margin-top: 1.5rem; }
.field input.code { font: 700 1.5rem/1 var(--mono); letter-spacing: .3em; max-width: 10rem; text-align: center; }
.linklike { font: inherit; color: var(--navy-2); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.sections { display: flex; gap: 1.25rem; margin-top: 1rem; font-size: .9375rem; }
.sections a { color: var(--ink-2); }
.panel h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: .6rem; }
.panel h3 { font-size: 1.05rem; margin-top: .4rem; }
.panel form { display: grid; gap: .9rem; }
.panel form.profile + form.profile { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.field select { font: inherit; font-weight: 400; min-height: 44px; padding: 0 .75rem; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel); color: var(--ink); max-width: 24rem; }
.field .hint { font-weight: 400; font-size: .85rem; color: var(--muted); }
.field textarea { font: inherit; font-weight: 400; line-height: 1.45; padding: .6rem .75rem; border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--panel); color: var(--ink); max-width: 24rem; resize: vertical; }
.field input:not(.short) { width: 100%; box-sizing: border-box; }
.field input.short { max-width: 9rem; }
.practice { border: 0; border-top: 1px solid var(--line); margin: .4rem 0 0; padding: 1.1rem 0 0; display: grid; gap: .9rem; min-width: 0; }
.practice legend { float: left; width: 100%; padding: 0; font-weight: 700; font-size: 1rem; color: var(--ink); }
.practice legend + * { clear: both; }
.more-body { display: grid; gap: .9rem; margin-top: .4rem; }
.more-details summary { list-style: none; cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--navy-2); min-height: 36px; display: flex; align-items: center; gap: .3rem; }
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary::before { content: "▸"; display: inline-block; width: 1rem; color: var(--muted); }
.more-details[open] summary::before { content: "▾"; }
.more-details[open] summary { margin-bottom: .1rem; }
.more-details .quiet { font-weight: 400; color: var(--muted); }
.field .quiet { font-weight: 400; color: var(--muted); }
.check { display: flex; gap: .6rem; align-items: center; min-height: 44px; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }
.plan-price { display: flex; align-items: center; gap: .7rem; }
.plan-price strong { font: 600 2.4rem/1 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.plan-price .per { font-size: .875rem; line-height: 1.3; color: var(--ink-2); }
.danger-zone { background: color-mix(in srgb, var(--bad-wash) 45%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 14%, var(--line)); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; }
.panel .danger-row h2 { font-size: 1.1rem; }
.danger-row p { color: var(--ink-2); font-size: .9rem; margin-top: .15rem; }
.btn.soft-danger { background: var(--panel); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--bad); }
.btn.soft-danger:hover { border-color: var(--bad); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.confirm-pop { width: min(27rem, calc(100vw - 32px)); padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel); color: var(--ink); box-shadow: 0 18px 50px rgb(12 19 27 / .22); }
.confirm-pop::backdrop { background: rgb(12 19 27 / .18); }
.confirm-pop h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.confirm-pop > p { margin: .5rem 0 1rem; color: var(--ink-2); }
.confirm-pop form { display: grid; gap: 1rem; }
.confirm-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.prompt { margin-top: 1.25rem; }

.reports { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.reports li { padding: 1.25rem 1.5rem; display: grid; gap: .5rem; }
.reports h2 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.reports .when { color: var(--muted); font-size: .9rem; }
.reports .actions { margin-top: .4rem; }

.legal h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-2); }
.legal strong { color: var(--ink); }
.legal p + p, .legal ul + p { margin-top: .75rem; }
.legal ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .45rem; }

.article { --s1: .25rem; --s2: .5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 4rem;
  font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); }
.article h1, .article h2, .article strong, .article b { color: var(--ink); }
.article ul { margin: 0; padding-left: var(--s4); }
.article figure { margin-inline: 0; margin-bottom: 0; }
.article ul:not(.stats):not(.bars):not(.ex-tiles) > li + li { margin-top: var(--s2); }
.article .ex-tiles { margin: 0 0 1.25rem; padding: 0; }
.article > * + *, .article .method > * + * { margin-top: var(--s4); }
.article > figure, .article > .takeaway, .article > .stats, .article > .cta,
.article > figure + *, .article > .takeaway + *, .article > .stats + *, .article > .cta + * { margin-top: var(--s5); }
.article > h2 { margin-top: var(--s6); }
.article h2 + * { margin-top: var(--s3); }

.article .eyebrow { font-size: .75rem; line-height: 1.5; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.article .eyebrow + h1 { margin-top: var(--s3); }
.article .page-title { font-size: clamp(1.875rem, 3.2vw, 2.25rem); line-height: 1.15; }
.article .lede { font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); }
.article h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.25; letter-spacing: -.01em; scroll-margin-top: 6rem; }
.article .small { font-size: .875rem; line-height: 1.5; }
.article .table-wrap + .small { margin-top: var(--s3); }

.article .stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4);
  padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.article .stats li { display: grid; gap: var(--s1); align-content: start; }
.article .stats li + li { padding-left: var(--s4); border-left: 1px solid var(--line); }
.article .stats b { font-family: var(--serif); font-weight: 600; font-size: 1.875rem; line-height: 1.1; }
.article .stats span { font-size: .875rem; line-height: 1.5; color: var(--ink-2); }

.article figcaption { font-size: .875rem; line-height: 1.5; color: var(--muted); margin-top: var(--s3); }
.article table.data { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.article table.data th, .article table.data td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--line); }
.article table.data th { padding-top: 0; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; }
.article table.data td { color: var(--ink); }
.article table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.article .assistant { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }

.article .bars { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.bars li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3rem; align-items: center; column-gap: var(--s3); }
.bar-label { font-size: 1rem; line-height: 1.4; color: var(--ink); }
.bar-track { height: .5rem; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); background: var(--navy-2); border-radius: 999px; }
.bar-value { font-size: 1rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bars li.you .bar-fill { background: var(--you); }
.bars li.you .bar-label, .bars li.you .bar-value { color: var(--you); font-weight: 600; }

.article .takeaway { font-weight: 600; line-height: 1.6; color: var(--ink); padding-left: var(--s3); border-left: 3px solid var(--you); }

.article .cta { padding: var(--s5); background: var(--navy); color: var(--on-navy); border: 0; border-radius: 8px;
  box-shadow: 0 1px 2px rgb(14 27 43 / .08), 0 12px 24px rgb(14 27 43 / .14); }
.article .cta h2 { color: var(--on-navy); font-size: 1.5rem; }
.article .cta p { margin-top: var(--s2); font-size: 1rem; line-height: 1.6; color: color-mix(in srgb, var(--on-navy) 82%, transparent); }
.article .cta .btn.primary { margin-top: var(--s4); background: var(--on-navy); border-color: var(--on-navy); color: var(--navy); }
.article .cta .btn.primary:hover { background: color-mix(in srgb, var(--on-navy) 88%, var(--navy)); }

.article .method { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.6; }
.article .method h2 { font-size: 1.125rem; }
.article .method h2 + * { margin-top: var(--s3); }
.article .method li, .article .method p { color: var(--muted); }

.page:has(.with-toc) { max-width: 62rem; }
.with-toc { display: grid; grid-template-columns: 12rem minmax(0, 40rem); column-gap: var(--toc-gap, 4rem); justify-content: center; align-items: start; }
.toc { position: sticky; top: 6rem; font-size: .875rem; line-height: 1.4; }
.toc-title { margin-bottom: .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: .5rem 0 .5rem 1rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }

@media (max-width: 1100px) { .page:has(.with-toc) { max-width: 44rem; } .with-toc { display: block; } .toc { display: none; } }
@media (max-width: 640px) {
  .article { font-size: 1.0625rem; }
  .article .stats { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .article .stats li + li { padding: var(--s3) 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .bars li { grid-template-columns: minmax(0, 1fr) 3rem; row-gap: var(--s1); }
  .bar-label { grid-column: 1 / -1; }
  .article .cta { padding: var(--s4); }
}
