:root {
  --bg: #faf2e1;
  --bg-tint: #f5e8c9;
  --paper: #ffffff;
  --ink: #25160c;
  --muted: #7a6450;
  --line: #ecdcbb;
  --line-strong: #d8c39a;
  --brand: #ee5a24;
  --brand-dark: #b8390f;
  --brand-soft: #fde2d4;
  --plum: #4a1722;
  --plum-2: #6b2433;
  --gold: #f5b342;
  --gold-soft: #fff1cf;
  --good: #2f7a3a;
  --warn: #b46b00;
  --shadow-sm: 0 1px 2px rgba(60, 20, 5, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(60, 20, 5, 0.18), 0 2px 6px -2px rgba(60, 20, 5, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 90% -100px, rgba(238, 90, 36, 0.10), transparent 60%),
    radial-gradient(900px 420px at -10% 200px, rgba(245, 179, 66, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
header.site a:focus-visible, footer.site a:focus-visible {
  outline-color: var(--gold);
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
header.site {
  background:
    linear-gradient(135deg, var(--plum) 0%, var(--plum-2) 60%, #7a2a3b 100%);
  color: #fff;
  border-bottom: 3px solid var(--brand);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 20px -8px rgba(0,0,0,0.35);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px; gap: 20px;
}
header.site a { color: #fff; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px; font-weight: 700; letter-spacing: -0.015em;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(140deg, var(--brand) 0%, #f7843f 60%, var(--gold) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  box-shadow: 0 4px 12px -4px rgba(238, 90, 36, 0.6), inset 0 1px 0 rgba(255,255,255,0.35);
  font-family: 'Inter', sans-serif;
}
.brand .brand-tag {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #f0d4a8; margin-top: 3px; font-family: 'Inter', sans-serif;
}
nav.primary { display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
nav.primary a {
  opacity: 0.88; padding: 7px 14px; border-radius: 999px;
  transition: background .15s ease, opacity .15s ease;
}
nav.primary a:hover { opacity: 1; background: rgba(255,255,255,0.12); text-decoration: none; }


/* --- Layout --- */
main { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.content {
  background: var(--paper);
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 700px) { .content { padding: 24px 22px; } }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
@media (max-width: 960px) { .sidebar { position: static; } }
.sidebar .box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar .box h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--plum);
  display: flex; align-items: center; gap: 8px;
}
.sidebar .box h3::before {
  content: ""; width: 14px; height: 2px; background: var(--brand); border-radius: 2px;
}
.sidebar .box ul { list-style: none; padding: 0; margin: 0; }
.sidebar .box li {
  padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line);
}
.sidebar .box li:last-child { border-bottom: none; }
.sidebar .box li a { color: var(--ink); display: block; transition: transform .15s ease, color .15s ease; }
.sidebar .box li a:hover { color: var(--brand-dark); text-decoration: none; transform: translateX(2px); }

/* --- Typography --- */
h1 { font-family: 'Fraunces', Georgia, serif; font-size: 40px; line-height: 1.1; margin: 0 0 14px; color: var(--plum); letter-spacing: -0.02em; font-weight: 700; }
h2 {
  font-family: 'Fraunces', Georgia, serif; font-size: 26px; line-height: 1.25;
  margin: 36px 0 14px; color: var(--plum); letter-spacing: -0.01em; font-weight: 700;
  position: relative; padding-left: 14px;
}
h2::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--gold) 100%);
}
h3 { font-family: 'Fraunces', Georgia, serif; font-size: 19px; margin: 22px 0 8px; color: var(--plum); font-weight: 600; }
p { margin: 0 0 14px; }
.content > p:first-of-type:not(.lede) { font-size: 16px; }
.lede { font-size: 18px; line-height: 1.55; color: #5d4937; margin-bottom: 22px; font-weight: 400; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: 12px; color: var(--muted);
  margin-bottom: 18px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-dark); }
.breadcrumbs span { margin: 0 8px; opacity: 0.5; }

/* --- Hero --- */
.hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin: -8px 0 28px;
  background: linear-gradient(135deg, #2a0e16 0%, #4a1722 50%, #7a2a3b 100%);
  box-shadow: 0 18px 40px -20px rgba(74, 23, 34, 0.55);
  isolation: isolate;
}
.hero img {
  display: block; width: 100%; height: 280px; object-fit: cover; opacity: 0.55;
  mix-blend-mode: luminosity;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 220px at 80% 30%, rgba(238, 90, 36, 0.45), transparent 60%),
    radial-gradient(500px 200px at 10% 80%, rgba(245, 179, 66, 0.30), transparent 60%);
  pointer-events: none;
}
.hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 36px 30px;
  background: linear-gradient(0deg, rgba(20,5,10,0.92) 0%, rgba(20,5,10,0.55) 60%, rgba(20,5,10,0) 100%);
  color: #fff; z-index: 2;
}
.hero-cap .eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 179, 66, 0.15);
  border: 1px solid rgba(245, 179, 66, 0.35);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 12px;
}
.hero-cap h1 {
  color: #fff; margin: 0; font-size: 44px; font-weight: 900; letter-spacing: -0.025em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-cap p {
  margin: 10px 0 0; max-width: 640px; opacity: 0.92; font-size: 16px; line-height: 1.5;
}

/* --- Chain / Category cards --- */
.chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}
.chain-card {
  display: block; padding: 16px 18px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink);
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.chain-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--gold) 100%);
  opacity: 0.85;
}
.chain-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.chain-card .name { font-weight: 700; color: var(--plum); font-size: 15px; letter-spacing: -0.01em; }
.chain-card .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* --- Tables --- */
table.menu {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 14px 0 28px;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
table.menu th, table.menu td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
table.menu th {
  background: var(--bg-tint); color: var(--plum);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
table.menu td.right, table.menu th.right { text-align: right; font-variant-numeric: tabular-nums; }
table.menu tbody tr { transition: background .12s ease; }
table.menu tbody tr:nth-child(even) td { background: #fdfaf2; }
table.menu tbody tr:hover td { background: var(--brand-soft); }
table.menu tbody tr:last-child td { border-bottom: none; }
table.menu td a { font-weight: 600; }

.cat-tag {
  display: inline-block; padding: 3px 9px;
  background: var(--brand-soft); border: 1px solid #f5c4ad;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--brand-dark); letter-spacing: 0.02em;
}

/* --- Facts --- */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin: 22px 0 28px;
}
.fact {
  background: linear-gradient(180deg, #fffaee 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px; text-align: center;
}
.fact .v {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px; font-weight: 700; color: var(--plum);
  letter-spacing: -0.02em; line-height: 1.1;
}
.fact .l {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; color: var(--muted);
  letter-spacing: 0.1em; margin-top: 4px;
}

/* --- Tags --- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; }
.tag-row .tag {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; color: var(--muted); font-weight: 500;
}

/* --- Lists in body --- */
.content ul:not(.bare) { padding-left: 20px; }
.content ul:not(.bare) li { margin-bottom: 6px; }

/* --- Footer --- */
footer.site {
  background:
    linear-gradient(180deg, var(--plum) 0%, #2c0e16 100%);
  color: #e8d6bc;
  padding: 40px 0 32px;
  margin-top: 56px;
  font-size: 14px;
  border-top: 3px solid var(--brand);
}
footer.site a { color: #ffd6a6; }
footer.site a:hover { color: #fff; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { footer.site .cols { grid-template-columns: 1fr 1fr; gap: 24px; } }
footer.site h4 {
  margin: 0 0 12px; color: #fff;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { padding: 4px 0; }
footer.site p { margin: 0; line-height: 1.6; opacity: 0.85; }
footer.site .copy {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #c9b599; font-size: 12px;
}

/* --- Notice / callouts --- */
.notice {
  background: linear-gradient(180deg, var(--gold-soft) 0%, #fff7df 100%);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 18px 0;
  font-size: 14px;
  color: #6f521a;
  box-shadow: var(--shadow-sm);
}
ul.bare { list-style: none; padding: 0; margin: 0; }
ul.bare li { padding: 4px 0; }
.muted { color: var(--muted); font-size: 14px; }

.content h1 { font-size: 34px; }
.content table.menu { margin-bottom: 22px; }
table.menu td.current { background: var(--brand-soft); }
.content code { background: var(--bg-tint); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.content .chain-grid { margin-top: 14px; }
