/* ==========================================================================
   Torc Battery Tools — Design System
   ========================================================================== */

:root {
  /* Color palette — gunmetal steel + American safety-red accent */
  --color-bg: #17181b;
  --color-bg-elevated: #1e1f22;
  --color-surface: #242527;
  --color-surface-2: #2c2d30;
  --color-border: #38393c;
  --color-border-light: #47484c;

  --color-text: #f2f1ee;
  --color-text-muted: #a8a7a3;
  --color-text-faint: #757472;

  --color-accent: #c8102e;
  --color-accent-hover: #e2213f;
  --color-accent-soft: rgba(200, 16, 46, 0.14);

  --color-steel: #5b6068;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --container-w: 1180px;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", var(--font-body);
}

@media (prefers-color-scheme: light) {
  :root {
    /* Site is intentionally dark-themed (industrial look) regardless of OS scheme */
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-outline {
  background: transparent;
  border-color: var(--color-border-light);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-block { width: 100%; }

/* ---------------------------------- Flag bar ---------------------------------- */

.flag-bar {
  height: 4px;
  display: flex;
}
.flag-bar span { flex: 1; }
.flag-bar .r { background: #b22234; }
.flag-bar .w { background: #f5f6f8; }
.flag-bar .b { background: #3c3b6e; }

.badge-usa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.badge-usa .stripes {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: none;
}
.badge-usa .stripes span {
  flex: 1;
}
.badge-usa .stripes span:nth-child(odd) { background: #b22234; }
.badge-usa .stripes span:nth-child(even) { background: #f5f6f8; }

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23, 24, 27, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand img {
  height: 40px;
  width: auto;
}

.torc-wordmark {
  height: 19px !important;
  width: auto;
  display: block;
  margin-bottom: 2px;
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--color-text-faint);
  font-weight: 500;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.main-nav a.active {
  color: var(--color-accent);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  background: radial-gradient(ellipse at top right, rgba(200, 16, 46, 0.14), transparent 55%), var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 20px; }
.hero .lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-lg);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--color-border);
  background: radial-gradient(ellipse at top left, rgba(200, 16, 46, 0.12), transparent 55%), var(--color-bg);
}

.page-hero .lede {
  color: var(--color-text-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

/* ---------------------------------- Stat strip ---------------------------------- */

.stat-strip {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.stat-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.stat {
  text-align: center;
  border-left: 1px solid var(--color-border);
}
.stat:first-child { border-left: none; }

.stat .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat .label {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------------------------- Sections ---------------------------------- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.alt-bg {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* ---------------------------------- Feature grid / cards ---------------------------------- */

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

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-light);
  transform: translateY(-3px);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.card h3 { margin-bottom: 10px; color: var(--color-text); }
.card p { margin: 0; font-size: 0.95rem; }

/* ---------------------------------- Split section ---------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
}

.check-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--color-text);
  font-size: 0.98rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(45deg);
}

/* ---------------------------------- Product cards ---------------------------------- */

.product {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--color-border);
}

.product:last-child { border-bottom: none; }

.product-media {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media img {
  max-height: 380px;
  width: auto;
  margin: 0 auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.92rem;
}

.spec-table tr {
  border-bottom: 1px solid var(--color-border);
}

.spec-table td {
  padding: 12px 0;
  color: var(--color-text-muted);
}

.spec-table td:first-child {
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  width: 40%;
}

.spec-table td:last-child {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------------------------------- Model lineup tables ---------------------------------- */

.model-specs {
  padding: 64px 0;
  border-top: 1px solid var(--color-border);
}

.model-specs-head {
  margin-bottom: 32px;
}

.model-table-group {
  margin-bottom: 36px;
}

.model-table-group:last-child {
  margin-bottom: 0;
}

.model-table-group h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 14px;
}

.model-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.model-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.model-table thead th {
  background: var(--color-surface-2);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.model-table tbody td {
  padding: 12px 16px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.model-table tbody tr:last-child td {
  border-bottom: none;
}

.model-table tbody tr:nth-child(odd) {
  background: var(--color-surface);
}

.model-table td:first-child {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted);
}

/* ---------------------------------- Industries ---------------------------------- */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------------------------------- Resource cards ---------------------------------- */

.resource-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 16px;
}

.resource-card .file-icon {
  width: 48px;
  height: 56px;
  flex: none;
  border-radius: 4px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
}

.resource-card .file-info {
  flex: 1;
}

.resource-card h3 { margin: 0 0 4px; text-transform: none; font-size: 1.05rem; }
.resource-card p { margin: 0; font-size: 0.88rem; }

/* ---------------------------------- CTA band ---------------------------------- */

.cta-band {
  background: linear-gradient(120deg, #1a0f06, var(--color-bg));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.cta-band h2 { margin-bottom: 16px; }
.cta-band .lede { max-width: 52ch; margin: 0 auto 32px; }

/* ---------------------------------- Contact ---------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-info .card { margin-bottom: 20px; }

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.field textarea { resize: vertical; min-height: 140px; }

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  margin-top: 14px;
}

#form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
}
#form-status.visible { display: block; }
#form-status.success { color: #6ee7a8; }
#form-status.error { color: #f87171; }

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 56px 0 32px;
  background: var(--color-bg-elevated);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 40ch; font-size: 0.92rem; }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-text-faint);
}

.footer-legal a:hover {
  color: var(--color-text);
}

/* ---------------------------------- Image placeholders ---------------------------------- */
/* Swap these out for real photography — see images/README.txt */

.img-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--color-surface-2), var(--color-bg-elevated));
  color: var(--color-text-faint);
  border-radius: inherit;
}

.img-placeholder .ph-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 24px;
}

.img-placeholder .ph-label small {
  display: block;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--color-text-faint);
  margin-top: 6px;
  opacity: 0.7;
}

.hero-media .img-placeholder,
.split img.img-placeholder,
.product-media .img-placeholder {
  aspect-ratio: 4 / 3;
}

/* ---------------------------------- Real photography ---------------------------------- */

.media-photo {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-md);
}

.hero-media .media-photo {
  aspect-ratio: 4 / 3.1;
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .product,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .product-media { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .container { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat:nth-child(3) { border-left: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .main-nav {
    display: flex;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
  }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .resource-card { flex-direction: column; align-items: flex-start; }
  section { padding: 64px 0; }
  .hero { padding: 90px 0 72px; }
}

/* ---------------------------------- Legal / policy pages ---------------------------------- */

.legal-content {
  max-width: 760px;
}

.legal-content .updated {
  color: var(--color-text-faint);
  font-size: 0.85rem;
  margin-bottom: 36px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 16px;
}

.legal-content ul {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
  padding-left: 22px;
  margin: 0 0 16px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--color-accent);
}

/* ---------------------------------- Skip link ---------------------------------- */

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 1000;
  background: var(--color-accent);
  color: #171100;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------------------------------- Accessibility widget ---------------------------------- */

.a11y-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 900;
  transition: bottom 0.2s ease;
}

body.has-cookie-banner .a11y-widget {
  bottom: 108px;
}

.a11y-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #171100;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  padding: 0;
}

.a11y-toggle svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.a11y-toggle:hover {
  background: var(--color-accent-hover);
}

.a11y-panel {
  position: absolute;
  bottom: 64px;
  left: 0;
  width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  display: none;
}

.a11y-widget.open .a11y-panel {
  display: block;
}

.a11y-panel h4 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.a11y-row span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.a11y-btn-group {
  display: flex;
  gap: 6px;
}

.a11y-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.a11y-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.a11y-btn[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #171100;
}

.a11y-reset {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.a11y-reset:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

/* Accessibility states, toggled on <html> and persisted via localStorage */

html.a11y-text-lg { font-size: 18px; }
html.a11y-text-xl { font-size: 20px; }

html.a11y-underline a { text-decoration: underline; }

html.a11y-contrast {
  --color-bg: #000000;
  --color-bg-elevated: #000000;
  --color-surface: #0d0d0d;
  --color-surface-2: #171717;
  --color-border: #555555;
  --color-border-light: #808080;
  --color-text: #ffffff;
  --color-text-muted: #f2f2f2;
  --color-text-faint: #d8d8d8;
  --color-accent: #ffb347;
  --color-accent-hover: #ffc670;
}

html.a11y-contrast .media-photo,
html.a11y-contrast .img-placeholder {
  filter: contrast(1.05);
}

/* High-contrast mode's accent is a light amber, not the brand red —
   button text needs to flip back to dark for readable contrast. */
html.a11y-contrast .btn-primary {
  color: #16110a;
}

/* ---------------------------------- Cookie banner ---------------------------------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-lg);
  padding: 18px 24px;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-banner-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  max-width: 68ch;
}

.cookie-banner a {
  color: var(--color-accent);
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

@media (max-width: 640px) {
  .a11y-widget { left: 14px; bottom: 14px; }
  .a11y-panel { width: 84vw; max-width: 280px; }
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; }
  body.has-cookie-banner .a11y-widget { bottom: 168px; }
}
