/* Table Frontier — utility-first stylesheet */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --ink: #141414;
  --ink-soft: #2a2a2a;
  --muted: #5c5c5c;
  --paper: #fafbfc;
  --paper-2: #f3f5f7;
  --line: #d8dce0;
  --emerald: #00c853;
  --emerald-deep: #009624;
  --emerald-soft: rgba(0, 200, 83, 0.12);
  --aurora-a: rgba(0, 200, 83, 0.22);
  --aurora-b: rgba(100, 160, 255, 0.18);
  --aurora-c: rgba(180, 140, 255, 0.16);
  --shadow: 0 12px 32px rgba(20, 20, 20, 0.08);
  --radius: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;
  --max: 1120px;
  --nav-w: 220px;
  --font: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

/* Aurora ambient glow */
.aurora {
  position: relative;
  isolation: isolate;
}
.aurora::before {
  content: "";
  position: absolute;
  inset: -10% -5% auto;
  height: min(72vh, 640px);
  background:
    radial-gradient(ellipse 50% 60% at 18% 30%, var(--aurora-a), transparent 70%),
    radial-gradient(ellipse 45% 55% at 78% 20%, var(--aurora-b), transparent 68%),
    radial-gradient(ellipse 40% 50% at 55% 70%, var(--aurora-c), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.bg-aurora-img {
  background-image: url("/images/aurora-hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Layout utilities */
.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  padding-block: var(--space-4) var(--space-6);
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; gap: var(--space-3); }
}
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-5); }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
}
.cluster-between { justify-content: space-between; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.offset { margin-left: clamp(0px, 4vw, 48px); }
.offset-neg { margin-left: clamp(-12px, -2vw, 0px); }
.flow > * + * { margin-top: var(--space-3); }
.flow-lg > * + * { margin-top: var(--space-4); }

/* Type */
.h1, .h2, .h3, .h4, h1, h2, h3, h4 {
  font-family: var(--font);
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
  font-weight: 700;
}
.h1, h1.h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.h2, h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.h3, h3 { font-size: 1.25rem; }
.h4, h4 { font-size: 1.05rem; }
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }
.small { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.tiny { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.measure { max-width: 68ch; }
.accent { color: var(--emerald-deep); }
.mark {
  background: linear-gradient(transparent 58%, rgba(0, 200, 83, 0.28) 58%);
  padding: 0 0.1em;
}
.weight-400 { font-weight: 400; }
.weight-700 { font-weight: 700; }
.italic { font-style: italic; }
.center { text-align: center; }
.right { text-align: right; }

/* Motif divider */
.break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-block: var(--space-5);
  color: var(--emerald);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}
.break::before, .break::after {
  content: "";
  height: 1px;
  width: min(120px, 20vw);
  background: var(--line);
}
.break-glyph::before { content: "◆"; margin: 0; width: auto; height: auto; background: none; }
.break span { font-size: 0.65rem; }

/* Links — bracket / dot prefixed */
.prose a,
.dot-link {
  color: var(--emerald-deep);
  font-weight: 700;
  text-decoration: none;
}
.prose a::before,
.dot-link::before {
  content: "· ";
  color: var(--emerald);
}
.prose a:hover,
.dot-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav-link {
  display: block;
  padding: 0.35rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-link::before { content: "[ "; color: var(--emerald); font-weight: 400; }
.nav-link::after { content: " ]"; color: var(--emerald); font-weight: 400; }
.nav-link:hover { color: var(--emerald-deep); }
.nav-link.is-active { color: var(--ink); font-weight: 700; }

/* Buttons — sharp rectangular, zero radius */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border: 2px solid var(--ink);
  background: var(--emerald);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--emerald-deep); color: #fff; border-color: var(--emerald-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.85rem; }

/* Badges — square-cut sharp + icon prefixes (DETAIL) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #fff;
  line-height: 1;
}
.badge::before { content: attr(data-ico); font-size: 0.7rem; }
.badge-fill {
  background: var(--emerald);
  border-color: var(--ink);
}
.badge-soft {
  background: var(--emerald-soft);
  border-color: transparent;
}
.verdict {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0;
}
.verdict-strong { background: var(--emerald-deep); }
.verdict-solid { background: var(--ink); }
.verdict-niche { background: #3d4a5c; }

/* Cards — soft tiles, rounded (Aurora), subtle shadow; featured get double-line frame */
.card {
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
}
.card-featured {
  border: 3px double var(--ink);
  box-shadow: var(--shadow);
}
.card-flat {
  background: var(--paper-2);
  box-shadow: none;
  border: 1px solid var(--line);
}
.tile {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.tile-head {
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.18), rgba(100, 160, 255, 0.12));
  border-bottom: 1px solid var(--line);
}
.tile-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.tile-foot {
  padding: var(--space-3) var(--space-4) var(--space-4);
  margin-top: auto;
}
.logo-box {
  width: 120px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 6px;
}
.logo-box img {
  max-height: 44px;
  max-width: 100%;
  object-fit: contain;
}
.logo-fallback {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

/* Age bar */
.age-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  text-align: center;
}
.age-bar a { color: var(--emerald); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.age-bar a::before { content: none; }

/* Site header / brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img, .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.side-nav {
  position: sticky;
  top: 3rem;
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px double var(--line);
}
@media (max-width: 860px) {
  .side-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    border: 1px solid var(--line);
  }
  .side-nav .nav-link { display: inline-block; padding: 0.25rem 0; }
  .side-nav .nav-label { width: 100%; }
}
.nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
  font-weight: 700;
}

/* Hero */
.hero {
  padding-block: var(--space-4) var(--space-3);
}
.hero-line {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.05;
  font-weight: 700;
  max-width: 12ch;
  margin: 0 0 var(--space-3);
}
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  border: 3px double var(--line);
}
@media (max-width: 640px) {
  .trust-strip { grid-template-columns: 1fr; }
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--emerald-deep);
}
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* Notice / disclosure boxes */
.notice {
  padding: var(--space-3);
  background: var(--emerald-soft);
  border-left: 4px solid var(--emerald);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
}
.disclosure {
  padding: var(--space-3);
  border: 3px double var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.9rem;
}

/* Category picks */
.pick-block {
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pick-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.pick-list li:last-child { border-bottom: 0; }
.rank {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--emerald-deep);
  width: 1.6rem;
}

/* Safety cards */
.safe-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  min-height: 140px;
  transition: transform 0.15s ease;
}
.safe-card:hover { transform: translateY(-2px); }
.safe-card img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

/* FAQ */
.faq-group + .faq-group { margin-top: var(--space-5); }
.faq-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.faq-item h4 { margin-bottom: var(--space-2); }
.faq-item p { margin: 0; color: var(--ink-soft); }

/* Footer */
.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-5) 0 var(--space-7);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  position: relative;
}
.site-footer::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 18%;
  width: 80px;
  height: 80px;
  background: url("/images/mark.svg") center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid a {
  display: block;
  padding: 0.2rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-grid a::before { content: "· "; color: var(--emerald); }
.footer-grid a:hover { color: var(--emerald-deep); }

/* Cookie banner */
.cookie {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 200;
  max-width: 420px;
  margin-inline: auto;
  padding: var(--space-4);
  background: #fff;
  border: 3px double var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
}
.cookie.is-open { display: block; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field input,
.field textarea {
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

/* Motion — staggered fade-in of showcase cards */
@media (prefers-reduced-motion: no-preference) {
  .fade-rise {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .fade-rise.is-in {
    opacity: 1;
    transform: none;
  }
  .showcase .tile.fade-rise:nth-child(1) { transition-delay: 0.05s; }
  .showcase .tile.fade-rise:nth-child(2) { transition-delay: 0.12s; }
  .showcase .tile.fade-rise:nth-child(3) { transition-delay: 0.19s; }
  .showcase .tile.fade-rise:nth-child(4) { transition-delay: 0.26s; }
  .showcase .tile.fade-rise:nth-child(5) { transition-delay: 0.33s; }
}
@media (prefers-reduced-motion: reduce) {
  .fade-rise { opacity: 1; transform: none; }
}

/* Prose pages */
.prose h2 { margin-top: var(--space-5); margin-bottom: var(--space-3); }
.prose h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.prose p { margin: 0 0 var(--space-3); color: var(--ink-soft); }
.prose ul, .prose ol {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.prose li + li { margin-top: 0.4rem; }
.figure {
  margin: var(--space-4) 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.figure img { width: 100%; }
.figure figcaption {
  padding: var(--space-2) var(--space-3);
  background: #fff;
  font-size: 0.82rem;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  font-weight: 700;
  background: var(--paper-2);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.tile-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .tile-split { grid-template-columns: 1fr; }
}
