:root {
  --bg: #fffdf7;
  --surface: #fff9ed;
  --text: #2f2416;
  --muted: #6f5c40;
  --mustard: #d8a822;
  --olive: #6b7d2a;
  --pumpkin: #c96a22;
  --gold-brown: #8f5a21;
  --ring: #f0c04a;
  --header-height: 72px;
  --radius: 16px;
  --shadow: 0 10px 24px rgba(109, 82, 24, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #fffdf7 0%, #fff8ea 60%, #fffdf7 100%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: #9a5f23;
  text-decoration-color: rgba(201, 106, 34, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: #c96a22;
  text-decoration-color: rgba(107, 125, 42, 0.9);
}

.container {
  width: min(1280px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  backdrop-filter: blur(8px);
  background: rgba(255, 249, 237, 0.92);
  border-bottom: 1px solid rgba(109, 82, 24, 0.16);
}

.nav-shell {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header nav a {
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  padding: 0.44rem 0.72rem;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  background: rgba(201, 106, 34, 0.12);
}

.site-header nav a[aria-current="page"] {
  background: rgba(216, 168, 34, 0.2);
  font-weight: 600;
}

.site-main {
  flex: 1;
  padding: 2rem 0 3rem;
}

.hero {
  padding: 2rem;
  border-radius: var(--radius);
  background: radial-gradient(circle at 0% 0%, #ffe9b0 0%, #fff5db 44%, #fff9ed 100%);
  border: 1px solid rgba(143, 90, 33, 0.2);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-height) + 1.2rem);
}

h1 {
  color: var(--pumpkin);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0.3rem 0 1rem;
}

h2 { color: var(--olive); }
h3 { color: var(--gold-brown); }

.hero__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  text-decoration: none;
  font-weight: 700;
  color: #1f170f;
}

.cta--mustard { background: #f2ce66; }
.cta--olive { background: #b7cb72; }
.cta--pumpkin { background: #e9a06a; }

.cta:hover,
.cta:focus-visible {
  filter: brightness(0.96);
}

.home-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.card,
.related-link {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(143, 90, 33, 0.2);
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(109, 82, 24, 0.08);
}

.card h2 { margin-top: 0; }

.related-link {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.related-link:hover,
.related-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(109, 82, 24, 0.16);
  border-color: rgba(201, 106, 34, 0.45);
}

.related-link__eyebrow {
  width: fit-content;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7d2a;
  background: rgba(183, 203, 114, 0.35);
  border: 1px solid rgba(107, 125, 42, 0.28);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
}

.related-link__title {
  color: #3b2e1d;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.35;
}

.related-link__meta {
  margin-top: auto;
  color: #a8641f;
  font-size: 0.9rem;
  font-weight: 600;
}

.breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.breadcrumbs .sep { margin: 0 0.35rem; }

.related {
  margin-top: 1.4rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(143, 90, 33, 0.16);
  background: linear-gradient(180deg, rgba(255, 245, 220, 0.68) 0%, rgba(255, 252, 245, 0.7) 100%);
}

.related > h2 {
  margin: 0;
  color: #8f5a21;
}

.content-page {
  background: rgba(255, 249, 237, 0.58);
  border: 1px solid rgba(143, 90, 33, 0.14);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.8rem);
}

.content-page > h1 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: clamp(2.2rem, 3.4vw, 3.2rem);
  font-weight: 800;
  color: #c96a22;
  background: linear-gradient(92deg, #d47a1d 0%, #c96a22 30%, #8f5a21 62%, #6b7d2a 100%);
  letter-spacing: 0.01em;
  line-height: 1.18;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55), 0 6px 14px rgba(143, 90, 33, 0.16);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .content-page > h1 {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.content-page h2,
.content-page h3,
.content-page h4 {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.content-page h2 {
  margin-top: 1.9rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.35rem, 1.9vw, 1.75rem);
  color: #6b7d2a;
  border-left: 4px solid rgba(107, 125, 42, 0.45);
  border-bottom: 1px solid rgba(107, 125, 42, 0.28);
  padding-bottom: 0.24rem;
  padding-left: 0.52rem;
  border-radius: 4px;
}

.content-page h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  color: #a8641f;
  border-left: 3px solid rgba(201, 106, 34, 0.5);
  padding-left: 0.5rem;
}

.content-page h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: #7f6d25;
}

.content-page p {
  margin: 0 0 1rem;
  max-width: none;
  width: 100%;
  color: #3b2e1d;
  font-size: 1.01rem;
  line-height: 1.78;
}

.content-page a {
  color: #9a5f23;
  font-weight: 600;
  background-image: linear-gradient(120deg, rgba(216, 168, 34, 0.26), rgba(107, 125, 42, 0.22));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: color 160ms ease, background-size 190ms ease, text-decoration-color 160ms ease;
}

.content-page a:hover,
.content-page a:focus-visible {
  color: #b4601f;
  background-size: 100% 100%;
  text-decoration-color: rgba(107, 125, 42, 0.95);
}

.content-page .faq-qa {
  padding: 0.72rem 0.86rem;
  border-left: 4px solid rgba(107, 125, 42, 0.55);
  background: rgba(255, 244, 214, 0.65);
  border-radius: 8px;
}

.content-page .faq-qa strong:first-child {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--olive);
  font-size: 1.02rem;
}

.content-page pre {
  position: relative;
  overflow: auto;
  border-radius: 12px;
  background: #fff7e6;
  color: #2f2416;
  border: 1px solid rgba(143, 90, 33, 0.28);
}

.content-page pre code {
  display: block;
  padding: 0.9rem;
  font-size: 0.9rem;
}

.content-page code[class*="language-"],
.content-page pre[class*="language-"] {
  color: #2f2416;
  text-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.content-page .token.comment,
.content-page .token.prolog,
.content-page .token.doctype,
.content-page .token.cdata {
  color: #7f7466;
}

.content-page .token.punctuation,
.content-page .token.operator {
  color: #6f5c40;
}

.content-page .token.keyword,
.content-page .token.atrule,
.content-page .token.important,
.content-page .token.selector {
  color: #6b7d2a;
  font-weight: 600;
}

.content-page .token.function,
.content-page .token.class-name,
.content-page .token.property,
.content-page .token.tag,
.content-page .token.attr-name {
  color: #8f5a21;
}

.content-page .token.string,
.content-page .token.char,
.content-page .token.attr-value,
.content-page .token.url,
.content-page .token.inserted {
  color: #b4601f;
}

.content-page .token.number,
.content-page .token.boolean,
.content-page .token.constant,
.content-page .token.symbol,
.content-page .token.deleted {
  color: #c96a22;
}

.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 0;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  color: #2f2416;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  outline: 2px solid var(--ring);
}

.table-scroll {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(143, 90, 33, 0.2);
  margin: 1rem 0;
  background: #fffdf8;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  border: 1px solid rgba(143, 90, 33, 0.2);
  padding: 0.66rem;
  text-align: left;
}

th { background: #f9e8bd; }

input[type="checkbox"] {
  accent-color: var(--olive);
  transform: translateY(1px);
}

:target {
  scroll-margin-top: calc(var(--header-height) + 1.2rem);
}

.site-footer {
  border-top: 1px solid rgba(109, 82, 24, 0.16);
  background: rgba(255, 249, 237, 0.95);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

@media (max-width: 860px) {
  .site-header nav { justify-content: flex-start; }
  .nav-shell { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1360px) {
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .container {
    width: min(1440px, 100% - 3rem);
  }
}

