:root {
  color-scheme: light;
  --grass: #6f8957;
  --grass-light: #88a36b;
  --panel: #b7b8b2;
  --panel-light: #e4e5df;
  --bevel-light: #f0f0e9;
  --bevel-dark: #595b56;
  --ink: #171a16;
  --red: #b92320;
  --green: #355a3b;
  --gold: #f4d36d;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background: var(--grass);
  line-height: 1.65;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding: 0 clamp(.75rem, 3vw, 2rem) 2rem;
  background-color: var(--grass);
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(29, 57, 34, .10) 49%, rgba(29, 57, 34, .10) 51%, transparent 52%),
    linear-gradient(150deg, transparent 48%, rgba(239, 242, 207, .10) 49%, rgba(239, 242, 207, .10) 51%, transparent 52%);
  background-size: 54px 32px;
}

a { color: #174e34; text-underline-offset: .17em; }
a:hover { color: #092d1d; }
a:focus-visible, button:focus-visible { outline: 3px solid #c17a00; outline-offset: 3px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 20; padding: .5rem .75rem; background: #fff; }
.skip-link:focus { top: .5rem; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; text-shadow: 1px 2px #20301c; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 1.45rem; letter-spacing: .04em; }
.brand small { margin-top: .25rem; font-size: .66rem; font-weight: 800; letter-spacing: .2em; }
.brand-mark { position: relative; display: inline-block; width: 42px; height: 36px; transform: skewY(-28deg) scale(.8); }
.brand-mark i { position: absolute; width: 22px; height: 13px; background: #d7d1a2; border: 2px solid #29352a; }
.brand-mark i:nth-child(1) { left: 1px; top: 16px; }
.brand-mark i:nth-child(2) { left: 15px; top: 8px; background: #a7c27f; }
.brand-mark i:nth-child(3) { left: 28px; top: 1px; background: #d54738; }
.play-link, .game-button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  color: #171a16;
  background: #d0d1cb;
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px #fff;
  font-weight: 800;
  text-decoration: none;
}
.play-link:hover { color: #111; background: #e8e9df; }

.page-grid { display: grid; grid-template-columns: minmax(205px, 250px) minmax(0, 1fr); gap: 1.1rem; max-width: 1240px; margin: 0 auto; align-items: start; }
.window-frame {
  overflow: hidden;
  background: var(--panel);
  border: 3px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: 4px 5px 0 rgba(26, 35, 25, .48), inset 1px 1px #f7f7f2;
}
.guide-frame { position: sticky; top: 1rem; }
.window-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  padding: .2rem .55rem;
  color: #fff;
  background: var(--red);
  border-bottom: 2px solid var(--bevel-dark);
  box-shadow: inset 2px 2px rgba(255,255,255,.26), inset -2px -2px rgba(0,0,0,.2);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 1px 2px #1a1a1a;
}
.window-controls { color: #f1eee0; font-size: .75rem; letter-spacing: .25em; }
.guide-nav { display: grid; gap: 2px; padding: .45rem; }
.guide-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; color: #20231f; text-decoration: none; font-size: .92rem; font-weight: 700; }
.guide-nav a:hover { background: #d7d8d1; }
.guide-nav a[aria-current="page"] { color: #fff; background: #536f3f; box-shadow: inset 2px 2px rgba(0,0,0,.2), inset -2px -2px rgba(255,255,255,.25); }
.nav-icon { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; background: #e4e3d7; border: 2px solid; border-color: #f7f6ec #62645e #62645e #f7f6ec; font-size: 1.12rem; }
.guide-nav a[aria-current="page"] .nav-icon { color: #171a16; }
.nav-note { margin: .25rem .55rem .7rem; padding: .65rem; background: #d9dacf; border: 1px solid #797b74; font-size: .83rem; line-height: 1.5; }
.content-frame { min-width: 0; }
.page-titlebar { background: #536f3f; }
.page-content { padding: clamp(1rem, 3vw, 2.4rem); background: var(--panel-light); }
.page-intro { margin: 0 0 1.75rem; padding-bottom: 1.25rem; border-bottom: 2px solid #b9bcb0; }
.eyebrow { margin: 0 0 .45rem; color: #4b6540; font-size: .72rem; font-weight: 900; letter-spacing: .18em; }
.eyebrow span { color: #c79318; }
h1, h2, h3 { color: #1d2b20; line-height: 1.2; }
h1 { max-width: 20ch; margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.lead { max-width: 65ch; margin: .8rem 0 0; color: #41483c; font-size: 1.15rem; }
.page-content h2 { margin: 2rem 0 .65rem; padding-bottom: .35rem; border-bottom: 1px solid #b8bcb0; font-size: 1.42rem; }
.page-content h3 { margin: 1.4rem 0 .4rem; font-size: 1.08rem; }
.page-content p { max-width: 78ch; }
.page-content li { margin: .42rem 0; padding-left: .15rem; }
.page-content ol, .page-content ul { padding-left: 1.45rem; }
.page-content ol > li::marker { color: #355a3b; font-weight: 900; }
.page-content table { width: 100%; margin: 1.1rem 0 1.5rem; border-collapse: collapse; background: #fbfcf8; }
.page-content th, .page-content td { padding: .65rem .7rem; border: 1px solid #9fa397; text-align: left; vertical-align: top; }
.page-content th { color: #fff; background: #536f3f; }
.page-content tr:nth-child(even) td { background: #eef0e9; }
.page-content blockquote { max-width: 78ch; margin: 1.25rem 0; padding: .8rem 1rem; background: #f2e8bf; border-left: 5px solid #c49621; }
.page-content blockquote p { margin: .15rem 0; }
.page-content code { padding: .08rem .25rem; background: #d6d9ce; border: 1px solid #b4b8aa; font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.map-figure { margin: 1.2rem 0 1.8rem; padding: .55rem; background: #c3c6b8; border: 2px solid; border-color: #f4f4ed #686a62 #686a62 #f4f4ed; }
.map-figure img { display: block; width: 100%; height: auto; }
.map-figure figcaption { padding: .45rem .3rem .1rem; color: #3e4539; font-size: .85rem; }
.page-content a { font-weight: 700; }
.page-content a:hover { text-decoration-thickness: 2px; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; max-width: 1240px; margin: 1.1rem auto 0; padding: .65rem .8rem; color: #fff; background: rgba(32, 49, 28, .72); font-size: .82rem; }
.site-footer a { color: #fff3bb; }

@media (max-width: 780px) {
  .page-grid { grid-template-columns: 1fr; }
  .guide-frame { position: static; }
  .guide-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-note { display: none; }
}
@media (max-width: 520px) {
  body { padding-inline: .55rem; }
  .topbar { align-items: flex-start; }
  .play-link { padding: .45rem .55rem; font-size: .85rem; }
  .guide-nav { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .page-content table { display: block; overflow-x: auto; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
