/* =========================================================
   The Reputation Score — Design System
   Pure CSS, no preprocessor, no framework.
   ========================================================= */

:root {
  /* Surfaces */
  --bg-deep:        #0A1628;
  --bg-mid:         #1a2940;
  --bg-light:       #F4F1E8;

  /* Accents */
  --accent-gold:     #C9A961;
  --accent-gold-dim: #8a7340;

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: rgba(255,255,255,0.70);
  --text-muted:     rgba(255,255,255,0.40);
  --text-on-light:  #0A1628;

  /* Tier accents */
  --tier-A:     #C9A961;
  --tier-Bplus: #C9A961;
  --tier-B:     #C9A961;
  --tier-C:     #B8B8B8;
  --tier-D:     #C97F3D;
  --tier-F:     #C95D3D;

  /* Type */
  --serif: "Source Serif 4", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --max-width: 1200px;
  --max-prose: 720px;
  --header-h: 70px;
  --hairline: 1px solid rgba(201, 169, 97, 0.22);
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-gold); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--text-primary); }
p { margin: 0 0 1em 0; }
hr {
  border: 0;
  border-top: 1px solid rgba(201, 169, 97, 0.22);
  margin: 48px 0;
}

/* =========================================================
   Type scale
   ========================================================= */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 900; line-height: 1.1; margin: 0 0 0.4em 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(48px, 7vw, 80px); }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; }
h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; }

.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 16px 0;
}

.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 640px;
}

.muted   { color: var(--text-muted); }
.subtle  { color: var(--text-secondary); }

/* =========================================================
   Layout primitives
   ========================================================= */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.prose     { max-width: var(--max-prose); }
.section   { padding: clamp(64px, 10vw, 120px) 0; }
.section--tight  { padding: clamp(40px, 6vw, 72px) 0; }
.section--bordered { border-top: var(--hairline); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 800px) {
  .grid-3 { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--hairline);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}
.brand:hover { color: var(--text-primary); }
.brand__seal { width: 28px; height: 28px; flex: 0 0 28px; }
.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.005em;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}
.nav a:hover { color: var(--accent-gold); }
.nav__yt {
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
}
.nav__yt:hover { background: var(--accent-gold); color: var(--bg-deep); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
@media (max-width: 760px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-deep);
    border-bottom: var(--hairline);
    padding: 8px 0;
  }
  .nav.is-open a {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav.is-open .nav__yt {
    margin: 12px 24px;
    text-align: center;
  }
  .nav-toggle { display: inline-block; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  text-decoration: none;
  line-height: 1;
}
.btn--primary {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
}
.btn--primary:hover { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-deep); }
.btn--secondary {
  background: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.btn--secondary:hover { background: rgba(201, 169, 97, 0.08); color: var(--text-primary); border-color: var(--text-primary); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 8vw, 96px);
}
.hero h1 { max-width: 14ch; margin-bottom: 24px; }
.hero .lede { margin-bottom: 8px; max-width: 60ch; }

/* =========================================================
   Episode embed card
   ========================================================= */
.episode {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: 24px;
}
.episode__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}
.episode__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.episode__title { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 0 0 8px 0; }
.episode__desc { color: var(--text-secondary); font-size: 15px; margin: 0 0 16px 0; }
.episode__more { font-family: var(--mono); font-size: 13px; letter-spacing: 0.05em; }

/* =========================================================
   "How it works" cards
   ========================================================= */
.how-card {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: 32px;
}
.how-card__num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.how-card h3 { margin-bottom: 12px; }
.how-card p  { color: var(--text-secondary); margin: 0; }

/* =========================================================
   Newsletter
   ========================================================= */
.newsletter {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: clamp(32px, 6vw, 56px);
  text-align: center;
}
.newsletter h2 { margin-bottom: 12px; }
.newsletter p  { color: var(--text-secondary); max-width: 50ch; margin: 0 auto 28px; }
.newsletter__form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.newsletter__form input[type="email"] {
  flex: 1 1 220px;
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 4px;
}
.newsletter__form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.newsletter__disc {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 16px;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: var(--hairline);
  padding: 60px 0 32px 0;
  background: var(--bg-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 16px 0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-secondary); font-size: 15px; }
.footer-col a:hover { color: var(--accent-gold); }
.footer-base {
  border-top: var(--hairline);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-base p { margin: 0; }

/* =========================================================
   Rubric page — methodology
   ========================================================= */
.rubric-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) {
  .rubric-layout { grid-template-columns: 1fr; gap: 32px; }
  .rubric-toc { position: static !important; }
}
.rubric-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.rubric-toc h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 16px 0;
}
.rubric-toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0; margin: 0;
}
.rubric-toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.rubric-toc li::before {
  content: counter(toc, decimal-leading-zero) " · ";
  font-family: var(--mono);
  color: var(--accent-gold);
  margin-right: 4px;
}
.rubric-toc a { color: var(--text-secondary); }
.rubric-toc a:hover { color: var(--accent-gold); }

.dimension {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 24px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.dimension__num {
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 8px;
}
.dimension h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 16px 0;
  line-height: 1.2;
}
.dimension__def {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 24px;
  border-left: 2px solid var(--accent-gold);
  padding-left: 16px;
}
.dimension h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 24px 0 12px 0;
  font-weight: 700;
}
.dimension ul { padding-left: 18px; margin: 0 0 8px 0; color: var(--text-secondary); }
.dimension li { margin-bottom: 6px; }

.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) { .principles { grid-template-columns: 1fr; } }
.principles li {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: 24px;
  color: var(--text-secondary);
}
.principles li::before {
  content: "—";
  color: var(--accent-gold);
  font-weight: 700;
  margin-right: 8px;
}

.searches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .searches { grid-template-columns: 1fr; } }
.search {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: 24px;
}
.search__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.search__query {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-deep);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  word-break: break-word;
}
.search p { color: var(--text-secondary); font-size: 14px; margin: 0; }

/* Tier table */
.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
}
.tier-table th, .tier-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tier-table th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
}
.tier-table td:first-child { font-family: var(--mono); width: 110px; color: var(--text-primary); }
.tier-badge {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid currentColor;
  letter-spacing: 0.1em;
}
.tier-badge--A     { color: var(--tier-A); }
.tier-badge--A2    { color: var(--tier-A); }
.tier-badge--Bplus { color: var(--tier-Bplus); }
.tier-badge--B     { color: var(--tier-B); }
.tier-badge--C     { color: var(--tier-C); }
.tier-badge--D     { color: var(--tier-D); }
.tier-badge--F     { color: var(--tier-F); }

/* =========================================================
   Rubric — measure / not measure
   ========================================================= */
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 800px) { .scope-grid { grid-template-columns: 1fr; } }

.scope-card {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 36px);
}
.scope-card .eyebrow { margin-bottom: 16px; }
.scope-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}
.scope-card li {
  padding: 8px 0 8px 22px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.scope-card li:last-child { border-bottom: 0; }
.scope-card--positive li::before {
  content: "+";
  position: absolute; left: 0; top: 8px;
  color: var(--accent-gold);
  font-family: var(--mono);
  font-weight: 700;
}
.scope-card--negative li::before {
  content: "−";
  position: absolute; left: 0; top: 8px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 700;
}

/* =========================================================
   Audit conditions
   ========================================================= */
.conditions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) { .conditions { grid-template-columns: 1fr; } }
.conditions li {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 4px;
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}
.conditions li strong {
  display: block;
  color: var(--accent-gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}

/* =========================================================
   Per-tier scoring rows inside a dimension card
   ========================================================= */
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
}
.tier-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}
.tier-list li:last-child { border-bottom: 0; }
.tier-list .tier-badge { margin-top: 1px; justify-self: start; }

/* =========================================================
   Example evidence patterns
   ========================================================= */
.evidence {
  list-style: none;
  padding: 0;
  margin: 0;
}
.evidence li {
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.evidence__sign {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  flex: 0 0 16px;
  line-height: 1.4;
}
.evidence li.evidence--positive .evidence__sign { color: var(--accent-gold); }
.evidence li.evidence--negative .evidence__sign { color: var(--tier-D); }

/* =========================================================
   Anchor example score table
   ========================================================= */
.anchor-table { max-width: 760px; }
.anchor-verdict {
  background: var(--bg-mid);
  border-left: 2px solid var(--accent-gold);
  padding: 24px 28px;
  border-radius: 4px;
  margin-top: 32px;
}
.anchor-verdict p { color: var(--text-secondary); margin-bottom: 12px; }
.anchor-verdict p:last-child { margin-bottom: 0; }
.anchor-verdict strong { color: var(--text-primary); }

.version-history {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-secondary);
}
.version-history li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* =========================================================
   About page
   ========================================================= */
.host {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 700px) { .host { grid-template-columns: 1fr; } }
.host__photo {
  width: 240px;
  height: 240px;
  border-radius: 6px;
  background: var(--bg-mid);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  overflow: hidden;
}
.host__photo img { width: 100%; height: 100%; object-fit: cover; }
.host h2 { margin-top: 0; }
.host__links {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* =========================================================
   Contact page — form
   ========================================================= */
.form {
  background: var(--bg-mid);
  border: var(--hairline);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 40px);
}
.form__group { margin-bottom: 20px; }
.form__label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.form input[type="text"],
.form input[type="email"],
.form textarea,
.form select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 4px;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--accent-gold);
}
.form textarea { min-height: 160px; resize: vertical; }
.form__radios {
  display: grid;
  gap: 10px;
}
.form__radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  transition: border-color 120ms ease;
}
.form__radio:hover { border-color: var(--accent-gold-dim); }
.form__radio input { margin-top: 4px; }
.form__radio input:checked + span { color: var(--accent-gold); }
.form__conditional { display: none; }
.form__conditional.is-visible { display: block; }
.form__note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--hairline);
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   404
   ========================================================= */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.notfound__code {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.notfound h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 16px; }
.notfound p { color: var(--text-secondary); max-width: 50ch; margin: 0 auto 32px; }

/* =========================================================
   Utility
   ========================================================= */
.text-center { text-align: center; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.callout {
  background: var(--bg-mid);
  border-left: 2px solid var(--accent-gold);
  padding: 24px;
  border-radius: 4px;
  color: var(--text-secondary);
}
.callout strong { color: var(--text-primary); }
