/* ============================================================
   NO SOFT OPINIONS: CINEMA
   Master Stylesheet
   Dark editorial — gold accent — confident, unhedged
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=DM+Mono:wght@400;500&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
  /* Core palette */
  --black:        #0a0a0a;
  --deep:         #111111;
  --surface:      #161616;
  --surface-2:    #1e1e1e;
  --surface-3:    #252525;
  --border:       #2a2a2a;
  --border-light: #333333;

  /* Gold accent system */
  --gold:         #c9a84c;
  --gold-light:   #e2c068;
  --gold-dim:     #8a6f2e;
  --gold-glow:    rgba(201, 168, 76, 0.12);
  --gold-subtle:  rgba(201, 168, 76, 0.06);

  /* Text */
  --text-primary:   #f0ede8;
  --text-secondary: #9a9590;
  --text-muted:     #5a5652;
  --text-gold:      var(--gold);

  /* Framework colours */
  --f1-color: #7eb8d4;   /* Popular — cool blue */
  --f2-color: #c97a4a;   /* Filmmaker — warm amber */
  --f3-color: #7aad8a;   /* Long View — sage green */

  /* Score tier colours */
  --tier-s-plus: #e8c547;
  --tier-s:      #c9a84c;
  --tier-a:      #8fb87a;
  --tier-b:      #7eb8d4;
  --tier-c:      #9a9590;
  --tier-d:      #5a5652;

  /* Spacing */
  --nav-height: 64px;
  --max-width:  1200px;
  --page-pad:   clamp(1rem, 4vw, 3rem);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Subtle film grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  flex-shrink: 0;
}

.nav-brand-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.nav-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active {
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.85rem;
  right: 0.85rem;
  height: 2px;
  background: var(--gold);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: var(--transition);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--deep);
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--page-pad);
  z-index: 99;
}

.nav-drawer.open { display: block; }

.nav-drawer a {
  display: block;
  padding: 0.7rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover, .nav-drawer a.active { color: var(--gold); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-toggle:hover { color: var(--gold); }

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.6rem;
  opacity: 0.6;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: rgba(10,10,10,0.98);
  border: 1px solid var(--border);
  border-top: none;
  min-width: 160px;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { color: var(--gold); }

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */

.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* ============================================================
   PAGE HEADERS
   ============================================================ */

.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.page-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 60ch;
  font-weight: 300;
  line-height: 1.7;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 65ch;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ============================================================
   FILM CARDS (shared ranking row pattern)
   ============================================================ */

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

.film-table thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.film-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.film-table thead th.sortable:hover { color: var(--gold); }
.film-table thead th.sort-active { color: var(--gold); }

.film-row {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}

.film-row:hover { background: var(--gold-subtle); }
.film-row.expanded { background: var(--surface); }

.film-row td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

.film-rank {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 3rem;
  text-align: right;
  padding-right: 1rem;
}

.film-title-cell { min-width: 200px; }

.film-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.film-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: var(--font-mono);
}

.film-score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.film-score.f1 { color: var(--f1-color); }
.film-score.f2 { color: var(--f2-color); }
.film-score.f3 { color: var(--f3-color); }
.film-score.final { color: var(--gold); font-size: 0.95rem; }

.film-volatility {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Score tier badge */
.tier-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-weight: 500;
}

.tier-badge.s-plus { background: rgba(232,197,71,0.15); color: var(--tier-s-plus); border: 1px solid rgba(232,197,71,0.3); }
.tier-badge.s      { background: rgba(201,168,76,0.12); color: var(--tier-s); border: 1px solid rgba(201,168,76,0.25); }
.tier-badge.a      { background: rgba(143,184,122,0.1); color: var(--tier-a); border: 1px solid rgba(143,184,122,0.2); }
.tier-badge.b      { background: rgba(126,184,212,0.1); color: var(--tier-b); border: 1px solid rgba(126,184,212,0.2); }
.tier-badge.c      { background: rgba(154,149,144,0.1); color: var(--tier-c); border: 1px solid rgba(154,149,144,0.2); }
.tier-badge.d      { background: rgba(90,86,82,0.1);    color: var(--tier-d); border: 1px solid rgba(90,86,82,0.2); }

/* ============================================================
   EXPANDED FILM DETAIL
   ============================================================ */

.film-detail {
  display: none;
  background: var(--surface);
  border-bottom: 2px solid var(--gold-dim);
}

.film-detail.open { display: table-row; }

.film-detail td {
  padding: 2rem;
}

.detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 700px) {
  .detail-inner { grid-template-columns: 1fr; }
}

.detail-section-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Dimension bars */
.dimension-list { display: flex; flex-direction: column; gap: 0.75rem; }

.dimension-item {}

.dimension-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.dimension-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.dimension-score-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
}

.dimension-bar-track {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.dimension-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.dimension-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
  line-height: 1.5;
}

/* Framework comparison */
.framework-comparison {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.framework-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.framework-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 5rem;
  flex-shrink: 0;
}

.framework-label.f1 { color: var(--f1-color); }
.framework-label.f2 { color: var(--f2-color); }
.framework-label.f3 { color: var(--f3-color); }

.framework-bar-track {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.framework-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.framework-bar-fill.f1 { background: var(--f1-color); }
.framework-bar-fill.f2 { background: var(--f2-color); }
.framework-bar-fill.f3 { background: var(--f3-color); }

.framework-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  width: 3rem;
  text-align: right;
}

.framework-val.f1 { color: var(--f1-color); }
.framework-val.f2 { color: var(--f2-color); }
.framework-val.f3 { color: var(--f3-color); }

/* Critique block */
.critique-block {
  grid-column: 1 / -1;
  background: var(--surface-2);
  border-left: 3px solid var(--gold-dim);
  padding: 1.25rem 1.5rem;
  border-radius: 0 4px 4px 0;
}

.critique-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-style: italic;
}

.critique-placeholder {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   FILTERS & SEARCH
   ============================================================ */

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-select {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235a5652'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.8rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.search-input {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  width: 220px;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ============================================================
   STATS STRIP
   ============================================================ */

.stats-strip {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.stat-item {}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   CONTESTED / GAP CARDS
   ============================================================ */

.contested-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.contested-card:hover {
  border-color: var(--border-light);
  background: var(--surface-2);
}

.contested-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contested-card-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.gap-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.gap-from { }
.gap-arrow { color: var(--text-muted); }
.gap-to { }
.gap-delta {
  margin-left: auto;
  font-weight: 500;
}
.gap-delta.positive { color: #7aad8a; }
.gap-delta.negative { color: #c97a4a; }

.contested-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ============================================================
   DECADE / GENRE CARDS
   ============================================================ */

.decade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.decade-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.decade-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

.decade-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.decade-essay {
  padding: 1.5rem 2rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.decade-films {
  padding: 1rem 0;
}

/* ============================================================
   HERO (index page)
   ============================================================ */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(201,168,76,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(126,184,212,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* Vertical film strip decorations */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    var(--gold-dim) 0px,
    var(--gold-dim) 20px,
    transparent 20px,
    transparent 30px
  );
  opacity: 0.4;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--black);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ============================================================
   TOP TEN (homepage)
   ============================================================ */

.top-ten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.top-ten-item {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: background var(--transition);
  text-decoration: none;
}

.top-ten-item:hover { background: var(--surface-2); }

.top-ten-rank {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-dim);
  line-height: 1;
  min-width: 2rem;
}

.top-ten-rank.top-three { color: var(--gold); }

.top-ten-info { flex: 1; }

.top-ten-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.top-ten-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.top-ten-score {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 500;
}

/* ============================================================
   FRAMEWORK EXPLAINER CARDS
   ============================================================ */

.framework-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

@media (max-width: 700px) {
  .framework-cards { grid-template-columns: 1fr; }
}

.framework-card {
  background: var(--surface);
  padding: 1.75rem;
}

.framework-card-id {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.framework-card-id.f1 { color: var(--f1-color); }
.framework-card-id.f2 { color: var(--f2-color); }
.framework-card-id.f3 { color: var(--f3-color); }

.framework-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.framework-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.framework-card-example {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  line-height: 1.5;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-section {
  max-width: 72ch;
  margin: 0 auto;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.about-section:last-child { border-bottom: none; }

.about-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.about-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.about-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-section p:last-child { margin-bottom: 0; }

.about-attribution {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.about-section blockquote {
  border-left: 3px solid var(--gold-dim);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--surface);
}

.about-section blockquote p {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* Dimension table on about page */
.dimension-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.82rem;
}

.dimension-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.dimension-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}

.dimension-table tr:last-child td { border-bottom: none; }
.dimension-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.page-btn {
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: var(--gold-subtle);
}

.page-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-info {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.footer-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 38ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-base {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.5rem var(--page-pad) 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-credit a { color: var(--text-muted); }
.footer-credit a:hover { color: var(--gold); }

/* ============================================================
   UTILITIES
   ============================================================ */

.gold { color: var(--gold); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.italic { font-style: italic; }

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* Gold rule */
.gold-rule {
  height: 1px;
  background: linear-gradient(to right, var(--gold-dim), transparent);
  margin: 2rem 0;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ============================================================
   SELECTION
   ============================================================ */

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--text-primary);
}
