/* ============================================================
   2. app.css
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ============================================================
   3. Eyebrow.css
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  line-height: 1;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: eyebrow-pulse 2s infinite;
}

@keyframes eyebrow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 4px currentColor; opacity: 0.6; }
}

/* ============================================================
   4. CTAButton.css
   ============================================================ */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--fs);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 10px 10px 20px;
  border-radius: 99px;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.cta-btn:hover {
  transform: translateY(-1px);
}

.cta-btn--dark {
  background: var(--accent);
  color: #fff;
}

.cta-btn--dark:hover {
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.3);
}

.cta-btn--light {
  background: var(--paper);
  color: var(--ink);
}

.cta-btn--light:hover {
  box-shadow: 0 4px 16px rgba(13, 13, 13, 0.12);
}

.cta-btn-label {
  position: relative;
  z-index: 1;
}

.cta-btn-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.cta-btn--dark .cta-btn-circle {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cta-btn--light .cta-btn-circle {
  background: var(--ink);
  color: var(--paper);
}

.cta-btn:hover .cta-btn-circle {
  transform: translateX(3px) rotate(45deg);
}

/* ============================================================
   5. Nav.css
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 18px 24px;
  pointer-events: none;
}

.island {
  pointer-events: all;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 44px;
  padding: 0 6px 0 22px;
  background: var(--ink);
  border-radius: 99px;
  box-shadow:
    0 2px 8px rgba(13, 13, 13, 0.12),
    0 12px 32px rgba(13, 13, 13, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  animation: isl-in 0.6s var(--ease) 0.2s forwards;
}

@keyframes isl-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.isl-logo {
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Hidden by default, expands on scroll */
.isl-sep {
  width: 1px;
  height: 16px;
  background: rgba(245, 240, 232, 0.12);
  margin: 0;
  flex-shrink: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.4s var(--ease), opacity 0.3s ease, margin 0.4s var(--ease);
}

.island--expanded .isl-sep {
  max-width: 20px;
  margin: 0 18px;
  opacity: 1;
}

.isl-links {
  display: flex;
  gap: 22px;
  list-style: none;
  flex-shrink: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.4s var(--ease), opacity 0.3s ease 0.1s;
}

.island--expanded .isl-links {
  max-width: 300px;
  opacity: 1;
}

.isl-links a {
  font-family: var(--fm);
  font-size: 11px;
  color: rgba(245, 240, 232, 0.38);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.isl-links a:hover {
  color: rgba(245, 240, 232, 0.85);
}

.isl-links a.active {
  color: rgba(245, 240, 232, 0.92);
}

.isl-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 7px 7px 7px 14px;
  background: var(--accent);
  border-radius: 99px;
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.04em;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(192, 57, 43, 0.35);
  transition: background 0.2s ease, transform 0.15s ease;
}

.isl-cta:hover {
  background: #a93226;
}

.isl-cta:active {
  transform: scale(0.96);
}

.isl-cta-dot {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: transform 0.3s var(--ease);
}

.isl-cta:hover .isl-cta-dot {
  transform: translateX(2px) rotate(45deg);
}

@media (max-width: 600px) {
  .isl-links,
  .isl-sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .island {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .isl-sep,
  .isl-links {
    transition: none;
  }
}

/* ============================================================
   6. Hero.css
   ============================================================ */
/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 72px 1fr 1fr;
  overflow: hidden;
}

/* Dot-grid background — fades in with .loaded */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(13, 13, 13, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.hero.loaded::before {
  opacity: 1;
}

/* ── Side Label ── */
.side-label {
  position: relative;
  z-index: 10;
  border-right: 1px solid rgba(13, 13, 13, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  opacity: 0;
  transition: opacity 0.6s ease 1.8s;
}

.side-label.show {
  opacity: 1;
}

.side-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(13, 13, 13, 0.22);
  user-select: none;
}

/* ── Copy Column ── */
.copy-col {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 56px 80px 48px;
  border-right: 1px solid rgba(13, 13, 13, 0.06);
}

/* ── Lot Tag (eyebrow) ── */
.lot-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(13, 13, 13, 0.28);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.8s, transform 0.5s ease 0.8s;
}

.lot-tag.show {
  opacity: 1;
  transform: none;
}

.lot-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: lglow 2s ease-in-out infinite;
}

@keyframes lglow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29, 138, 80, 0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(29, 138, 80, 0); }
}

/* ── Headline ── */
.cat-h1 {
  font-family: var(--fd);
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 28px;
}

.ch-line {
  display: block;
  overflow: hidden;
}

.ch-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.75s var(--ease);
}

.ch-line:nth-child(1) .ch-inner { transition-delay: 1.0s; }
.ch-line:nth-child(2) .ch-inner { transition-delay: 1.15s; }
.ch-line:nth-child(3) .ch-inner { transition-delay: 1.3s; }

.ch-inner.show {
  transform: translateY(0);
}

.ch-em {
  font-style: italic;
  color: var(--accent);
}

/* ── Rule ── */
.cat-rule {
  width: 0;
  height: 1px;
  background: rgba(13, 13, 13, 0.12);
  margin-bottom: 36px;
  transition: width 0.8s var(--ease) 1.5s;
}

.cat-rule.show {
  width: 100%;
}

/* ── Description ── */
.cat-desc {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 360px;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 1.7s, transform 0.5s ease 1.7s;
}

.cat-desc.show {
  opacity: 1;
  transform: none;
}

.cat-desc strong {
  color: var(--ink);
  font-weight: 400;
}

/* ── Provenance ── */
.provenance {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 40px;
  opacity: 0;
  transition: opacity 0.5s ease 1.9s;
}

.provenance.show {
  opacity: 1;
}

.prov-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(13, 13, 13, 0.06);
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.prov-row:last-child {
  border-bottom: none;
}

.prov-key {
  color: rgba(13, 13, 13, 0.32);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.prov-val {
  color: var(--ink);
}

.prov-val.green {
  color: var(--green);
}

/* ── Bid Row (CTA) ── */
.bid-row {
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 2.1s, transform 0.5s ease 2.1s;
}

.bid-row.show {
  opacity: 1;
  transform: none;
}

.btn-bid {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s ease;
  position: relative;
}

.btn-bid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.4s var(--ease);
  border-radius: 99px;
  z-index: 0;
}

.btn-bid:hover::before {
  transform: translateX(0);
}

.bid-label {
  position: relative;
  z-index: 1;
  padding: 12px 22px;
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.btn-bid:hover .bid-label {
  color: var(--paper);
}

.bid-circle {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  margin: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.btn-bid:hover .bid-circle {
  transform: rotate(45deg);
}

.bid-note {
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(13, 13, 13, 0.3);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .side-label {
    display: none;
  }

  .copy-col {
    padding: 100px 24px 48px;
    border-right: none;
    border-bottom: 1px solid rgba(13, 13, 13, 0.06);
  }

  .board-col {
    padding: 48px 24px 72px;
  }

  .reticle-wrap {
    width: clamp(220px, 60vw, 360px);
  }
}

@media (max-width: 640px) {
  .copy-col {
    padding: 80px 20px 40px;
  }

  .board-col {
    padding: 32px 20px 60px;
  }

  .cat-h1 {
    font-size: clamp(36px, 9vw, 52px);
  }

  .reticle-wrap {
    width: clamp(200px, 72vw, 280px);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .ch-inner {
    transform: none !important;
    transition: none !important;
  }

  .lot-tag,
  .cat-desc,
  .cat-rule,
  .provenance,
  .bid-row,
  .side-label {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .cat-rule {
    width: 100% !important;
  }
}

/* ============================================================
   7. FlipClock.css
   ============================================================ */
/* ── Board Column ── */
.board-col {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 48px 80px;
  gap: 0;
}

/* ── Context sentence ── */
.board-context {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(13, 13, 13, 0.32);
  text-align: center;
  margin: 0 0 20px;
  opacity: 0;
  transition: opacity 0.5s ease 1.2s;
}

.board-context--after {
  margin: 16px 0 0;
  transition-delay: 2.2s;
}

.board-context.show {
  opacity: 1;
}

/* ── Reticle ── */
.reticle-wrap {
  position: relative;
  width: clamp(300px, 34vw, 460px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reticle-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: reticle-spin 24s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease 1.6s;
}

.reticle-svg.show {
  opacity: 1;
}

@keyframes reticle-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.reticle-path {
  fill: none;
  stroke: rgba(13, 13, 13, 0.1);
  stroke-width: 1;
  stroke-dasharray: 1226;
  stroke-dashoffset: 1226;
  transition: stroke-dashoffset 2.2s ease 1.9s;
}

.reticle-svg.show .reticle-path {
  stroke-dashoffset: 0;
}

/* ── Cost Display ── */
.cost-display {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), filter 0.15s;
}

.cost-dollar {
  font-family: var(--fd);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 400;
  color: var(--ink);
  opacity: 0.3;
  margin-right: 4px;
}

.roll-digit {
  display: inline-block;
  font-family: var(--fd);
  font-size: clamp(36px, 4.8vw, 64px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease;
}

.roll-digit.roll-tick {
  transform: translateY(-3px);
  opacity: 0.6;
}

.cost-comma {
  font-family: var(--fd);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 400;
  color: var(--ink);
  opacity: 0.2;
  margin: 0 1px;
}

/* ── Stats row ── */
.board-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  opacity: 0;
  transition: opacity 0.5s ease 2.4s;
}

.board-stats.show {
  opacity: 1;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.stat-num {
  font-family: var(--fm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(13, 13, 13, 0.55);
}

.stat-label {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(13, 13, 13, 0.22);
}

.stat-sep {
  width: 1px;
  height: 24px;
  background: rgba(13, 13, 13, 0.08);
  flex-shrink: 0;
}

/* ── Citation ── */
.board-cite {
  margin-top: 16px;
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(13, 13, 13, 0.2);
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease 2.6s;
}

.board-cite.show {
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .board-col {
    padding: 48px 24px 80px;
  }
}

@media (max-width: 600px) {
  .board-stats {
    gap: 14px;
  }

  .stat-num {
    font-size: 12px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .board-context,
  .board-stats,
  .board-cite,
  .reticle-svg {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .reticle-svg {
    animation: none !important;
  }

  .roll-digit {
    transition: none !important;
  }
}

/* ============================================================
   8. Problem.css
   ============================================================ */
/* ── Section ──────────────────────────────────────────────────────────────── */
.problem {
  position: relative;
  background: var(--paper);
  padding: clamp(80px, 12vw, 140px) 0;
}

.problem-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 56px);
}

/* ── Head ─────────────────────────────────────────────────────── */
.problem-head {
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.problem-head.show { opacity: 1; transform: none; }

.problem-h2 {
  font-family: var(--fd);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 400;
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 28px 0 0;
}

.problem-accent {
  position: relative;
  display: inline-block;
  color: var(--accent);
}
.problem-accent::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Chart ────────────────────────────────────────────────────── */
.problem-chart {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease) 0.15s, transform 0.6s var(--ease) 0.15s;
}
.problem-chart.show { opacity: 1; transform: none; }

/* ── Bar rows ─────────────────────────────────────────────────── */
.sb-row {
  margin-bottom: 20px;
}

.sb-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sb-label {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sb-pct {
  font-family: var(--fm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sb-track {
  position: relative;
  height: 36px;
  background: rgba(13, 13, 13, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.sb-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.sb-note {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  padding-right: 12px;
  white-space: nowrap;
}

/* ── Divider ──────────────────────────────────────────────────── */
.sb-rule {
  height: 1px;
  background: rgba(13, 13, 13, 0.08);
  margin: 32px 0;
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}
.sb-rule.show { opacity: 1; }

/* ── Punchline ────────────────────────────────────────────────── */
.sb-punch {
  display: flex;
  align-items: center;
  gap: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease) 0.7s, transform 0.6s var(--ease) 0.7s;
}
.sb-punch.show { opacity: 1; transform: none; }

.sb-punch-left {
  flex: 1;
}

.sb-punch-num {
  font-family: var(--fd);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
}

.sb-punch-sub {
  font-family: var(--fs);
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0;
}

/* ── Card ─────────────────────────────────────────────────────── */
.sb-card {
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 32px -8px rgba(13, 13, 13, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s var(--ease) 0.9s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s;
}
.sb-card.show { opacity: 1; transform: scale(1); }

.sb-card-hours {
  font-family: var(--fd);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
}

.sb-card-label {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Source ───────────────────────────────────────────────────── */
.sb-source {
  margin-top: 32px;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(13, 13, 13, 0.25);
  opacity: 0;
  transition: opacity 0.5s ease 1.1s;
}
.sb-source.show { opacity: 1; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .sb-punch { gap: 20px; }
  .sb-card { width: 96px; }
  .sb-card-hours { font-size: 24px; }
  .sb-track { height: 28px; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .problem-head,
  .problem-chart,
  .sb-rule,
  .sb-punch,
  .sb-card,
  .sb-source {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .sb-fill {
    transition: none !important;
  }
}

/* ============================================================
   9. Bridge.css
   ============================================================ */
/* ===== Bridge / Marquee of Madness ===== */

.bridge {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  padding: 100px 0 0;
}

/* ---- Section label ---- */
.bridge-label {
  font-family: var(--fd);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
  max-width: 600px;
  margin: 0 auto 52px;
  padding: 0 32px;
}

/* ---- Ledger ticker ---- */
.bridge-ledger {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 32px 40px;
}
.ledger-rows {
  height: 220px;
  overflow: hidden;
}
.ledger-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(13, 13, 13, 0.06);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.ledger-row--ghost { opacity: 0.15; }
.ledger-row--exit  { opacity: 0; transform: translateY(-4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.ledger-journal {
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  width: 80px;
  flex-shrink: 0;
}
.ledger-rule {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.ledger-row--active .ledger-rule {
  border-right: 2px solid var(--ink);
  animation: ledger-type var(--type-duration, 1.5s) steps(var(--type-steps, 30)) forwards,
             ledger-blink 0.5s step-end infinite;
  width: 0;
}
@keyframes ledger-type { to { width: 100%; } }
@keyframes ledger-blink { 50% { border-color: transparent; } }
.ledger-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 0;
  margin-top: 8px;
}
.ledger-count, .ledger-total {
  font-family: var(--fm);
  font-size: 10px;
  color: rgba(13, 13, 13, 0.45);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.ledger-track {
  flex: 1;
  height: 2px;
  background: rgba(13, 13, 13, 0.06);
  border-radius: 1px;
  overflow: hidden;
}
.ledger-fill {
  height: 100%;
  width: 0%;
  background: rgba(13, 13, 13, 0.25);
  border-radius: 1px;
  transition: width 0.4s ease;
}
@media (max-width: 640px) {
  .bridge-ledger { max-width: 100%; padding: 0 20px 40px; }
  .ledger-journal { width: 60px; font-size: 10px; }
  .ledger-rule { font-size: 11px; }
}

/* ---- Conflict list (between ledger and bottom) ---- */
.bridge-conflicts {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px 0;
}

.bridge-conflict {
  width: 100%;
  max-width: 520px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(13, 13, 13, 0.07);
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

.bridge-conflict:first-child {
  border-top: 1px solid rgba(13, 13, 13, 0.07);
}

.bridge-conflict-vs {
  color: var(--accent);
  margin: 0 6px;
}

/* ---- Bottom punchline ---- */
.bridge-bottom {
  padding: 52px 32px 100px;
  text-align: center;
}

.bridge-headline {
  font-family: var(--fd);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  text-wrap: balance;
}

.bridge-sub {
  font-family: var(--fs);
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* ---- Scroll-reveal entry animation ---- */
.bridge--hidden .bridge-label,
.bridge--hidden .bridge-ledger,
.bridge--hidden .bridge-conflicts,
.bridge--hidden .bridge-bottom {
  opacity: 0;
  transform: translateY(24px);
}

.bridge--visible .bridge-label,
.bridge--visible .bridge-ledger,
.bridge--visible .bridge-conflicts,
.bridge--visible .bridge-bottom {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.bridge--visible .bridge-ledger {
  transition-delay: 0.15s;
}

.bridge--visible .bridge-conflicts {
  transition-delay: 0.32s;
}

.bridge--visible .bridge-bottom {
  transition-delay: 0.48s;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .bridge--hidden .bridge-label,
  .bridge--hidden .bridge-ledger,
  .bridge--hidden .bridge-conflicts,
  .bridge--hidden .bridge-bottom {
    opacity: 1;
    transform: none;
  }
  .ledger-row--active .ledger-rule {
    animation: none;
    width: 100%;
    border-right: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .bridge {
    padding: 72px 0 0;
  }

  .bridge-label {
    margin-bottom: 36px;
  }

  .bridge-headline {
    font-size: 36px;
  }

  .bridge-sub {
    font-size: 13px;
  }

  .bridge-conflicts {
    padding: 36px 20px 0;
  }

  .bridge-conflict {
    font-size: 10px;
    max-width: 100%;
  }

  .bridge-bottom {
    padding: 40px 24px 72px;
  }
}

@media (max-width: 480px) {
  .bridge-label {
    font-size: 22px;
  }

  .bridge-headline {
    font-size: 28px;
  }

}

/* ============================================================
   10. Solution.css
   ============================================================ */
/* ===================================================================
   Solution — "The Machine"
   Background: cream (--paper). Intentional stillness after marquee.
   =================================================================== */

.sol {
  position: relative;
  background: var(--paper);
  padding: 120px 24px 140px;
  overflow: hidden;
}

.sol-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Eyebrow ---- */
.sol-eyebrow {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.sol--visible .sol-eyebrow {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Headline ---- */
.sol-headline {
  font-family: var(--fd);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-align: center;
  margin: 0 0 64px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease) 0.1s, transform 0.7s var(--ease) 0.1s;
}

.sol--visible .sol-headline {
  opacity: 1;
  transform: translateY(0);
}

.sol-headline-break {
  display: block;
}

/* ---- Machine layout ---- */
.sol-machine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease) 0.2s, transform 0.8s var(--ease) 0.2s;
}

.sol--visible .sol-machine {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Arrows ---- */
.sol-arrow {
  flex-shrink: 0;
  padding: 0 12px;
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.6s;
}

.sol--visible .sol-arrow {
  opacity: 1;
}

.sol-arrow svg {
  display: block;
}

/* ---- Input paper (broken) ---- */
.sol-input {
  width: 180px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s var(--ease) 0.25s, transform 0.7s var(--ease) 0.25s;
}

.sol--visible .sol-input {
  opacity: 0.55;
  transform: translateX(0);
}

.sol-paper {
  border-radius: 14px;
  overflow: hidden;
}

.sol-paper--broken {
  padding: 3px;
  background: rgba(192, 57, 43, 0.04);
  border: 1px solid rgba(192, 57, 43, 0.12);
}

.sol-paper-inner {
  border-radius: 11px;
  background: #fff;
}

.sol-paper-inner--broken {
  padding: 18px;
}

.sol-broken-line {
  font-family: var(--fm);
  font-size: 11px;
  line-height: 2;
  color: var(--muted);
}

.sol-err {
  color: var(--accent);
}

.sol-label {
  font-family: var(--fm);
  font-size: 11px;
  text-align: center;
  margin-top: 8px;
}

.sol-label--err {
  color: var(--accent);
}

.sol-label--ok {
  color: var(--green);
}

/* ---- KERNIT black box ---- */
.sol-box {
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s var(--ease) 0.35s, transform 0.7s var(--ease) 0.35s;
}

.sol--visible .sol-box {
  opacity: 1;
  transform: scale(1);
}

.sol-box-outer {
  padding: 6px;
  background: var(--ink);
  border-radius: 22px;
  box-shadow:
    0 24px 64px rgba(13, 13, 13, 0.2),
    0 8px 24px rgba(13, 13, 13, 0.12);
}

.sol-box-mid {
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
}

.sol-box-content {
  padding: 32px 40px;
  text-align: center;
  min-width: 220px;
}

.sol-box-logo {
  font-family: var(--fm);
  font-size: 20px;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* ---- Terminal lines ---- */
.sol-terminal {
  text-align: left;
  position: relative;
}

.sol-tline {
  font-family: var(--fm);
  font-size: 11px;
  line-height: 2.4;
  color: rgba(245, 240, 232, 0);
  transition: color 0.25s ease;
  white-space: nowrap;
}

.sol-tline--on {
  color: rgba(245, 240, 232, 0.4);
}

.sol-tline--done.sol-tline--on {
  color: var(--green);
}

.sol-check {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 4px;
}

.sol-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: rgba(245, 240, 232, 0.4);
  vertical-align: middle;
  margin-left: 2px;
  animation: sol-blink 0.8s step-end infinite;
}

.sol-cursor--done {
  opacity: 0;
  transition: opacity 0.3s ease 0.4s;
}

@keyframes sol-blink {
  50% { opacity: 0; }
}

/* ---- Timing badge ---- */
.sol-timing {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  font-family: var(--fm);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sol-timing--on {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Output paper (clean) ---- */
.sol-output {
  width: 180px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.7s var(--ease) 0.9s, transform 0.7s var(--ease) 0.9s;
}

.sol--visible .sol-output {
  opacity: 1;
  transform: translateX(0);
}

.sol-paper--clean {
  padding: 3px;
  background: rgba(29, 138, 80, 0.04);
  border: 1px solid rgba(29, 138, 80, 0.12);
}

.sol-paper-inner--clean {
  padding: 16px;
}

.sol-clean-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sol-clean-col {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 7px;
  color: var(--muted);
  line-height: 1.6;
}

.sol-clean-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 3px;
  grid-column: span 2;
}

/* Make title span both columns */
.sol-clean-cols .sol-clean-col:first-child .sol-clean-title {
  grid-column: unset;
}

.sol-clean-authors {
  font-size: 6px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
}

.sol-clean-body {
  font-size: 7px;
  line-height: 1.6;
}

.sol-clean-label {
  font-style: italic;
  color: var(--ink);
  font-weight: 600;
}

.sol-clean-fig {
  margin-top: 6px;
  padding: 4px;
  border: 1px solid #ede7d5;
  border-radius: 2px;
  text-align: center;
  font-size: 5px;
  color: var(--muted);
}

.sol-clean-status {
  padding: 8px 16px;
  background: rgba(29, 138, 80, 0.04);
  border-top: 1px solid rgba(29, 138, 80, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--fm);
  font-size: 9px;
  color: var(--green);
  border-radius: 0 0 11px 11px;
}

.sol-clean-check {
  flex-shrink: 0;
}

/* ---- Subtext ---- */
.sol-sub {
  font-family: var(--fs);
  font-size: 16px;
  color: var(--muted);
  max-width: 440px;
  text-align: center;
  line-height: 1.7;
  margin: 64px 0 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease) 0.5s, transform 0.7s var(--ease) 0.5s;
}

.sol--visible .sol-sub {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   Responsive: stack vertically below 960px
   =================================================================== */
@media (max-width: 960px) {
  .sol {
    padding: 80px 20px 100px;
  }

  .sol-headline {
    margin-bottom: 48px;
  }

  .sol-machine {
    flex-direction: column;
    gap: 0;
    max-width: 320px;
  }

  .sol-arrow {
    padding: 10px 0;
    transform: rotate(90deg);
  }

  .sol-input,
  .sol-output {
    width: 220px;
  }

  .sol--visible .sol-input {
    transform: translateX(0);
  }

  .sol--visible .sol-output {
    transform: translateX(0);
  }

  .sol-input {
    transform: translateY(-16px);
  }

  .sol-output {
    transform: translateY(16px);
  }

  .sol-box-content {
    padding: 28px 32px;
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .sol {
    padding: 64px 16px 80px;
  }

  .sol-input,
  .sol-output {
    width: 200px;
  }

  .sol-box-content {
    padding: 24px 24px;
    min-width: 180px;
  }

  .sol-tline {
    font-size: 10px;
  }

  .sol-sub {
    font-size: 15px;
    margin-top: 48px;
  }
}

/* ===================================================================
   Reduced motion: skip all transitions/animations, show everything
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sol-eyebrow,
  .sol-headline,
  .sol-machine,
  .sol-arrow,
  .sol-input,
  .sol-box,
  .sol-output,
  .sol-sub,
  .sol-timing {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .sol--visible .sol-input {
    opacity: 0.55 !important;
  }

  .sol-tline {
    color: rgba(245, 240, 232, 0.4) !important;
    transition: none !important;
  }

  .sol-tline--done {
    color: var(--green) !important;
  }

  .sol-cursor {
    animation: none;
    display: none;
  }

  .sol-timing--on {
    opacity: 1 !important;
  }
}

/* ============================================================
   11. Features.css
   ============================================================ */
/* ===== Features: Inside the Machine ===== */

.features {
  position: relative;
  background: var(--ink);
  padding: 120px clamp(24px, 5vw, 56px);
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────── */

.features-eyebrow-wrap {
  margin-bottom: 28px;
}

.features-headline {
  font-family: var(--fd);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 400;
  color: var(--paper);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 600px;
  margin: 0 0 16px;
}

.features-headline-accent {
  color: var(--accent);
}

.features-desc {
  font-family: var(--fs);
  font-size: clamp(14px, 1.5vw, 16px);
  /* var(--muted) is designed for the light paper bg — on dark ink it fails contrast.
     Use a paper-tinted value that passes WCAG AA instead. */
  color: rgba(245, 240, 232, 0.62);
  line-height: 1.7;
  max-width: 420px;
  margin: 0 0 56px;
}

/* ── Bento Grid ─────────────────────────────────────────────────── */

.features-row-top {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 16px;
  margin-bottom: 16px;
}

.features-row-bottom {
  /* Full-width band */
}

/* ── Hyperlinker link strip ─────────────────────────────────────── */
.feat-link-strip {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 16px;
  margin: -4px 0 20px;
}
.feat-link-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 2px;
}
.feat-link-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  font-family: var(--fm);
  font-size: 11px;
  line-height: 1.6;
  align-items: baseline;
}
.feat-link-prefix {
  color: var(--accent);
  letter-spacing: 0.01em;
}
.feat-link-line a {
  color: rgba(245, 240, 232, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.feat-link-line a:hover {
  color: rgba(245, 240, 232, 0.9);
}
.feat-link-sep {
  color: var(--accent);
  opacity: 0.3;
  margin: 0 5px;
}

/* ── Double-Bezel (dark variant) ────────────────────────────────── */

.features-bezel-outer {
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: rgba(245, 240, 232, 0.03);
}

.features-bezel-inner {
  padding: 5px;
  border-radius: 16px;
  background: rgba(245, 240, 232, 0.02);
  box-shadow: inset 0 1px 1px rgba(245, 240, 232, 0.04);
}

/* LaTeX panel green tint */
.features-bezel-outer--green {
  border-color: rgba(29, 138, 80, 0.08);
  background: rgba(29, 138, 80, 0.04);
}

.features-bezel-inner--green {
  background: rgba(29, 138, 80, 0.02);
  box-shadow: inset 0 1px 1px rgba(29, 138, 80, 0.06);
}

/* ── Hyperlinker Panel ──────────────────────────────────────────── */

.features-hyper-body {
  padding: 24px;
}

.features-hyper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.features-hyper-title {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--accent2);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.features-hyper-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.features-hyper-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: hyper-dot-pulse 1.4s ease-in-out infinite;
}

@keyframes hyper-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.features-hyper-status-label {
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.5);
}

/* Prose area with word-by-word reveal */
.features-hyper-prose {
  padding: 16px;
  background: rgba(245, 240, 232, 0.04);
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.75);
  line-height: 1.85;
  margin-bottom: 16px;
  overflow: hidden;
}

/* Linked cross-references */
.features-hyper-link {
  color: var(--accent2);
  border-bottom: 1px solid rgba(44, 62, 107, 0.4);
  padding-bottom: 1px;
}

/* Scan line for typewriter animation */
.features-hyper-scan-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(44, 62, 107, 0.85), transparent);
  box-shadow: 0 0 14px rgba(44, 62, 107, 0.6);
  pointer-events: none;
  opacity: 0;
}

/* Cursor blink */
@keyframes hyper-cur-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Target stats grid */
.features-hyper-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.features-hyper-stat {
  text-align: center;
}

.features-hyper-stat-num {
  font-family: var(--fm);
  font-size: 20px;
  color: var(--paper);
  font-weight: 700;
  line-height: 1;
}

.features-hyper-stat-label {
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.5);
  margin-top: 4px;
}

/* ── LaTeX Panel ────────────────────────────────────────────────── */

.features-latex-body {
  padding: 24px;
}

.features-latex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.features-latex-title {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.features-latex-badge {
  padding: 3px 8px;
  background: rgba(29, 138, 80, 0.1);
  border-radius: 99px;
  font-family: var(--fm);
  font-size: 8px;
  color: var(--green);
}

/* Code block */
.features-latex-code {
  font-family: var(--fm);
  font-size: 10px;
  line-height: 1.9;
  color: rgba(245, 240, 232, 0.65);
  margin: 0;
  white-space: pre-wrap;
}

/* Typewriter: each line hidden until animated */
.features-latex-line {
  display: block;
  opacity: 0;
  transform: translateY(4px);
}

.features--visible .features-latex-line {
  animation: latex-type 0.4s var(--ease) forwards;
}

@keyframes latex-type {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features-latex-cmd {
  color: var(--accent);
}

.features-latex-brace {
  color: rgba(245, 240, 232, 0.45);
}

.features-latex-val {
  color: var(--paper);
}

.features-latex-pkg {
  color: var(--accent2);
}

.features-latex-env {
  color: var(--green);
}

.features-latex-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  font-family: var(--fs);
  font-size: 11px;
  color: rgba(245, 240, 232, 0.55);
  line-height: 1.6;
}

/* ── Custom Styles Band ─────────────────────────────────────────── */

.features-styles-body {
  padding: 24px;
}

.features-styles-title {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--paper);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.features-styles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Individual style card */
.features-style-card {
  display: flex;
  flex-direction: column;
}

.features-style-count {
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.features-style-preview {
  padding: 10px;
  background: rgba(245, 240, 232, 0.04);
  border-radius: 8px;
  height: 80px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.features-style-preview > * {
  width: 100%;
  transition: opacity 0.25s ease;
}

/* Crossfade variant name */
.features-style-name-wrap {
  position: relative;
  height: 18px;
  margin-top: 8px;
  overflow: hidden;
}

.features-style-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fm);
  font-size: 9px;
  color: rgba(245, 240, 232, 0.5);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.features-style-name--entering {
  opacity: 1;
  transform: translateY(0);
}

.features-style-name--exiting {
  opacity: 0;
  transform: translateY(-6px);
}

/* ── Table preview mini ──────────────────────────────────────────── */

.features-mini-table {
  border-top: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  padding: 4px 0;
}

.features-mini-table-head {
  border-bottom: 1px solid rgba(245, 240, 232, 0.2);
  padding-bottom: 3px;
  margin-bottom: 3px;
  font-family: var(--fm);
  font-size: 8px;
  color: var(--paper);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.features-mini-table-row {
  font-family: var(--fm);
  font-size: 7px;
  color: rgba(245, 240, 232, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1px 0;
}

/* ── Abstract preview mini ───────────────────────────────────────── */

.features-mini-abstract {
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.features-mini-abstract-heading {
  font-family: Georgia, serif;
  font-size: 8px;
  color: var(--paper);
  font-weight: 700;
}

.features-mini-abstract-text {
  font-family: Georgia, serif;
  font-size: 7px;
  color: rgba(245, 240, 232, 0.5);
  line-height: 1.5;
  margin-top: 2px;
}

/* ── Blockquote preview mini ─────────────────────────────────────── */

.features-mini-quote {
  text-align: center;
  padding: 4px 0;
}

.features-mini-quote-mark {
  display: none;
  font-size: 16px;
  color: var(--accent);
  line-height: 0.6;
  margin-bottom: 3px;
}

.features-mini-quote-text {
  font-family: Georgia, serif;
  font-size: 7px;
  color: var(--paper);
  font-style: italic;
  line-height: 1.4;
}

/* ── Footnote preview mini ───────────────────────────────────────── */

.features-mini-fn-body {
  font-family: Georgia, serif;
  font-size: 8px;
  color: rgba(245, 240, 232, 0.6);
  line-height: 1.6;
}

.features-mini-fn-sup {
  color: var(--accent2);
  font-size: 7px;
  vertical-align: super;
}

.features-mini-fn-rule {
  display: none;
  border: none;
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  margin: 6px 0 4px;
}

.features-mini-fn-note {
  font-family: Georgia, serif;
  font-size: 7px;
  color: rgba(245, 240, 232, 0.45);
}

/* ── Style-variant transitions: handled via opacity in JS ────────── */

/* ── TABLE style variants (based on actual renderer output) ─────── */

/* minimal: underline under header only — simplest academic style */
.features-mini-table[data-style="minimal"] { border: none; }
.features-mini-table[data-style="minimal"] .features-mini-table-head {
  border-bottom: 1px solid rgba(245,240,232,0.35); background: none;
}
.features-mini-table[data-style="minimal"] .features-mini-table-row { border: none; background: none; }

/* academic (three-line): thick top/bottom rules, thin midrule, no verticals */
.features-mini-table[data-style="academic"] {
  border-top: 2px solid rgba(245,240,232,0.85);
  border-bottom: 2px solid rgba(245,240,232,0.85);
  border-left: none; border-right: none;
}
.features-mini-table[data-style="academic"] .features-mini-table-head {
  border-bottom: 1px solid rgba(245,240,232,0.5); background: none;
}
.features-mini-table[data-style="academic"] .features-mini-table-row { border: none; background: none; }

/* bordered (plain): outer border + tinted header + row dividers */
.features-mini-table[data-style="bordered"] { border: 1px solid rgba(245,240,232,0.28); padding: 0; }
.features-mini-table[data-style="bordered"] .features-mini-table-head {
  background: rgba(245,240,232,0.13); border-bottom: 1px solid rgba(245,240,232,0.28); padding: 3px 5px;
}
.features-mini-table[data-style="bordered"] .features-mini-table-row {
  border-bottom: 1px solid rgba(245,240,232,0.13); background: none; padding: 1px 5px;
}

/* booktabs: LaTeX classic — heavy top, thin midrule, heavy bottom, no cell borders */
.features-mini-table[data-style="booktabs"] {
  border-top: 2.5px solid rgba(245,240,232,0.9);
  border-bottom: 2.5px solid rgba(245,240,232,0.9);
  border-left: none; border-right: none;
}
.features-mini-table[data-style="booktabs"] .features-mini-table-head {
  border-bottom: 0.75px solid rgba(245,240,232,0.6); background: none;
}
.features-mini-table[data-style="booktabs"] .features-mini-table-row { border: none; background: none; }

/* striped: outer border + tinted header + alternating row backgrounds */
.features-mini-table[data-style="striped"] { border: 1px solid rgba(245,240,232,0.22); padding: 0; }
.features-mini-table[data-style="striped"] .features-mini-table-head {
  background: rgba(245,240,232,0.13); border-bottom: 1px solid rgba(245,240,232,0.22); padding: 3px 5px;
}
.features-mini-table[data-style="striped"] .features-mini-table-row:nth-child(even) {
  background: rgba(245,240,232,0.07); padding: 1px 5px;
}
.features-mini-table[data-style="striped"] .features-mini-table-row:nth-child(odd) { background: none; padding: 1px 5px; }

/* grid: heavier borders on all sides */
.features-mini-table[data-style="grid"] { border: 1.5px solid rgba(245,240,232,0.45); padding: 0; }
.features-mini-table[data-style="grid"] .features-mini-table-head {
  background: rgba(245,240,232,0.09); border-bottom: 1.5px solid rgba(245,240,232,0.45); padding: 3px 5px;
}
.features-mini-table[data-style="grid"] .features-mini-table-row {
  border-bottom: 1px solid rgba(245,240,232,0.3); background: none; padding: 1px 5px;
}

/* clean: uppercase column labels + header rule only */
.features-mini-table[data-style="clean"] { border: none; }
.features-mini-table[data-style="clean"] .features-mini-table-head {
  border-bottom: 1.5px solid rgba(245,240,232,0.4);
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 6.5px; background: none;
}
.features-mini-table[data-style="clean"] .features-mini-table-row { border: none; background: none; }

/* compact (color header): dark accent2 header — matches "Color Header" style */
.features-mini-table[data-style="compact"] { border: 1px solid rgba(44,62,107,0.55); padding: 0; }
.features-mini-table[data-style="compact"] .features-mini-table-head {
  background: var(--accent2); border-bottom: none; color: rgba(245,240,232,0.95); padding: 3px 5px;
}
.features-mini-table[data-style="compact"] .features-mini-table-row {
  border-bottom: 1px solid rgba(245,240,232,0.1); background: none; padding: 1px 5px;
}

/* ── ABSTRACT style variants (based on actual getAbsStyleCSS output) */

/* block: plain — no decoration */
.features-mini-abstract[data-style="block"] { padding-left: 0; background: none; border: none; }
.features-mini-abstract[data-style="block"] .features-mini-abstract-heading {
  text-transform: none; letter-spacing: normal; text-align: left;
}

/* structured: box border + subtle bg — labeled section style */
.features-mini-abstract[data-style="structured"] {
  border: 1px solid rgba(245,240,232,0.25); padding: 5px 7px;
  background: rgba(245,240,232,0.04);
}
.features-mini-abstract[data-style="structured"] .features-mini-abstract-heading {
  text-transform: uppercase; letter-spacing: 0.07em; font-size: 6.5px;
  padding-bottom: 2px; border-bottom: 1px solid rgba(245,240,232,0.2); margin-bottom: 3px;
}

/* indented: pulled in from both sides — 0.5in margin in real app */
.features-mini-abstract[data-style="indented"] { padding: 0 14px; background: none; border: none; }

/* left-bar: 3px accent bar + subtle bg — matches actual 3px border + #f8f8f8 */
.features-mini-abstract[data-style="left-bar"] {
  border-left: 3px solid var(--accent);
  border-top: none; border-right: none; border-bottom: none;
  padding-left: 8px; background: rgba(245,240,232,0.04);
}

/* shaded: gray background, no borders — matches actual #f5f5f5 bg */
.features-mini-abstract[data-style="shaded"] {
  border: none; padding: 5px 8px; background: rgba(245,240,232,0.09); border-radius: 2px;
}

/* framed: border all around */
.features-mini-abstract[data-style="framed"] {
  border: 1px solid rgba(245,240,232,0.28); padding: 5px 8px; background: none;
}

/* italic: text is italic, no decoration */
.features-mini-abstract[data-style="italic"] { border: none; padding-left: 0; background: none; }
.features-mini-abstract[data-style="italic"] .features-mini-abstract-heading { font-style: italic; }
.features-mini-abstract[data-style="italic"] .features-mini-abstract-text {
  font-style: italic; color: rgba(245,240,232,0.55);
}

/* centered: centered heading and text */
.features-mini-abstract[data-style="centered"] {
  border: none; padding-left: 0; background: none; text-align: center;
}
.features-mini-abstract[data-style="centered"] .features-mini-abstract-heading,
.features-mini-abstract[data-style="centered"] .features-mini-abstract-text { text-align: center; }

/* hanging: hanging indent */
.features-mini-abstract[data-style="hanging"] { border: none; padding-left: 0; background: none; }
.features-mini-abstract[data-style="hanging"] .features-mini-abstract-text {
  padding-left: 10px; text-indent: -10px;
}

/* ── QUOTE style variants (based on actual getQuoteCSS output) ───── */
/* Note: ALL real quote styles use font-style:italic — the base already sets it */

/* left-bar: 3px accent bar + subtle bg — matches actual left-bar style */
.features-mini-quote[data-style="left-bar"] {
  border-left: 3px solid var(--accent); padding-left: 8px; text-align: left;
  background: rgba(245,240,232,0.03); border-top: none; border-right: none; border-bottom: none;
}

/* indent (border in app): rounded box + subtle bg */
.features-mini-quote[data-style="indent"] {
  border: 1px solid rgba(245,240,232,0.25); border-radius: 3px;
  padding: 5px 8px; background: rgba(245,240,232,0.04); text-align: left;
}

/* background (shaded): accent-tinted bg + rounded — matches accent 10% fill */
.features-mini-quote[data-style="background"] {
  background: rgba(192,57,43,0.12); border-radius: 3px; padding: 5px 8px;
  text-align: left; border: none;
}

/* pullquote: centered + accent top/bottom borders + accent text (no quote mark) */
.features-mini-quote[data-style="pullquote"] {
  border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  border-left: none; border-right: none;
  padding: 5px 8px; background: none; text-align: center;
}
.features-mini-quote[data-style="pullquote"] .features-mini-quote-text {
  color: var(--accent); font-style: italic;
}

/* elegant: large left-aligned serif quote mark in accent — matches actual "Elegant" */
.features-mini-quote[data-style="elegant"] {
  text-align: left; padding: 2px 6px; border: none; background: none;
}
.features-mini-quote[data-style="elegant"] .features-mini-quote-mark {
  display: block; font-size: 22px; color: var(--accent); line-height: 0.65;
  font-family: Georgia, serif; margin-bottom: 2px;
}
.features-mini-quote[data-style="elegant"] .features-mini-quote-text {
  font-style: italic; padding-left: 2px;
}

/* centered: centered italic, simple */
.features-mini-quote[data-style="centered"] {
  text-align: center; border: none; background: none; padding: 4px 8px;
}

/* boxed: full border box, italic */
.features-mini-quote[data-style="boxed"] {
  border: 1px solid rgba(245,240,232,0.28); padding: 5px 8px;
  text-align: left; background: none;
}

/* serif: large faded serif mark — italic block style */
.features-mini-quote[data-style="serif"] {
  text-align: left; padding: 0 4px; border: none; background: none;
}
.features-mini-quote[data-style="serif"] .features-mini-quote-mark {
  display: block; font-size: 22px; color: rgba(245,240,232,0.28);
  font-family: Georgia, serif; line-height: 0.55;
}

/* ── FOOTNOTE mode variants (based on actual fn rendering) ───────── */

/* bottom: separator rule + hanging-indent note — standard academic */
.features-style-preview > div[data-style="bottom"] .features-mini-fn-rule,
.features-style-preview > div:not([data-style]) .features-mini-fn-rule { display: block; }
.features-style-preview > div[data-style="bottom"] .features-mini-fn-note {
  margin-top: 0; border: none; border-radius: 0; padding: 0; background: none;
}

/* endnote: "NOTES" section heading at end — separate section style */
.features-style-preview > div[data-style="endnote"] .features-mini-fn-sup { display: none; }
.features-style-preview > div[data-style="endnote"] .features-mini-fn-note {
  border-top: 1.5px solid rgba(245,240,232,0.3); padding-top: 3px; margin-top: 4px;
  background: none; border-left: none; border-right: none; border-bottom: none; border-radius: 0;
}
.features-style-preview > div[data-style="endnote"] .features-mini-fn-note::before {
  content: 'NOTES'; display: block; font-size: 6.5px; font-weight: 700;
  color: rgba(245,240,232,0.6); letter-spacing: 0.06em; margin-bottom: 2px;
}

/* margin: side-column note — note in outer margin */
.features-style-preview > div[data-style="margin"] {
  display: flex; gap: 6px; align-items: flex-start;
}
.features-style-preview > div[data-style="margin"] .features-mini-fn-body { flex: 1; }
.features-style-preview > div[data-style="margin"] .features-mini-fn-note {
  width: 36%; font-size: 6px; color: rgba(245,240,232,0.4);
  border-left: 1px solid rgba(245,240,232,0.2); padding-left: 4px; margin-top: 0;
  background: none; border-top: none; border-right: none; border-bottom: none; border-radius: 0;
}

/* tufte: sidenote beside body — grid layout */
.features-style-preview > div[data-style="tufte"] {
  display: grid; grid-template-columns: 1fr 46px; gap: 0 6px;
}
.features-style-preview > div[data-style="tufte"] .features-mini-fn-body { grid-column: 1; grid-row: 1; }
.features-style-preview > div[data-style="tufte"] .features-mini-fn-note {
  grid-column: 2; grid-row: 1; font-size: 6px; color: rgba(245,240,232,0.35);
  margin-top: 0; background: none; border: none; border-radius: 0; padding: 0;
}

/* inline: parenthetical — (note text) inline in body */
.features-style-preview > div[data-style="inline"] .features-mini-fn-body { display: inline; }
.features-style-preview > div[data-style="inline"] .features-mini-fn-note {
  display: inline; font-style: italic; font-size: 7px;
  color: rgba(245,240,232,0.55); margin-top: 0; border: none; background: none; padding: 0;
}
.features-style-preview > div[data-style="inline"] .features-mini-fn-note > sup { display: none; }
.features-style-preview > div[data-style="inline"] .features-mini-fn-note::before { content: ' ('; }
.features-style-preview > div[data-style="inline"] .features-mini-fn-note::after { content: ')'; }

/* popup: tooltip bubble above separator */
.features-style-preview > div[data-style="popup"] .features-mini-fn-note {
  background: rgba(245,240,232,0.1); border: 1px solid rgba(245,240,232,0.22);
  border-radius: 3px; padding: 3px 5px; font-size: 6.5px; margin-top: 8px; position: relative;
}
.features-style-preview > div[data-style="popup"] .features-mini-fn-note::before {
  content: ''; position: absolute; top: -5px; left: 8px;
  border: 4px solid transparent; border-bottom-color: rgba(245,240,232,0.22); border-top: none;
}

/* numbered: full-width hr + accent-colored number markers */
.features-style-preview > div[data-style="numbered"] .features-mini-fn-rule { display: block; }
.features-style-preview > div[data-style="numbered"] .features-mini-fn-sup { color: var(--accent); font-weight: 700; }
.features-style-preview > div[data-style="numbered"] .features-mini-fn-note {
  margin-top: 0; background: none; border: none; border-radius: 0; padding: 0;
}
.features-style-preview > div[data-style="numbered"] .features-mini-fn-note > sup { color: var(--accent); font-weight: 700; }

/* ── Scroll-reveal entry animation ──────────────────────────────── */

.features--hidden .features-eyebrow-wrap,
.features--hidden .features-headline,
.features--hidden .features-desc,
.features--hidden .features-row-top,
.features--hidden .features-row-bottom {
  opacity: 0;
  transform: translateY(24px);
}

.features--visible .features-eyebrow-wrap,
.features--visible .features-headline,
.features--visible .features-desc,
.features--visible .features-row-top,
.features--visible .features-row-bottom {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.features--visible .features-headline {
  transition-delay: 0.05s;
}

.features--visible .features-desc {
  transition-delay: 0.1s;
}

.features--visible .features-row-top {
  transition-delay: 0.2s;
}

.features--visible .features-row-bottom {
  transition-delay: 0.35s;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .features {
    padding: 80px clamp(20px, 4vw, 40px);
  }

  .features-row-top {
    grid-template-columns: 1fr;
  }

  .features-styles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .features-hyper-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .features {
    padding: 64px 20px;
  }

  .features-desc {
    margin-bottom: 40px;
  }

  .features-styles-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-hyper-stat-num {
    font-size: 16px;
  }

  .features-latex-code {
    font-size: 9px;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .features--hidden .features-eyebrow-wrap,
  .features--hidden .features-headline,
  .features--hidden .features-desc,
  .features--hidden .features-row-top,
  .features--hidden .features-row-bottom {
    opacity: 1;
    transform: none;
  }

  .features-latex-line {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .features-hyper-link {
    animation: none !important;
  }

  .features-hyper-dot {
    animation: none;
  }

  .features-style-name {
    transition: none;
  }
}

/* ============================================================
   12. Presets.css
   ============================================================ */
/* ===== Presets: The Switchboard ===== */

.presets {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  padding: 120px 0 100px;
}

.presets-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 56px);
}

/* ---- Eyebrow wrap ---- */

.presets-eyebrow-wrap {
  margin-bottom: 28px;
}

/* ---- Headline ---- */

.presets-headline {
  font-family: var(--fd);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 400;
  color: var(--ink);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}

.presets-headline-accent {
  color: var(--accent2);
}

/* ---- Description ---- */

.presets-desc {
  font-family: var(--fs);
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 0 56px;
}

/* ===== Switchboard grid: pills left, preview right ===== */

.presets-switchboard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}

/* ---- Left: Selector pills ---- */

.presets-selector {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
  position: relative;
}

.presets-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(13, 13, 13, 0.03);
  cursor: pointer;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

.presets-pill:hover {
  background: rgba(44, 62, 107, 0.06);
  border-color: rgba(44, 62, 107, 0.1);
}

.presets-pill:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.presets-pill--active {
  background: var(--accent2);
  border-color: var(--accent2);
}

.presets-pill--active:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

/* Dot inside pill */

.presets-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s var(--ease);
}

.presets-pill--active .presets-pill-dot {
  background: var(--paper);
}

/* Name inside pill */

.presets-pill-name {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  transition: color 0.3s var(--ease), font-weight 0.3s var(--ease);
}

.presets-pill--active .presets-pill-name {
  color: var(--paper);
  font-weight: 600;
}

/* ===== Right: Preview area ===== */

.presets-preview-area {
  min-width: 0; /* prevent grid blowout */
}

/* ---- Double-bezel paper shell ---- */

.presets-paper-bezel-outer {
  padding: 6px;
  background: rgba(44, 62, 107, 0.04);
  border: 1px solid rgba(44, 62, 107, 0.1);
  border-radius: 22px;
}

.presets-paper-bezel-inner {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 32px 64px -16px rgba(13, 13, 13, 0.1);
  overflow: hidden;
}

/* ===== Paper content =====
 * Fixed height prevents the section from growing/shrinking when switching
 * between 1-column and 2-column journal layouts. Content clips at the bottom,
 * which reads as a natural paper-through-a-window effect.
 */

.presets-paper {
  padding: 32px;
  height: 360px;
  overflow: hidden;
}

/* ---- Title block ---- */

.presets-paper-title-block {
  margin-bottom: 16px;
}

.presets-paper-title-block--center {
  text-align: center;
}

.presets-paper-title {
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.presets-paper-authors {
  font-family: Georgia, serif;
  font-size: 10px;
  color: var(--muted);
}

.presets-paper-affil {
  font-family: Georgia, serif;
  font-size: 8px;
  color: var(--border);
  font-style: italic;
  margin-top: 2px;
}

/* ---- Body layout ---- */

.presets-paper-body {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.7;
}

.presets-paper-body--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.presets-paper-body--one-col {
  display: block;
}

.presets-paper-body--one-col .presets-paper-col + .presets-paper-col {
  margin-top: 12px;
}

/* ---- Section headings inside paper ---- */

.presets-paper-heading {
  font-size: 8px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  margin-top: 10px;
}

.presets-paper-heading:first-child {
  margin-top: 0;
}

/* ---- Body text ---- */

.presets-paper-text {
  margin: 0 0 8px;
  text-indent: 12px;
}

/* ---- Superscript citation ---- */

.presets-cite-super {
  font-size: 7px;
  color: var(--accent);
  vertical-align: super;
  line-height: 0;
}

/* ---- Figure placeholder ---- */

.presets-paper-figure {
  margin: 10px 0;
  padding: 8px;
  border: 1px solid #ede7d5;
  border-radius: 4px;
  text-align: center;
}

.presets-paper-figure-placeholder {
  height: 40px;
  background: linear-gradient(135deg, rgba(44, 62, 107, 0.04), rgba(44, 62, 107, 0.08));
  border-radius: 2px;
  margin-bottom: 4px;
}

.presets-paper-figure-caption {
  font-size: 7px;
  color: var(--muted);
}

/* ---- References section ---- */

.presets-paper-refs-heading {
  font-size: 8px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  margin-bottom: 4px;
}

.presets-paper-refs {
  font-size: 7px;
  line-height: 1.6;
}

.preset-ref {
  margin-bottom: 2px;
}

/* ===== Format info bar ===== */

.presets-info-bar {
  padding: 12px 24px;
  background: rgba(44, 62, 107, 0.04);
  border-top: 1px solid rgba(44, 62, 107, 0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--fm);
  font-size: 10px;
  color: var(--muted);
}

.presets-info-name {
  color: var(--accent2);
  font-weight: 600;
}

/* ===== Hint below preview ===== */

.presets-hint {
  margin-top: 12px;
  text-align: center;
  font-family: var(--fm);
  font-size: 9px;
  color: var(--border);
  letter-spacing: 0.04em;
}

/* ===== Scroll-reveal entry animation ===== */

.presets--hidden .presets-eyebrow-wrap,
.presets--hidden .presets-headline,
.presets--hidden .presets-desc,
.presets--hidden .presets-switchboard {
  opacity: 0;
  transform: translateY(24px);
}

.presets--visible .presets-eyebrow-wrap,
.presets--visible .presets-headline,
.presets--visible .presets-desc,
.presets--visible .presets-switchboard {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.presets--visible .presets-eyebrow-wrap {
  transition-delay: 0.05s;
}

.presets--visible .presets-headline {
  transition-delay: 0.1s;
}

.presets--visible .presets-desc {
  transition-delay: 0.18s;
}

.presets--visible .presets-switchboard {
  transition-delay: 0.28s;
}

/* ===== Responsive ===== */

@media (max-width: 960px) {
  .presets-switchboard {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .presets-selector {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    gap: 6px;
  }

  .presets-pill {
    padding: 8px 12px;
  }

  .presets-pill-name {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .presets {
    padding: 80px 0 72px;
  }

  .presets-desc {
    margin-bottom: 40px;
  }

  .presets-paper {
    padding: 20px;
    height: 300px;
  }

  .presets-paper-title {
    font-size: 13px;
  }

  .presets-paper-body--two-col {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .presets-info-bar {
    padding: 10px 16px;
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .presets-headline {
    font-size: 28px;
  }

  .presets-pill {
    padding: 6px 10px;
    border-radius: 8px;
  }

  .presets-pill-name {
    font-size: 9px;
  }

  .presets-paper-bezel-outer {
    padding: 4px;
    border-radius: 16px;
  }

  .presets-paper-bezel-inner {
    border-radius: 13px;
  }

  .presets-paper {
    padding: 16px;
    height: 260px;
  }

  .presets-paper-title {
    font-size: 11px;
  }
}

/* ===== Reduced motion ===== */

@media (prefers-reduced-motion: reduce) {
  .presets--hidden .presets-eyebrow-wrap,
  .presets--hidden .presets-headline,
  .presets--hidden .presets-desc,
  .presets--hidden .presets-switchboard {
    opacity: 1;
    transform: none;
  }

  .presets-pill,
  .presets-pill-dot,
  .presets-pill-name {
    transition: none;
  }
}

/* ============================================================
   13. Trust.css
   ============================================================ */
/* ===== Trust / The Footnotes ===== */

.trust {
  min-height: 100vh;
  padding: 120px 0;
  background: var(--ink);
  position: relative;
}

.trust-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- Eyebrow override for dark bg ---- */
.trust-eyebrow {
  margin-bottom: 40px;
}

.trust-eyebrow .eyebrow {
  border-color: rgba(245, 240, 232, 0.12);
}

/* ---- Body text with superscript references ---- */
.trust-body-text {
  font-family: var(--fd);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.5;
  color: var(--paper);
  margin-bottom: 64px;
  max-width: 700px;
}

.trust-body-text sup {
  font-family: var(--fm);
  font-size: 0.45em;
  color: var(--accent);
  vertical-align: super;
  margin-left: 2px;
  cursor: default;
  position: relative;
  top: -0.3em;
}

/* ---- Rule line ---- */
.trust-rule {
  width: 200px;
  height: 1px;
  background: rgba(245, 240, 232, 0.15);
  margin-bottom: 32px;
}

/* ---- Footnote entries ---- */
.trust-fn-entry {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(245, 240, 232, 0.06);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.trust-fn-entry:last-of-type {
  border-bottom: none;
}

.trust-fn-num {
  font-family: var(--fm);
  font-size: 14px;
  color: var(--accent);
  padding-top: 2px;
}

.trust-fn-title {
  font-family: var(--fs);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 6px;
}

.trust-fn-detail {
  font-family: var(--fm);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.trust-fn-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--green);
  background: rgba(29, 138, 80, 0.1);
  padding: 3px 10px;
  border-radius: 99px;
}

.trust-fn-metric::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Footer meta ---- */
.trust-meta {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.2);
  text-transform: uppercase;
  text-align: center;
  margin-top: 40px;
}

/* ---- Section-level scroll reveal ---- */
.trust--hidden .trust-eyebrow,
.trust--hidden .trust-body-text,
.trust--hidden .trust-rule,
.trust--hidden .trust-meta {
  opacity: 0;
  transform: translateY(24px);
}

.trust--visible .trust-eyebrow,
.trust--visible .trust-body-text,
.trust--visible .trust-rule,
.trust--visible .trust-meta {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.trust--visible .trust-body-text {
  transition-delay: 0.1s;
}

.trust--visible .trust-rule {
  transition-delay: 0.2s;
}

.trust--visible .trust-meta {
  transition-delay: 0.8s;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .trust--hidden .trust-eyebrow,
  .trust--hidden .trust-body-text,
  .trust--hidden .trust-rule,
  .trust--hidden .trust-meta {
    opacity: 1;
    transform: none;
  }

  .trust-fn-entry {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .trust {
    padding: 80px 0;
  }

  .trust-inner {
    padding: 0 24px;
  }

  .trust-body-text {
    margin-bottom: 48px;
  }

  .trust-fn-entry {
    grid-template-columns: 32px 1fr;
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .trust-fn-num {
    font-size: 12px;
  }

  .trust-fn-title {
    font-size: 14px;
  }

  .trust-fn-detail {
    font-size: 11px;
  }

  .trust-meta {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  .trust {
    padding: 64px 0;
  }

  .trust-inner {
    padding: 0 20px;
  }

  .trust-body-text {
    margin-bottom: 40px;
  }

  .trust-fn-entry {
    grid-template-columns: 28px 1fr;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .trust-rule {
    width: 120px;
    margin-bottom: 24px;
  }
}

/* ============================================================
   14. CTA.css
   ============================================================ */
/* ===== CTA / Footnote 6 ===== */

.cta-section {
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  position: relative;
}

.cta-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

/* ---- Continuation marker ---- */
.cta-continuation {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.12);
  margin-bottom: 60px;
  padding-top: 4px;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  display: inline-block;
}

/* ---- Body text ---- */
.cta-body-text {
  font-family: var(--fd);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.5;
  color: var(--paper);
  margin-bottom: 64px;
  max-width: 700px;
}

.cta-body-text sup {
  font-family: var(--fm);
  font-size: 0.45em;
  color: var(--accent);
  vertical-align: super;
  position: relative;
  top: -0.3em;
  margin-left: 2px;
}

/* ---- Rule line ---- */
.cta-rule {
  width: 200px;
  height: 1px;
  background: rgba(245, 240, 232, 0.15);
  margin-bottom: 40px;
}

/* ---- Footnote 6 entry ---- */
.cta-entry {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0;
  align-items: start;
}

.cta-fn-num {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--accent);
  padding-top: 6px;
}

.cta-fn-title {
  font-family: var(--fs);
  font-size: 17px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 10px;
}

.cta-fn-detail {
  font-family: var(--fm);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 500px;
}

.cta-fn-terms {
  font-family: var(--fm);
  font-size: 10px;
  color: rgba(245, 240, 232, 0.2);
  margin-top: 20px;
  letter-spacing: 0.05em;
}

/* ---- Page number ---- */
.cta-page-num {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.12);
  text-transform: uppercase;
  margin-top: 80px;
  text-align: right;
}

/* ---- Scroll-reveal: hidden state ---- */
.cta--hidden .cta-continuation,
.cta--hidden .cta-body-text,
.cta--hidden .cta-rule,
.cta--hidden .cta-entry,
.cta--hidden .cta-page-num {
  opacity: 0;
  transform: translateY(24px);
}

/* ---- Scroll-reveal: visible state ---- */
.cta--visible .cta-continuation,
.cta--visible .cta-body-text,
.cta--visible .cta-rule,
.cta--visible .cta-entry,
.cta--visible .cta-page-num {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.cta--visible .cta-body-text {
  transition-delay: 0.1s;
}

.cta--visible .cta-rule {
  transition-delay: 0.2s;
}

.cta--visible .cta-entry {
  transition-delay: 0.3s;
}

.cta--visible .cta-page-num {
  transition-delay: 0.4s;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .cta--hidden .cta-continuation,
  .cta--hidden .cta-body-text,
  .cta--hidden .cta-rule,
  .cta--hidden .cta-entry,
  .cta--hidden .cta-page-num {
    opacity: 1;
    transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .cta-inner {
    padding: 0 24px;
  }

  .cta-continuation {
    margin-bottom: 40px;
  }

  .cta-body-text {
    margin-bottom: 48px;
  }

  .cta-fn-detail {
    max-width: 100%;
  }

  .cta-page-num {
    margin-top: 60px;
  }
}

@media (max-width: 480px) {
  .cta-entry {
    grid-template-columns: 28px 1fr;
  }

  .cta-fn-title {
    font-size: 15px;
  }

  .cta-fn-detail {
    font-size: 11px;
  }

  .cta-continuation {
    margin-bottom: 32px;
  }

  .cta-body-text {
    margin-bottom: 40px;
  }

  .cta-page-num {
    margin-top: 48px;
  }
}

/* ============================================================
   15. Footer.css
   ============================================================ */
/* ===== Footer / The End Matter ===== */

.endmatter {
  background: var(--paper);
  color: var(--ink);
  padding: 80px 0 48px;
  position: relative;
}

.endmatter::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent, transparent 31px,
    rgba(13, 13, 13, 0.04) 31px,
    rgba(13, 13, 13, 0.04) 32px
  );
  pointer-events: none;
}

.endmatter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* ---- Section blocks ---- */
.endmatter-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.endmatter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.endmatter-heading {
  font-family: var(--fd);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 24px;
}

/* ---- References ---- */
.references-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
  padding: 0;
  margin: 0;
}

.references-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0;
  font-family: var(--fm);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.references-list .ref-num {
  color: var(--accent);
}

.references-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s var(--ease);
}
.references-list a:hover {
  border-color: var(--accent);
  opacity: 1;
}

/* ---- Acknowledgments ---- */
.acknowledgments {
  font-family: var(--fd);
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 600px;
}

/* ---- Appendix ---- */
.appendix-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 60px;
  align-items: end;
}

.appendix-legal {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.appendix-legal a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s var(--ease);
}
.appendix-legal a:hover {
  border-color: var(--accent);
  opacity: 1;
}

.appendix-right {
  text-align: right;
}
.appendix-right .logo-text {
  font-family: var(--fs);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.appendix-right .tagline {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
}

/* ---- Legal link button (looks like <a>) ---- */
.legal-link {
  color: var(--ink);
  font-family: var(--fm);
  font-size: 11px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
  transition: border-color 0.3s var(--ease);
}
.legal-link:hover {
  border-color: var(--accent);
}

/* ---- Legal modal ---- */
.legal-dialog {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper, #fafaf8);
  color: var(--ink, #1a1a18);
  padding: 0;
  max-width: 560px;
  width: 90vw;
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.legal-dialog::backdrop {
  background: rgba(0,0,0,0.45);
}
.legal-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.legal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.legal-dialog-title {
  font-family: var(--fs, serif);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.legal-dialog-close {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.legal-dialog-close:hover {
  color: var(--ink);
}
.legal-dialog-body {
  overflow-y: auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-section strong {
  font-family: var(--fm);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.legal-section p {
  font-family: var(--fm);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  color: var(--ink);
}

/* ---- Standalone legal pages (/privacy, /terms) ---- */
#view-legal {
  display: none;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
}
.legal-page {
  display: none;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.legal-page.active { display: block; }
.legal-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  transition: color 0.2s var(--ease);
}
.legal-page-back:hover { color: var(--ink); }
.legal-page-back svg { width: 14px; height: 14px; }
.legal-page h1 {
  font-family: var(--fs);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.legal-page-updated {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin: 0 0 48px;
}
.legal-page .legal-section {
  margin-bottom: 32px;
}
.legal-page .legal-section strong {
  font-family: var(--fm);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.legal-page .legal-section p {
  font-family: var(--fs);
  font-size: 14.5px;
  line-height: 1.8;
  margin: 0;
  color: var(--ink);
  max-width: 65ch;
}
.legal-page-contact {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.legal-page-contact p {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.legal-page-contact a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 640px) {
  .legal-page { padding: 40px 16px 64px; }
  .legal-page-back { margin-bottom: 28px; }
  .legal-page-updated { margin-bottom: 36px; }
}

/* ---- Scroll reveal ---- */
.endmatter--hidden .endmatter-section {
  opacity: 0;
  transform: translateY(24px);
}
.endmatter--visible .endmatter-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.endmatter--visible .endmatter-section:nth-child(2) {
  transition-delay: 0.12s;
}
.endmatter--visible .endmatter-section:nth-child(3) {
  transition-delay: 0.24s;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .appendix-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .appendix-right {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .endmatter {
    padding: 56px 0 32px;
  }
  .endmatter-inner {
    padding: 0 20px;
  }
  .endmatter-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .endmatter--hidden .endmatter-section,
  .endmatter--visible .endmatter-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* (marquee keyframes removed — replaced by ledger ticker) */

/* ============================================================
   17. Presets paper fade + Trust footnote initial state
   ============================================================ */
/* Presets paper fade — replaces AnimatePresence (opacity only, scale dropped) */
.presets-paper { transition: opacity 0.35s cubic-bezier(0.32,0.72,0,1); }
.presets-paper.fading { opacity: 0; }

/* Trust footnote entries — initial hidden state for JS stagger reveal */
.trust-fn-entry {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

