/* Marketing pages (server-rendered by site.js). Built on tokens.css + ds.css. */

/* ===== Visual pass (R28): white surfaces, thin lines, one rhythm =====
   Colours (white surfaces, lines, --hover) apply to the portal too (R30). Spacing and type
   rules stay marketing-only via `:where(body:not(:has(> #app)))`; the portal renders into main#app.
   Rhythm: sections 60px apart on desktop, 44px on phones; card gaps 20px; head-to-content 20px. */
:where(body:not(:has(> #app))) {
  --mk-section: 48px;
  --mk-gap: 20px;
  --mk-head: 20px;
}
body { --hover: color-mix(in srgb, var(--accent) 7%, transparent); }
@media (max-width: 760px) { :where(body:not(:has(> #app))) { --mk-section: 32px; --mk-gap: 16px; --mk-head: 16px; } }
/* light: pure white page, crisp lines, no grey fills */
@media not (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) body { --surface: #FFFFFF; --surface-raised: #FFFFFF; --surface-sunken: #F7F8F7; --line: #E9E9EE; --line-strong: #D5D5DC; --text: #474751; }
}
:root[data-theme="light"] body { --surface: #FFFFFF; --surface-raised: #FFFFFF; --surface-sunken: #F7F8F7; --line: #E9E9EE; --line-strong: #D5D5DC; --text: #474751; }
/* dark: near-black page, cards one step up */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { --surface: #0B0B0F; --surface-raised: #131318; --line: #24242C; --line-strong: #33333D; --hover: color-mix(in srgb, var(--accent) 10%, transparent); }
}
:root[data-theme="dark"] body { --surface: #0B0B0F; --surface-raised: #131318; --line: #24242C; --line-strong: #33333D; --hover: color-mix(in srgb, var(--accent) 10%, transparent); }

/* type hierarchy */
:where(body:not(:has(> #app))) h1 { font-weight: var(--weight-bold); letter-spacing: -0.04em; }
:where(body:not(:has(> #app))) h2 { font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -0.025em; line-height: 1.2; }
:where(body:not(:has(> #app))) .lead { font-size: 17px; line-height: 1.55; }
@media (max-width: 600px) { :where(body:not(:has(> #app))) .lead { font-size: var(--text-md); } }

/* one section rhythm: top spacing only, so gaps never double up */
:where(body:not(:has(> #app))) .section { padding: var(--mk-section) 0 0; }
:where(body:not(:has(> #app))) .section + .section { border-top: 0; }
:where(body:not(:has(> #app))) .grid { gap: var(--mk-gap); }

/* nav: solid white bar with a hairline, no frosted grey */
.site-nav, .nav-bare { background: var(--surface); backdrop-filter: none; border-bottom-color: var(--line); }
.explore summary.btn-ghost { height: 36px; padding: 0 10px; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-strong); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.explore summary.btn-ghost:hover, .explore[open] summary.btn-ghost { background: transparent; border-color: var(--accent); color: var(--accent-strong); }
:where(body:not(:has(> #app))) .btn-ghost:hover { background: var(--hover); }
:where(body:not(:has(> #app))) .btn-primary:hover { background: color-mix(in srgb, var(--text-strong) 82%, var(--accent)); }

.small { font-size: var(--text-sm); }
.fine { font-size: var(--text-xs); margin: var(--space-3) 0 0; }
.between { justify-content: space-between; }
.align-center { align-items: center; }
.narrow { max-width: 760px; }
.block { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
main { min-height: 60vh; }

/* nav: links collapse into a menu on phones */
.nav .nav-links { display: flex; gap: var(--space-5); align-items: center; }
.nav-toggle { display: none; }
.nav-bare { justify-content: flex-start; }
@media (max-width: 760px) {
  .nav { gap: var(--space-3); }
  .nav .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-2) var(--page-gutter) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav .nav-links a.link { display: block; padding: var(--space-3) 0; font-size: var(--text-md); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-toggle { display: inline-flex; }
}

.container.hero { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }

/* page heads */
.page-head { padding: var(--space-7) var(--page-gutter) 0; }
.page-head h1 { margin: var(--space-3) 0 var(--space-4); }
.page-head .row { margin-top: var(--space-4); }
.page-head .lead { max-width: 680px; }
.section-head { margin-bottom: var(--mk-head, var(--space-5)); }
.section-head h2 { margin: var(--space-2) 0 var(--space-3); }
.section-tight { padding-top: var(--space-5); }
.crumbs { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-4); }
.crumbs a { color: var(--text); }
.muted-kicker { color: var(--text-muted); }
.hero-card h3 { margin: var(--space-2) 0 var(--space-3); }
.hero-card .progress { margin-top: var(--space-3); }
.hero .proof span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero .proof .icon { width: 16px; height: 16px; }
.card h3 { margin-top: var(--space-3); }
.card.track-card h3 { margin-top: var(--space-2); }
.card .icon-box + h3 { margin-top: var(--space-4); }
.level-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); }

/* facts row on a track page */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-6) 0; max-width: 860px; }
.facts > div { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-3); align-items: start; }
.facts .icon { grid-row: span 2; margin-top: 3px; color: var(--accent-strong); }
.facts b { color: var(--text-strong); font-weight: var(--weight-semibold); }
.facts span { font-size: var(--text-sm); color: var(--text-muted); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

/* lists */
.ticks { list-style: none; padding: 0; margin: 0; }
.course-facts { margin: 0 0 var(--space-3); color: var(--text-muted); font-size: var(--text-sm); line-height: 1.55; max-width: 640px; }
.ticks li { display: flex; gap: var(--space-3); padding: var(--space-2) 0; }
.ticks .icon { color: var(--accent-strong); margin-top: 3px; }
.sessions { list-style: none; padding: 0; margin: var(--space-5) 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.sessions li { counter-increment: s; border-top: 2px solid var(--line); padding-top: var(--space-4); }
.sessions li::before { content: counter(s, decimal-leading-zero); font-size: var(--text-xs); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; color: var(--accent-strong); }
.sessions h3 { margin: var(--space-2) 0; font-size: var(--text-lg); }
.sessions p { font-size: var(--text-sm); margin: 0; }
.sessions.compact { grid-template-columns: 1fr; gap: var(--space-2); }
@media (max-width: 900px) { .sessions { grid-template-columns: 1fr; } }
.tool-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.tool-row > span:first-child { margin-right: var(--space-2); }
.spine { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
.spine li { counter-increment: s; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--text-sm); }
.spine li::before { content: counter(s, decimal-leading-zero); display: block; font-size: var(--text-sm); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); color: var(--accent-strong); letter-spacing: var(--tracking-tight); margin-bottom: var(--space-2); }
@media (max-width: 900px) { .spine { grid-template-columns: repeat(2, 1fr); } }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--space-4) 0; }
.faq summary:hover { color: var(--accent-strong); }
.faq summary { cursor: pointer; font-weight: var(--weight-semibold); color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--text-muted); font-weight: var(--weight-regular); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: var(--space-3) 0 0; font-size: var(--text-sm); }

/* lead form */
.lead-form h3 { margin-top: 0; }
.lead-form .check { margin: var(--space-2) 0 var(--space-3); }
.lead-form .check + .btn, .lead-form .field-err + .btn { margin-top: var(--space-3); }
.form-msg { margin: var(--space-3) 0 0; font-size: var(--text-sm); }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--accent-strong); font-weight: var(--weight-semibold); }
.form-msg.err { color: var(--danger); }

/* band */
.band { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--mk-section, var(--space-6)); padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface-inverse); color: var(--text-inverse); }
.band h3 { color: var(--text-inverse); margin: 0; }
.band p { margin: 0; }
.band .btn-accent { background: var(--accent); }

/* ad landing */
.go { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-7); padding-top: 56px; padding-bottom: 0; align-items: start; }
.go h1 { margin: var(--space-4) 0; }
.go .ticks { margin: var(--space-5) 0; }
.go-jump { display: none; }
@media (max-width: 900px) { .go { grid-template-columns: 1fr; gap: var(--space-5); padding-top: var(--space-5); } .go-jump { display: inline-flex; } }

/* quiz */
.quiz-q { border: 1px solid var(--line); margin: 0; }
.quiz-q legend { float: left; width: 100%; padding: 0; font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--text-lg); margin-bottom: var(--space-4); }
.quiz-q legend span { display: block; font-size: var(--text-xs); font-weight: var(--weight-medium); margin-bottom: var(--space-1); }
.quiz-opts { clear: both; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
@media (max-width: 600px) { .quiz-opts { grid-template-columns: 1fr; } }
.quiz-opt { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; font-size: var(--text-sm); }
.quiz-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--text-strong); font-weight: var(--weight-semibold); }
.quiz-opt input { accent-color: var(--accent-fill); }
#quiz-result .card { margin-top: var(--space-5); }

/* consent */
.consent { position: fixed; z-index: 50; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); max-width: 440px; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: var(--text-sm); }
.consent p { margin: 0 0 var(--space-3); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: calc(var(--mk-section, 64px) + 8px); padding: var(--space-7) 0 var(--space-5); font-size: var(--text-sm); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-6) var(--space-7); }
.footer-grid h4 { margin: 0 0 var(--space-3); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-strong); }
.footer-grid .brand { display: inline-block; margin-bottom: var(--space-2); }
.footer-grid p { margin: 0 0 var(--space-2); max-width: 280px; }
.footer-grid a:not(.brand) { display: block; width: fit-content; color: var(--text); padding: 4px 0; line-height: 1.4; }
.footer-grid a:not(.brand):hover { color: var(--accent-strong); text-decoration: none; }
.footer-base { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); font-size: var(--text-xs); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { gap: var(--space-5); } .footer-grid > :first-child { grid-column: 1 / -1; } .footer-topics { display: none; } }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-6); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: var(--space-2) 0; }

/* ================= Catalog (R24): search, browse, topics, course pages ================= */
body:has(.site-nav) { --page-max: 1240px; }
.site-nav { gap: var(--space-4); }
.site-nav .brand { margin-right: 0; white-space: nowrap; }
.site-nav .nav-links { gap: var(--space-4); margin-left: auto; }
.site-nav .nav-links .link { white-space: nowrap; }

/* search box, used in the header, hero, browse page and 404 */
.search { position: relative; display: flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-muted); }
.search:hover { border-color: color-mix(in srgb, var(--text-strong) 30%, var(--line-strong)); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: var(--text-md); color: var(--text-strong); }
.search input::-webkit-search-cancel-button { display: none; }
.nav-search { flex: 1; max-width: 460px; height: 40px; }
.nav-search input { font-size: var(--text-sm); }
.hero-search { max-width: 620px; height: 54px; margin-top: var(--space-5); padding: 0 var(--space-5); box-shadow: 0 1px 2px rgba(11, 11, 15, .04), 0 6px 20px rgba(11, 11, 15, .06); }
.hero-search input { font-size: var(--text-md); }
.browse-search { max-width: 620px; margin-top: var(--space-5); }
.suggest { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; padding: var(--space-2); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.suggest a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); color: var(--text-strong); font-size: var(--text-sm); }
.suggest a:hover, .suggest a.on { background: var(--hover); text-decoration: none; }
.suggest a .muted { margin-left: auto; font-size: var(--text-xs); white-space: nowrap; }
.suggest .icon { color: var(--text-muted); }
.suggest .all { border-top: 1px solid var(--line); margin-top: var(--space-1); border-radius: 0 0 var(--radius-md) var(--radius-md); color: var(--accent-strong); }

/* Explore menu */
.explore { position: relative; }
.explore summary { list-style: none; cursor: pointer; gap: 4px; }
.explore summary::-webkit-details-marker { display: none; }
.explore summary .icon { width: 16px; height: 16px; transition: transform var(--duration) var(--ease); }
.explore[open] summary .icon { transform: rotate(180deg); }
.explore-menu { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); width: 520px; padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.explore-menu h4 { margin: 0 0 var(--space-2); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-muted); }
.explore-menu a { display: flex; align-items: center; gap: var(--space-3); padding: 7px var(--space-2); margin: 0 calc(-1 * var(--space-2)); border-radius: var(--radius-md); color: var(--text-strong); font-size: var(--text-sm); }
.explore-menu a:hover { background: var(--hover); color: var(--accent-strong); text-decoration: none; }
.explore-menu .icon { width: 18px; height: 18px; color: var(--accent-strong); }

@media (max-width: 1080px) { .site-nav .nav-cta { display: none; } }
@media (max-width: 900px) {
  .site-nav .nav-search { display: none; }
  .site-nav { gap: var(--space-3); }
  .site-nav .brand { margin-right: auto; }
  .site-nav .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-2) var(--page-gutter) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--line); }
  .site-nav .nav-links a.link { display: block; padding: var(--space-3) 0; font-size: var(--text-md); border-bottom: 1px solid var(--line); }
  .site-nav.open .nav-links { display: flex; }
  .site-nav .nav-toggle { display: inline-flex; }
  .explore-menu { position: fixed; top: var(--nav-height); left: var(--space-3); right: var(--space-3); width: auto; max-height: calc(100vh - var(--nav-height) - 24px); overflow: auto; }
}
@media (max-width: 520px) { .explore-menu { grid-template-columns: 1fr; } }

/* home hero */
/* hero background (R48): emerald and warm glows over a soft grid that fades out */
.hero-band { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(820px 520px at 85% 15%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(600px 380px at 62% 110%, color-mix(in srgb, #E0A526 26%, transparent), transparent 70%),
    radial-gradient(600px 360px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, var(--accent) 3%, var(--surface))); }
.hero-band::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  --grid: color-mix(in srgb, var(--accent) 22%, transparent);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 70% 30%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 90% at 70% 30%, #000 30%, transparent 85%); }
.hero-band > .container { position: relative; }
/* why learn it live: plain text columns, no boxes (R77) */
.why-live { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4) var(--space-6); }
.why-live h3 { margin: 0 0 var(--space-2); font-size: 17px; letter-spacing: -0.01em; }
.why-live p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.55; }
@media (max-width: 760px) { .why-live { grid-template-columns: 1fr; } }
.hero-inner { padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 760px) { .hero-inner { padding-top: var(--space-6); padding-bottom: var(--space-6); } }
.hero-inner h1 { margin: var(--space-3) 0 var(--space-4); max-width: 820px; font-size: clamp(36px, 5vw, 54px); }
.hero-inner .lead { max-width: 640px; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--space-4); }
.popular .chip { height: 28px; padding: 0 12px; }
.popular a.chip:hover, .popular button.chip:hover { border-color: var(--accent); color: var(--accent-strong); text-decoration: none; }
.popular button.chip { cursor: pointer; font: inherit; font-size: var(--text-xs); font-weight: var(--weight-medium); }
.popular button.chip.chip-dark { color: var(--surface); }

/* rows and section heads */
.section-row { padding-top: var(--mk-section, var(--space-7)); }
/* first block under a page head sits closer: the head already separates it */
.browse-head + .section-row, .topic-band + .section-row { padding-top: var(--space-6); }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--mk-head, var(--space-5)); }
.row-head h2 { margin: var(--space-1) 0 0; }
.row-head p { margin: 6px 0 0; font-size: var(--text-md); }
.row-head .kicker { display: block; margin-bottom: var(--space-2); }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--accent-strong); white-space: nowrap; }
.see-all .icon { width: 16px; height: 16px; }
.card-row { --g: var(--mk-gap, 20px); display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--g)) / 4); gap: var(--g); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 var(--space-3); margin-top: -4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.card-row > * { scroll-snap-align: start; }
@media (max-width: 1080px) { .card-row { grid-auto-columns: calc((100% - 2 * var(--g)) / 3); } }
@media (max-width: 760px) { .card-row { grid-auto-columns: min(80%, 290px); } }

/* course card */
.course-card { display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: inherit; transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease); }
.course-card:hover { text-decoration: none; color: inherit; border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(11, 11, 15, .04), 0 10px 24px rgba(11, 11, 15, .07); transform: translateY(-2px); }
.course-card:hover h3 { color: var(--accent-strong); }
.course-card[hidden] { display: none; }
.course-body { display: flex; flex-direction: column; flex: 1; padding: var(--space-4) var(--space-4) 14px; }
.course-kicker { font-size: 11px; font-weight: var(--weight-semibold); color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.08em; }
.course-card h3 { margin: 6px 0; font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; color: var(--text-strong); transition: color var(--duration) var(--ease); }
.course-card p { margin: 0 0 var(--space-3); font-size: var(--text-sm); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: auto; font-size: var(--text-sm); }
.course-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.course-foot .muted { display: inline-flex; align-items: center; gap: 4px; }
.course-foot .icon { width: 14px; height: 14px; }

/* course art: a drawing of what you make, tinted by topic (art.js). No stock photos, no faces. */
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line);
  --a-bg: color-mix(in srgb, var(--tint) 9%, var(--surface-raised)); --a-glow: color-mix(in srgb, var(--tint) 10%, transparent);
  --a-card: var(--surface-raised); --a-card2: color-mix(in srgb, var(--tint) 4%, var(--surface-raised)); --a-edge: var(--line);
  --a-line: color-mix(in srgb, var(--text-strong) 13%, transparent); --a-soft: color-mix(in srgb, var(--tint) 26%, var(--surface-raised));
  --a-shadow: color-mix(in srgb, var(--tint) 16%, transparent); --a-dark: #14161C; }
.thumb .art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform var(--duration-slow, .4s) var(--ease); }
.course-card:hover .thumb .art { transform: scale(1.03); }
.art .a-bg { fill: var(--a-bg); } .art .a-glow { fill: var(--a-glow); }
.art .a-card { fill: var(--a-card); stroke: var(--a-edge); stroke-width: 1; } .art .a-card2 { fill: var(--a-card2); stroke: var(--a-edge); stroke-width: 1; }
.art .a-sh { fill: var(--a-shadow); } .art .a-edge { fill: var(--a-edge); } .art .a-edge2 { fill: none; stroke: var(--tint); stroke-width: 1.5; }
.art .a-ln { fill: var(--a-line); } .art .a-t { fill: var(--tint); } .art .a-ts { fill: var(--a-soft); } .art .a-dark { fill: var(--a-dark); }
.art .a-dln { fill: rgba(255, 255, 255, .22); } .art .a-white { fill: #fff; } .art .a-fill { fill: var(--tint); } .art .a-fills { fill: var(--a-soft); }
.art .a-st, .art .a-stt { fill: none; stroke: var(--tint); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.art .a-stw { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .a-sl { fill: none; stroke: color-mix(in srgb, var(--tint) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 3 4; }
.art .a-ring { fill: none; stroke: color-mix(in srgb, var(--tint) 30%, transparent); stroke-width: 1.5; }
.art .a-edgep { fill: none; stroke: var(--tint); stroke-width: 1.5; }
.art .a-code { fill: var(--tint); font: 600 56px var(--font-mono, monospace); }
.thumb-type { position: absolute; top: var(--space-3); left: var(--space-3); padding: 3px 9px; border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-strong); border: 1px solid var(--line); font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: 0.02em; }

/* how a session runs */
.session-run { list-style: none; margin: var(--space-4) 0 0 6px; padding: 0; border-left: 2px solid var(--line); }
.session-run li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: var(--space-3); padding: 0 0 var(--space-4) var(--space-4); }
.session-run li::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-raised); border: 2px solid var(--accent); }
.session-run-min { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.session-run b { color: var(--text-strong); } .session-run p { margin: 2px 0 0; font-size: var(--text-sm); }
.session-run-ends { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-2); }
.session-run-ends h4 { margin: 0 0 var(--space-2); }
@media (max-width: 600px) { .session-run-ends { grid-template-columns: 1fr; } .session-run li { grid-template-columns: 1fr; gap: 0; } }

/* goal paths and topic tiles */
.paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--mk-gap, 16px); }
.path { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); color: inherit; transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.path:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); text-decoration: none; color: inherit; }
.path:hover > .icon { color: var(--accent-strong); }
.path-text { flex: 1; display: flex; flex-direction: column; font-size: var(--text-sm); color: var(--text-muted); }
.path-text b { color: var(--text-strong); font-size: var(--text-md); }
.path-course { margin-top: var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--accent-strong); }
.path > .icon { color: var(--text-muted); }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--mk-gap, 16px); }
.topic { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); color: inherit; transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.topic:hover { border-color: var(--tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 12%, transparent); text-decoration: none; color: inherit; }
.topic b { color: var(--text-strong); margin-top: var(--space-3); }
.topic-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-md); background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topic-icon { color: color-mix(in srgb, var(--tint) 55%, #fff); } }
:root[data-theme="dark"] .topic-icon { color: color-mix(in srgb, var(--tint) 55%, #fff); }
@media (min-width: 1081px) { .topics { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .paths { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .paths { grid-template-columns: 1fr; } }
.tool-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* browse */
.browse-head { padding: var(--space-6) 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); }
.browse-head h1 { margin: 0 0 var(--space-3); font-size: clamp(30px, 4vw, 44px); }
.browse-head .lead { max-width: 640px; margin-bottom: 0; }
.browse { display: grid; grid-template-columns: 232px 1fr; gap: var(--space-7); padding-top: var(--space-6); align-items: start; }
.filters-panel { position: sticky; top: calc(var(--nav-height) + var(--space-4)); }
.filters-top { display: flex; justify-content: space-between; align-items: center; height: 36px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); box-sizing: content-box; }
.filters-top b { color: var(--text-strong); font-size: var(--text-sm); }
.filters-top .btn-ghost { height: 28px; padding: 0 8px; color: var(--accent-strong); }
.filter-group { border: 0; padding: var(--space-4) 0; margin: 0; border-bottom: 1px solid var(--line); }
.filter-group legend { float: left; width: 100%; padding: 0; margin-bottom: var(--space-2); font-weight: var(--weight-semibold); color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.filter-group .check { clear: both; padding: 5px 0; color: var(--text-strong); align-items: center; }
.filter-group .check input { margin: 0; width: 16px; height: 16px; }
.filter-group .check:hover { color: var(--accent-strong); }
.results-bar { display: flex; align-items: center; gap: var(--space-3); height: 36px; margin-bottom: var(--space-4); }
.results-bar #count { font-weight: var(--weight-semibold); color: var(--text-strong); margin-right: auto; }
.sort { display: flex; align-items: center; gap: var(--space-2); }
.sort .select { height: 36px; width: auto; padding-top: 0; padding-bottom: 0; }
.filters-toggle { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.active-filters:empty { display: none; }
.active-filters button { cursor: pointer; font: inherit; font-size: var(--text-xs); }
.active-filters .icon { width: 12px; height: 12px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--mk-gap, 16px); }
@media (max-width: 900px) {
  .browse { grid-template-columns: 1fr; }
  .filters-panel { display: none; position: static; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); }
  .filters-panel.open { display: block; }
  .filters-panel .filter-group:last-child { border-bottom: 0; }
  .filters-toggle { display: inline-flex; }
  .browse .results { order: 2; }
}
@media (max-width: 520px) { .sort .muted { display: none; } }

/* topic page */
.topic-band { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); background: radial-gradient(800px 300px at 90% -30%, color-mix(in srgb, var(--tint) 12%, transparent), transparent 70%), var(--surface); }
.topic-band .lead { margin-bottom: 0; }
.topic-title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.topic-title h1 { margin: 0; }
.topic-title .topic-icon { width: 48px; height: 48px; }

/* course page: dark band, main column, sticky side card */
.course-band { background: radial-gradient(700px 320px at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--graphite-950); color: var(--graphite-200); padding: var(--space-6) 0 var(--space-7); border-bottom: 1px solid var(--graphite-800); }
.course-band .lead { margin-bottom: 0; }
.course-band .container { padding-right: calc(var(--page-gutter) + 380px); }
.course-band h1 { color: #fff; margin: var(--space-4) 0 var(--space-3); font-size: clamp(32px, 4.4vw, 48px); }
.course-band .lead { color: var(--graphite-200); max-width: 720px; }
.course-band .crumbs, .course-band .crumbs a { color: var(--graphite-300); }
.course-band .chip { background: transparent; color: var(--graphite-100); border-color: var(--graphite-700); }
.course-band .chip-accent { color: var(--emerald-300); border-color: color-mix(in srgb, var(--emerald-300) 50%, transparent); }
.band-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); font-size: var(--text-sm); }
.band-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.band-meta .icon { width: 16px; height: 16px; }
.course-band .level { color: var(--graphite-100); }
.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-7); align-items: start; }
.course-main { padding-top: var(--space-6); min-width: 0; }
.course-main { padding-bottom: 0; }
.course-main > section + section { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.course-main > section.card + section, .course-main > section + section#join { border-top: 0; padding-top: 0; }
.course-main h2 { font-size: var(--text-xl); letter-spacing: -0.02em; margin: 0 0 var(--space-4); }
.course-main h2 + p.muted { margin-top: calc(-1 * var(--space-3)); }
.learn-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-5); font-size: var(--text-sm); }
.learn-grid li, .includes li { display: flex; gap: var(--space-3); align-items: flex-start; }
.learn-grid .icon { width: 18px; height: 18px; color: var(--accent-strong); margin-top: 1px; }
.outline { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.outline details + details { border-top: 1px solid var(--line); }
.outline summary { display: flex; align-items: center; gap: var(--space-3); padding: 14px var(--space-4); cursor: pointer; list-style: none; font-weight: var(--weight-semibold); color: var(--text-strong); background: var(--surface-raised); transition: background var(--duration) var(--ease); }
.outline summary:hover { background: var(--hover); }
.outline summary::-webkit-details-marker { display: none; }
.outline summary::after { content: '+'; margin-left: auto; color: var(--text-muted); font-weight: var(--weight-regular); }
.outline details[open] summary::after { content: '–'; }
.outline-n { flex: none; min-width: 2.2em; font-size: var(--text-xs); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; color: var(--accent-strong); }
.outline p { margin: 0; padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 2.2em + var(--space-3)); font-size: var(--text-sm); }
.outline-links { margin-top: var(--space-4); }
.course-main .tool-cloud + p { margin-top: var(--space-3); }
.teacher { display: flex; gap: var(--space-4); align-items: flex-start; }
.teacher p { margin: var(--space-2) 0 0; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-weight: var(--weight-bold); font-size: var(--text-xl); }
.course-side { margin-top: calc(-1 * var(--space-10, 220px)); position: sticky; top: calc(var(--nav-height) + var(--space-4)); }
.side-card { padding: 0; overflow: hidden; }
.side-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.side-body h4 { padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: var(--text-sm); }
.side-body h4 { margin: var(--space-3) 0 0; font-size: var(--text-sm); }
.includes { list-style: none; padding: 0; margin: 0; font-size: var(--text-sm); display: grid; gap: var(--space-2); }
.includes .icon { width: 18px; height: 18px; color: var(--text-muted); }
@media (max-width: 1000px) {
  .course-band .container { padding-right: var(--page-gutter); }
  .course-layout { grid-template-columns: 1fr; gap: 0; }
  .course-side { position: static; margin-top: var(--space-5); order: -1; }
  .side-card .thumb { display: none; }
}
@media (max-width: 600px) { .learn-grid { grid-template-columns: 1fr; } }

/* tools directory */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--mk-gap, 16px); }
.tool-card { display: flex; flex-direction: column; gap: var(--space-2); color: inherit; padding: var(--space-4); }
.tool-card { transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.tool-card:hover { border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(11, 11, 15, .04), 0 10px 24px rgba(11, 11, 15, .07); text-decoration: none; color: inherit; }
.tool-card:hover h3 { color: var(--accent-strong); }
.tool-card h3 { margin: var(--space-1) 0 0; font-size: var(--text-md); color: var(--text-strong); }
.tool-card p { margin: 0; font-size: var(--text-sm); flex: 1; }
.tool-card[hidden] { display: none; }
#tool-count { margin: 0 0 var(--space-3); }

/* home hero: copy on the left, featured courses on the right */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-feature { display: grid; gap: var(--space-3); }
.feature-main { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-raised); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(11, 11, 15, .04), 0 12px 32px rgba(11, 11, 15, .08); color: inherit; }
.feature-main:hover, .feature-mini:hover { text-decoration: none; color: inherit; border-color: var(--line-strong); }
.feature-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4) var(--space-4); }
.feature-mini { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); color: inherit; }
.feature-mini:hover b { color: var(--accent-strong); }
.feature-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.feature-mini b { color: var(--text-strong); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-thumb { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--radius-md); color: #fff; background: linear-gradient(135deg, var(--tint), color-mix(in srgb, var(--tint) 55%, #0B0B0F)); }
@media (max-width: 1000px) { .hero-inner { grid-template-columns: 1fr; } .hero-feature { display: none; } }
.feature-main .thumb { aspect-ratio: 2 / 1; }
@media (max-width: 600px) { .results-grid .thumb { aspect-ratio: 21 / 9; } }

.popular-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); margin-right: var(--space-1); }
.hero-search + .popular { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
@media (max-width: 600px) { .hero-actions .btn { flex: 1 1 100%; } }

/* phone header and menu (R27): icon buttons, full-screen sheet with search, links and topics */
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-strong); cursor: pointer; }
.icon-btn:hover { background: var(--hover, var(--surface-sunken)); text-decoration: none; color: var(--text-strong); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn .icon { width: 22px; height: 22px; }
.nav-toggle .i-close, .site-nav.open .nav-toggle .i-open { display: none; }
.site-nav.open .nav-toggle .i-close { display: block; }
.phone-only, .mobile-menu { display: none; }
@media (max-width: 900px) {
  .site-nav .explore, .site-nav .nav-links, .site-nav.open .nav-links { display: none; }
  .site-nav .phone-only { display: inline-grid; }
  .site-nav .nav-signin { place-items: center; height: 36px; padding: 0 14px; margin-right: var(--space-1); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-strong); white-space: nowrap; }
  .site-nav .nav-signin:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--hover); text-decoration: none; }
  .site-nav .nav-toggle { margin-left: calc(-1 * var(--space-2)); }
  .site-nav.open .mobile-menu { display: block; }
  /* A small dropdown under the menu button, not a full-screen sheet (R59). */
  .mobile-menu { position: absolute; top: calc(100% - 4px); right: var(--page-gutter); width: min(260px, calc(100vw - 2 * var(--page-gutter))); max-height: calc(100dvh - var(--nav-height) - 16px); overflow-y: auto; padding: var(--space-2); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
  .menu-search { height: 48px; }
  .mobile-menu h4 { margin: var(--space-5) 0 var(--space-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
  .menu-list { display: grid; }
  .menu-list a { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--text-strong); font-size: var(--text-sm); font-weight: var(--weight-medium); }
  .menu-list a:hover { background: var(--hover); text-decoration: none; }
  .menu-list .icon { color: var(--accent-strong); }
  .menu-list span { flex: 1; }
  .menu-list .chev { display: none; }
  .menu-topics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .menu-topics a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--text-strong); font-size: var(--text-sm); font-weight: var(--weight-medium); }
  .menu-topics a:hover { border-color: var(--tint); text-decoration: none; }
  .menu-topics .topic-icon { width: 32px; height: 32px; flex: none; }
  .menu-topics .topic-icon .icon { width: 18px; height: 18px; }
  .menu-actions { display: grid; margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
}

/* tool guides: ratings, quick start, detail page */
.stars { position: relative; display: inline-block; font-size: 14px; line-height: 1; letter-spacing: 1px; color: var(--line-strong); white-space: nowrap; }
.stars-on { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #E0A526; }
.stars-lg { font-size: 20px; }
.rating { display: inline-flex; align-items: center; gap: 6px; } .rating b { color: var(--text-strong); font-size: var(--text-sm); }
.tool-foot { margin-top: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.tool-foot .muted { display: inline-flex; align-items: center; gap: 4px; } .tool-foot .icon { width: 14px; height: 14px; }
.tools-bar { margin-bottom: var(--space-3); gap: var(--space-3); flex-wrap: wrap; } .tools-bar p { margin: 0; }
@media (max-width: 600px) { .kind-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -16px; } .kind-chips::-webkit-scrollbar { display: none; } .kind-chips .chip { flex: none; } }
.chip-link { color: inherit; } .chip-link:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-strong); }
.verdict { font-size: var(--text-md); color: var(--text-strong); margin: 0 0 var(--space-4); }
.scores { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.score { display: grid; grid-template-columns: 150px 1fr 36px; gap: var(--space-3); align-items: center; font-size: var(--text-sm); }
.score b { color: var(--text-strong); text-align: right; font-variant-numeric: tabular-nums; }
.score-bar { height: 8px; border-radius: 4px; background: var(--hover, rgba(0,0,0,.06)); overflow: hidden; } .score-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.quick-steps { list-style: none; counter-reset: step; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.quick-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); align-items: start; }
.quick-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-strong); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.quick-steps li span { padding-top: 3px; }
.tip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.tip-pair h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--space-2); } .tip-pair p { margin: 0; font-size: var(--text-sm); } .tip-pair .icon { width: 16px; height: 16px; }
.card-warn { border-color: color-mix(in srgb, #E0A526 45%, var(--line)); background: color-mix(in srgb, #E0A526 6%, var(--surface-raised)); }
.similar { list-style: none; margin: 0 0 var(--space-3); padding: 0; } .similar a { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; font-size: var(--text-sm); } .similar a:hover { color: var(--accent-strong); text-decoration: none; }
@media (max-width: 600px) { .tip-pair { grid-template-columns: 1fr; } .score { grid-template-columns: 1fr 70px 32px; } }
.side-body > h4:first-child { border-top: 0; padding-top: 0; margin-top: 0; font-size: var(--text-md); color: var(--text-strong); }
.course-band .rating b { color: #fff; font-size: var(--text-md); } .course-band .rating .muted { color: var(--graphite-300); }
.course-band .stars { color: var(--graphite-700); }

/* forms (R55): errors by the field; 16px fields on phones so iOS doesn't zoom; anchors clear the sticky header */
html { scroll-padding-top: 80px; }
.field-err { margin: 4px 0 0; font-size: var(--text-sm); color: var(--danger, #C2410C); }
[aria-invalid="true"] { border-color: var(--danger, #C2410C) !important; }
@media (max-width: 640px) { .input, .select, .textarea { font-size: 16px; } }
.feature-name { display: block; font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--text-strong); margin: 2px 0; }
.sub-kinds { margin-top: var(--space-2); } .sub-kinds .chip { height: 28px; }
.kind-chips[hidden], .kind-chips [hidden] { display: none !important; }

/* ---------- newsletter (R57) ---------- */
.news-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-7); align-items: start; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.news-form h2 { margin: 0 0 var(--space-2); }
.news-form .check { margin: var(--space-3) 0; }
.news-fields .btn { margin-top: var(--space-2); }
.news-list { display: grid; border-top: 1px solid var(--line); }
.news-row { display: grid; gap: 4px; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.news-row:hover b { color: var(--accent-strong); }
.news-items { display: grid; gap: var(--space-6); padding-top: var(--space-6); }
.news-item { border-top: 1px solid var(--line); padding-top: var(--space-5); }
.news-item h2 { font-size: var(--text-xl); margin: var(--space-2) 0 var(--space-3); }
.news-links { display: flex; flex-wrap: wrap; gap: var(--space-5); font-weight: 600; }
.draft-note { background: var(--warm-soft); color: var(--text-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-weight: 600; font-size: .9rem; }
@media (max-width: 760px) { .news-form { grid-template-columns: 1fr; padding: var(--space-5); } }
.news-top { margin-top: var(--space-5); }
.narrow .news-form { grid-template-columns: 1fr; }
