/*
Theme Name: Scoresheet
Theme URI: https://www.worldmindgames.net/
Author: World Mind Games
Author URI: https://www.worldmindgames.net/
Description: Tournament-interface theme for worldmindgames.net — wallchart tables, hairline rules, tabular numerals.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scoresheet
Tags: custom-menu, featured-images, custom-post-types
*/

/* ---------- fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Martian Mono';
  src: url('assets/fonts/martian-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --led: #ff3b30;
  --matte: #1a1a1a;
  --sheet: #f4f4f2;
  --rule: #d1d1cf;
  --rule-dark: rgba(255, 255, 255, 0.1);
  --ink-soft: #6e6e6a;
  --ink-faint: #9a9a96;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Martian Mono', 'Courier New', monospace;
  --gutter: clamp(1rem, 3vw, 2rem);
  --measure: 70ch;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--sheet);
  color: var(--matte);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
table { border-collapse: collapse; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--matte); color: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- layout ---------- */
.rail { max-width: 1380px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.deck { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.deck--dark { background: var(--matte); color: #fff; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; text-transform: uppercase; margin: 0 0 .75em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.035em; line-height: 0.95; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }
.numeric, .meta-row, .ticker { font-family: var(--mono); }
.kicker {
  font-family: var(--mono); font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em; color: var(--led);
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
}
.kicker::before { content: ""; width: .55rem; height: .55rem; background: var(--led); flex: none; }
.deck--dark .kicker { color: var(--led); }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: var(--measure); }
.deck--dark .lede { color: rgba(255,255,255,.55); }

/* ---------- header ---------- */
.masthead {
  background: var(--matte); color: #fff;
  border-bottom: 1px solid var(--rule-dark);
  position: sticky; top: 0; z-index: 50;
}
.masthead__bar { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; gap: 1.5rem; }
.brandmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.brandmark svg { width: 1.9rem; height: 1.9rem; flex: none; }
.compass-nav { display: none; }
.compass-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.compass-nav a {
  font-family: var(--mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.6); text-decoration: none;
}
.compass-nav a:hover, .compass-nav .current-menu-item a, .compass-nav .current_page_item a { color: #fff; }
.masthead__clock { font-family: var(--mono); font-size: .62rem; color: rgba(255,255,255,.4); display: none; }
.masthead__clock strong { color: var(--led); font-weight: 700; }
.nav-latch { background: none; border: 1px solid var(--rule-dark); color: #fff; font-family: var(--mono); font-size: .62rem; text-transform: uppercase; padding: .5rem .8rem; cursor: pointer; }
@media (min-width: 64em) {
  .compass-nav { display: block; }
  .masthead__clock { display: block; }
  .nav-latch { display: none; }
}
.nav-drawer { display: none; border-top: 1px solid var(--rule-dark); }
.nav-drawer.is-open { display: block; }
.nav-drawer ul { list-style: none; margin: 0; padding: .5rem 0; }
.nav-drawer a { display: block; padding: .7rem var(--gutter); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; color: rgba(255,255,255,.7); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.05); }
.nav-drawer a:hover { color: #fff; }

/* ---------- LED pulse ---------- */
.led { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--led); animation: led-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes led-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- hero ---------- */
.openboard { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--rule-dark); }
.openboard__main { border-left: 1px solid var(--rule-dark); padding: clamp(1.5rem, 4vw, 2.5rem); }
.openboard__side { border-left: 1px solid var(--rule-dark); border-right: 1px solid var(--rule-dark); padding: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 64em) {
  .openboard { grid-template-columns: 2fr 1fr; }
}
.btn-row { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-dark); font-family: var(--mono); }
.btn {
  display: inline-block; padding: 1.05rem 1.8rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; text-decoration: none; transition: background .15s, color .15s;
}
.btn--led { background: var(--led); color: #fff; }
.btn--led:hover { background: #fff; color: var(--matte); }
.btn--ghost { background: transparent; color: #fff; border-left: 1px solid var(--rule-dark); }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--ink { background: var(--matte); color: #fff; border: 0; }
.btn--ink:hover { background: var(--led); }

/* score panel (dark stat block) */
.scorepanel { background: var(--matte); color: #fff; border: 1px solid #333; padding: 1.5rem; font-family: var(--mono); }
.scorepanel__head { display: flex; justify-content: space-between; font-size: .6rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.scorepanel__value { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.scorepanel__foot { display: flex; justify-content: space-between; font-size: .6rem; padding-top: 1rem; margin-top: 1.2rem; border-top: 1px solid var(--rule-dark); color: rgba(255,255,255,.6); }

/* ---------- wallchart table ---------- */
.wallchart-wrap { overflow-x: auto; }
.wallchart { width: 100%; font-family: var(--mono); font-size: .74rem; text-align: left; }
.wallchart th {
  background: #e9e9e6; text-transform: uppercase; font-size: .62rem; letter-spacing: .08em;
  border-top: 1px solid var(--matte);
}
.wallchart th, .wallchart td { padding: .85rem 1rem; border: 1px solid var(--rule); vertical-align: middle; }
.wallchart td a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: rgba(255, 59, 48, .35); text-underline-offset: 3px; }
.wallchart td a:hover { color: var(--matte); }
.wallchart .is-strong { font-weight: 700; color: var(--matte); }
.deck--dark .wallchart th { background: rgba(255,255,255,.06); border-color: var(--rule-dark); color: #fff; }
.deck--dark .wallchart td { border-color: var(--rule-dark); color: rgba(255,255,255,.75); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid currentColor; }
.section-head h2 { margin: 0; }
.section-head .meta-row { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }

/* ---------- terminal strip (game launch tiles) ---------- */
.terminal-strip { display: grid; grid-template-columns: 1fr; border-left: 1px solid var(--rule-dark); font-family: var(--mono); }
@media (min-width: 40em) { .terminal-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .terminal-strip { grid-template-columns: repeat(4, 1fr); } }
.terminal-cell {
  border: 1px solid var(--rule-dark); border-left: 0;
  padding: 1.4rem; text-decoration: none; color: #fff; display: block; transition: background .15s;
}
.terminal-cell:hover { background: rgba(255,255,255,.05); }
.terminal-cell__id { font-size: .6rem; color: rgba(255,255,255,.4); margin-bottom: 2rem; }
.terminal-cell__name { font-size: .86rem; font-weight: 700; text-transform: uppercase; margin-bottom: .6rem; }
.terminal-cell__sub { font-size: .68rem; color: rgba(255,255,255,.4); margin-bottom: 1.6rem; }
.terminal-cell__go { font-size: .6rem; color: var(--led); text-transform: uppercase; letter-spacing: .08em; }
.terminal-cell__go::after { content: " \2192"; }
/* light variant */
.terminal-strip--light { border-left-color: var(--matte); }
.terminal-strip--light .terminal-cell { border-color: var(--matte); color: var(--matte); }
.terminal-strip--light .terminal-cell:hover { background: rgba(26,26,26,.04); }
.terminal-strip--light .terminal-cell__id, .terminal-strip--light .terminal-cell__sub { color: var(--ink-faint); }

/* ---------- index ledger (article list) ---------- */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { border-top: 1px solid var(--matte); }
.ledger li:last-child { border-bottom: 1px solid var(--matte); }
.ledger a { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 0; text-decoration: none; }
@media (min-width: 48em) { .ledger a { flex-direction: row; align-items: center; gap: 1.5rem; } }
.ledger__index { font-family: var(--mono); font-size: .6rem; font-weight: 700; color: var(--ink-faint); flex: none; width: 4.5rem; }
.ledger__body { flex: 1; }
.ledger__title { font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: .3rem; transition: color .15s; }
.ledger a:hover .ledger__title { color: var(--led); }
.ledger__sub { font-size: .8rem; color: var(--ink-soft); }
.ledger__tag { font-family: var(--mono); font-size: .6rem; font-weight: 700; text-transform: uppercase; padding: .55rem .9rem; border: 1px solid var(--rule); flex: none; }
.deck--dark .ledger li { border-color: var(--rule-dark); }
.deck--dark .ledger__sub { color: rgba(255,255,255,.5); }
.deck--dark .ledger__tag { border-color: var(--rule-dark); }

/* ---------- framed panel ---------- */
.frame { border: 1px solid var(--matte); padding: clamp(1.4rem, 3vw, 2rem); }
.deck--dark .frame { border-color: var(--rule-dark); }
.statline { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .7rem; border-bottom: 1px solid var(--rule); padding-bottom: .55rem; margin-bottom: .55rem; }
.statline span:first-child { color: var(--ink-faint); }
.statline strong { font-weight: 700; }

/* ---------- content prose ---------- */
.prose { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.deck > .rail > figure { margin-left: auto; margin-right: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; padding-bottom: .4em; border-bottom: 1px solid var(--matte); }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose table { width: 100%; font-family: var(--mono); font-size: .78rem; }
.prose table th { background: #e9e9e6; text-transform: uppercase; font-size: .64rem; letter-spacing: .06em; text-align: left; }
.prose table th, .prose table td { padding: .7rem .9rem; border: 1px solid var(--rule); }
.prose blockquote { margin: 1.5em 0; padding: 1rem 1.4rem; border: 1px solid var(--matte); font-style: italic; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-top: .6rem; }
.prose a { text-decoration-color: rgba(255,59,48,.45); text-underline-offset: 3px; }
.prose a:hover { color: var(--led); }

/* refnote — site-specific aside treatment (full hairline frame + mono ref number) */
.refnote { border: 1px solid var(--matte); margin: 1.8em 0; }
.refnote__label { display: inline-block; font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--matte); color: #fff; padding: .35rem .8rem; }
.refnote__body { padding: .9rem 1.4rem 1.1rem; font-size: .92rem; }
.refnote__body > * { margin: 0; }
.refnote__body > * + * { margin-top: .6em; }

/* scoreboard FAQ — numbered rows, expandable */
.faq-board { border-top: 1px solid var(--matte); margin: 2em 0; }
.faq-board details { border-bottom: 1px solid var(--matte); }
.faq-board summary {
  display: flex; align-items: baseline; gap: 1.2rem; cursor: pointer; list-style: none;
  padding: 1.05rem 0; font-weight: 700; text-transform: uppercase; font-size: .92rem; letter-spacing: -0.01em;
}
.faq-board summary::-webkit-details-marker { display: none; }
.faq-board summary::before { content: attr(data-ref); font-family: var(--mono); font-size: .6rem; font-weight: 700; color: var(--ink-faint); flex: none; width: 2.6rem; }
.faq-board summary::after { content: "+"; font-family: var(--mono); margin-left: auto; color: var(--led); font-size: 1rem; }
.faq-board details[open] summary::after { content: "\2212"; }
.faq-board .faq-board__a { padding: 0 0 1.3rem 3.8rem; max-width: var(--measure); color: #333; }
.faq-board .faq-board__a > * { margin: 0 0 .7em; }

/* ---------- pairing grid (discipline subnav / hub tiles) ---------- */
.pairing-grid { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--matte); border-bottom: 0; }
@media (min-width: 48em) { .pairing-grid { grid-template-columns: repeat(3, 1fr); border-right: 0; } }
.pairing-grid a { display: block; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--matte); text-decoration: none; transition: background .15s; }
@media (min-width: 48em) { .pairing-grid a { border-right: 1px solid var(--matte); } }
.pairing-grid a:hover { background: rgba(26,26,26,.05); }
.pairing-grid .pairing__no { font-family: var(--mono); font-size: .6rem; font-weight: 700; color: var(--led); display: block; margin-bottom: .8rem; }
.pairing-grid .pairing__name { font-weight: 700; text-transform: uppercase; font-size: .95rem; }
.pairing-grid .pairing__hint { font-size: .76rem; color: var(--ink-soft); margin-top: .35rem; }

/* ---------- breadcrumb ---------- */
.crumbline { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); padding: 1rem 0; }
.crumbline a { color: var(--ink-soft); text-decoration: none; }
.crumbline a:hover { color: var(--led); }

/* ---------- page header band ---------- */
.pageband { background: var(--matte); color: #fff; padding: clamp(2.4rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--rule-dark); }
.pageband h1 { margin-bottom: .4em; }
.pageband .lede { color: rgba(255,255,255,.55); }

/* ---------- game stage ---------- */
.game-stage { background: var(--matte); color: #fff; border: 1px solid #333; padding: clamp(1rem, 3vw, 2rem); }
#wmg-game-root { min-height: 420px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.game-stage__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.45); margin-bottom: 1.2rem; }

/* ---------- footer ---------- */
.basefold { background: var(--matte); color: rgba(255,255,255,.45); padding: 4rem 0 2.5rem; border-top: 1px solid var(--rule-dark); font-family: var(--mono); font-size: .66rem; }
.basefold__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 48em) { .basefold__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.basefold__brand { color: #fff; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.basefold__brand svg { width: 1.6rem; height: 1.6rem; }
.basefold h4 { color: #fff; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; margin-bottom: 1.2rem; }
.basefold ul { list-style: none; margin: 0; padding: 0; }
.basefold li { margin-bottom: .55rem; }
.basefold a { color: rgba(255,255,255,.45); text-decoration: none; }
.basefold a:hover { color: #fff; }
.basefold__legal { border-top: 1px solid rgba(255,255,255,.06); padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; text-transform: uppercase; letter-spacing: .1em; font-size: .58rem; }

/* ---------- archive list / search ---------- */
.entry-meta { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 1.5rem; }
.pagination { display: flex; gap: .5rem; font-family: var(--mono); font-size: .72rem; margin-top: 2.5rem; }
.pagination .page-numbers { padding: .55rem .9rem; border: 1px solid var(--matte); text-decoration: none; }
.pagination .page-numbers.current { background: var(--matte); color: #fff; }

/* ---------- home split ---------- */
@media (min-width: 64em) { .home-split { grid-template-columns: 2fr 3fr !important; } }

/* ---------- utility ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
