
/* ═══════════════════════════════════════════════
   DESIGN SYSTEM — HIGH CONTRAST SAFETY PALETTE
   ═══════════════════════════════════════════════ */
:root {
  /* Core palette */
  --bg:        #F2F0EB;   /* warm paper, not pure white */
  --bg-alt:    #E8E5DF;   /* cold industrial grey, slightly darker */
  --surface:   #EDEAE4;   /* card surface */
  --surface-2: #E2DED7;   /* inset / deeper surface */
  --border:    #C8C3BA;   /* visible rule */
  --border-lt: #D8D4CC;   /* subtle rule */

  /* Typography */
  --ink:       #121212;   /* deep carbon */
  --ink-mid:   #3A3832;   /* secondary text */
  --ink-muted: #7A7468;   /* muted / captions */

  /* Accent — warm amber/olive for safety brand */
  --accent:        #FF5F1F;   /* safety orange — brand accent */
  --accent-light:  #FF8050;   /* medium amber */
  --accent-bg:     rgba(255,95,31,0.08);
  --accent-border: rgba(255,95,31,0.3);

  /* Semantic */
  --danger:  #B02A1A;
  --success: #2A6B42;
  --warn:    #8B5E14;

  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Paper grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ─── NAV ─────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: stretch;
  height: 56px;
  transition: box-shadow 0.3s;
}
#site-nav.shadowed { box-shadow: 0 4px 20px rgba(18,18,18,0.1); }

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
}
.nav-logo .dot { color: var(--accent); font-size: 1.6rem; line-height: 1; margin-left: 1px; }

.nav-tabs {
  display: flex;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  border-right: 1px solid var(--border-lt);
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  user-select: none;
  position: relative;
  top: 2px;
}
.nav-tab:hover { color: var(--ink); background: var(--bg-alt); }
.nav-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  background: var(--surface);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  padding: 0 24px;
  margin-left: auto;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}

/* Mobile hamburger */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-left: 1px solid var(--border);
  cursor: pointer;
  font-size: 1.2rem;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  color: var(--ink);
}
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  z-index: 499;
  flex-direction: column;
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-item {
  padding: 16px 28px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  border-bottom: 1px solid var(--border-lt);
  transition: color 0.2s, background 0.2s;
}
.nav-mobile-item:hover, .nav-mobile-item.active { color: var(--ink); background: var(--bg-alt); }

/* ─── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  font-size: 0.72rem;
  padding: 12px 28px;
}
.btn-primary:hover { background: var(--ink-mid); box-shadow: 0 4px 16px rgba(18,18,18,0.18); transform: translateY(-1px); }
.btn-primary.sm { padding: 9px 20px; font-size: 0.65rem; }
.btn-primary.lg { padding: 16px 40px; font-size: 0.8rem; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: 0.72rem;
  padding: 11px 26px;
}
.btn-outline:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-outline.sm { padding: 8px 18px; font-size: 0.65rem; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  padding: 12px 28px;
}
.btn-accent:hover { background: var(--accent-light); box-shadow: 0 4px 16px rgba(255,95,31,0.25); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.65rem;
  padding: 8px 0;
  border: none;
  font-weight: 400;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--ink); }

/* ─── PAGE WRAPPER ────────────────────────────── */
.page { display: none; animation: fadeUp 0.4s ease both; }
.page.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ─── SHARED COMPONENTS ───────────────────────── */
.label-tag {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 4px 12px;
  border-radius: 1px;
  background: var(--accent-bg);
}

.section-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-eyebrow::before { content:''; width:20px; height:1px; background:var(--ink-muted); }

.rule { height:1px; background:var(--border); margin:0; }
.rule-heavy { height:2px; background:var(--ink); margin:0; }

.input-field {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.input-field::placeholder { color: var(--ink-muted); }
.input-field:focus { border-color: var(--accent); }
.input-field.error { border-color: var(--danger); }

/* ══════════════════════════════════════════════
   PAGE 1: HOME
   ══════════════════════════════════════════════ */
#page-home {}

.home-hero {
  padding: 80px 64px 72px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40%;
  background: repeating-linear-gradient(
    -60deg,
    transparent,
    transparent 18px,
    rgba(18,18,18,0.025) 18px,
    rgba(18,18,18,0.025) 19px
  );
  pointer-events: none;
}
.hero-left {}
.hero-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content:''; width:28px; height:1.5px; background:var(--accent); }

.hero-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero-h1 .line-accent {
  color: var(--accent);
  display: block;
}
.hero-sub {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink-mid);
  max-width: 500px;
  margin-bottom: 44px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}
.hero-stat {
  text-align: right;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-lt);
  width: 140px;
}
.hero-stat:last-child { border-bottom: none; }
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.03em;
}
.stat-num span { color: var(--accent); font-size: 2rem; }
.stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* MARQUEE */
.marquee-strip {
  background: var(--ink);
  overflow: hidden;
  padding: 11px 0;
}
.marquee-inner {
  display: flex;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.marquee-item {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--bg-alt);
  padding: 0 28px;
}
.marquee-item .dot { color: var(--accent-light); margin-right: 28px; }

/* WHY GRID */
.home-why {
  padding: 80px 64px;
  border-bottom: 1px solid var(--border);
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 52px;
  border: 1px solid var(--border);
  background: var(--border);
}
.why-card {
  background: var(--surface);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
}
.why-card:hover { background: var(--bg); }
.wc-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 6rem;
  color: var(--border);
  line-height: 1;
  position: absolute;
  top: 8px;
  right: 20px;
  letter-spacing: 0.03em;
  transition: color 0.25s;
  pointer-events: none;
  z-index: 0;
}
.why-card:hover .wc-num { color: rgba(255,95,31,0.12); }
.wc-icon { font-size: 1.8rem; margin-bottom: 16px; position: relative; z-index: 1; }
.wc-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
  position: relative;
  z-index: 1;
  padding-right: 48px;
}
.wc-body { font-size: 0.83rem; color: var(--ink-mid); line-height: 1.65; position: relative; z-index: 1; }

/* TIERS */
.home-tiers {
  padding: 80px 64px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}


/* TESTIMONIALS */
.home-testi {
  padding: 80px 64px;
  border-bottom: 1px solid var(--border);
}
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  margin-top: 52px;
  border: 1px solid var(--border);
  background: var(--border);
}
.testi-card {
  background: var(--bg);
  padding: 32px 28px;
}
.testi-stars { color: var(--accent); font-size: 0.7rem; letter-spacing: 3px; margin-bottom: 14px; }
.testi-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-mid);
  margin-bottom: 20px;
}
.testi-name { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.testi-loc { font-size: 0.65rem; color: var(--ink-muted); margin-top: 3px; }

/* CTA BANNER */
.home-cta {
  padding: 100px 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.home-cta h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: 0.03em;
  line-height: 0.92;
  margin-bottom: 20px;
}
.home-cta p { font-size: 0.92rem; color: var(--ink-mid); margin-bottom: 44px; }

/* ══════════════════════════════════════════════
   PAGE 2: CALCULATOR
   ══════════════════════════════════════════════ */
#page-calc {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 100px;
}

/* Progress bar under nav */
.calc-progress-rail {
  position: sticky;
  top: 58px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 400;
  margin: 0 -24px;
}
.calc-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

.calc-header { padding: 16px 0 20px; }
.calc-tier-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-tier-label::before { content:'◆'; font-size: 0.5rem; }
.calc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.calc-meta-txt { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-muted); }
.calc-meta-txt b { color: var(--ink); }

/* Step dots */
.step-dots { display: flex; gap: 4px; }
.sdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
}
.sdot.done { background: var(--ink-muted); }
.sdot.cur { background: var(--accent); }

/* Inline question progress bar */
.q-progress-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.q-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.q-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.q-progress-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.q-progress-label span { color: var(--ink); }

/* SCREEN: Email/tier intro */
.screen { display: none; animation: fadeUp 0.4s ease both; }
.screen.active { display: block; }

.calc-intro { padding-top: 8px; }
.calc-intro h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}
.calc-intro h1 em { color: var(--accent); font-style: normal; display: block; }
.calc-intro p {
  font-size: 0.92rem;
  color: var(--ink-mid);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 44px;
}

.email-row { display: flex; gap: 12px; max-width: 480px; }
.privacy { font-size: 0.62rem; color: var(--ink-muted); margin-top: 10px; }

/* QUESTION */
.q-cat-band {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.q-cat-band::after { content:''; flex:1; height:1px; background:var(--border); }

/* q-counter hidden — progress bar above already shows position */
.q-counter { display: none; }

.q-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.8vw, 1.55rem);
  line-height: 1.32;
  color: var(--ink);
  margin-bottom: 20px;
}

.opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.opt-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.opt-row::before {
  content:'';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s;
}
.opt-row:hover { border-color: var(--ink-muted); transform: translateX(3px); background: var(--bg); }
.opt-row:hover::before { transform: scaleY(0.5); }
.opt-row.sel { border-color: var(--ink); background: var(--bg); transform: translateX(3px); }
.opt-row.sel::before { transform: scaleY(1); }

.opt-key {
  width: 26px; height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.opt-row.sel .opt-key { border-color: var(--accent); background: var(--accent); color: #fff; }

.opt-txt { font-size: 0.88rem; line-height: 1.42; color: var(--ink-mid); flex: 1; }
.opt-row.sel .opt-txt { color: var(--ink); }

/* opt-score dots removed — they revealed correct answer to users */
.opt-score { display: none; }

.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* RESULTS */
.results-hero { padding: 40px 0 56px; text-align: center; }
.score-ring-wrap { width: 180px; height: 180px; margin: 0 auto 24px; position: relative; }
.score-ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 502; stroke-dashoffset: 502; transition: stroke-dashoffset 1.8s cubic-bezier(0.4,0,0.2,1); }
.score-center { position: absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align: center; }
.sc-num { font-family: 'Bebas Neue', sans-serif; font-size: 3.5rem; line-height: 1; letter-spacing: 0.03em; }
.sc-denom { font-size: 0.62rem; color: var(--ink-muted); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 2px; }
.score-tier { font-family: 'Bebas Neue', sans-serif; font-size: 1.9rem; letter-spacing: 0.12em; margin-bottom: 10px; }
.score-desc { font-size: 0.88rem; color: var(--ink-mid); max-width: 460px; margin: 0 auto; line-height: 1.65; }

.breakdown-section { margin-bottom: 48px; }
.sec-head {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
}
.domain-row {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
}
.dr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dr-name { font-size: 0.8rem; font-weight: 500; }
.dr-score { font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem; letter-spacing: 0.05em; }
.dr-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.dr-fill { height: 100%; transition: width 1.3s 0.3s ease; width: 0%; }

.refs-section { margin-bottom: 48px; }
.ref-item {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
}
.ref-q { font-size: 0.8rem; font-weight: 500; margin-bottom: 4px; }
.ref-ans { font-size: 0.72rem; color: var(--danger); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.ref-ans::before { content:'↓'; }
.ref-ch { font-size: 0.7rem; color: var(--accent); font-weight: 600; }

.results-cta { display:flex;gap:12px;justify-content:center;flex-wrap:wrap;padding-top:8px; }

/* ══════════════════════════════════════════════
   PAGE 3: CABINET
   ══════════════════════════════════════════════ */
#page-cabinet {
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}
.cab-header {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cab-header h1 { font-family:'Bebas Neue',sans-serif;font-size:3.5rem;letter-spacing:0.04em;line-height:1; }
.cab-header p { font-size:0.82rem;color:var(--ink-muted);margin-top:6px; }

.empty-state {
  text-align:center; padding:80px 24px;
  border: 1.5px dashed var(--border);
  border-radius: 3px;
}
.empty-icon { font-size:3rem;margin-bottom:20px; }
.empty-state h2 { font-family:'Playfair Display',serif;font-size:1.5rem;margin-bottom:10px; }
.empty-state p { font-size:0.83rem;color:var(--ink-muted);margin-bottom:28px;max-width:380px;margin-left:auto;margin-right:auto;line-height:1.6; }

.dash-stats { display:grid;grid-template-columns:repeat(4,1fr);gap:1px;border:1px solid var(--border);background:var(--border);margin-bottom:32px; }
.ds-cell { background:var(--surface);padding:20px; }
.ds-val { font-family:'Bebas Neue',sans-serif;font-size:2.2rem;line-height:1;letter-spacing:0.03em;margin-bottom:4px; }
.ds-lbl { font-size:0.6rem;letter-spacing:0.2em;text-transform:uppercase;color:var(--ink-muted); }

.cab-score-card {
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:3px;
  overflow:hidden;
  margin-bottom:28px;
}
.csc-head {
  background:var(--bg-alt);
  border-bottom:1px solid var(--border);
  padding:16px 24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
.csc-title { font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:0.08em; }
.csc-date { font-size:0.65rem;color:var(--ink-muted);letter-spacing:0.1em; }
.csc-body { padding:24px; }
.csc-summary { display:flex;align-items:center;gap:28px;margin-bottom:28px;flex-wrap:wrap; }
.csc-big { font-family:'Bebas Neue',sans-serif;font-size:5rem;line-height:1;letter-spacing:0.03em; }
.csc-denom { font-size:0.65rem;color:var(--ink-muted);letter-spacing:0.15em;text-transform:uppercase;margin-top:4px; }
.csc-tier h3 { font-family:'Bebas Neue',sans-serif;font-size:1.6rem;letter-spacing:0.1em;margin-bottom:5px; }
.csc-tier p { font-size:0.8rem;color:var(--ink-mid);line-height:1.55;max-width:340px; }

.cab-domain-row {
  display:flex;align-items:center;gap:14px;
  padding:10px 0;border-bottom:1px solid var(--border-lt);
}
.cab-domain-row:last-child{border-bottom:none;}
.cdn-name { font-size:0.78rem;color:var(--ink);min-width:160px; }
.cdn-rail { flex:1;height:3px;background:var(--border);border-radius:2px; }
.cdn-fill { height:100%;border-radius:2px;transition:width 1.1s ease;width:0%; }
.cdn-pct { font-family:'Bebas Neue',sans-serif;font-size:0.88rem;min-width:36px;text-align:right; }

.checklist-card {
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:3px;
  padding:24px;
  margin-bottom:28px;
}
.cl-title { font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:0.08em;margin-bottom:18px; }
.cl-item {
  display:flex;align-items:flex-start;gap:12px;
  padding:10px 0;border-bottom:1px solid var(--border-lt);
  cursor:pointer;
}
.cl-item:last-child{border-bottom:none;}
.cl-box {
  width:18px;height:18px;
  border:1.5px solid var(--border);
  border-radius:2px;
  flex-shrink:0; margin-top:1px;
  display:flex;align-items:center;justify-content:center;
  transition:background 0.2s,border-color 0.2s;
}
.cl-item.checked .cl-box { background:var(--ink);border-color:var(--ink);color:var(--bg);font-size:0.65rem; }
.cl-item.checked .cl-text { color:var(--ink-muted);text-decoration:line-through; }
.cl-text { font-size:0.81rem;line-height:1.4;color:var(--ink-mid); }
.cl-ch { font-size:0.63rem;color:var(--accent);font-weight:600;margin-top:2px; }

/* ══════════════════════════════════════════════
   PAGE 4: INTEL HUB
   ══════════════════════════════════════════════ */
#page-intel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}
.intel-header {
  margin-bottom: 52px;
  padding-bottom: 32px;
  border-bottom: 1.5px solid var(--ink);
}
.intel-header h1 {
  font-family:'Bebas Neue',sans-serif;
  font-size:clamp(3rem,7vw,5.5rem);
  letter-spacing:0.03em;
  line-height:0.92;
  margin-bottom:14px;
}
.intel-header h1 span { color:var(--accent); }
.intel-header p { font-size:0.9rem;color:var(--ink-mid);max-width:540px;line-height:1.65; }

.search-bar { display:flex;gap:10px;margin-bottom:24px; }
.filter-bar { display:flex;gap:6px;flex-wrap:wrap;margin-bottom:44px; }
.f-btn {
  font-size:0.62rem;letter-spacing:0.2em;text-transform:uppercase;
  color:var(--ink-muted);border:1.5px solid var(--border);background:transparent;
  padding:7px 16px;border-radius:1px;cursor:pointer;
  transition:color 0.2s,border-color 0.2s,background 0.2s;
  font-family:'DM Sans',sans-serif;
}
.f-btn:hover { color:var(--ink);border-color:var(--ink-muted); }
.f-btn.active { color:var(--ink);border-color:var(--ink);background:var(--ink);color:var(--bg); }

/* Featured */
.featured-grid { display:grid;grid-template-columns:2fr 1fr;gap:1px;border:1px solid var(--border);background:var(--border);margin-bottom:44px; }
.feat-card {
  background:var(--surface);
  cursor:pointer;
  transition:background 0.2s;
  position:relative;
}
.feat-card:hover { background:var(--bg); }
.feat-visual {
  height:180px;
  background:var(--bg-alt);
  display:flex;align-items:center;justify-content:center;
  font-size:3.5rem;
  position:relative;
  overflow:hidden;
  border-bottom:1px solid var(--border);
}
.feat-visual::before {
  content:'';position:absolute;inset:0;
  background: repeating-linear-gradient(45deg,transparent,transparent 14px,rgba(18,18,18,0.03) 14px,rgba(18,18,18,0.03) 15px);
}
.feat-body { padding:24px; }
.feat-cat { font-size:0.55rem;letter-spacing:0.3em;text-transform:uppercase;color:var(--accent);font-weight:600;margin-bottom:8px; }
.feat-title { font-family:'Playfair Display',serif;font-size:1.1rem;line-height:1.3;margin-bottom:8px; }
.feat-expt { font-size:0.78rem;color:var(--ink-muted);line-height:1.55;margin-bottom:14px; }
.feat-meta { font-size:0.62rem;color:var(--ink-muted); }
.feat-side { display:flex;flex-direction:column; }
.feat-side-card {
  background:var(--surface);
  cursor:pointer;
  padding:20px;
  border-bottom:1px solid var(--border);
  flex:1;
  transition:background 0.2s;
}
.feat-side-card:hover { background:var(--bg); }
.feat-side-card:last-child { border-bottom:none; }

/* Article grid */
.intel-sec-head {
  font-size:0.58rem;letter-spacing:0.35em;text-transform:uppercase;
  color:var(--ink-muted);padding-bottom:12px;
  border-bottom:1.5px solid var(--ink);margin-bottom:22px;
}
.articles-grid { display:flex;flex-wrap:wrap;gap:0;border:1px solid var(--border);background:var(--border);margin-bottom:52px; }
.art-card {
  background:var(--surface);
  padding:22px;
  cursor:pointer;
  transition:background 0.2s;
}
.art-card:hover { background:var(--bg); }
.art-card.hidden { display:none; }
.art-cat { font-size:0.55rem;letter-spacing:0.3em;text-transform:uppercase;color:var(--accent);font-weight:600;margin-bottom:8px; }
.art-title { font-family:'Playfair Display',serif;font-size:0.95rem;line-height:1.35;margin-bottom:8px; }
.art-expt { font-size:0.74rem;color:var(--ink-muted);line-height:1.55;margin-bottom:14px; }
.art-foot { display:flex;justify-content:space-between;align-items:center;font-size:0.62rem; }
.art-ch { color:var(--accent);font-weight:700;letter-spacing:0.05em; }
.art-time { color:var(--ink-muted); }

/* Chapter grid */
.chapter-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:1px;border:1px solid var(--border);background:var(--border);margin-bottom:52px; }
.chap-part-label {
  grid-column: 1 / -1;
  padding: 10px 18px;
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.chap-card {
  background:var(--surface);padding:18px;
  cursor:pointer;transition:background 0.2s;
  position:relative;
}
.chap-card:hover { background:var(--bg); }
.chap-num { font-family:'Bebas Neue',sans-serif;font-size:2.2rem;color:var(--border);line-height:1;margin-bottom:6px;letter-spacing:0.05em; }
.chap-title { font-size:0.78rem;font-weight:600;margin-bottom:3px;line-height:1.3; }
.chap-sub { font-size:0.62rem;color:var(--ink-muted);line-height:1.4; }
.chap-arr { position:absolute;bottom:14px;right:14px;font-size:0.7rem;color:var(--border);transition:color 0.2s,transform 0.2s; }
.chap-card:hover .chap-arr { color:var(--accent);transform:translateX(3px); }

/* Newsletter */
.nl-banner {
  background:var(--ink);
  border-radius:3px;
  padding:44px 40px;
  display:flex;align-items:center;gap:40px;flex-wrap:wrap;
}
.nl-text { flex:1;min-width:220px; }
.nl-text h3 { font-family:'Bebas Neue',sans-serif;font-size:1.8rem;letter-spacing:0.08em;color:var(--bg);margin-bottom:6px; }
.nl-text p { font-size:0.8rem;color:rgba(242,240,235,0.55);line-height:1.55; }
.nl-form { display:flex;gap:10px;flex:1;min-width:260px; }
.nl-input {
  flex:1;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);
  border-radius:2px;padding:12px 16px;
  color:#fff;font-family:'DM Sans',sans-serif;font-size:0.85rem;outline:none;
  transition:border-color 0.2s;
}
.nl-input::placeholder { color:rgba(255,255,255,0.35); }
.nl-input:focus { border-color:var(--accent-light); }

/* MODAL */
.modal-bg {
  display:none;position:fixed;inset:0;
  background:rgba(18,18,18,0.7);
  z-index:800;align-items:center;justify-content:center;padding:24px;
}
.modal-bg.open { display:flex; }
.modal-box {
  background:var(--bg);
  border:1.5px solid var(--ink);
  border-radius:3px;
  max-width:680px;width:100%;
  max-height:84vh;overflow-y:auto;
  animation:fadeUp 0.3s ease both;
}
.modal-head {
  background:var(--bg-alt);
  border-bottom:1px solid var(--border);
  padding:18px 26px;
  display:flex;justify-content:space-between;align-items:center;
  position:sticky;top:0;
}
.modal-cat-lbl { font-size:0.55rem;letter-spacing:0.3em;text-transform:uppercase;color:var(--accent);font-weight:600; }
.modal-close { background:none;border:none;font-size:1.1rem;cursor:pointer;color:var(--ink-muted);transition:color 0.2s; }
.modal-close:hover { color:var(--ink); }
.modal-body { padding:32px; }
.modal-cta {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-top: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.modal-cta-text {
  font-size: 0.78rem;
  color: var(--ink-mid);
  line-height: 1.55;
  flex: 1;
  min-width: 200px;
}
.modal-cta-text strong {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.modal-title { font-family:'Playfair Display',serif;font-size:1.6rem;line-height:1.25;margin-bottom:24px; }
.modal-content { font-size:0.875rem;color:var(--ink-mid);line-height:1.75; }
.modal-content p { margin-bottom:16px; }
.modal-content strong { color:var(--ink); }
.modal-content h4 { font-family:'Playfair Display',serif;font-size:1rem;color:var(--ink);margin:24px 0 10px; }

/* ─── FOOTER ──────────────────────────────────── */
#site-footer {
  background: var(--ink);
  padding: 44px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo { font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:0.1em;color:var(--bg); }
.footer-logo .dot { color:var(--accent-light); font-size:1.5rem; line-height:1; }
.footer-tag { font-size:0.62rem;letter-spacing:0.15em;text-transform:uppercase;color:rgba(242,240,235,0.4);margin-top:4px; }
.footer-nav { display:flex;gap:24px;flex-wrap:wrap; }
.f-link {
  font-size:0.65rem;letter-spacing:0.15em;text-transform:uppercase;
  color:rgba(242,240,235,0.4);cursor:pointer;
  transition:color 0.2s;
  background:none;border:none;font-family:'DM Sans',sans-serif;
}
.f-link:hover { color:var(--bg); }
.footer-legal { font-size:0.62rem;color:rgba(242,240,235,0.3);letter-spacing:0.08em; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media(max-width:900px) {
  .home-hero { padding:60px 24px 56px;grid-template-columns:1fr; }
  .hero-right { display:flex;flex-direction:row;align-items:flex-start;flex-wrap:wrap;gap:0;border-top:1px solid var(--border);padding-top:28px;margin-top:0; }
  .hero-stat { width:50%;text-align:left;border-right:1px solid var(--border-lt); }
  .hero-stat:nth-child(2n) { border-right:none;padding-left:20px; }
  .why-grid,
  .testi-grid { grid-template-columns:1fr; }
  .home-why, .home-tiers, .home-testi, .home-cta { padding:60px 24px; }
  .featured-grid { grid-template-columns:1fr; }
  .articles-grid .art-card { width: 50%; }
  .chapter-grid { grid-template-columns:1fr 1fr; }
  #site-footer { padding:36px 24px; flex-direction:column;align-items:flex-start; }
}
@media(max-width:600px) {
  /* Tabs always visible — compress them on small screens */
  .nav-logo { padding:0 14px; font-size:0.58rem; }
  .nav-tab  { padding:0 12px; font-size:0.6rem; letter-spacing:0.12em; }
  .nav-cta  { display:none; }
  .nav-burger { display:none; }
  .calc-intro h1 { font-size:3.5rem; }
  .email-row { flex-direction:column; }
  .q-nav { flex-direction:column-reverse; }
  .q-nav .btn-ghost, .q-nav .btn-primary { width:100%;justify-content:center;text-align:center; }
  .dash-stats { grid-template-columns:1fr 1fr; }
  .articles-grid .art-card, .chapter-grid { grid-template-columns:1fr; }
  .nl-banner { flex-direction:column; }
  .nl-form { flex-direction:column; }
}


/* ══════════════════════════════════════════════
   AUTH — Cabinet login / register
   ══════════════════════════════════════════════ */

.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 44px 48px;
  max-width: 520px;
  margin: 0 auto 48px;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.auth-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--ink);
}
.auth-subtext {
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 400px;
}
.auth-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 10px;
  padding: 9px 14px;
  background: rgba(176,42,26,0.06);
  border-radius: var(--radius);
  border-left: 2px solid var(--danger);
  line-height: 1.5;
}
.auth-success {
  font-size: 0.78rem;
  color: var(--success);
  margin-top: 10px;
  padding: 11px 16px;
  background: rgba(42,107,66,0.07);
  border-radius: var(--radius);
  border-left: 2px solid var(--success);
  line-height: 1.55;
  margin-bottom: 14px;
}
.auth-skip {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-lt);
  margin-top: 24px;
}

/* USER BAR — shown when signed in */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.user-bar-email {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
}
.user-bar-badge {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--success);
  font-weight: 600;
  margin-top: 2px;
}

@media(max-width:600px) {
  .auth-card { padding: 32px 24px; }
}


/* ══════════════════════════════════════════════
   BOOK PROMO — home page
   ══════════════════════════════════════════════ */

.home-book {
  padding: 80px 48px;
  background: var(--ink);
  color: var(--bg);
}
.book-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}
.home-book .section-eyebrow { color: var(--accent); border-color: var(--accent); }
.home-book .section-eyebrow::before { background: var(--accent); }
.book-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.06em;
  color: var(--bg);
  margin-bottom: 16px;
  line-height: 1;
}
.book-sub {
  font-size: 0.88rem;
  color: rgba(242,240,235,0.7);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 24px;
}
.book-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}
.book-bullet {
  font-size: 0.8rem;
  color: rgba(242,240,235,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Decorative book cover illustration */
.book-cover {
  width: 200px;
  height: 280px;
  position: relative;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  flex-shrink: 0;
}
.book-cover-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 28px;
  background: var(--accent);
  border-radius: 2px 0 0 2px;
}
.book-cover-face {
  position: absolute;
  left: 28px; top: 0; right: 0; bottom: 0;
  background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(255,95,31,0.3);
  border-radius: 0 2px 2px 0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.book-cover-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--accent);
}
.book-cover-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #f0ece4;
}
.book-cover-foot {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.4);
}

/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   PRIORITY READING PLAN — results screen
   ══════════════════════════════════════════════ */

.ref-item {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ref-item.ref-critical { border-left: 3px solid var(--danger); }
.ref-item.ref-recommended { border-left: 3px solid var(--accent); }
.ref-domain {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex-shrink: 0;
  min-width: 140px;
}
.ref-ch { font-size: 0.82rem; font-weight: 500; color: var(--ink); flex: 1; }
.ref-badge {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ref-critical   .ref-badge { background: rgba(176,42,26,0.08); color: var(--danger); }
.ref-recommended .ref-badge { background: var(--accent-bg); color: var(--accent); }

.ref-book-cta {
  margin-top: 20px;
  padding: 24px 28px;
  background: var(--ink);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.ref-book-copy {
  font-size: 0.84rem;
  color: rgba(242,240,235,0.8);
  line-height: 1.6;
  max-width: 380px;
}
.ref-book-copy strong { color: var(--bg); }

@media(max-width:900px) {
  .book-inner    { grid-template-columns: 1fr; }
  .book-right    { display: none; }
  .yt-grid       { grid-template-columns: 1fr 1fr; }
  .home-book     { padding: 60px 24px; }
  .home-youtube  { padding: 60px 24px; }
}
@media(max-width:600px) {
  .yt-grid { grid-template-columns: 1fr; }
  .ref-item { flex-direction: column; align-items: flex-start; gap: 6px; }
}


/* ══════════════════════════════════════════════
   LANGUAGE SWITCHER
   ══════════════════════════════════════════════ */

.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }
.lang-chevron { font-size: 0.6rem; opacity: 0.6; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(18,18,18,0.12);
  z-index: 600;
  min-width: 150px;
  overflow: hidden;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-mid);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  border-bottom: 1px solid var(--border-lt);
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: var(--bg-alt); color: var(--ink); }
.lang-option.active { color: var(--accent); font-weight: 600; }
.lang-option.active::after {
  content: '✓';
  margin-left: auto;
  font-size: 0.7rem;
}

@media(max-width:600px) {
  .lang-switcher { padding: 0 10px; }
  .lang-toggle   { padding: 4px 7px; font-size: 0.62rem; }
}


/* ══════════════════════════════════════════════
   LIBRARY PAGE
   ══════════════════════════════════════════════ */

.lib-header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.lib-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.lib-header p {
  font-size: 0.88rem;
  color: var(--ink-mid);
  max-width: 540px;
  line-height: 1.65;
}

.lib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lib-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s;
}
.lib-item:hover { border-color: var(--ink-muted); }

.lib-featured {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}
.lib-featured:hover { border-color: var(--accent); }

.lib-item-body {
  padding: 24px 24px 20px;
  flex: 1;
}

.lib-item-tag {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.lib-coming-soon .lib-item-tag { color: var(--ink-muted); }

.lib-item-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 10px;
}

.lib-item-desc {
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 16px;
}

.lib-item-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lib-meta-pill {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--bg-alt);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}
.lib-featured .lib-meta-pill {
  background: rgba(255,95,31,0.06);
  border-color: var(--accent-border);
  color: var(--accent);
}

.lib-item-action {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-lt);
}
.lib-featured .lib-item-action { border-top-color: var(--accent-border); }

.lib-lock-btn,
.lib-download-btn {
  width: 100%;
  justify-content: center;
}

.lib-soon-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 2px;
}

.lib-coming-soon { opacity: 0.65; }

@media(max-width: 640px) {
  .lib-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════
   CHECKLIST PROGRESS BAR
   ══════════════════════════════════════════════ */

.cl-progress {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}
.cl-progress-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.cl-progress-label {
  position: absolute;
  top: 8px;
  right: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
}
.cl-item.checked .cl-text { color: var(--ink-muted); text-decoration: line-through; }
.cl-ch { cursor: default; }
.cl-linked .cl-ch {
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cl-linked .cl-ch:hover { opacity: 0.75; }

/* ══════════════════════════════════════════════
   CABINET — SOFT AUTH SYNC BANNER
   ══════════════════════════════════════════════ */

.auth-card--soft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.auth-card--soft .auth-heading {
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  margin: 0;
}
.auth-card--soft .auth-subtext { display: none; }
.auth-card--soft .auth-skip    { display: none; }
.auth-card--soft .label-tag    { display: none; }
.auth-card--soft .auth-success { margin: 0; font-size: 0.75rem; }
.auth-card--soft #btn-send-magic-link {
  width: auto;
  padding: 8px 18px;
  font-size: 0.75rem;
}
.auth-card--soft input.input-field {
  max-width: 240px;
  padding: 8px 12px;
  font-size: 0.78rem;
  margin-bottom: 0 !important;
}

/* ══════════════════════════════════════════════
   INTEL HUB — PERSONALISED PRIORITY ARTICLES
   ══════════════════════════════════════════════ */

.intel-personal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--ink-mid);
  margin-bottom: 24px;
}
.intel-personal-banner strong { color: var(--ink); }

.art-card--priority {
  border-color: var(--accent-border);
  background: var(--accent-bg);
  order: -1; /* float priority cards to top */
}
.art-card--priority:hover { border-color: var(--accent); }
.art-priority-tag {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
/* art-card responsive widths handled in base rule and media queries above */
.art-card {
  width: calc(33.333% - 1px);
  box-sizing: border-box;
}
@media(max-width:900px) { .art-card { width: calc(50% - 1px); } }
@media(max-width:600px) { .art-card { width: 100%; } }

/* ══════════════════════════════════════════════
   MODAL — NEXT ARTICLE LINK
   ══════════════════════════════════════════════ */

.modal-next {
  margin-top: 24px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.modal-next:hover { border-color: var(--accent); background: var(--accent-bg); }
.modal-next-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.modal-next-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   CHAPTER GRID — BOOK CTA AFTER TABLE OF CONTENTS
   ══════════════════════════════════════════════ */

.chapter-book-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  background: var(--ink);
  border-radius: var(--radius);
  margin-bottom: 48px;
}
.chapter-book-cta-text {
  font-size: 0.84rem;
  color: rgba(242,240,235,0.8);
  line-height: 1.6;
}
.chapter-book-cta-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--bg);
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════
   BOOK SECTION — 5-PART TIMELINE STRIP
   ══════════════════════════════════════════════ */

.book-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.bt-part {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.bt-phase {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
  min-width: 80px;
}
.bt-label { color: rgba(242,240,235,0.7); }

/* ══════════════════════════════════════════════
   RESULTS — SHARE SCORE BUTTON ALIGNMENT
   ══════════════════════════════════════════════ */

.results-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 8px;
}
