:root {
  --indigo: #2b3a67;
  --indigo-deep: #1e2a4d;
  --mustard: #e8a33d;
  --mustard-deep: #c9862a;
  --paper: #faf7f0;
  --card: #ffffff;
  --ink: #26293a;
  --muted: #6b6f80;
  --stitch: #d8d2c4;
  --max-width: 52rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--indigo);
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }

a { color: var(--indigo); text-decoration-color: var(--mustard); text-decoration-thickness: 2px; }
a:hover { color: var(--mustard-deep); }

main, .shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Header */
.site-header {
  background: var(--indigo);
  border-bottom: 4px solid var(--mustard);
}
.site-header .shell {
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}
.logo svg { display: block; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-left: auto;
}
.site-nav a {
  color: #f0ead9;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--mustard);
}

/* Hero */
.hero {
  padding: 2.5rem 0 1rem;
}
.hero .tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
}

/* Patchwork card grid */
.patchwork {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0;
  list-style: none;
}
.patch {
  background: var(--card);
  border: 1px solid var(--stitch);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  position: relative;
}
.patch::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px dashed var(--stitch);
  border-radius: 5px;
  pointer-events: none;
}
.patch h2, .patch h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.patch p { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--muted); }
.patch a.more { font-weight: 600; font-size: 0.95rem; }

/* Checklists & verdicts */
.verdict {
  background: #fdf3e0;
  border-left: 4px solid var(--mustard);
  padding: 0.9rem 1.1rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
}
.verdict p { margin: 0.25rem 0; }

ul.checklist { padding-left: 1.1rem; }
ul.checklist li { margin: 0.3rem 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
  background: var(--card);
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--stitch);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
th { background: var(--indigo); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: #f4f0e6; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--mustard);
  color: var(--indigo-deep);
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
}
.btn:hover { background: var(--mustard-deep); color: #fff; }

/* Affiliate disclosure + related (JIT pages) */
.affiliate-disclosure {
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px dashed var(--stitch);
  padding-bottom: 0.6rem;
}
.related-articles {
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--stitch);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.related-articles h2 { margin-top: 0; font-size: 1.1rem; }
.related-articles ul { margin: 0; padding-left: 1.1rem; }

/* Footer */
.site-footer {
  border-top: 4px solid var(--mustard);
  background: var(--indigo);
  color: #d9d4c5;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.site-footer .shell {
  padding: 1.5rem 1rem;
}
.site-footer a { color: #fff; }

/* Hub → article deep links (browse-guides sections) */
.guide-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem 1.5rem;
  padding-left: 1.1rem;
  margin: 0.5rem 0 1.5rem;
}
.guide-links li { break-inside: avoid; }

/* /guides/ index page */
.guides-group { margin-bottom: 1.75rem; }
.guides-group h2 a { text-decoration: none; }
.guides-group ul { columns: 2; column-gap: 1.5rem; padding-left: 1.1rem; margin: 0.5rem 0; }
.guides-group li { break-inside: avoid; }

@media (max-width: 40rem) {
  h1 { font-size: 1.6rem; }
  .site-nav { margin-left: 0; }
  .guide-links { grid-template-columns: 1fr; }
  .guides-group ul { columns: 1; }
}
