/* Chapterwise web app: brand design system with switchable colour themes.
   Layout concept: calm "paper and ribbon" pages, a Cloud ground with a coloured band,
   generous photography, and one soft bookmark accent per screen.
   Each palette defines only --p* base colours; every other token derives from them. */
:root {
  /* Palette: Petrol (default brand) */
  --p: #2B5462; --p-deep: #1C3A44; --p-hl: #2F7779; --p-soft: #A9CEC2; --p-tint: #E4EFEC; --p-ink: #1C3A44;
  --bg: #F4F6F6; --surface: #FFFFFF; --surface-2: #EEF2F2; --fg: #1F2326; --muted: #5A6872; --line: #D6DEDF;
  --accent: var(--p); --accent-fg: #FFFFFF; --link: var(--p); --chip: var(--p-tint); --chip-fg: var(--p-ink);
  --good: #2E7D4F; --good-bg: #E7F4EC; --warn: #9A5B00; --warn-bg: #FDF3E3; --bad: #B3261E;
  --band: var(--p); --band-fg: #FFFFFF; --band-muted: color-mix(in srgb, var(--p-soft) 55%, #FFFFFF); --hl: var(--p-hl); --icon: var(--p);
  --petrol: var(--p); --viridian: var(--p-hl); --opal: var(--p-soft);
  --shadow: 0 1px 2px rgba(31,35,38,.06), 0 6px 20px rgba(31,35,38,.06);
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-doc: "Source Serif 4", Georgia, "Times New Roman", serif;
  --r: 12px; --r-sm: 8px; --max: 1180px;
}
:root[data-palette="cornflower"] { --p: #1E3A6E; --p-deep: #142A52; --p-hl: #2F5FA8; --p-soft: #A9C3EC; --p-tint: #E3ECF8; --p-ink: #142A52; }
:root[data-palette="royal"]      { --p: #5B3F8C; --p-deep: #3F2B66; --p-hl: #6B4FA6; --p-soft: #CDBDEB; --p-tint: #EFE9F8; --p-ink: #3F2B66; }
:root[data-palette="castleton"]  { --p: #00563F; --p-deep: #003D2D; --p-hl: #2E7D5B; --p-soft: #A8D5BF; --p-tint: #E3F2EA; --p-ink: #003D2D; }
:root[data-palette="lagoon"]     { --p: #1B6A86; --p-deep: #124C61; --p-hl: #1F7A9A; --p-soft: #9FD3E3; --p-tint: #E0F1F6; --p-ink: #124C61; }
:root[data-palette="graphite"]   { --p: #2F3437; --p-deep: #1F2326; --p-hl: #4F5F6B; --p-soft: #C3CDD4; --p-tint: #E9EDF0; --p-ink: #1F2326; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #11171A; --surface: #172025; --surface-2: #1D292F; --fg: #E6EDEE; --muted: #9DB0B6; --line: #2C3B42;
  --accent: var(--p-soft); --accent-fg: #11171A; --link: var(--p-soft); --chip: color-mix(in srgb, var(--p) 45%, #11171A); --chip-fg: color-mix(in srgb, var(--p-soft) 70%, #FFFFFF);
  --good: #7FCB9C; --good-bg: #183327; --warn: #E7B464; --warn-bg: #33270F; --bad: #F08A80;
  --band: var(--p-deep); --band-fg: #FFFFFF; --band-muted: var(--p-soft); --hl: var(--p-soft); --icon: var(--p-soft);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #11171A; --surface: #172025; --surface-2: #1D292F; --fg: #E6EDEE; --muted: #9DB0B6; --line: #2C3B42;
  --accent: var(--p-soft); --accent-fg: #11171A; --link: var(--p-soft); --chip: color-mix(in srgb, var(--p) 45%, #11171A); --chip-fg: color-mix(in srgb, var(--p-soft) 70%, #FFFFFF);
  --good: #7FCB9C; --good-bg: #183327; --warn: #E7B464; --warn-bg: #33270F; --bad: #F08A80;
  --band: var(--p-deep); --band-fg: #FFFFFF; --band-muted: var(--p-soft); --hl: var(--p-soft); --icon: var(--p-soft);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.large { font-size: 118%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--viridian); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font: 600 .75rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--hl); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tnum { font-variant-numeric: tabular-nums; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--fg); font: 650 1.25rem/1 var(--font-display); letter-spacing: -.02em; }
.brand b { color: var(--hl); font-weight: 650; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: .2rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--fg); padding: .45rem .7rem; border-radius: 999px; font-size: .93rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--chip); color: var(--chip-fg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .6rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-fg); font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--link); }
.btn.small { min-height: 36px; padding: .4rem .85rem; font-size: .87rem; }
.nav .btn { margin-left: .4rem; color: var(--accent-fg); }
.nav .btn:hover { background: var(--accent); color: var(--accent-fg); }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; min-height: 40px; padding: 0 .9rem; font: 600 .9rem var(--font-body); cursor: pointer; }
  .nav { display: none; width: 100%; margin: 0 0 .75rem; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav .btn { margin: .4rem 0 0; }
}

/* sections */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band { background: var(--band); color: var(--band-fg); }
.band .lead, .band .muted { color: var(--band-muted); }
.band a { color: var(--band-fg); }
.band .eyebrow { color: var(--opal); }
.band .btn { background: var(--opal); border-color: var(--opal); color: #11191C; }
.band .btn.ghost { background: transparent; color: #FFFFFF; border-color: var(--opal); }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2rem, 5vw, 4rem); }
.hero > * { min-width: 0; }
.hero-photo { border-radius: 20px; overflow: hidden; position: relative; aspect-ratio: 3/2; background: var(--surface-2); max-width: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.ribbon { position: absolute; top: 0; right: 28px; width: 44px; height: 86px; background: var(--opal); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; min-width: 0; }
.card h3 { margin-bottom: .35rem; }
.card.link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: var(--viridian); transform: translateY(-2px); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--chip); display: grid; place-items: center; margin-bottom: .8rem; }
.feature-icon svg { width: 24px; height: 24px; stroke: var(--icon); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; background: var(--chip); color: var(--chip-fg); font-size: .8rem; font-weight: 600; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .v { font: 700 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .9rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head > div { min-width: 0; max-width: 680px; }

/* blog */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.post-card .body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.post-card h3 { font-size: 1.05rem; }
.meta { display: flex; gap: .6rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; align-items: center; }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.article .cover { border-radius: 18px; overflow: hidden; margin: 1.5rem 0 2rem; aspect-ratio: 3/2; }
.article .cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; overflow-wrap: anywhere; }
.filters { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters button { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: .4rem .85rem; font: 500 .88rem var(--font-body); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.dots { letter-spacing: 2px; color: var(--hl); white-space: nowrap; font-size: .95rem; }

/* pricing */
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.seg button { border: 0; background: transparent; color: var(--fg); padding: .45rem .85rem; border-radius: 999px; font: 600 .88rem var(--font-body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.plan { display: flex; flex-direction: column; gap: .7rem; }
.plan.featured { border: 2px solid var(--viridian); position: relative; }
.plan .price { font: 700 2.1rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .93rem; }
.plan li::before { content: "✓"; color: var(--good); font-weight: 700; margin-right: .45rem; }
.badge-top { position: absolute; top: -12px; left: 1.25rem; background: var(--opal); color: #11191C; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }

/* app shell */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .75rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: .4rem .5rem 1rem; }
.side h4 { font: 600 .7rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1.1rem .6rem .5rem; }
.side a { display: flex; gap: .55rem; align-items: center; padding: .5rem .6rem; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: .92rem; }
.side a:hover, .side a[aria-current="page"] { background: var(--chip); color: var(--chip-fg); }
.app-main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: .75rem; padding-block: .85rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; flex-wrap: wrap; }
.topbar .title { font: 650 1.05rem var(--font-display); margin-right: auto; }
.app-body { padding-block: 1.5rem 3rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1180px; }
.demo-note { font-size: .8rem; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: .5rem .75rem; margin-bottom: 1.25rem; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: .3rem; overflow-x: auto; padding: .6rem; }
  .side h4, .side .brand span.word { display: none; }
  .side a { white-space: nowrap; }
}

/* forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 1rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.toggle input { width: 44px; height: 24px; accent-color: var(--petrol); }
.option { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; width: 100%; color: var(--fg); font: inherit; }
.option[aria-pressed="true"] { border-color: var(--viridian); background: var(--chip); }
.option b { display: block; }

/* resume document preview */
.paper { background: #FFFFFF; color: #1A1A1A; border-radius: 6px; box-shadow: var(--shadow); padding: 2rem 2.2rem; font: 400 .88rem/1.45 var(--font-doc); }
.paper h5 { font: 700 .72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--p); border-bottom: 1.5px solid var(--p); padding-bottom: .25rem; margin: 1rem 0 .4rem; }
.paper .nm { font: 700 1.5rem/1.1 var(--font-display); color: #1F2326; }
.paper .hl { color: var(--p-hl); font: 600 .9rem var(--font-body); }
.paper .ct { color: #555; font-size: .78rem; margin-bottom: .4rem; overflow-wrap: anywhere; }
.paper ul { padding-left: 1.1rem; margin: .2rem 0 .5rem; }
.paper .job { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.paper .photo { float: right; width: 72px; height: 92px; object-fit: cover; border-radius: 4px; margin-left: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* chat */
.chat { display: flex; flex-direction: column; gap: .75rem; }
.msg { max-width: 78%; padding: .75rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--chip); color: var(--chip-fg); border-color: transparent; }
.msg .src { display: block; margin-top: .4rem; font-size: .78rem; color: var(--muted); }

/* misc */
.callout { border-left: 4px solid var(--viridian); background: var(--chip); color: var(--chip-fg); padding: 1rem 1.15rem; border-radius: 0 10px 10px 0; }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban .col { background: var(--surface-2); border-radius: 12px; padding: .75rem; display: grid; gap: .6rem; align-content: start; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 50; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.footer-grid h4 { font: 600 .78rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.footer-grid a { display: block; color: var(--fg); text-decoration: none; padding: .2rem 0; font-size: .92rem; }
.footer-grid a:hover { color: var(--link); text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.rating-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.rating-row:last-child { border-bottom: 0; }
.headshots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.headshots img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; width: 100%; }
@media (max-width: 620px) { .headshots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.band .stat .l { color: var(--band-muted); }
.band .stat .v { color: var(--band-fg); }

/* theme picker */
.theme-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; min-height: 36px; padding: 0 .75rem; font: 600 .85rem var(--font-body); cursor: pointer; }
.theme-btn .sw { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--p) 50%, var(--p-soft) 50%); }
.theme-wrap { position: relative; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 1rem; z-index: 30; }
.theme-pop h4, .theme-panel h4 { font: 600 .72rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .35rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; padding: .55rem .3rem; cursor: pointer; font: 500 .78rem var(--font-body); }
.swatch[aria-pressed="true"] { border-color: var(--hl); box-shadow: 0 0 0 2px var(--chip); }
.swatch i { width: 30px; height: 30px; border-radius: 50%; display: block; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; }
.modes button { border: 0; background: transparent; color: var(--fg); border-radius: 999px; padding: .4rem .3rem; font: 600 .82rem var(--font-body); cursor: pointer; }
.modes button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
@media (max-width: 860px) { .nav .theme-wrap { width: 100%; } .nav .theme-pop { position: static; width: 100%; margin-top: .5rem; } .nav .theme-btn { width: 100%; justify-content: center; min-height: 44px; } }
@media (min-width: 621px) and (max-width: 960px) { .g3.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g3.plans .plan .price { font-size: 1.7rem; } }

/* ---------- v3: Goldmend footer, auth, money tools, vault, AI coach Ari, packs ---------- */
.prefooter { background: var(--band); color: var(--band-fg); padding-block: 2.5rem; margin-top: 3rem; }
.prefooter .wrap { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; }
.prefooter h2 { margin: 0 0 .3rem; color: var(--band-fg); }
.prefooter p { margin: 0; color: var(--band-muted); }
.prefooter .btn { background: var(--opal); border-color: var(--opal); color: #11191C; }
.prefooter .btn.ghost { background: transparent; color: var(--band-fg); border-color: var(--opal); }
.prefooter + .site-footer { margin-top: 0; }
.newsletter { margin-top: 1.1rem; display: grid; gap: .35rem; max-width: 340px; }
.nl-row { display: flex; gap: .4rem; }
.nl-row input { flex: 1; min-width: 0; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.footer-legal p { margin: 0; max-width: 80ch; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.pw-wrap { display: flex; gap: .4rem; }
.pw-wrap input { flex: 1; min-width: 0; }
.pw-eye { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; padding: 0 .8rem; cursor: pointer; font: inherit; font-size: .85rem; }
.pw-meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: .4rem; }
.pw-meter i { display: block; height: 100%; width: 0; background: #B3261E; transition: width .2s, background .2s; }
.form-err { background: #FDECEA; color: #8C1D18; border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin: 0 0 .8rem; }
.code-boxes { display: flex; gap: .45rem; justify-content: center; }
.code-boxes input { width: 2.6rem; height: 3rem; text-align: center; font: 600 1.3rem var(--font-display); padding: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.btn.danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.vault-lock { max-width: 460px; margin: 1rem auto; text-align: center; }
.vault-ico { font-size: 2.2rem; }
.fin-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.fin-row:last-of-type { border-bottom: 0; }
.fin-big { font: 700 2.2rem var(--font-display); margin: .1rem 0 .6rem; }
.plans.packs .plan { display: flex; flex-direction: column; }
.persona-card { display: flex; gap: .8rem; align-items: center; padding-bottom: .8rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.persona-card .av, .msg-who .av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--opal)); color: #fff; display: grid; place-items: center; font: 700 1.1rem var(--font-display); flex: none; }
.msg-who { display: flex; gap: .4rem; align-items: center; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: -.4rem; }
.msg-who .av { width: 22px; height: 22px; font-size: .7rem; }
.ai-pill { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em; padding: .1rem .45rem; border-radius: 999px; background: var(--chip); color: var(--chip-fg); vertical-align: middle; }
.msg.alert { background: #FCF1DE; border-color: #9A5B00; color: #1B2224; }
.msg.typing { display: inline-flex; gap: 4px; width: auto; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: cwdot 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cwdot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg.typing i { animation: none; } }
.coach-split .chat { max-height: 520px; overflow-y: auto; padding-right: .25rem; }
.mem-item { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.mem-item .grow { flex: 1; min-width: 0; }
.mem-item input { width: 100%; }
.footer-grid a.brand { display: inline-flex; padding: 0; font-size: 1.25rem; }
.footer-contact a { display: inline; padding: 0; }
.fb-row { display: flex; gap: .4rem; margin-top: -.35rem; }
.fb-row .chip { padding: .15rem .6rem; font-size: .85rem; cursor: pointer; border: 1px solid var(--line); }
.fb-row .chip[aria-pressed="true"] { background: var(--chip); color: var(--chip-fg); }
.ai-pill.demo { background: var(--surface-2); color: var(--muted); font-weight: 600; letter-spacing: 0; }
