:root {
  --cream: #F6F3EC;
  --cream-dark: #EAE4D7;
  --ink: #16181A;
  --muted: #4B5563;
  --blue: #003688;
  --red: #C8102E;
  --green: #00782A;
  --purple: #5C2D91;
  --ochre: #B87D00;
  --yellow: #F2B705;
  --font: "Gill Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  min-height: 100vh;
  padding-bottom: 84px;
}

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 4px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-badge { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.brand-title { font-size: 30px; font-weight: 700; letter-spacing: 0.05em; line-height: 1.05; }
.brand-sub { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: var(--blue); margin-top: 4px; }

.nav-tabs { display: flex; gap: 8px; }
.tab-btn {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  background: #FFFFFF;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tab-btn:hover { background: var(--cream-dark); }
.tab-btn.active { background: var(--ink); color: var(--cream); }

.legend-strip {
  max-width: 1480px;
  margin: 0 auto;
  padding: 8px 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1.5px solid rgba(22,24,26,0.16);
}
.legend-items { display: flex; gap: 18px; flex-wrap: wrap; }
.leg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.leg i { display: inline-block; width: 20px; height: 9px; border-radius: 2px; }
.legend-note { font-size: 13px; font-weight: 600; color: var(--muted); }

/* Main */
.main-wrap { max-width: 1480px; margin: 0 auto; padding: 24px; }
.view { display: none; }
.view.active { display: block; }

/* Interactive Tube Map */
.board-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(22,24,26,0.12);
  padding: 12px;
}
.tube-map-container { min-width: 980px; }
.tube-map-container svg { display: block; width: 100%; height: auto; }
.station-clickable { cursor: pointer; transition: opacity 0.12s; }
.station-clickable:hover { opacity: 0.88; }

/* Section Intro */
.section-intro { margin-bottom: 22px; border-left: 5px solid var(--ink); padding-left: 16px; }
.section-intro h2 { font-size: 28px; letter-spacing: 0.03em; margin-bottom: 6px; }
.section-intro p { font-size: 16px; color: var(--muted); max-width: 820px; line-height: 1.45; }

/* Audited Cards Grid */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
.rail-card {
  border-radius: 14px;
  padding: 18px;
  color: #FFFFFF;
  border: 4px solid #FFFFFF;
  box-shadow: 6px 6px 0 rgba(22,24,26,0.18);
  cursor: pointer;
  transition: transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rail-card:hover { transform: translateY(-2px); }
.rc-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid rgba(255,255,255,0.5); padding-bottom: 10px; }
.rc-num { background: var(--yellow); color: #141618; font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 5px; }
.rc-party { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; padding: 4px 10px; border: 2px solid #FFFFFF; border-radius: 5px; }
.rc-hero { display: flex; gap: 14px; align-items: center; }
.rc-pic { width: 92px; height: 116px; object-fit: cover; object-position: center 12%; border: 3px solid #FFFFFF; border-radius: 7px; flex-shrink: 0; background: #141618; }
.rc-const { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--yellow); text-transform: uppercase; }
.rc-name { font-size: 28px; font-weight: 800; line-height: 1.05; margin: 3px 0 6px; }
.rc-role { font-size: 15px; line-height: 1.3; opacity: 0.94; }
.rc-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rc-st { background: #14181C; border-radius: 8px; padding: 10px 12px; }
.rc-sk { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--yellow); }
.rc-sv { font-size: 26px; font-weight: 800; color: #FFFFFF; margin-top: 2px; line-height: 1.05; }
.rc-ss { font-size: 12px; color: #D1D5DB; margin-top: 3px; }
.rc-foot { background: #FFFFFF; color: #141618; border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }

/* Shortlist Grid */
.shortlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.sl-card { background: #FFFFFF; border: 3px solid var(--ink); padding: 16px 18px; box-shadow: 5px 5px 0 rgba(22,24,26,0.1); }
.sl-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--cream-dark); padding-bottom: 8px; margin-bottom: 10px; }
.sl-title { font-size: 20px; font-weight: 700; }
.sl-line { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--cream-dark); }
.sl-row:last-child { border-bottom: none; }
.sl-mp { font-size: 16px; font-weight: 700; }
.sl-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.party-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.ext-link { font-size: 12px; font-weight: 700; color: var(--blue); text-decoration: none; border: 1.5px solid var(--blue); padding: 4px 9px; white-space: nowrap; }
.ext-link:hover { background: var(--blue); color: #FFFFFF; }

/* Sticky 326 Bar */
.bar-326 {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--cream);
  border-top: 3px solid var(--yellow);
  z-index: 45;
}
.bar-326-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bar-left { display: flex; align-items: center; gap: 12px; }
.tag-326 { color: var(--yellow); font-weight: 800; letter-spacing: 0.12em; font-size: 15px; }
.desc-326 { font-size: 14px; font-weight: 700; letter-spacing: 0.05em; }
.party-mix { display: flex; gap: 8px; flex-wrap: wrap; }
.mix-chip { font-size: 13px; font-weight: 800; padding: 4px 10px; border: 1.5px solid #52525B; color: #9CA3AF; }
.mix-chip.on { border-color: #FFFFFF; color: #FFFFFF; }
.bar-links { display: flex; gap: 12px; }
.bar-links a { color: var(--cream); text-decoration: none; font-size: 14px; font-weight: 700; border-bottom: 2px solid var(--yellow); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22,24,26,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.hidden { display: none; }
.modal-box {
  background: var(--cream);
  border: 4px solid var(--ink);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 10px 10px 0 rgba(0,0,0,0.3);
}
.modal-top {
  background: var(--ink);
  color: var(--cream);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.modal-close {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
}
.modal-body { padding: 20px; }

.slide-toggle { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.slide-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.slide-btn.active { background: var(--ink); color: var(--cream); }

.receipt-block {
  background: #14181C;
  color: #F3F4F6;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.receipt-block h4 { font-size: 13px; letter-spacing: 0.12em; color: var(--yellow); text-transform: uppercase; margin-bottom: 8px; }
.receipt-quote { font-size: 18px; font-weight: 700; color: #FFFFFF; margin-bottom: 10px; line-height: 1.35; }
.receipt-data { font-size: 15px; color: #E5E7EB; line-height: 1.45; margin-bottom: 8px; }
.receipt-ctx { font-size: 14px; color: #9CA3AF; line-height: 1.4; }
.int-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 15px; }
.int-row:last-child { border-bottom: none; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.btn-outline {
  display: inline-block;
  background: #FFFFFF;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  cursor: pointer;
}
