/* Life AI Academy: shared styles for the public site and the learning area.
   System and rationale: DESIGN.md. Mobile first. One self-hosted font; no other downloads. */

@font-face {
  font-family: "Display";
  src: url("/fonts/display-400_900-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ink family (business side). The personal side swaps these at the end of the file. */
  --navy: #1b2540;
  --navy-soft: #2a3658;
  --navy-line: #45517a;
  --navy-deep: #121a2e;
  --on-dark: #e9ecf4;
  --on-dark-muted: #cfd5e3;
  --on-dark-faint: #aeb6ca;

  --bg: #f6f5f1;          /* ground */
  --surface: #ffffff;     /* paper */
  --manila: #ead9a7;      /* the folder */
  --manila-deep: #dcc68a;
  --manila-ink: #4a3b12;  /* text on manila */
  --tint: #eef0f4;
  --tint-soft: #f3f4f7;
  --track: #e6e9ef;
  --amber: #f2a33a;
  --amber-light: #f7bd6a;
  --amber-dark: #c97d12;
  --amber-ink: #8a5208;   /* amber text on light grounds (AA) */
  --text: #1b2130;
  --muted: #555d70;
  --line: #dfe1e6;
  --ok: #2f8f5b;
  --warn: #b5401f;

  --radius: 6px;          /* paper */
  --tab-radius: 10px;     /* tabs: top corners only */
  --max: 1160px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Display", var(--font);
  --lift: 0 1px 2px rgba(27, 37, 64, .08), 0 10px 24px -12px rgba(27, 37, 64, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg { max-width: 100%; height: auto; }
::selection { background: #fbe0b6; color: var(--navy); }
input, textarea, select { caret-color: var(--amber-dark); accent-color: var(--navy); }

/* Inline links: underline at rest, it thickens on hover */
a { color: var(--navy); text-underline-offset: .2em; text-decoration-thickness: 1px; transition: text-decoration-thickness .2s var(--ease), color .2s; }
@media (hover: hover) { a:hover { color: var(--amber-ink); text-decoration-thickness: 3px; } }

h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0 0 .5em; text-wrap: balance; font-weight: 800; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: -.045em; line-height: .98; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -.035em; line-height: 1.04; }
h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.25; font-weight: 750; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
b, strong { font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ---------- Page transitions (cross-document, no script) ---------- */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
.site-header { view-transition-name: site-header; }
.audience-bar { view-transition-name: audience-bar; }
main { view-transition-name: page; }
::view-transition-old(page) { animation: page-out .22s ease-in both; }
::view-transition-new(page) { animation: page-in .45s var(--ease) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  color: #fff; font-family: var(--display); font-weight: 800; letter-spacing: -.02em; text-decoration: none;
  font-size: 1.15rem; display: flex; align-items: center; gap: 10px; min-height: 44px;
}
.brand-mark {
  min-width: 34px; height: 28px; padding: 0 8px; border-radius: var(--tab-radius) var(--tab-radius) 2px 2px;
  background: var(--amber); color: var(--navy); border: 2px solid var(--amber);
  display: grid; place-items: center; font-weight: 900; font-size: .78rem; letter-spacing: .06em;
  transition: background-color .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.brand:hover { color: #fff; text-decoration: none; }
@media (hover: hover) { .brand:hover .brand-mark { background: transparent; color: var(--amber); transform: translateY(-2px); } }
.brand:focus-visible .brand-mark { background: transparent; color: var(--amber); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--on-dark); text-decoration: none; padding: 10px 10px; display: block; font-size: .98rem; min-height: 44px;
  background: linear-gradient(var(--amber) 0 0) 10px calc(100% - 8px) / 0 2px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
@media (hover: hover) { .nav a:hover { color: #fff; background-size: calc(100% - 20px) 2px; text-decoration: none; } }
.nav a:focus-visible, .nav a[aria-current="page"] { color: #fff; background-size: calc(100% - 20px) 2px; }
.nav a.nav-learn {
  border: 1.5px solid var(--navy-line); border-radius: 999px; padding: 9px 16px; margin-left: 8px; background-image: none;
  transition: background-color .22s var(--ease), border-color .22s, color .22s;
}
@media (hover: hover) { .nav a.nav-learn:hover { background-color: var(--on-dark); color: var(--navy); border-color: var(--on-dark); } }
.nav a.nav-learn:focus-visible { background-color: var(--on-dark); color: var(--navy); }

/* Mobile menu without JavaScript */
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; color: #fff; padding: 10px 16px; min-height: 44px;
  border: 1.5px solid var(--navy-line); border-radius: 999px; font-weight: 700; font-family: var(--display);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--on-dark); color: var(--navy); }
.menu[open] .nav {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--radius);
  padding: 8px; min-width: 240px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
}
.menu[open] .nav ul { flex-direction: column; }
.menu[open] .nav a.nav-learn { margin: 6px 0 0; text-align: center; }
.menu:not([open]) .nav { display: none; }
.nav-desktop { display: none; }
@media (min-width: 900px) { .nav-desktop { display: block; } .menu { display: none; } }

/* ---------- Audience toggle ---------- */
.audience-bar { background: var(--navy-deep); color: var(--on-dark-muted); font-size: .9rem; }
.audience-bar .wrap { display: flex; justify-content: flex-end; }
.audience { display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 3px; margin: 6px 0; }
.audience-label { margin: 0 8px 0 10px; color: var(--on-dark-faint); }
.audience a {
  color: var(--on-dark); text-decoration: none; padding: 6px 14px; min-height: 32px; display: grid; place-items: center;
  border-radius: 999px; font-weight: 650; transition: background-color .2s var(--ease), color .2s;
}
@media (hover: hover) { .audience a:not([aria-current]):hover { background: var(--on-dark); color: var(--navy-deep); } }
.audience a:not([aria-current]):focus-visible { background: var(--on-dark); color: var(--navy-deep); }
.audience a[aria-current="true"] { background: var(--amber); color: var(--navy-deep); font-weight: 800; cursor: default; }
@media (hover: hover) { .audience a[aria-current="true"]:hover { background: var(--amber-light); } }
@media (max-width: 520px) {
  .audience-bar .wrap { justify-content: center; }
  .audience-label { display: none; }
  .audience { width: 100%; }
  .audience a { flex: 1; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.section.alt { background: var(--surface); }
.section.dark { background: var(--navy); color: var(--on-dark); }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.flush-top { padding-top: 0; }
.section-tight { padding-top: 48px; }
@media (min-width: 900px) { .section-tight { padding-top: 64px; } }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; line-height: 1.55; }
.section.dark .lead { color: var(--on-dark-muted); }
.section .lead + .grid, .section .lead + .steps, .section h2 + .grid, .section h2 + .steps, .section h2 + .table-wrap, .section .lead + .ledger, .section .lead + .index-list, .section h2 + .index-list { margin-top: 40px; }
.fineprint { margin-top: 20px; font-size: .95rem; }
ul + h2, ol + h2, p + h2, .table-wrap + h2 { margin-top: 1.4em; }

/* Learning-area labels */
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-ink); margin-bottom: 10px; }
.section.dark .eyebrow { color: var(--amber); }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 56px; background: var(--bg); overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 96px 0 112px; } }
.hero h1 { margin-bottom: .32em; text-wrap: wrap; }
.hero p.lead { font-size: clamp(1.15rem, 1.6vw, 1.32rem); color: var(--text); opacity: .82; }
.hero-meta { color: var(--muted); font-size: .95rem; margin-top: 16px; }
.hero.hero-cream, .hero.hero-white, .hero.hero-ivory { background: var(--bg); }
.hero-facts { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-facts li {
  font-family: var(--display); font-size: .88rem; font-weight: 650; color: var(--navy); padding: 5px 12px;
  border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--navy) 22%, transparent);
}

.hero-grid { display: grid; gap: 28px; align-items: center; }
/* The illustration sits on a manila sheet with a tab, like a page pulled from the folder */
.hero-art { margin: 0; justify-self: center; width: 100%; max-width: 440px; position: relative; }
.hero-art img { display: block; width: 100%; height: auto; }
.hero-grid > .hero-art, .hero-form-grid > .hero-art {
  background: var(--manila); border-radius: 0 var(--tab-radius) var(--radius) var(--radius); padding: 18px; margin-top: 26px;
}
.hero-grid > .hero-art::before, .hero-form-grid > .hero-art::before {
  content: ""; position: absolute; left: 0; top: -26px; width: 42%; height: 27px;
  background: var(--manila); border-radius: var(--tab-radius) var(--tab-radius) 0 0;
}
.hero-grid > .hero-art img, .hero-form-grid > .hero-art img { border-radius: 3px; mix-blend-mode: multiply; }
.hero-art.fade img { -webkit-mask-image: radial-gradient(ellipse at center, #000 64%, transparent 74%); mask-image: radial-gradient(ellipse at center, #000 64%, transparent 74%); }
@media (max-width: 899px) { .hero-grid > .hero-art { max-width: min(78vw, 360px); justify-self: start; } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; }
  .hero-art { max-width: 460px; justify-self: end; }
}

.hero-form-grid { display: grid; gap: 28px; }
.hero-form-grid .hero-art { max-width: 340px; justify-self: start; }
@media (min-width: 900px) {
  .hero-form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 56px; row-gap: 12px; align-items: start; }
  .hero-form-grid .hero-text { grid-column: 1; grid-row: 1; }
  .hero-form-grid .hero-form { grid-column: 2; grid-row: 1 / span 2; }
  .hero-form-grid .hero-art { grid-column: 1; grid-row: 2; max-width: 380px; }
}

/* ---------- Buttons: paper lifts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-family: var(--display); font-weight: 750; letter-spacing: -.01em; line-height: 1.2;
  padding: 15px 26px; min-height: 52px; border-radius: 999px; border: 2px solid transparent;
  font-size: 1.05rem; cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease), border-color .22s;
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-primary { background: var(--amber); color: var(--navy-deep); box-shadow: 0 1px 2px rgba(27, 37, 64, .12); }
@media (hover: hover) { .btn-primary:hover { background: var(--amber-light); color: var(--navy-deep); transform: translateY(-2px); box-shadow: var(--lift); text-decoration: none; } }
.btn-primary:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; background: var(--amber-light); transform: translateY(-2px); box-shadow: var(--lift); }
.section.dark .btn-primary:focus-visible, .band-amber .btn:focus-visible { outline-color: #fff; }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
@media (hover: hover) { .btn-ghost:hover { background: var(--navy); color: #fff; text-decoration: none; } }
.btn-ghost:focus-visible { background: var(--navy); color: #fff; }
.section.dark .btn-ghost { border-color: #fff; color: #fff; }
@media (hover: hover) { .section.dark .btn-ghost:hover { background: #fff; color: var(--navy); } }
.section.dark .btn-ghost:focus-visible { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:focus-visible { transform: none !important; transition: none; } }

/* ---------- Grid, cards ---------- */
.grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .grid.two { grid-template-columns: repeat(2, 1fr); gap: 32px; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) and (max-width: 999px) { .grid.four { grid-template-columns: repeat(2, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.section.alt .card { background: var(--bg); }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .points p:last-child { margin-bottom: 0; }
.card .tag, .tag {
  display: inline-block; font-family: var(--display); font-size: .8rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: #fdf0dc; color: var(--amber-ink); margin-bottom: 12px;
}
.card .price { font-family: var(--display); font-size: 1.7rem; font-weight: 800; color: var(--navy); margin: 8px 0; letter-spacing: -.02em; }
.card .price small { font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.card .price-tba { font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.section.dark .card { background: var(--navy-soft); border-color: var(--navy-line); color: var(--on-dark); }

.section-banner { padding: 0 0 40px; }
.banner-art { margin: 0; }
.banner-art img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

.split-art { display: grid; gap: 16px; align-items: center; margin-bottom: 18px; }
.split-art .hero-art { max-width: 360px; }
@media (min-width: 900px) { .split-art { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; } .split-art .hero-art { max-width: 400px; justify-self: end; } }

/* Cards with an illustration (or a typeset panel) across the top */
.card-with-art { overflow: hidden; display: flex; flex-direction: column; }
.card-art { position: relative; margin: -26px -26px 20px; background: #fcfbfc; border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.card-art-type { background: var(--manila); display: flex; align-items: flex-end; padding: 22px; }
.card-art-type ul { list-style: none; margin: 0; padding: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--manila-ink); }
.card-art-type li:nth-child(even) { color: color-mix(in srgb, var(--manila-ink) 62%, var(--manila)); }

/* Headings with a line icon */
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; }
.icon-head { display: flex; align-items: flex-start; gap: 10px; }
.icon-head .icon { color: var(--amber-dark); margin-top: .02em; }
.section.dark .icon-head .icon { color: var(--amber); }

/* Points: short statements, separated by a rule instead of boxed */
.points > div { border-top: 3px solid var(--navy); padding-top: 18px; }
.points h3 { margin-bottom: .35em; }
.points p { color: var(--muted); }
@media (min-width: 700px) { .grid.points { column-gap: 36px; row-gap: 36px; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.section.alt .steps li { background: var(--bg); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--display); font-weight: 800; margin-bottom: 12px;
}
.steps li strong { display: block; color: var(--navy); font-family: var(--display); font-size: 1.15rem; letter-spacing: -.01em; margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--muted); font-size: .97rem; }
.steps.three { grid-template-columns: 1fr; }
@media (min-width: 900px) { .steps.three { grid-template-columns: repeat(3, 1fr); } }
.steps li .price { display: block; margin-top: auto; padding-top: 14px; font-family: var(--display); font-size: 1.6rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---------- Ledger: one row per step, price on the right ---------- */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--navy); }
.ledger li { display: grid; gap: 6px 32px; padding: 26px 0; border-bottom: 1px solid var(--line); grid-template-columns: 1fr auto; align-items: baseline; }
.ledger .step { grid-column: 1 / -1; font-family: var(--display); font-size: .9rem; font-weight: 700; color: var(--amber-ink); }
.ledger h3 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: -.025em; }
.ledger .amount { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -.03em; color: var(--navy); grid-row: 2; grid-column: 2; }
.ledger p { grid-column: 1 / -1; margin: 0; color: var(--muted); max-width: 44rem; }
@media (min-width: 900px) {
  .ledger li { grid-template-columns: 14rem minmax(0, 1fr) 10rem; }
  .ledger .step { grid-column: 1; grid-row: 1 / span 2; padding-top: .5em; }
  .ledger h3 { grid-column: 2; }
  .ledger .amount { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
  .ledger p { grid-column: 2; }
}

/* ---------- Index list (people in the examples) ---------- */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--navy); }
.index-list li { display: grid; gap: 4px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.index-list h3 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.03em; }
.index-list .where { color: var(--amber-ink); font-family: var(--display); font-weight: 700; }
.index-list p { margin: 0; color: var(--muted); }
@media (min-width: 900px) {
  .index-list li { grid-template-columns: 15rem 16rem minmax(0, 1fr); align-items: baseline; }
}

/* ---------- Lists ---------- */
.ticks, .crosses { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li, .crosses li { padding-left: 32px; position: relative; margin-bottom: 10px; }
.ticks li::before, .crosses li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.1em; height: 1.1em;
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}
.ticks li::before { background: var(--ok); --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.crosses li::before { background: var(--warn); --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }

/* ---------- The Brain folder (signature) ---------- */
.folder { background: var(--manila); color: var(--manila-ink); position: relative; }
.folder h2, .folder h3 { color: var(--navy); }
.folder .lead { color: var(--manila-ink); }
.folder-grid { display: grid; gap: 40px; }
.folder-intro .brain-note { color: var(--manila-ink); font-size: .95rem; }
@media (min-width: 900px) {
  .folder-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
  .folder-intro { position: sticky; top: 120px; }
}
.sheets { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sheet {
  --i: 0;
  position: sticky; top: 118px;
  margin-top: 34px; min-height: 310px;
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 -1px 0 rgba(74, 59, 18, .08), 0 18px 40px -24px rgba(74, 59, 18, .55);
  padding: 26px 24px 28px;
}
.sheet:first-child { margin-top: 34px; }
.sheet + .sheet { margin-top: 64px; }
.sheet-tab {
  position: absolute; top: -32px; left: calc(var(--i) * 20%); width: calc(20% - 4px); height: 33px; padding: 0 12px;
  display: flex; align-items: center; gap: 7px; background: var(--surface); overflow: hidden;
  border-radius: var(--tab-radius) var(--tab-radius) 0 0;
  font-family: var(--display); font-weight: 800; font-size: .88rem; color: var(--navy); white-space: nowrap;
}
.sheet-tab b { color: var(--amber-ink); font-variant-numeric: tabular-nums; }
.sheet h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); letter-spacing: -.03em; margin: 0 0 .3em; }
.sheet > p { color: var(--muted); margin-bottom: 18px; }
.sheet blockquote {
  margin: 0; padding: 16px 18px; background: var(--tint-soft); border-radius: var(--radius);
  font-size: .98rem; color: var(--text);
}
.sheet blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: .82rem; color: var(--muted); }
@media (max-width: 899px) {
  .sheet { top: 104px; min-height: 340px; padding: 22px 18px 24px; }
  .sheet-tab { font-size: .85rem; padding: 0 10px; }
}
@media (max-width: 640px) { .sheet-tab span { display: none; } .sheet-tab { justify-content: center; } }

.sheet-solo .sheet-tab { width: auto; }
.sheet-solo .sheet-tab span { display: inline !important; }
.section.fill { min-height: calc(100vh - 64px); display: flex; align-items: center; }
.section.fill > .wrap { width: 100%; }

/* Cards whose first child is a tag become filed sheets: the tag is the index tab */
.card:has(> .tag:first-child) { position: relative; margin-top: 30px; border-top-left-radius: 0; }
.card > .tag:first-child {
  position: absolute; left: -1px; top: -31px; height: 32px; margin: 0; padding: 0 14px; max-width: calc(100% + 2px);
  display: flex; align-items: center; background: inherit; border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--tab-radius) var(--tab-radius) 0 0; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.folder .card { background: var(--surface); border-color: transparent; color: var(--text); box-shadow: 0 18px 40px -28px rgba(74, 59, 18, .6); }
.folder .card > .tag:first-child { border-color: transparent; }
.folder .card .price small, .folder .card p { color: var(--muted); }
.folder.section-tight { padding-bottom: 72px; }
.card-meta { font-family: var(--display); font-weight: 700; font-size: .9rem; color: var(--amber-ink); margin: 0 0 6px; }

/* Any panel with a tab label (login card, forms) */
.tabbed { position: relative; margin-top: 32px; border-top-left-radius: 0; }
.tabbed::before {
  content: attr(data-tab); position: absolute; left: -1px; top: -31px; height: 32px; padding: 0 16px; display: flex; align-items: center;
  background: inherit; border: inherit; border-bottom: 0; border-radius: var(--tab-radius) var(--tab-radius) 0 0;
  font-family: var(--display); font-weight: 800; font-size: .88rem; color: var(--amber-ink);
}
.auth-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .auth-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; align-items: start; } }
.auth .form { max-width: none; }

/* Small inline links still get a 24 px target */
.form .small a, .fineprint a, .small a, .hint a, .card p a, .card > a, .notice a { display: inline-block; padding-block: 3px; }

/* ---------- Rules on a dark field ---------- */
.rules { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--navy-line); }
.rules li { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; padding: 28px 0; border-bottom: 1px solid var(--navy-line); }
.rules .icon { width: 44px; height: 44px; color: var(--amber); grid-row: span 2; }
.rules h3 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: -.025em; }
.rules p { margin: 0; color: var(--on-dark-muted); max-width: 42rem; }
@media (min-width: 900px) { .rules li { grid-template-columns: 64px 22rem minmax(0, 1fr); align-items: baseline; } .rules .icon { grid-row: auto; align-self: center; } }

/* ---------- A second folder: cross-link panel ---------- */
.feature-panel {
  position: relative; margin-top: 30px; background: var(--manila); color: var(--manila-ink);
  border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 28px; display: grid; gap: 20px; align-items: center;
}
.feature-panel::before {
  content: attr(data-tab); position: absolute; left: 0; top: -30px; height: 31px; padding: 0 18px; display: flex; align-items: center;
  background: var(--manila); border-radius: var(--tab-radius) var(--tab-radius) 0 0;
  font-family: var(--display); font-weight: 800; font-size: .9rem; color: var(--manila-ink);
}
.feature-panel h2 { color: var(--navy); }
.feature-panel p:last-child { margin-bottom: 0; }
.feature-panel .btn { justify-self: start; }
@media (min-width: 800px) { .feature-panel { grid-template-columns: minmax(0, 1fr) auto; padding: 44px 48px; gap: 48px; } }

/* ---------- Closing band ---------- */
.band-amber { background: var(--amber); color: var(--navy-deep); }
.band-amber h2 { color: var(--navy-deep); font-size: clamp(2.2rem, 5.6vw, 4.4rem); letter-spacing: -.045em; line-height: 1; max-width: 16ch; }
.band-amber .lead { color: var(--navy-deep); opacity: .85; }
.band-amber .btn-primary { background: var(--navy-deep); color: #fff; }
@media (hover: hover) { .band-amber .btn-primary:hover { background: var(--navy); color: #fff; } }
.band-amber .btn-primary:focus-visible { background: var(--navy); color: #fff; }
.band-amber .btn-ghost { border-color: var(--navy-deep); color: var(--navy-deep); }
.band-amber a:not(.btn) { color: var(--navy-deep); }
.band-amber .muted, .band-amber .fineprint { color: var(--navy-deep); }
.band-grid { display: grid; gap: 32px; align-items: center; }
.band-art { margin: 0; max-width: 420px; }
.band-art img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
@media (min-width: 900px) { .band-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; } .band-art { justify-self: end; } }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--tint); color: var(--navy); font-family: var(--display); font-size: .95rem; }

/* ---------- Notice ---------- */
.notice { border: 1px solid #f0d9ae; background: #fff8ec; padding: 18px 22px; border-radius: var(--radius); margin: 18px 0; }

/* ---------- FAQ ---------- */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; transition: border-color .2s; }
details.faq summary { cursor: pointer; font-family: var(--display); font-weight: 750; color: var(--navy); padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--amber-ink); transition: transform .25s var(--ease); }
details.faq[open] summary::after { transform: rotate(45deg); }
@media (hover: hover) { details.faq:hover { border-color: var(--navy); } }
details.faq p { margin: 0; padding: 0 20px 18px; }

/* ---------- Forms ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; max-width: 560px; box-shadow: 0 18px 40px -30px rgba(27, 37, 64, .5); }
.form label { display: block; font-weight: 600; margin: 14px 0 6px; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .92rem; }
.form input[type=text], .form input[type=email], .form select, .form textarea {
  width: 100%; padding: 12px; border: 1px solid #c3c8d4; border-radius: var(--radius); font: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 45%, transparent); }
.form input:user-invalid, .form select:user-invalid { border-color: var(--warn); }
.form textarea { min-height: 110px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 14px; }
.form .check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.form .small { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.form button { margin-top: 18px; width: 100%; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.h-form { font-size: 1.7rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark-muted); padding: 56px 0 36px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration-color: color-mix(in srgb, #fff 40%, transparent); display: inline-block; padding: 4px 0; min-height: 30px; }
@media (hover: hover) { .site-footer a:hover { color: var(--amber); text-decoration-color: var(--amber); } }
.site-footer .wrap { display: grid; gap: 24px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 2px; }
.site-footer strong { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; display: block; margin-bottom: 12px; color: #fff; }
.fine { font-size: .85rem; color: var(--on-dark-faint); margin-top: 18px; grid-column: 1 / -1; border-top: 1px solid var(--navy-line); padding-top: 18px; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.muted { color: var(--muted); }

/* ---------- Personal side: graphite instead of navy ---------- */
.theme-personal {
  --navy: #33373e;
  --navy-soft: #464b53;
  --navy-line: #686f79;
  --navy-deep: #24272c;
  --on-dark: #eceef0;
  --on-dark-muted: #d2d5da;
  --on-dark-faint: #b5bac1;
  --tint: #f0f1f3;
  --tint-soft: #f5f6f7;
  --track: #e6e8eb;
  --text: #222428;
  --muted: #5b5f66;
}
