/* Layout for the generated pages (items, hubs, guides). Static content: no JavaScript involved. */
:root {
  color-scheme: dark;
  --page-bg: #100d0d;
  --surface: #1a1c1d;
  --surface-2: #262223;
  --surface-3: #100e0d;
  --line: #5f5650;
  --text: #f4f1f0;
  --muted: #ccc3bf;
  --muted-2: #9a877e;
  --gold: #fac459;
  --gold-2: #ffce6d;
  --green: #28bd77;
  --red: #ea6944;
  --radius: 12px;
  --content-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 76% -8%, rgba(250, 196, 89, 0.1), transparent 34%),
    var(--page-bg);
  color: var(--text);
  font-family: "Onest", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--gold-2);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
}

a:focus-visible {
  outline: 3px solid var(--gold-2);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gold);
  color: #17110b;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header-inner {
  display: flex;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 10px 16px;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 140px;
  height: auto;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--gold-2);
}

.lang-switcher {
  display: flex;
  gap: 6px;
}

.lang-switcher a {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.lang-switcher a:hover,
.lang-switcher a[aria-current="true"] {
  border-color: var(--gold);
  background: var(--surface-2);
  color: var(--gold-2);
}

/* Content */
.page {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 24px 16px 56px;
  flex: 1 0 auto;
}

.page h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.page h2 {
  margin: 36px 0 12px;
  font-size: clamp(21px, 3.4vw, 27px);
  line-height: 1.2;
}

.page h3 {
  margin: 24px 0 8px;
  font-size: 18px;
}

.page p,
.page ul,
.page ol {
  margin-top: 0;
  margin-bottom: 14px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
}

.muted {
  color: var(--muted-2);
  font-size: 14px;
}

.breadcrumb {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 14px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 4px 8px;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 8px;
  color: var(--line);
  content: "/";
}

.item-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-heading img {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.chips li,
.chip {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card,
.recipe {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card > :first-child,
.recipe > :first-child {
  margin-top: 0;
}

.callout {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* Tables scroll sideways inside .table-wrap instead of breaking the page width. */
.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

caption {
  padding: 10px 12px;
  color: var(--muted);
  text-align: left;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

td img {
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

/* Icon and name side by side; a long name wraps beside the icon, not under it. */
.material {
  display: flex;
  align-items: center;
}

.material img {
  flex: 0 0 auto;
}

.button,
.cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--gold);
  color: #17110b;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.cta:hover {
  background: var(--gold-2);
  color: #17110b;
}

.button.secondary {
  background: transparent;
  color: var(--gold-2);
}

.button.secondary:hover {
  background: var(--surface-2);
  color: var(--gold-2);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* Call-to-action buttons side by side, wrapping on narrow screens. */
.page .cta-row {
  display: flex;
  flex-wrap: wrap;
  margin: 16px 0 0;
  gap: 10px;
}

.recipe-section {
  scroll-margin-top: 16px;
}

.faq details {
  margin: 0 0 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq details[open] summary {
  margin-bottom: 8px;
}

/* Alphabetical hubs: a multi-column list that stays readable on phones. */
.item-list {
  margin: 0 0 24px;
  padding: 0;
  columns: 3 220px;
  column-gap: 24px;
  list-style: none;
}

.item-list li {
  break-inside: avoid;
  padding: 3px 0;
}

/* A-Z jump links of the chronicle hubs. */
.page .alpha-nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 8px;
  gap: 6px;
}

.alpha-nav a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

.alpha-nav a:hover {
  border-color: var(--gold);
  background: var(--surface-2);
}

/* Footer */
.site-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 28px 16px 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--gold-2);
}

.footer-disclaimer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 8px 16px 28px;
  color: var(--muted-2);
  font-size: 13px;
}

@media (max-width: 720px) {
  .site-header-inner {
    gap: 4px 16px;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
  }

  .lang-switcher {
    margin-left: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .item-heading {
    align-items: flex-start;
  }

  th,
  td {
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
