/* Dynasty Grounds public help. Floodlit visual language from the approved prototype and
   C003, local fonts only. Section labels inside the article are drawn from data-label so they never become
   part of the extractable .kb-text. */
:root {
  --night: #070d15; --ink: #0c1622; --navy: #101e2d; --navy-2: #13263a; --line: rgba(244,239,228,.14); --line-2: rgba(244,239,228,.26);
  --ivory: #f4efe4; --dim: #c9c2b3; --faint: #9aa1ad; --brass: #c9a15a; --amber: #f0c27a;
  --display: Georgia, "Times New Roman", serif; --label: "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --gut: clamp(16px, 4vw, 32px); --max: 760px;
}
* { box-sizing: border-box; }
html { background: var(--night); color: var(--ivory); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--body); min-height: 100vh;
  background: radial-gradient(80% 40% at 50% 0%, rgba(240,194,122,.10), transparent 70%), var(--night); }
a { color: var(--amber); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ivory); color: var(--ink); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.candidate { padding: 8px var(--gut); font: 700 12px/1.3 var(--label); letter-spacing: .14em; text-transform: uppercase; text-align: center;
  color: #f3e3f8; background: repeating-linear-gradient(135deg, #6c2a7c 0 14px, #5a2168 14px 28px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gut); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ivory); text-decoration: none; font: 700 14px/1 var(--label); letter-spacing: .22em; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 2px var(--brass); }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ivory); text-decoration: none; font-weight: 600; }
.lang:hover { border-color: var(--brass); }

main { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 6vw, 56px) var(--gut) 48px; }
main:focus { outline: none; }
.crumbs { font-size: 14px; color: var(--faint); margin: 0 0 14px; }
.crumbs a { color: var(--dim); }
h1 { margin: 0 0 18px; font: 400 clamp(32px, 6vw, 48px)/1.08 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; font: 400 24px/1.2 var(--display); }

/* the extractable article */
.kb-text { display: grid; gap: 18px; }
.kb-text p, .kb-text ol { margin: 0; }
.kb-summary { font-size: 20px; line-height: 1.5; color: var(--ivory); }
[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; font: 700 12px/1.2 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.kb-where { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16,30,45,.7); font-weight: 600; }
.kb-steps { padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.kb-steps::before { margin-bottom: 0; }
.kb-steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 54px; border-radius: 10px; background: rgba(16,30,45,.55); border: 1px solid var(--line); }
.kb-steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: linear-gradient(180deg, #f0c27a, #c9a15a); color: #1a1206; font: 700 15px/1 var(--label); }
.kb-success { padding: 12px 14px; border-left: 3px solid #7fd49e; background: rgba(46,138,85,.14); border-radius: 0 10px 10px 0; }
.kb-success::before { color: #9fe0b5; }
.kb-tip { padding: 12px 14px; border-left: 3px solid var(--brass); background: rgba(240,194,122,.08); border-radius: 0 10px 10px 0; color: var(--dim); }

.kb-shot { margin: 28px 0 0; }
.kb-shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-2); background: #0b1520; }
.kb-shot-narrow img { max-width: 420px; }
.kb-shot figcaption { margin-top: 10px; font-size: 15px; color: var(--dim); }
.kb-shot figcaption small { display: block; margin-top: 4px; font-size: 13px; color: var(--faint); }

.kb-game { margin: 28px 0 0; display: grid; gap: 8px; justify-items: start; }
.kb-game small { font-size: 13px; color: var(--faint); }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 8px; text-decoration: none;
  font: 700 15px/1.2 var(--label); letter-spacing: .1em; text-transform: uppercase; color: #1a1206; background: linear-gradient(180deg, #f0c27a, #c9a15a); }
.kb-related { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.kb-related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.kb-related a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ivory); }
.kb-related a:hover { border-color: var(--brass); }
.kb-back { margin: 28px 0 0; }
.kb-back a { display: inline-flex; align-items: center; min-height: 44px; }

/* index */
.index { max-width: 1040px; }
.eyebrow { margin: 0 0 10px; font: 700 12px/1 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--amber); }
.lead { margin: 0 0 22px; color: var(--dim); font-size: 18px; }
.first { display: grid; gap: 4px; max-width: 560px; padding: 16px 18px; margin: 0 0 26px; border-radius: 12px; text-decoration: none; color: var(--ivory);
  border: 1px solid rgba(201,161,90,.5); background: linear-gradient(180deg, var(--navy-2), var(--ink)); }
.first-label { font: 700 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.first-title { font: 400 22px/1.2 var(--display); }
.first-note { font-size: 14px; color: var(--faint); }
.finder { display: grid; gap: 10px; margin: 0 0 8px; }
.finder label { font-weight: 600; }
.finder-row { display: flex; gap: 8px; }
.finder input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #0b1520; color: var(--ivory); font: inherit; }
.ghost { min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--ivory); font: inherit; font-weight: 600; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(201,161,90,.4); background: transparent; color: var(--amber); font: inherit; font-size: 15px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--amber); color: #1a1206; border-color: var(--amber); font-weight: 700; }
.count { margin: 12px 0; color: var(--faint); font-size: 14px; }
.cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.card a { display: grid; gap: 6px; height: 100%; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(16,30,45,.6); text-decoration: none; color: var(--ivory); }
.card a:hover { border-color: rgba(201,161,90,.7); }
.card-topic { font: 700 11px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.card-title { font: 400 20px/1.25 var(--display); overflow-wrap: anywhere; }
.card-summary { color: var(--dim); font-size: 15px; }
.card-where { color: var(--faint); font-size: 13px; }
.empty { padding: 18px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--dim); }
.foot { max-width: 1040px; margin: 0 auto; padding: 24px var(--gut) 40px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .finder-row { flex-direction: column; }
  .ghost { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
