/* =============================================================================
   HoloAlmanac member site — design system
   team/bot8/ha.css

   Dark theme with a gold accent. Text wordmark only (no image or SVG logos).
   No url() references, no raster or SVG backgrounds, no icon fonts, no
   external font files. System font stacks only.

   Include with:  <link rel="stylesheet" href="ha.css">
   Root:          <html lang="en"> is enough; color-scheme is dark.

   Tokens are WCAG AA verified by check.py. Recolored for this product from
   Bot 8's earlier HoloAlmanac token work; components are original to this
   file and written for the member site (landing, pricing, dashboard,
   downloads, demo).
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Brand */
  --ink: #12110e;
  --cream: #f3eee4;
  --gold: #c6a35a;
  --gold-bright: #e0c078;
  --gold-soft: #d4b36a;
  --gold-dim: #2a2416;

  /* Surfaces */
  --bg: #12110e;
  --surface: #1b1914;
  --surface-2: #242119;
  --input-bg: #1e1c18;

  /* Text */
  --text: #f3eee4;
  --text-muted: #a39a88;
  --text-on-gold: #12110e;
  --placeholder: #8e8778;

  /* Interactive */
  --link: #d4b36a;
  --link-hover: #e0c078;
  --focus: #e0c078;
  --focus-on-gold: #f3eee4;

  /* Lines */
  --line: #3a352c;
  --line-strong: #7a7262;

  /* Semantic (not red/green alone: pair with words or glyphs) */
  --ok: #8ecfbe;
  --ok-bg: #1c2a24;
  --warning: #e4d2a0;
  --warning-bg: #2a2616;
  --danger: #e8a0a8;
  --danger-bg: #2a1c1c;
  --info: #d4b36a;
  --info-bg: #2a2416;

  /* Buttons */
  --btn-bg: #c6a35a;
  --btn-fg: #12110e;
  --btn-bg-hover: #e0c078;
  --btn-danger-bg: #8a3e56;
  --btn-danger-fg: #f3eee4;
  --btn-danger-hover: #9a4a62;
  --disabled-bg: #242119;
  --disabled-fg: #948c7a;

  /* Elevation */
  --shadow: 0 1px 0 rgb(0 0 0 / 0.45), 0 16px 40px rgb(0 0 0 / 0.35);
  --shadow-soft: 0 1px 0 rgb(0 0 0 / 0.4);

  /* Type — system stacks only, no @font-face or url() */
  --font-sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono",
    "Liberation Mono", Menlo, Consolas, monospace;

  --fs-2xs: 0.6875rem; /* 11 */
  --fs-xs: 0.75rem;    /* 12 */
  --fs-sm: 0.8125rem;  /* 13 */
  --fs-base: 1rem;     /* 16 */
  --fs-md: 1.125rem;   /* 18 */
  --fs-lg: 1.5rem;     /* 24 */
  --fs-xl: 2rem;       /* 32 */
  --fs-2xl: 2.625rem;  /* 42 */
  --fs-3xl: 3.25rem;   /* 52 */

  --lh-none: 1;
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.6;
  --lh-table: 1.4;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Space (4px grid) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;

  --container: 72rem;
  --sidebar-w: 15.5rem;
  --measure: 40rem;
  --header-h: 4rem;
  --wordmark-size: 1.375rem;

  /* Motion */
  --move: 160ms;
  --move-slow: 280ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

:focus {
  outline: none;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(var(--fs-xl), 4vw + 0.75rem, var(--fs-3xl)); }
h2 { font-size: clamp(var(--fs-lg), 2vw + 0.75rem, var(--fs-xl)); }
h3 { font-size: var(--fs-md); font-family: var(--font-sans); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-base); font-family: var(--font-sans); font-weight: var(--fw-semibold); }

p, ul, ol, dl, blockquote {
  margin: 0 0 var(--s-4);
}

p:last-child,
ul:last-child,
ol:last-child,
dl:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-left: 1.25rem;
}

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: var(--surface-2);
  padding: var(--s-4);
  border-radius: var(--r-md);
  overflow-x: auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

strong { font-weight: var(--fw-semibold); }

/* Reduced motion: drop decorative transitions only. Form and state
   changes still happen instantly, without a long fade. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   3. Utilities
   --------------------------------------------------------------------------- */
.visually-hidden,
.period-switch input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -8rem;
  z-index: 100;
  background: var(--gold);
  color: var(--text-on-gold);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: var(--s-3);
  color: var(--text-on-gold);
  outline: 2px solid var(--focus-on-gold);
  outline-offset: 3px;
}

.example-flag {
  display: inline-block;
  vertical-align: middle;
  margin-left: var(--s-2);
  padding: 0.05em 0.45em;
  border: 1px solid var(--gold);
  border-radius: var(--r-pill);
  color: var(--gold-soft);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-banner {
  background: var(--gold-dim);
  color: var(--gold-soft);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: var(--fs-sm);
  padding: var(--s-2) var(--s-4);
}

/* ---------------------------------------------------------------------------
   4. Layout
   --------------------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--s-4), var(--container));
  margin-inline: auto;
  max-width: 100%;
  min-width: 0;
}

.container-narrow {
  width: min(100% - 2 * var(--s-4), 28rem);
  margin-inline: auto;
}

.section {
  padding-block: var(--s-6);
}

@media (min-width: 48em) {
  .section { padding-block: var(--s-7); }
}

.section-title {
  margin-bottom: var(--s-5);
}

.lede {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text-muted);
  max-width: var(--measure);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

.grid {
  display: grid;
  gap: var(--s-4);
}

.grid-2,
.grid-3,
.stat-grid,
.feature-grid,
.tier-grid,
.download-grid {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 40em) {
  .grid-2,
  .stat-grid,
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .grid-3,
  .feature-grid,
  .tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------------
   5. Wordmark (HTML text only)
   --------------------------------------------------------------------------- */
.wordmark {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: var(--wordmark-size);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-none);
  letter-spacing: 0.01em;
  color: var(--cream);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--cream);
}

/* The second half carries the gold accent. Never replace this with an image. */
.wordmark span {
  color: var(--gold);
}

/* ---------------------------------------------------------------------------
   6. Header, navigation, footer
   --------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .container,
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  min-height: var(--header-h);
  padding-block: var(--s-3);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-soft);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--gold);
  padding-bottom: 2px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-6);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--link-hover); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}

.disclosure {
  max-width: 52rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  border-left: 3px solid var(--gold);
  padding-left: var(--s-3);
  margin-bottom: var(--s-4);
}

/* ---------------------------------------------------------------------------
   7. Buttons
   --------------------------------------------------------------------------- */
.btn,
.btn-ghost,
.btn-danger,
.btn-sm,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  transition: background-color var(--move) var(--ease),
              border-color var(--move) var(--ease),
              color var(--move) var(--ease);
}

.btn,
.btn-ghost,
.btn-danger {
  padding: 0.65rem 1.1rem;
  font-size: var(--fs-base);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: var(--fs-sm);
}

.btn {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg);
}

.btn:focus-visible {
  outline-color: var(--focus-on-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn-danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-fg);
}

.btn-danger:hover {
  background: var(--btn-danger-hover);
  color: var(--btn-danger-fg);
}

.btn-link,
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  border-radius: 2px;
}

.btn-link:hover,
button.link:hover { color: var(--link-hover); }

button.link.danger,
.btn-link.danger { color: var(--danger); }
button.link.danger:hover,
.btn-link.danger:hover { color: #f0b4b8; }

.btn:disabled,
.btn-ghost:disabled,
.btn-danger:disabled,
.btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  color: var(--disabled-fg);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   8. Forms
   --------------------------------------------------------------------------- */
label,
.field {
  display: block;
  margin: 0 0 var(--s-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.field > span,
label > span.label-text {
  display: block;
  margin-bottom: var(--s-1);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
input:not([type]),
select,
textarea {
  display: block;
  width: 100%;
  margin-top: var(--s-1);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  caret-color: var(--gold);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--disabled-fg);
  background: var(--disabled-bg);
  cursor: not-allowed;
}

select {
  appearance: auto;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: end;
}

.field-row > input,
.field-row > select,
.field-row > .field {
  flex: 1 1 16rem;
  margin-bottom: 0;
}

.field-row > .btn,
.field-row > button {
  flex: 0 0 auto;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  color: var(--text);
  font-weight: var(--fw-regular);
  margin-bottom: var(--s-4);
}

.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--gold);
}

.field-error input,
input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-hint,
.field-error-msg {
  display: block;
  margin-top: var(--s-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
}

.field-hint { color: var(--text-muted); }
.field-error-msg { color: var(--danger); }

.rule-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--s-4);
  align-items: end;
}

@media (min-width: 40em) {
  .rule-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .rule-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------------
   9. Cards (generic)
   --------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-soft);
}

.card h3 { margin-bottom: var(--s-2); }

/* ---------------------------------------------------------------------------
   10. Landing — hero, features, proof, testimonials, FAQ, CTA
   --------------------------------------------------------------------------- */
.hero {
  padding-block: var(--s-7);
}

@media (min-width: 48em) {
  .hero { padding-block: var(--s-8); }
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: var(--s-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.feature-grid .card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.feature-step {
  display: block;
  color: var(--gold);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.proof {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 40em) {
  .proof { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.proof-stat {
  border-left: 3px solid var(--gold);
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
}

.proof-value {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}

.proof-label {
  display: block;
  margin-top: var(--s-1);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.testimonial blockquote {
  margin: 0 0 var(--s-3);
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
}

.testimonial-cite {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-style: normal;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-4) 2.25rem var(--s-4) 0;
  font-weight: var(--fw-semibold);
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: var(--fw-regular);
  font-size: var(--fs-lg);
  line-height: 1;
}

.faq details[open] summary::after { content: "\2212"; }

.faq details p {
  color: var(--text-muted);
  padding-bottom: var(--s-4);
  max-width: var(--measure);
}

.cta-band {
  background: var(--gold-dim);
  border-block: 1px solid var(--line);
  padding-block: var(--s-7);
  text-align: center;
}

.cta-band h2 { margin-bottom: var(--s-3); }
.cta-band .lede { margin-inline: auto; }
.cta-band .cluster { justify-content: center; margin-top: var(--s-5); }

/* ---------------------------------------------------------------------------
   11. Pricing — three tiers, popular middle, period toggle
   --------------------------------------------------------------------------- */
.period-switch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}

.period-switch-ui {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  gap: 0;
}

.period-switch-ui label {
  margin: 0;
  padding: 0.45rem 1.05rem;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.period-switch-ui label .save {
  display: inline-block;
  margin-left: var(--s-1);
  color: var(--gold-soft);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#period-monthly:checked ~ .period-switch-ui label[for="period-monthly"],
#period-annual:checked ~ .period-switch-ui label[for="period-annual"] {
  background: var(--gold);
  color: var(--text-on-gold);
}

#period-monthly:checked ~ .period-switch-ui label[for="period-monthly"] .save,
#period-annual:checked ~ .period-switch-ui label[for="period-annual"] .save {
  color: var(--text-on-gold);
}

.period-switch input[type="radio"]:focus-visible + .period-switch-ui label[for="period-monthly"],
#period-annual:focus-visible ~ .period-switch-ui label[for="period-annual"] {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* The annual radio is the second hidden input, so focus-visible is
   handled on the input itself (clipped). Draw a ring on the switch
   when either radio is focused. */
.period-switch input[type="radio"]:focus-visible ~ .period-switch-ui {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.price-annual { display: none; }

#period-annual:checked ~ .tier-grid .price-annual { display: inline; }
#period-annual:checked ~ .tier-grid .price-monthly { display: none; }

.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.tier-popular {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow);
}

@media (min-width: 64em) {
  .tier-popular { transform: translateY(-0.35rem); }
}

.tier-flag {
  align-self: flex-start;
  margin-bottom: var(--s-3);
  background: var(--gold);
  color: var(--text-on-gold);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: var(--r-pill);
}

.tier-name {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  margin-bottom: var(--s-2);
}

.tier-price {
  margin: 0 0 var(--s-4);
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-none);
  letter-spacing: -0.02em;
}

.tier-price .period {
  margin-left: 0.2em;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  letter-spacing: 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-5);
  flex: 1 1 auto;
}

.checklist li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.4rem;
  color: var(--text);
  font-size: var(--fs-sm);
}

.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: var(--fw-bold);
}

.tier-cta { margin-top: auto; }
.tier-cta .btn,
.tier-cta .btn-ghost { width: 100%; }

.price-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}

/* ---------------------------------------------------------------------------
   12. Dashboard — shell, sidebar, stats, alerts, tables, empty
   --------------------------------------------------------------------------- */
.app-shell {
  display: grid;
  gap: var(--s-5);
  align-items: start;
  padding-block: var(--s-5);
  min-width: 0;
}

.app-shell > * {
  min-width: 0;
}

@media (min-width: 64em) {
  .app-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}

@media (min-width: 64em) {
  .sidebar { position: sticky; top: var(--s-4); }
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
}

.side-nav a:hover { background: var(--surface-2); color: var(--gold-soft); }

.side-nav a[aria-current="page"] {
  background: var(--gold-dim);
  color: var(--gold-soft);
  box-shadow: inset 3px 0 0 var(--gold);
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-none);
}

.stat-hint {
  display: block;
  margin-top: var(--s-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

.alert-item {
  display: grid;
  gap: var(--s-2);
  justify-items: start;
  padding: var(--s-4);
  border-top: 1px solid var(--line);
}

.alert-item:first-child { border-top: 0; }

@media (min-width: 48em) {
  .alert-item {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: var(--s-4);
  }

  .alert-price { justify-self: end; }
}

.alert-title {
  margin: 0 0 var(--s-1);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

.alert-title a { color: var(--text); text-decoration: none; }
.alert-title a:hover { color: var(--link-hover); text-decoration: underline; }

.alert-meta {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.alert-price {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  font-size: var(--fs-sm);
  line-height: var(--lh-table);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--surface-2);
}

.data-table tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover td { background: rgb(42 36 22 / 0.45); }

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table .actions {
  white-space: nowrap;
}

.data-table .actions form,
.data-table .actions .inline { display: inline; margin-right: var(--s-3); }

.empty {
  text-align: center;
  padding: var(--s-7) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.empty h2,
.empty h3 { margin-bottom: var(--s-2); }

.empty p {
  color: var(--text-muted);
  max-width: 32rem;
  margin-inline: auto;
  margin-bottom: var(--s-4);
}

/* ---------------------------------------------------------------------------
   13. Badges, toasts, flashes
   --------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.badge-gold {
  background: var(--gold);
  color: var(--text-on-gold);
  border-color: var(--gold);
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: transparent;
}

.badge-warn {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: transparent;
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: transparent;
}

.badge-muted {
  background: var(--surface-2);
  color: var(--text-muted);
}

.flash,
.toast {
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.flash-ok, .toast-ok { background: var(--ok-bg); border-color: #2a4a40; color: var(--ok); }
.flash-warn, .toast-warn { background: var(--warning-bg); border-color: #4a4020; color: var(--warning); }
.flash-danger, .toast-danger { background: var(--danger-bg); border-color: #4a2a2a; color: var(--danger); }
.flash-info, .toast-info { background: var(--info-bg); border-color: var(--gold); color: var(--gold-soft); }

.toast-stack {
  display: grid;
  gap: var(--s-3);
}

@media (min-width: 48em) {
  .toast-stack.docked {
    position: fixed;
    right: var(--s-4);
    bottom: var(--s-4);
    width: min(24rem, calc(100% - 2 * var(--s-4)));
    z-index: 40;
  }
}

/* ---------------------------------------------------------------------------
   14. Downloads and changelog
   --------------------------------------------------------------------------- */
.download-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.download-card h3 { margin-bottom: var(--s-2); }

.download-card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  flex: 1 1 auto;
  margin-bottom: var(--s-4);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: 0;
  list-style: none;
}

.download-meta li {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.15rem 0.55rem;
}

.download-meta .platform {
  color: var(--gold-soft);
  border-color: var(--gold);
}

.changelog {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.changelog-item {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 40em) {
  .changelog-item {
    grid-template-columns: 8rem 6rem 1fr;
    gap: var(--s-4);
    align-items: start;
  }
}

.changelog-date {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.changelog-ver {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--gold-soft);
}

.changelog-body {
  margin: 0;
  font-size: var(--fs-sm);
}

/* ---------------------------------------------------------------------------
   15. Demo panel
   --------------------------------------------------------------------------- */
.demo-panel {
  position: relative;
  border: 1px dashed var(--gold);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-6) var(--s-5) var(--s-5);
}

.demo-label {
  position: absolute;
  top: 0;
  left: var(--s-4);
  transform: translateY(-50%);
  background: var(--gold);
  color: var(--text-on-gold);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: var(--r-pill);
}

/* ---------------------------------------------------------------------------
   16. Auth / narrow forms, legal
   --------------------------------------------------------------------------- */
.auth-card {
  margin-block: var(--s-7);
}

.legal {
  max-width: var(--measure);
}

.legal h1 { margin-bottom: var(--s-4); }
.legal h2 { margin-top: var(--s-6); font-size: var(--fs-lg); }
