@import url('/tokens.css');

/* The public site (home, field guide, matches, agents, leaderboard, profiles): the watch page's ink-on-paper system, laid
   out as pages. Vermilion is the seal red of the brush seals and the main buttons; gold marks what wins. */
:root { --seal: #a8382a; --seal-ink: #fff8ef; --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(40, 30, 10, 0.08); }
@media (prefers-color-scheme: dark) { :root { --seal: #c8553f; --seal-ink: #fff4ea; --shadow: 0 8px 24px rgba(0, 0, 0, 0.35); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--f-ui); }
a { color: var(--seal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img.av { width: 40px; height: 40px; border-radius: 50%; vertical-align: middle; margin-right: 10px; }
form { display: inline; }
code { font: 13.5px/1.45 ui-monospace, Menlo, monospace; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--sheet) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.top .in { max-width: 1160px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; margin-right: auto; }
.brand:hover { color: var(--ink); }
.top a.nav { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.top a.nav:hover, .top a.nav.on { color: var(--ink); }

/* seals: one brush character on a vermilion square, like a chop on a scroll */
.seal { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 6px; background: var(--seal); color: var(--seal-ink); font: 24px/1 var(--f-brush); flex: none; }
.seal.lg { width: 64px; height: 64px; font-size: 46px; border-radius: 10px; }
.seal.ink { background: var(--ink); color: var(--sheet); }
.seal.gold { background: var(--gold); color: var(--on-k); }

/* layout */
main { max-width: 1160px; margin: 0 auto; padding: 32px 24px 80px; }
main.narrow { max-width: 900px; }
h1 { font-size: 34px; line-height: 1.15; margin: 0.2em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.muted { color: var(--ink-2); }
.fine { font-size: 14px; color: var(--ink-2); }
.kicker { font: 600 12px/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--seal); margin: 0 0 12px; }
section.band { margin: 72px 0; }
section.band > header { max-width: 760px; margin-bottom: 26px; }
section.band > header p { color: var(--ink-2); margin: 0; font-size: 17px; }

/* surfaces */
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; margin: 12px 0; }
.card.flat { box-shadow: none; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card { margin: 0; }

/* buttons */
button, .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--seal); color: var(--seal-ink); border: 1px solid var(--seal); border-radius: 8px; padding: 9px 16px; font: 600 15px/1.2 var(--f-ui); cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { filter: brightness(1.08); color: var(--seal-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.big { padding: 13px 22px; font-size: 16px; }

/* copy boxes */
.prompt { display: flex; gap: 10px; align-items: center; background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.prompt code { flex: 1; overflow-wrap: anywhere; }
.prompt button { padding: 6px 12px; font-size: 13px; }

/* tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
th { color: var(--ink-2); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* icons from icons.js (filled in by the page script) */
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }

footer.site { border-top: 1px solid var(--rule); margin-top: 60px; }
footer.site .in { max-width: 1160px; margin: 0 auto; padding: 22px 24px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
footer.site a { color: var(--ink-2); }

@media (max-width: 860px) {
  .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 30px; }
  main { padding: 22px 18px 60px; }
}
@media (max-width: 560px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: minmax(0, 1fr); }
  .top .in { gap: 14px; padding: 10px 16px; }
}

/* the hero map: the watch page's renderer (hexmap.js) in a framed panel */
.mapwrap { position: relative; overflow: hidden; background: var(--paper); }
canvas.hexmap { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; }
canvas.hexmap:active { cursor: grabbing; }
.mapctl { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.mapctl button { width: 32px; height: 28px; padding: 0; justify-content: center; background: var(--sheet); border: 1px solid var(--rule); color: var(--ink); font-weight: 600; font-size: 14px; border-radius: 6px; }
.mapctl button[data-a=coords] { display: none; }
#tip { position: fixed; pointer-events: none; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); padding: 6px 9px; border-radius: 6px; font-size: 12.5px; display: none; max-width: 280px; z-index: 50; }
