/* Persistent Work Areas site. Palette is taken from the mod's in-game pin panel. */
:root {
  --bg: #0d1716;
  --surface: #142523;
  --panel: #1a2e2b;
  --line: #2f4a41;
  --line-strong: #577560;
  --text: #f6efd6;
  --muted: #b9c9b9;
  --link: #f0c877;
  --gold: #ebb859;
  --gold-ink: #1a2e2b;
  --green: #a8e075;
  --green-text: #a8e075;
  --code-bg: #0a1211;
  --shadow: 0 12px 32px rgba(0, 0, 0, .38);
  --heading: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5efdb;
    --surface: #fffaf0;
    --panel: #fffdf6;
    --line: #ddd3b2;
    --line-strong: #b9ab7a;
    --text: #1d2b26;
    --muted: #465850;
    --link: #7a4f00;
    --green-text: #2c6a1c;
    --code-bg: #efe8cf;
    --shadow: 0 12px 30px rgba(60, 50, 20, .14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: .1em .38em; overflow-wrap: anywhere; }
kbd { background: var(--panel); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; margin: 0 0 1.2em; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--heading); font-weight: 700; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-header nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.site-header nav a:not(.btn) { display: inline-block; padding: 7px 11px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:not(.btn):hover { color: var(--text); background: var(--panel); }
.site-header nav a[aria-current="page"] { color: var(--text); background: var(--panel); box-shadow: inset 0 -2px 0 var(--gold); }

/* Buttons */
.btn { max-width: 100%; text-align: center; overflow-wrap: break-word; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 8px; border: 2px solid var(--gold); background: var(--gold); color: var(--gold-ink); font: 700 1rem var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.btn:hover { background: #f4c973; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--panel); border-color: var(--gold); }
.btn-small { min-height: 36px; padding: 5px 14px; font-size: .9rem; margin-left: 6px; }
.site-header .btn-small { color: var(--gold-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* Hero */
.hero { padding: 48px 0 40px; background: radial-gradient(900px 380px at 82% -10%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%); }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.02fr 1fr; gap: 44px; } .hero { padding: 68px 0 56px; } }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin-bottom: 14px; }
.eyebrow .ver { color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: none; margin-left: 6px; }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.chips li { border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 13px; font-size: .86rem; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* Sections */
section { padding: 52px 0; }
.section-head { max-width: 40em; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.band .card { background: var(--panel); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { color: var(--muted); margin: 0; }
.card .ico { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--link); font-weight: 800; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 68px; }
.steps > li::before { content: counter(step); position: absolute; left: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font: 800 1.05rem var(--body); }
.steps h3 { margin-bottom: .3em; font-size: 1.12rem; }
.steps p:last-child, .steps pre:last-child { margin-bottom: 0; }
.steps p { color: var(--muted); }
.steps .btn-row { margin-top: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 800px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.list { margin: 0; padding-left: 1.15em; color: var(--muted); }
.list li { margin-bottom: .55em; }
.list strong, .card strong { color: var(--text); }
.tick { list-style: none; padding: 0; margin: 0; }
.tick li { position: relative; padding-left: 26px; margin-bottom: .6em; color: var(--muted); }
.tick li::before { content: ""; position: absolute; left: 2px; top: .48em; width: 11px; height: 6px; border-left: 3px solid var(--green-text); border-bottom: 3px solid var(--green-text); transform: rotate(-45deg); }
.tick.no li::before { width: 12px; height: 12px; border: 0; transform: none; top: .42em; background: linear-gradient(45deg, transparent 43%, var(--muted) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--muted) 43% 57%, transparent 57%); }
.callout { border: 1px solid var(--line-strong); border-left: 5px solid var(--gold); background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 1.4em; }
.callout > :last-child { margin-bottom: 0; }
.callout strong.t { display: block; font-family: var(--heading); font-size: 1.05rem; margin-bottom: 4px; }
.callout.note { border-left-color: var(--green-text); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { width: 34%; color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--panel) 60%, transparent); }
td { color: var(--muted); }
@media (max-width: 600px) { th, td { display: block; width: 100%; } th { border-bottom: 0; padding-bottom: 2px; } }

/* Interior pages */
.page-head { padding: 44px 0 20px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 260px at 90% -20%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%); }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin: 0 0 12px; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.7em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 36px 60px; }
.layout > * { min-width: 0; }
@media (min-width: 960px) { .layout { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; } }
.toc { font-size: .93rem; }
@media (min-width: 960px) { .toc { position: sticky; top: 88px; align-self: start; } }
.toc strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); border-left-color: var(--gold); }
@media (max-width: 959px) { .toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; } }
.issue { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 8px; margin-bottom: 18px; }
.issue h2 { font-size: 1.28rem; margin-bottom: .6em; }
.issue dl { margin: 0; }
.issue dt { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin-top: .4em; }
.issue dd { margin: 2px 0 14px; color: var(--muted); }
.issue dd ul, .issue dd ol { margin: .3em 0 0; padding-left: 1.2em; }
.issue dd li { margin-bottom: .35em; }
.issue dd strong { color: var(--text); }

/* FAQ */
.faq-group { margin-bottom: 34px; }
.faq-group > h2 { font-size: 1.4rem; margin-bottom: .7em; }
details.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
details.q[open] { border-color: var(--line-strong); }
details.q summary { list-style: none; cursor: pointer; padding: 15px 50px 15px 18px; font-weight: 700; position: relative; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 3px solid var(--link); border-bottom: 3px solid var(--link); transform: rotate(45deg); transition: transform .15s ease; }
details.q[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.q .a { padding: 0 18px 4px; color: var(--muted); }
details.q .a > :last-child { margin-bottom: 14px; }
.q-tools { display: flex; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; }

/* CTA + footer */
.cta { text-align: center; }
.cta .btn-row { justify-content: center; }
.cta p { color: var(--muted); max-width: 32em; margin-inline: auto; }
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: .92rem; }
.foot { display: grid; gap: 20px; }
@media (min-width: 720px) { .foot { grid-template-columns: 1.4fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer p { margin: 0 0 .6em; }

/* ---------- Interactive demo ---------- */
.demo { --ui-bg: #1a2e2b; --ui-line: #577560; --ui-cream: #fff2c9; --ui-gold: #ebb859; --ui-green: #a8e075; --ui-hint: #c4d6c4; --ui-dark: #17301f; margin: 0; background: #0f1d1b; border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; color: var(--ui-cream); }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 14px; border-bottom: 1px solid #2b4339; min-height: 56px; }
.demo-top .t { font-size: .8rem; color: #b4c8b4; }
.ui-btn { font: 700 .85rem var(--body); background: #294f45; color: var(--ui-cream); border: 1px solid #85ab78; border-radius: 4px; padding: 7px 12px; cursor: pointer; }
.ui-btn:hover { background: #33614f; }
.ui-btn[hidden] { display: none; }
.demo svg.map { display: block; width: 100%; height: auto; background: #223a2c; touch-action: manipulation; }
.map .grid-line { stroke: #2b4735; stroke-width: 1; }
.map .road { fill: #8b7a55; }
.map .road-mark { stroke: #a8966b; stroke-width: 2; stroke-dasharray: 8 8; }
.map .area-fill { fill: #f5e6a3; fill-opacity: .24; shape-rendering: crispEdges; }
.map .area-edge { stroke: #f5e6a3; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.map .bld { cursor: pointer; }
.map .bld .body { stroke: #0c1712; stroke-width: 2; }
.map .bld:hover .body { stroke: #fff2c9; }
.map .bld:focus-visible { outline: none; }
.map .bld:focus-visible .body, .map .bld[aria-pressed="true"] .body { stroke: #ebb859; stroke-width: 3.5; }
.map .bld .label { font: 700 11px var(--body); fill: #fff2c9; paint-order: stroke; stroke: #0c1712; stroke-width: 3px; pointer-events: none; }
.map .pin-dot { fill: #a8e075; stroke: #17301f; stroke-width: 2; }
.demo-ui { padding: 14px; display: grid; gap: 12px; }
.ui-panel { background: var(--ui-bg); border: 1px solid var(--ui-line); border-left: 4px solid var(--ui-gold); border-radius: 5px; padding: 10px; }
.ui-panel.pinned { border-left-color: var(--ui-green); }
.ui-panel .h { font-size: 11px; font-weight: 800; color: var(--ui-gold); letter-spacing: .04em; margin-bottom: 7px; }
.ui-panel .who { font-size: .8rem; color: var(--ui-hint); margin-bottom: 8px; }
.ui-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; background: #26382f; color: var(--ui-cream); border: 2px solid var(--ui-gold); border-radius: 4px; cursor: pointer; font: inherit; text-align: left; }
.ui-toggle:hover, .ui-toggle:focus-visible { background: #40593f; border-color: var(--ui-cream); }
.ui-panel.pinned .ui-toggle { background: #304d38; border-color: var(--ui-green); }
.ui-toggle .box { flex: none; width: 24px; height: 24px; border: 2px solid var(--ui-gold); border-radius: 3px; background: #122320; display: grid; place-items: center; }
.ui-panel.pinned .ui-toggle .box { background: var(--ui-green); border-color: var(--ui-green); }
.ui-toggle .box i { display: none; width: 7px; height: 12px; border-right: 3px solid var(--ui-dark); border-bottom: 3px solid var(--ui-dark); transform: rotate(40deg) translate(-1px, -2px); }
.ui-panel.pinned .ui-toggle .box i { display: block; }
.ui-toggle .name { flex: 1; font-weight: 700; font-size: 14px; }
.ui-toggle .state { flex: none; min-width: 34px; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 5px; border-radius: 3px; background: #4a4a35; color: var(--ui-cream); }
.ui-panel.pinned .ui-toggle .state { background: var(--ui-green); color: var(--ui-dark); }
.ui-panel .hint { font-size: 12px; color: var(--ui-hint); margin: 7px 0 0; }
.ui-empty { font-size: .9rem; color: var(--ui-hint); margin: 0; padding: 4px 2px; }
.demo-foot { padding: 0 14px 12px; font-size: .78rem; color: #97ad9d; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* In-page UI reproduction used on the install page */
.ui-sample { max-width: 420px; }
.ui-btn:disabled { opacity: .45; cursor: default; }
.ui-btn:disabled:hover { background: #294f45; }

.file-name { margin: 10px 0 0; font-size: .9rem; }
