/* Script Merger — site styles. Design reference: spec/01_design/FINAL_DESIGN.png */
@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/fonts/libre-caslon-text-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/fonts/libre-caslon-text-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #101c12;
  --green-deep: #14251a;
  --green-mid: #1d3a24;
  --green-btn: #1f4a29;
  --parchment: #ead5a6;
  --parchment-light: #f4e4c1;
  --gold: #c6a251;
  --gold-bright: #e7c46b;
  --gold-dark: #8a6a2a;
  --ink: #27251c;
  --ink-soft: #4a4433;
  --cream: #f5e8c9;
  --link: #5b3b0c;
  --link-hover: #8a1f11;
  --focus: #ffd56a;
  --serif-display: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --serif-text: Georgia, "Times New Roman", serif;
  --container: 1440px;
  --radius: 14px;
  --header-h: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background-color: #0a120b;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(58, 84, 46, .35), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(40, 60, 30, .3), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: 18px;
  line-height: 1.65;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--parchment-light); color: var(--ink); border: 2px solid var(--gold); border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* ---------- Page frame ---------- */
.page-frame {
  position: relative;
  max-width: var(--container);
  margin: 10px auto;
  background: var(--bg);
  border: 1px solid rgba(198, 162, 81, .75);
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px #0a120b, 0 0 0 4px rgba(198, 162, 81, .35), 0 18px 60px rgba(0, 0, 0, .55);
  overflow: clip;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background:
    linear-gradient(180deg, rgba(10, 22, 13, .97), rgba(16, 30, 19, .97)),
    var(--green-deep);
  border-bottom: 1px solid var(--gold);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 6px 18px rgba(0, 0, 0, .35);
}
.site-header::before, .site-header::after {
  content: ""; position: absolute; bottom: -7px; width: 64px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 14'%3E%3Cpath d='M2 7h40' stroke='%23c6a251' stroke-width='1.2'/%3E%3Cpath d='M42 7l6-5 6 5-6 5z' fill='none' stroke='%23e7c46b' stroke-width='1.4'/%3E%3Ccircle cx='48' cy='7' r='1.6' fill='%23e7c46b'/%3E%3Cpath d='M54 7h8' stroke='%23c6a251' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat;
}
.site-header::before { left: 10px; }
.site-header::after { right: 10px; transform: scaleX(-1); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: var(--header-h); padding: 0 32px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  color: var(--cream); text-decoration: none;
}
.brand:hover { color: #fff3d6; }
.brand .gear { width: 38px; height: 38px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.brand-name { font-family: var(--serif-display); font-weight: 700; font-size: 26px; letter-spacing: .005em; line-height: 1; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 34px; flex-wrap: wrap; }
.main-nav a, .footer-nav a, .footer-legal a {
  color: var(--cream); text-decoration: none; font-family: var(--serif-display);
  font-size: 16px; padding: 6px 2px; border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--gold-bright); border-bottom-color: rgba(231, 196, 107, .7); }

.search-form { position: relative; flex: 0 1 340px; }
.search-form input {
  width: 100%; height: 38px; padding: 0 16px 0 40px;
  background: rgba(8, 18, 10, .85); color: var(--cream);
  border: 1px solid rgba(198, 162, 81, .7); border-radius: 999px;
  font: 14px/1 var(--serif-text);
}
.search-form input::placeholder { color: rgba(245, 232, 201, .8); }
.search-form input:focus { outline: none; border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(255, 213, 106, .35); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--cream); pointer-events: none; }
.search-icon svg { width: 16px; height: 16px; display: block; }
.typeahead {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  list-style: none; margin: 0; padding: 6px;
  background: var(--parchment-light); border: 1px solid var(--gold); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45); max-height: 70vh; overflow: auto;
}
.typeahead li { border-radius: 6px; }
.typeahead a { display: block; padding: 8px 10px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.typeahead .ta-title { display: block; font-weight: 700; font-size: 15px; }
.typeahead .ta-sec { display: block; font-size: 12.5px; color: var(--ink-soft); }
.typeahead li[aria-selected="true"], .typeahead li:hover { background: #e5cf98; }
.typeahead .ta-all a { font-size: 14px; color: var(--link); }
.header-tools { display: none; gap: 6px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; color: var(--cream); border: 1px solid rgba(198, 162, 81, .55); border-radius: 10px; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-expanded="true"] { background: rgba(198, 162, 81, .18); }

/* ---------- Home hero ---------- */
.hero { position: relative; isolation: isolate; padding: 0 24px 26px; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 22, 12, .86) 0%, rgba(10, 22, 12, .62) 30%, rgba(10, 22, 12, .12) 52%, transparent 62%),
    linear-gradient(180deg, transparent 50%, rgba(10, 20, 12, .25) 70%, rgba(10, 20, 12, .55) 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
}
.hero-content { max-width: 700px; padding: 38px 0 36px 112px; color: var(--cream); }
.hero h1 {
  margin: 0 0 16px; font-family: var(--serif-display); font-weight: 700;
  font-size: clamp(34px, 4.2vw, 56px); line-height: 1.06; letter-spacing: .005em;
  color: #f8ecd0; text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}
.hero-lead { margin: 0 0 24px; font-size: 17px; line-height: 1.5; color: var(--cream); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px; border-radius: 6px;
  font: 700 17px/1.2 var(--serif-display); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-green {
  color: var(--cream); background: linear-gradient(180deg, #2a5e33, #1b4123);
  border: 1px solid var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 230, 160, .18), 0 3px 10px rgba(0, 0, 0, .45);
}
.btn-green:hover { color: #fff; background: linear-gradient(180deg, #326d3c, #20502b); }
.btn-parchment {
  color: var(--ink); background: linear-gradient(180deg, #f8ebcb, #e8d3a1);
  border: 1px solid var(--gold-dark); box-shadow: inset 0 0 0 2px rgba(255, 250, 230, .6), 0 3px 10px rgba(0, 0, 0, .4);
}
.btn-parchment:hover { color: #000; background: linear-gradient(180deg, #fff3d8, #efdcae); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

/* ---------- Panels ---------- */
.panels {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch;
}
.panel { position: relative; padding: 22px 22px 22px; border-radius: 4px; min-width: 0; }
.parchment-panel, .parchment {
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 50% 40%, rgba(255, 246, 220, .55), transparent 70%),
    url("/static/img/parchment.webp");
  background-size: auto, 512px 512px;
}
.parchment-panel {
  border: 2px solid #9c7a35;
  box-shadow:
    inset 0 0 0 3px rgba(244, 228, 193, .9),
    inset 0 0 0 4px rgba(138, 106, 42, .75),
    inset 0 0 38px rgba(120, 82, 30, .38),
    0 6px 18px rgba(0, 0, 0, .45);
}
.parchment-panel::before, .parchment-panel::after,
.facts-panel::before, .facts-panel::after {
  content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M2 24V9C2 5 5 2 9 2h15' fill='none' stroke='%23b8933f' stroke-width='2'/%3E%3Cpath d='M6 20V11c0-3 2-5 5-5h9' fill='none' stroke='%23b8933f' stroke-width='1'/%3E%3Ccircle cx='9' cy='9' r='2.2' fill='%23c6a251'/%3E%3C/svg%3E") no-repeat;
}
.parchment-panel::before, .facts-panel::before { top: 5px; left: 5px; }
.parchment-panel::after, .facts-panel::after { bottom: 5px; right: 5px; transform: rotate(180deg); }
.panel-title {
  display: flex; align-items: center; gap: 10px; margin: 2px 0 14px;
  font: 700 21px/1.15 var(--serif-display); letter-spacing: -.01em; color: var(--ink);
}
.panel-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; color: #1f1d16; }
.panel-icon svg { width: 30px; height: 30px; }
.parchment-panel .panel-icon .gear path, .parchment-panel .panel-icon .gear circle:nth-of-type(2) { fill: #23211a; }
.parchment-panel .panel-icon .gear circle:nth-of-type(1), .parchment-panel .panel-icon .gear circle:nth-of-type(3) { fill: var(--parchment); }
.panel-list { list-style: none; margin: 0; padding: 0 0 0 4px; }
.panel-list li {
  position: relative; padding-left: 20px; margin: 0 0 3px;
  font: 700 16.5px/1.45 var(--serif-display); color: var(--ink);
}
.panel-list li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 0; height: 0;
  border-left: 7px solid #2a261b; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.panel-list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.panel-list a:hover { color: var(--link-hover); border-bottom-color: currentColor; }

.facts-panel {
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(52, 86, 50, .55), transparent 70%),
    linear-gradient(180deg, #17301d, #10231a);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 3px rgba(16, 35, 26, .9), inset 0 0 0 4px rgba(231, 196, 107, .55), 0 6px 18px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column;
}
.facts-panel::before, .facts-panel::after { filter: brightness(1.25); }
.facts-panel .panel-title { color: var(--cream); }
.facts-panel .panel-icon { color: var(--gold-bright); }
.facts-list { list-style: none; margin: 0; padding: 0; }
.facts-list li { display: flex; gap: 10px; margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.facts-list .check { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--gold-bright); }
.facts-emblem { position: relative; margin-top: auto; padding-top: 10px; display: flex; justify-content: center; }
.facts-emblem::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 56%; height: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1l5 5-5 5-5-5z' fill='none' stroke='%23e7c46b' stroke-width='1.4'/%3E%3C/svg%3E") left center / 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1l5 5-5 5-5-5z' fill='none' stroke='%23e7c46b' stroke-width='1.4'/%3E%3C/svg%3E") right center / 12px no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / calc(100% - 28px) 1.5px no-repeat;
}
.facts-emblem img { position: relative; width: 118px; height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .7)); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background:
    radial-gradient(ellipse at 50% -40%, rgba(70, 100, 50, .35), transparent 70%),
    linear-gradient(180deg, #11231a, #0d1a12);
  border-top: 1px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .6);
  color: var(--cream);
}
.site-footer::before, .site-footer::after {
  content: ""; position: absolute; top: -7px; width: 64px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 14'%3E%3Cpath d='M2 7h40' stroke='%23c6a251' stroke-width='1.2'/%3E%3Cpath d='M42 7l6-5 6 5-6 5z' fill='none' stroke='%23e7c46b' stroke-width='1.4'/%3E%3Ccircle cx='48' cy='7' r='1.6' fill='%23e7c46b'/%3E%3Cpath d='M54 7h8' stroke='%23c6a251' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat;
}
.site-footer::before { left: 10px; }
.site-footer::after { right: 10px; transform: scaleX(-1); }
.footer-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 40px;
  padding: 34px 40px 30px; border-bottom: 3px solid rgba(198, 162, 81, .55);
}
.footer-nav { display: flex; justify-content: center; }
.footer-nav .nav-list { gap: 6px 44px; }
.footer-legal { align-self: end; }
.footer-legal .nav-list { gap: 6px 28px; }
.footer-nav a, .footer-legal a { font-size: 15px; }
.footer-nav a:hover, .footer-legal a:hover { color: var(--gold-bright); border-bottom-color: rgba(231, 196, 107, .7); }

/* ---------- Inner pages: banner ---------- */
.banner { position: relative; isolation: isolate; color: var(--cream); min-height: 230px; display: flex; align-items: flex-end; }
.banner picture { position: absolute; inset: 0; z-index: -2; }
.banner-img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 22, 12, .92) 0%, rgba(10, 22, 12, .75) 45%, rgba(10, 22, 12, .35) 100%),
              linear-gradient(0deg, rgba(10, 20, 12, .7), transparent 60%);
}
.banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 6%, var(--gold) 94%, transparent);
}
.banner-slim { min-height: 180px; }
.banner-content { width: 100%; padding: 26px 40px 28px; }
.banner h1 {
  margin: 6px 0 8px; font-family: var(--serif-display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 48px); line-height: 1.12; color: #f8ecd0; text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
  max-width: 980px;
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; color: rgba(245, 232, 201, .85); }
.breadcrumbs li + li::before { content: "\203A"; color: var(--gold-bright); padding: 0 4px; }
.breadcrumbs a { color: var(--cream); text-decoration-color: rgba(231, 196, 107, .6); }
.breadcrumbs a:hover { color: var(--gold-bright); }
.article-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; color: rgba(245, 232, 201, .92); }
.article-meta strong { color: var(--gold-bright); font-weight: 700; }

/* ---------- Article layout ---------- */
.article-main, .simple-main {
  background:
    linear-gradient(180deg, rgba(16, 28, 18, .0), rgba(16, 28, 18, .0)),
    radial-gradient(ellipse at 50% 0%, #1b3221, var(--bg) 70%);
}
.article-layout {
  display: grid; grid-template-columns: 230px minmax(0, 820px) 280px; justify-content: center;
  gap: 26px; padding: 30px 28px 48px; align-items: start;
}
.toc { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow: auto; }
.toc-box {
  background: rgba(20, 37, 26, .92); color: var(--cream);
  border: 1px solid rgba(198, 162, 81, .6); border-radius: 8px; padding: 14px 16px;
}
.toc-box summary { cursor: pointer; font: 700 17px/1.3 var(--serif-display); color: var(--gold-bright); list-style: none; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary::after { content: "\25BE"; float: right; color: var(--gold); }
.toc-box:not([open]) summary::after { content: "\25B8"; }
.toc-box ol { margin: 10px 0 0; padding: 0 0 0 18px; font-size: 15px; line-height: 1.4; }
.toc-box li { margin: 0 0 7px; }
.toc-box li::marker { color: var(--gold); }
.toc-box a { color: var(--cream); text-decoration: none; }
.toc-box a:hover, .toc-box a.active { color: var(--gold-bright); text-decoration: underline; }

.article, .simple-content {
  position: relative; padding: 38px 46px 34px; border-radius: 6px;
  border: 2px solid #9c7a35;
  box-shadow: inset 0 0 0 3px rgba(244, 228, 193, .9), inset 0 0 0 4px rgba(138, 106, 42, .6), inset 0 0 50px rgba(120, 82, 30, .28), 0 8px 26px rgba(0, 0, 0, .5);
  font-size: 18px; line-height: 1.72; color: var(--ink); min-width: 0;
}
.article h2, .simple-content h2 {
  margin: 1.9em 0 .6em; font: 700 28px/1.2 var(--serif-display); color: #1f1c14;
  padding-bottom: 8px; border-bottom: 1px solid rgba(138, 106, 42, .45);
}
.article h3, .simple-content h3 { margin: 1.5em 0 .4em; font: 700 21px/1.3 var(--serif-display); color: #2a2519; }
.article h4 { margin: 1.2em 0 .3em; font-size: 18px; }
.article p, .simple-content p { margin: 0 0 1em; }
.article ul, .article ol, .simple-content ul, .simple-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.article li, .simple-content li { margin: 0 0 .45em; }
.article li::marker { color: var(--gold-dark); }
.article-intro > p:first-child { font-size: 19px; }
.article strong { color: #1d1a12; }
.article code, .simple-content code {
  font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .86em;
  background: rgba(70, 50, 15, .1); border: 1px solid rgba(120, 90, 40, .25); border-radius: 4px; padding: .08em .35em;
  overflow-wrap: anywhere;
}
.code-block { position: relative; margin: 0 0 1.2em; }
.code-block pre {
  margin: 0; padding: 16px 18px; overflow: auto; border-radius: 6px;
  background: #18271c; color: #f1e6c8; border: 1px solid rgba(198, 162, 81, .5); font-size: 15px; line-height: 1.55;
}
.code-block pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 1em; overflow-wrap: normal; white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 4px 12px;
  font: 13px/1 var(--serif-text); color: var(--ink); background: var(--parchment-light);
  border: 1px solid var(--gold-dark); border-radius: 4px; cursor: pointer; opacity: .92;
}
.copy-btn:hover { opacity: 1; }
.table-wrap { margin: 0 0 1.3em; overflow-x: auto; border: 1px solid rgba(138, 106, 42, .55); border-radius: 6px; background: rgba(255, 249, 232, .45); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(138, 106, 42, .3); }
.table-wrap th { background: rgba(29, 58, 36, .92); color: var(--cream); font-family: var(--serif-display); font-weight: 700; font-size: 15px; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) td { background: rgba(138, 106, 42, .07); }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; line-height: 1.6; font-family: var(--serif-text); white-space: nowrap; border: 1px solid; }
.badge-verified { background: #dcebd0; color: #1d4a24; border-color: #7aa56b; }
.badge-community { background: #f6e3b3; color: #6a4a08; border-color: #c49a3a; }
.badge-unknown { background: #e9e2d2; color: #4d4637; border-color: #a49a85; }
.badge-unsupported { background: #f0d6cf; color: #7a2412; border-color: #c4796a; }

.quick-answer {
  margin: 1.4em 0 1.6em; padding: 18px 22px 8px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(29, 58, 36, .95), rgba(20, 40, 26, .95)); color: var(--cream);
  border: 1px solid var(--gold); box-shadow: inset 0 0 0 1px rgba(231, 196, 107, .25);
}
.quick-answer h2 { margin: 0 0 .5em; padding: 0; border: 0; font-size: 22px; color: var(--gold-bright); }
.quick-answer a { color: #ffe4a1; }
.quick-answer a:hover { color: #fff; }
.quick-answer strong { color: #fff3d6; }
.quick-answer code { background: rgba(0, 0, 0, .25); border-color: rgba(231, 196, 107, .35); color: #fff1cf; }
.callout { margin: 0 0 1.2em; padding: 14px 18px 2px; border-radius: 6px; border-left: 5px solid; background: rgba(255, 250, 235, .6); }
.callout-note, .callout-tip { border-color: #4f7d48; }
.callout-warning, .callout-important { border-color: #a5491f; background: rgba(250, 226, 208, .65); }
.faq h3 { font-size: 19px; }
.references ul { font-size: 15.5px; line-height: 1.55; }
.references li { overflow-wrap: anywhere; }
a.ext::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-left: .22em; vertical-align: .05em; opacity: .6;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 2H2v8h8V7M7 1h4v4M11 1 5.5 6.5' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 2H2v8h8V7M7 1h4v4M11 1 5.5 6.5' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.article-footer { margin-top: 2.4em; padding-top: 16px; border-top: 1px solid rgba(138, 106, 42, .45); font-size: 15px; color: var(--ink-soft); }
.article-footer p { margin: 0 0 .6em; }

.related { position: sticky; top: calc(var(--header-h) + 18px); }
.related-box {
  padding: 20px 20px 14px; border-radius: 6px; border: 2px solid #9c7a35;
  box-shadow: inset 0 0 0 3px rgba(244, 228, 193, .9), inset 0 0 0 4px rgba(138, 106, 42, .6), 0 6px 18px rgba(0, 0, 0, .45);
}
.related-title { margin: 0 0 12px; font: 700 21px/1.2 var(--serif-display); color: var(--ink); }
.related-box ul { list-style: none; margin: 0; padding: 0; }
.related-box li { padding: 9px 0; border-bottom: 1px solid rgba(138, 106, 42, .3); line-height: 1.35; }
.related-box li:last-child { border-bottom: 0; }
.related-box li a { display: block; font: 700 15.5px/1.35 var(--serif-display); color: var(--ink); text-decoration: none; }
.related-box li a:hover { color: var(--link-hover); text-decoration: underline; }
.related-box li span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.related-more { margin: 12px 0 0; font-size: 14px; }

/* ---------- Index, search, service pages ---------- */
.simple-layout { padding: 30px 28px 48px; }
.simple-content { max-width: 1180px; margin: 0 auto; }
.page-simple .simple-content { max-width: 860px; }
.lead { font-size: 19px; }
.small { font-size: 14px; color: var(--ink-soft); }
.jump-links ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.jump-links a, .chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--gold-dark); background: rgba(255, 249, 232, .7); color: var(--ink);
  text-decoration: none; font: 15px/1.2 var(--serif-display); cursor: pointer;
}
.jump-links a:hover, .chip:hover, .chip[aria-pressed="true"] { background: var(--green-mid); color: var(--cream); border-color: var(--gold); }
.filters fieldset { border: 1px solid rgba(138, 106, 42, .45); border-radius: 8px; padding: 12px 16px; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.filters label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.filters select { min-height: 40px; padding: 4px 10px; font: 15px var(--serif-text); color: var(--ink); background: var(--parchment-light); border: 1px solid var(--gold-dark); border-radius: 6px; }
.filter-count { margin: 0 0 0 auto; font-size: 14px; color: var(--ink-soft); }
.guide-group h2 .count { display: inline-block; min-width: 30px; padding: 0 8px; margin-left: 6px; border-radius: 999px; background: var(--green-mid); color: var(--cream); font-size: 15px; text-align: center; vertical-align: middle; line-height: 26px; }
.card-grid { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card {
  margin: 0; padding: 16px 18px 12px; border-radius: 6px; background: rgba(255, 249, 232, .62);
  border: 1px solid rgba(138, 106, 42, .5); display: flex; flex-direction: column;
}
.card:hover { border-color: var(--gold-dark); box-shadow: 0 4px 14px rgba(70, 50, 15, .18); }
.card[hidden] { display: none; }
.card-title { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font: 700 17.5px/1.3 var(--serif-display) !important; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--link-hover); text-decoration: underline; }
.card-excerpt { margin: 0 0 10px !important; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.card-meta { margin: auto 0 0 !important; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.card-section, .tag { padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(138, 106, 42, .5); }
.card-section { background: var(--green-mid); color: var(--cream); border-color: var(--green-mid); }
.section-index .card-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.search-page-form { display: flex; gap: 10px; margin: 0 0 16px; }
.search-page-form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; font: 17px var(--serif-text); color: var(--ink);
  background: #fffaf0; border: 1px solid var(--gold-dark); border-radius: 6px;
}
.search-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.search-status { font-size: 15px; color: var(--ink-soft); }
.search-results { list-style: none; padding: 0; margin: 0 0 24px; }
.search-results li { padding: 14px 0; border-bottom: 1px solid rgba(138, 106, 42, .3); }
.search-results a { font: 700 19px/1.3 var(--serif-display); color: var(--ink); }
.search-results .sr-sec { display: inline-block; margin: 4px 0; font-size: 13px; padding: 0 8px; border-radius: 999px; background: var(--green-mid); color: var(--cream); }
.search-results p { margin: 4px 0 0; font-size: 15.5px; color: var(--ink-soft); }
.search-results mark { background: rgba(231, 196, 107, .55); color: inherit; padding: 0 1px; }
.search-results li.kb-active a { text-decoration: underline; }
.popular { columns: 2 260px; padding-left: 1.2em; }
.popular-title { margin-top: 1.4em !important; }

/* ---------- Downloads ---------- */
.dl-list { list-style: none; margin: 0 0 1.4em !important; padding: 0 !important; display: grid; gap: 16px; }
.dl-card {
  margin: 0 !important; padding: 18px 20px 20px; border-radius: 8px;
  background: rgba(255, 249, 232, .7); border: 1px solid var(--gold-dark);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .55);
}
.dl-title { margin: 0 0 10px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dl-badge { padding: 1px 10px; border-radius: 999px; background: var(--green-mid); color: var(--cream); font: 13px/1.7 var(--serif-text); }
.dl-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 10px; font-size: 15.5px; line-height: 1.45; }
.dl-meta dt { font-weight: 700; color: var(--ink); }
.dl-meta dd { margin: 0; color: var(--ink-soft); min-width: 0; }
.dl-meta .sha { font-size: 12.5px; word-break: break-all; }
.dl-credit { margin: 0 0 14px !important; font-size: 14.5px; color: var(--ink-soft); font-style: italic; }
.dl-btn { min-width: 220px; }
.btn-disabled { color: #6b6250; background: #e3d7b9; border: 1px dashed var(--gold-dark); cursor: not-allowed; }
.ext-ref { color: inherit; }
@media (max-width: 600px) {
  .dl-meta { grid-template-columns: minmax(0, 1fr); }
  .dl-meta dd { margin-bottom: 6px; }
  .dl-btn { width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .hero-content { padding-left: 64px; }
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .related { position: static; grid-column: 2; }
  .related-box ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 20px; }
  .header-inner { gap: 18px; padding: 0 22px; }
  .nav-list { gap: 6px 22px; }
  .search-form { flex-basis: 260px; }
}
@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .page-frame { margin: 0; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .header-tools { display: flex; }
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 8px 14px; min-height: var(--header-h); }
  .brand .gear { width: 34px; height: 34px; }
  .brand-name { font-size: 23px; }
  .main-nav, .search-form { display: none; flex-basis: 100%; }
  .main-nav.open { display: block; order: 5; }
  .main-nav.open .nav-list { flex-direction: column; gap: 0; padding: 6px 0 10px; }
  .main-nav.open a { display: flex; align-items: center; min-height: 46px; padding: 8px 6px; font-size: 18px; border-bottom: 1px solid rgba(198, 162, 81, .2); }
  .search-form.open { display: block; order: 6; padding: 4px 0 10px; }
  .search-form.open input { height: 46px; font-size: 16px; }
  .search-form.open .search-icon { top: calc(50% - 3px); }
  .hero { padding: 0 18px 22px; }
  .hero-content { padding: 36px 0 30px 18px; }
  .hero::before {
    background: linear-gradient(90deg, rgba(10, 22, 12, .88) 0%, rgba(10, 22, 12, .6) 45%, rgba(10, 22, 12, .1) 75%),
                linear-gradient(180deg, transparent 40%, rgba(10, 20, 12, .5) 100%);
  }
  .article-layout { grid-template-columns: minmax(0, 1fr); padding: 18px 14px 36px; gap: 18px; }
  .toc { position: static; max-height: none; }
  .related { grid-column: auto; }
  .article, .simple-content { padding: 26px 22px 24px; }
  .simple-layout { padding: 18px 14px 36px; }
  .banner-content { padding: 22px 18px 22px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 28px 18px 24px; }
  .footer-nav .nav-list, .footer-legal .nav-list { justify-content: center; gap: 4px 22px; }
  .footer-nav a, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 767px) {
  .hero { display: flex; flex-direction: column; padding: 0 14px 18px; }
  .hero-art { inset: 0 0 auto 0; height: 330px; }
  .hero-art img { object-position: 52% 20%; }
  .hero::before {
    inset: 0 0 auto 0; height: 332px;
    background: linear-gradient(180deg, rgba(10, 22, 12, .05) 0%, rgba(10, 22, 12, .15) 38%, rgba(10, 22, 12, .78) 78%, var(--bg) 100%);
  }
  .hero-content { padding: 196px 4px 26px; max-width: none; }
  .hero h1 { font-size: clamp(32px, 9vw, 38px); }
  .hero-lead { font-size: 16.5px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .btn { width: 100%; }
}
@media (max-width: 600px) {
  .panels { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body { font-size: 17px; }
  .article, .simple-content { font-size: 17px; padding: 22px 16px 20px; }
  .article h2, .simple-content h2 { font-size: 24px; }
  .article h3 { font-size: 19px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .search-page-form { flex-direction: column; }
  .filters fieldset { flex-direction: column; align-items: stretch; }
  .filters label { justify-content: space-between; }
  .filter-count { margin: 0; }
  .banner { min-height: 200px; }
  .breadcrumbs ol { font-size: 14px; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 20px; }
  .brand .gear { width: 30px; height: 30px; }
  .panel { padding: 18px 16px; }
  .panel-title { font-size: 21px; }
  .panel-list li { font-size: 15.5px; }
}
@media (min-width: 1600px) {
  .page-frame { margin: 18px auto; }
}
/* ---------- Core8 structure variants ---------- */
.structure-walkthrough .article-section ol {
  list-style: none; counter-reset: step; padding-left: 0; margin: 0 0 1.2em;
}
.structure-walkthrough .article-section > ol > li {
  position: relative; counter-increment: step; margin: 0 0 14px; padding: 14px 16px 12px 58px;
  border: 1px solid rgba(138, 106, 42, .45); border-radius: 8px; background: rgba(255, 249, 232, .55);
}
.structure-walkthrough .article-section > ol > li::before {
  content: counter(step); position: absolute; left: 14px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-mid); color: var(--cream); font: 700 15px/1 var(--serif-display);
  border: 1px solid var(--gold);
}
.checklist {
  list-style: none; margin: 0 0 1.2em; padding: 0;
  border: 1px solid rgba(138, 106, 42, .5); border-radius: 8px; background: rgba(255, 250, 235, .7);
}
.checklist li {
  margin: 0; padding: 12px 16px 12px 44px; position: relative;
  border-bottom: 1px solid rgba(138, 106, 42, .28);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 16px; top: 15px; width: 16px; height: 16px;
  border: 2px solid var(--gold-dark); border-radius: 3px; background: #fffaf0;
}
.decision-tree { list-style: none; margin: 0 0 1.3em; padding: 0; display: grid; gap: 12px; }
.decision-tree > li {
  margin: 0; padding: 14px 16px 10px; border-radius: 8px;
  border-left: 5px solid var(--gold-dark); background: rgba(255, 249, 232, .62);
  box-shadow: inset 0 0 0 1px rgba(138, 106, 42, .25);
}
.decision-tree > li > strong:first-child {
  display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--green-mid); color: var(--cream); font-size: 13px;
}
.structure-matrix .table-wrap, .structure-symptoms .table-wrap {
  border-width: 2px; box-shadow: 0 4px 14px rgba(40, 30, 10, .12);
}
.structure-matrix .table-wrap th:first-child, .structure-symptoms .table-wrap th:first-child { min-width: 9em; }
.role-grid {
  list-style: none; margin: 0 0 1.4em; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.role-grid > li {
  margin: 0; padding: 16px 18px 12px; border-radius: 8px;
  border: 1px solid var(--gold-dark); background: rgba(255, 249, 232, .65);
}
.role-grid h3 { margin: 0 0 8px !important; padding: 0 !important; border: 0 !important; font-size: 20px !important; }
.route-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.route-cards > li {
  margin: 0; padding: 18px 18px 16px; border-radius: 8px;
  background: rgba(255, 249, 232, .7); border: 1px solid rgba(138, 106, 42, .55);
}
.route-cards h3 { margin: 0 0 8px; font: 700 20px/1.25 var(--serif-display); }
.route-cards p { margin: 0 0 12px; font-size: 15.5px; color: var(--ink-soft); }
.route-cards a.btn { width: 100%; }
.home-body { padding: 8px 28px 48px; max-width: 1180px; margin: 0 auto; }
.home-body .parchment { padding: 28px 30px 22px; margin-bottom: 18px; }
.home-body h2 { margin: 0 0 12px; font: 700 28px/1.2 var(--serif-display); color: var(--ink); }
.workflow-steps {
  list-style: none; margin: 0 0 1.3em; padding: 0; counter-reset: wf;
  display: grid; gap: 0;
}
.workflow-steps > li {
  position: relative; counter-increment: wf; margin: 0; padding: 16px 16px 16px 72px;
  border-left: 3px solid var(--gold-dark); background: rgba(255, 249, 232, .4);
}
.workflow-steps > li::before {
  content: counter(wf); position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #2a4a30, #1a3222); color: var(--gold-bright);
  font: 700 16px/1 var(--serif-display); border: 1px solid var(--gold);
}
.workflow-steps > li + li { border-top: 1px dashed rgba(138, 106, 42, .35); }
@media (max-width: 900px) {
  .role-grid, .route-cards { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .site-header, .site-footer, .toc, .related, .copy-btn, .banner picture { display: none !important; }
  .page-frame { border: 0; box-shadow: none; }
  .banner { color: #000; min-height: 0; }
  .banner h1 { color: #000; text-shadow: none; }
  .article { box-shadow: none; border: 0; background: none; }
}
