@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap');

/* ── Custom Properties ──────────────────────────────── */
:root {
  --paper:    #FBF9F4;
  --ink:      #161413;
  --muted:    #6B655C;
  --hairline: #E4DED2;
  --accent:   #B5472D;
  --blue:     #1F3A5F;
  --card:     #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(22,20,19,.07), 0 1px 6px rgba(22,20,19,.05);
  --shadow-md: 0 4px 14px rgba(22,20,19,.09);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --prose: 760px;
  --wide:  1100px;
  --gap:   clamp(3rem, 6vw, 5rem);
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue); }

/* ── Navigation ─────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.85rem 0;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 1.5rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav-logo:hover { color: var(--accent); }

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--hairline);
}

/* ── Container ──────────────────────────────────────── */
.container {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: var(--prose);
}

/* ── Section Dividers ───────────────────────────────── */
.section {
  padding: var(--gap) 0;
  border-top: 1px solid var(--hairline);
}

.section:first-of-type { border-top: none; }

/* ── Eyebrow Label ──────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* ── Typography ─────────────────────────────────────── */
h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

p {
  color: var(--ink);
  margin-bottom: 1.1rem;
}

p.muted { color: var(--muted); }

strong { font-weight: 600; }

/* ── Hero Section ───────────────────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-top: none;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-verdict-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
}

.hero-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.hero h1 {
  max-width: 720px;
}

.hero-lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 0;
}

/* ── Callout / Pull Card ────────────────────────────── */
.callout {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-sm);
  margin: 1.8rem 0;
}

.callout p { margin: 0; font-size: 0.95rem; }
.callout strong { color: var(--accent); }

.callout-blue {
  border-left-color: var(--blue);
}
.callout-blue strong { color: var(--blue); }

/* ── Stat Chips ─────────────────────────────────────── */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.stat-chip {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-sm);
  min-width: 140px;
}

.stat-chip .stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-chip .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Comparison Table ───────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.table-wrapper::-webkit-scrollbar {
  height: 4px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--hairline);
  border-radius: 2px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 2px;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.83rem;
  background: var(--card);
}

thead th {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--ink);
  line-height: 1.5;
}

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

tbody tr:hover td { background: #F7F4EE; }

.td-yes {
  color: #1a6b3c;
  font-weight: 600;
}

.td-no {
  color: var(--muted);
}

.td-partial {
  color: var(--blue);
  font-weight: 500;
}

tr.nyx-row td {
  background: #FFF8F5;
  font-weight: 600;
  color: var(--accent);
  border-top: 1px solid var(--hairline);
}

tr.nyx-row td:first-child {
  border-left: 3px solid var(--accent);
}

/* ── Pros/Cons Grid ─────────────────────────────────── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 640px) {
  .pros-cons { grid-template-columns: 1fr; }
}

.pros-cons-col {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.pros-cons-col h3 {
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.pros-cons-col.pros h3 { color: #1a6b3c; }
.pros-cons-col.cons h3 { color: #9b2c2c; }

.pros-cons-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pros-cons-col ul li {
  font-size: 0.88rem;
  line-height: 1.5;
  padding-left: 1.2rem;
  position: relative;
  color: var(--ink);
}

.pros-cons-col.pros ul li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: #1a6b3c;
  font-weight: 700;
}

.pros-cons-col.cons ul li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: #9b2c2c;
  font-weight: 700;
}

/* ── License Cards ──────────────────────────────────── */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.license-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.license-card .license-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.license-card p {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Alternatives Cards ─────────────────────────────── */
.alt-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.alt-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.alt-card.recommended {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.alt-card .alt-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 0.1rem;
  min-width: 120px;
}

.alt-card.recommended .alt-label {
  color: var(--accent);
}

.alt-card .alt-body p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* ── Timeline / Step list ───────────────────────────── */
.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  counter-reset: step;
}

.step-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.step-list li p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.step-list li strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

/* ── Verdict Section ────────────────────────────────── */
.verdict-section {
  background: var(--card);
}

.verdict-section .container {
  padding-top: 0;
  padding-bottom: 0;
}

.verdict-banner {
  background: var(--blue);
  color: #fff;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
}

.verdict-banner .eyebrow { color: rgba(255,255,255,0.6); }

.verdict-banner h2 {
  color: #fff;
  max-width: 680px;
}

.verdict-body {
  padding: var(--gap) 0;
}

.risk-banner {
  background: #FFF5F0;
  border: 1px solid #F9C6B0;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.risk-banner .risk-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.risk-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
}

/* ── Citation Inline ────────────────────────────────── */
.cite {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  vertical-align: super;
  line-height: 1;
  transition: color 0.1s;
}

.cite:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Sources Section ────────────────────────────────── */
.sources-section {
  background: var(--paper);
}

.sources-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.sources-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.4rem 2rem;
  counter-reset: src;
}

.sources-list li {
  counter-increment: src;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--hairline);
}

.sources-list li::before {
  content: counter(src);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  min-width: 1.6rem;
  padding-top: 0.1rem;
}

.sources-list a {
  color: var(--muted);
  word-break: break-all;
}

.sources-list a:hover { color: var(--accent); }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ── Generic list styles ────────────────────────────── */
.prose ul, .prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}

.prose li {
  margin-bottom: 0.4rem;
  font-size: inherit;
}

/* ── Divider ─────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 2rem 0;
}

/* ── Probability bar ─────────────────────────────────── */
.prob-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.prob-label {
  font-size: 0.83rem;
  min-width: 200px;
  color: var(--ink);
}

.prob-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

.prob-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

.prob-pct {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 60px;
  text-align: right;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .stat-row { gap: 0.5rem; }
  .stat-chip { min-width: 120px; }
  .stat-chip .stat-number { font-size: 1.25rem; }

  .alt-card { flex-direction: column; gap: 0.5rem; }
  .alt-card .alt-label { min-width: unset; }

  .prob-label { min-width: 150px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  h1 { letter-spacing: -0.01em; }

  .stat-row { flex-direction: column; }
  .stat-chip { min-width: unset; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  .nav { display: none; }
  .section { break-inside: avoid; }
  body { font-size: 12pt; }
  a { color: inherit; text-decoration: underline; }
  .table-wrapper { overflow: visible; }
  table { min-width: unset; }
}
