/* ==========================================================================
   guide.css — The look of the player guide (theradbois.com).
   Same colors and fonts as the game (website/css/realm.css): near-black,
   bone text, old gold, blood red. Built for reading: a comfortable line
   length, a menu on the left, "On this page" on the right, and one column
   on a phone.
   ========================================================================== */

:root {
  --bg: #0E0B0A; --panel: #17110F; --panel-dark: #120E0C; --line: #2A1F19; --frame: #4A3628;
  --bone: #E8DFD0; --muted: #A89C8C; --faint: #8C8072;
  --gold: #C2A36B; --gold-bright: #E3C78F; --blood: #7A1515; --blood-edge: #A33A2A;
  --display: 'Cinzel', Georgia, serif; --body: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--bone); font-family: var(--body); font-size: 20px; line-height: 1.55; }
a { color: var(--gold-bright); text-decoration-color: rgba(227, 199, 143, .4); text-underline-offset: 3px; }
a:hover { color: #fff; }
::selection { background: var(--blood); color: #fff; }

/* ---- Top bar ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 24px;
  background: rgba(14, 11, 10, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(4px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 18px; white-space: nowrap; }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; background: var(--panel-dark); border: 1px solid var(--frame); color: var(--bone); font: inherit; font-size: 17px; padding: 6px 12px; }
.search input:focus { outline: none; border-color: var(--gold); }
.results { position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border: 1px solid var(--frame); max-height: 60vh; overflow-y: auto; }
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; text-decoration: none; color: var(--bone); font-size: 17px; border-bottom: 1px solid var(--line); }
.results a:hover, .results a.on { background: #24190F; }
.results .kind { color: var(--faint); font-size: 14px; white-space: nowrap; }
.results .none { padding: 8px 12px; color: var(--muted); font-size: 17px; }
.play { background: var(--blood); border: 1px solid var(--blood-edge); color: #fff; text-decoration: none; font-family: var(--display); letter-spacing: .12em; font-size: 14px; padding: 8px 16px; white-space: nowrap; }
.play:hover { background: #8E1D1D; color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--frame); color: var(--gold); font-size: 20px; padding: 2px 10px; cursor: pointer; }

/* ---- Three columns: menu, page, on-this-page ---- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 780px) 200px; gap: 40px; justify-content: center; padding: 0 24px; }
.side { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 28px 0; }
.nav-group { margin-bottom: 22px; }
.nav-title { font-family: var(--display); color: var(--gold); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px; }
.side a, .toc a { display: block; text-decoration: none; color: var(--muted); padding: 3px 0 3px 10px; border-left: 1px solid var(--line); font-size: 18px; }
.side a:hover, .toc a:hover { color: var(--bone); border-left-color: var(--frame); }
.side a.here { color: var(--gold-bright); border-left-color: var(--gold); }
.toc { position: sticky; top: 64px; align-self: start; padding: 32px 0; }
.toc a { font-size: 16px; }

/* ---- The page itself ---- */
.content { padding: 28px 0 60px; min-width: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.25; }
h1 { font-size: 34px; letter-spacing: .08em; color: var(--bone); margin: 8px 0 20px; }
h2 { font-size: 24px; color: var(--gold); letter-spacing: .06em; margin: 44px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 20px; color: var(--gold-bright); margin: 30px 0 8px; }
h4 { font-size: 17px; color: var(--bone); margin: 0 0 4px; }
p, ul, ol, dl { margin: 0 0 14px; }
li { margin-bottom: 4px; }
strong { color: #F3EADB; font-weight: 600; }
code { font-family: Consolas, 'Courier New', monospace; font-size: .8em; background: var(--panel-dark); border: 1px solid var(--line); padding: 1px 5px; color: var(--gold-bright); }
pre { background: var(--panel-dark); border: 1px solid var(--line); padding: 12px 16px; overflow-x: auto; }
pre code { border: 0; padding: 0; background: none; color: var(--bone); }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
blockquote { margin: 0 0 16px; padding: 4px 18px; border-left: 2px solid var(--gold); color: var(--muted); font-style: italic; }
.small { font-size: 16px; color: var(--muted); }
.lead { color: var(--bone); font-style: italic; }
.missing { color: #E0483A; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
th { text-align: left; font-family: var(--display); font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); background: var(--panel-dark); padding: 8px 12px; border-bottom: 1px solid var(--frame); white-space: nowrap; }
td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:target, .card:target, .beast:target, dt:target { background: #2A1D10; }

/* ---- Cards (races, professions, places, gods) ---- */
.card { background: var(--panel); border: 1px solid var(--line); padding: 16px 20px 6px; margin: 0 0 16px; }
.card h3, .card h4 { margin-top: 0; }
.tag { font-family: var(--body); font-size: 15px; color: var(--faint); letter-spacing: 0; margin-left: 6px; font-weight: 400; }
.chip { display: inline-block; font-size: 15px; padding: 1px 8px; margin: 0 4px 4px 0; border: 1px solid var(--frame); color: var(--muted); }
.chip.up { color: #A9CF8E; border-color: #3C4A2C; }
.chip.down { color: #D98C7E; border-color: #4D2A22; }
.facts-list { display: grid; grid-template-columns: 140px 1fr; gap: 4px 14px; font-size: 18px; }
.facts-list dt { color: var(--gold); }
.facts-list dd { margin: 0; }

/* ---- Commands ---- */
.commands dt { margin-top: 12px; }
.commands dd { margin: 2px 0 0 18px; color: var(--muted); }
.aka { font-size: 15px; color: var(--faint); margin-left: 6px; }

/* ---- Bestiary ---- */
.beasts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.beast { background: var(--panel); border: 1px solid var(--line); padding: 12px 16px; }
.beast p { font-size: 17px; margin-bottom: 6px; }

/* ---- Notes and the home page ---- */
.callout { border: 1px solid var(--frame); border-left: 3px solid var(--gold); background: var(--panel); padding: 12px 18px 2px; margin: 0 0 18px; }
.callout.warn { border-left-color: var(--blood-edge); }
.coming li { margin-bottom: 8px; }
.hero { text-align: center; padding: 30px 0 10px; }
.hero h1 { font-size: 46px; letter-spacing: .16em; margin-bottom: 6px; }
.hero .online { color: var(--gold); font-size: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 10px 0 24px; }
.tiles a { display: block; background: var(--panel); border: 1px solid var(--line); padding: 14px 18px; text-decoration: none; color: var(--muted); font-size: 17px; }
.tiles a strong { display: block; font-family: var(--display); font-weight: 500; color: var(--gold-bright); font-size: 17px; margin-bottom: 4px; }
.tiles a:hover { border-color: var(--frame); background: #1D1512; }

.foot { text-align: center; color: var(--faint); font-size: 16px; padding: 24px; border-top: 1px solid var(--line); }

/* ---- Narrower screens ---- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 210px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 820px) {
  body { font-size: 19px; }
  .top { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .brand span { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .menu-btn { display: block; }
  .layout { display: block; padding: 0 16px; }
  .side { display: none; position: static; max-height: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
  body.menu-open .side { display: block; }
  .facts-list { grid-template-columns: 1fr; }
  .facts-list dd { margin-bottom: 6px; }
  .hero h1 { font-size: 32px; }
  .beasts { grid-template-columns: 1fr; }
}
