/* Sports Law: "Box Score".
   The morning sports page: newsprint, black ink and one red. Condensed headline type, Georgia for reading,
   monospace agate for citations, counts and tables, double rules like a masthead. No league or team marks or
   colours. Loaded after study.css. System fonts only (no web fonts are fetched). */

:root {
  --paper: #f3efe4; --ink: #16130f; --ink-2: #3a352d; --muted: #6f6758;
  --rule: #16130f; --hair: #d5ccb8; --tint: #e9e3d4; --accent: #c8321e;
  --ok: #2b6a35; --warn: #a3281b; --link: #16130f;
  --sheet: #f8f5ec; --dot: #8a8170;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --cond: "Arial Narrow", "Avenir Next Condensed", "Roboto Condensed", "Helvetica Neue Condensed", Impact, sans-serif;
  --sans: var(--serif);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17150f; --ink: #ece6d6; --ink-2: #cfc7b3; --muted: #9a917d;
    --rule: #ece6d6; --hair: #363127; --tint: #221f18; --accent: #f0634c;
    --ok: #8fd19e; --warn: #ff9d8a; --link: #ece6d6; --sheet: #1d1a13; --dot: #5e5646;
  }
}
:root[data-theme="dark"] {
  --paper: #17150f; --ink: #ece6d6; --ink-2: #cfc7b3; --muted: #9a917d;
  --rule: #ece6d6; --hair: #363127; --tint: #221f18; --accent: #f0634c;
  --ok: #8fd19e; --warn: #ff9d8a; --link: #ece6d6; --sheet: #1d1a13; --dot: #5e5646;
}

body { font-family: var(--serif); }

/* masthead: double rule under the nameplate */
.top { border-bottom: 4px double var(--rule); }
.brand { font-family: var(--cond); text-transform: uppercase; font-weight: 800; letter-spacing: .02em; font-size: 1.25rem; }
.brand .mark { background: var(--accent); }
.top nav a { font-family: var(--cond); text-transform: uppercase; font-weight: 700; letter-spacing: .08em; font-size: .88rem; }
.top nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.top .aside a { font-family: var(--cond); text-transform: uppercase; font-weight: 700; letter-spacing: .06em; font-size: .88rem; }
.top .aside .cta { background: var(--accent); color: #fff; padding: 3px 12px; }
.foot { border-top: 4px double var(--rule); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.lockbar { background: var(--accent); color: #fff; }

/* type: condensed headlines, serif body, agate meta */
h1 { font-family: var(--cond); text-transform: uppercase; font-weight: 800; letter-spacing: -.005em; line-height: .98; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-family: var(--cond); text-transform: uppercase; font-weight: 800; letter-spacing: .01em; font-size: 1.3rem;
     border-top: 3px solid var(--rule); }
main > section > h2:first-child::before, main > h2::before { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
h3 { font-family: var(--cond); font-size: .86rem; letter-spacing: .12em; }
.kicker { font-family: var(--cond); text-transform: uppercase; font-weight: 700; letter-spacing: .14em; font-size: .8rem; color: var(--accent); }
.kicker b { color: var(--accent); }
.lede { font-style: italic; color: var(--ink-2); }
.meta { font-family: var(--mono); font-size: .78rem; }
blockquote { border-left: 3px solid var(--accent); background: var(--sheet); }
mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; }

/* buttons and forms: black slugs with condensed caps */
.button, button { background: var(--ink); border-color: var(--ink); color: var(--paper); font-family: var(--cond);
                  text-transform: uppercase; font-weight: 700; letter-spacing: .08em; border-radius: 0; }
.button:hover, button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
textarea, select, input { background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 0; font-family: var(--mono); }
.badge { border-radius: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }

/* agate: case lists and fact boxes read like box scores */
.gate, .facts, .hidden { background: var(--sheet); border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
                         padding: calc(2*var(--u)) calc(2.5*var(--u)); }
.facts-grid { border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); gap: 0; background: var(--sheet); }
.facts-grid > div { padding: var(--u) calc(1.5*var(--u)); border-top: 1px dotted var(--dot); }
.facts-grid dt { font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--muted); }
.facts-grid dd { font-family: var(--mono); font-size: 1.2rem; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
ol.cases li, ul.cases li { border-bottom: 1px dotted var(--dot); }
ol.cases .meta, ul.cases .meta { font-family: var(--mono); }
.ticks li::before { background: var(--accent); }
.opara:target { box-shadow: -8px 0 0 var(--tint), inset 3px 0 0 var(--accent); }

/* worked problems as clipped game stories */
.problem { background: var(--sheet); border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
           padding: calc(2*var(--u)) calc(2.5*var(--u)); margin: 0 0 calc(3*var(--u)); }
.problem header { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; font-family: var(--cond);
                  text-transform: uppercase; font-weight: 700; letter-spacing: .1em; font-size: .78rem; color: var(--muted); margin-bottom: var(--u); }
.problem .no { color: var(--accent); }
.problem details summary { color: var(--accent); font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- home: the front of the sports section ---------- */
@media (min-width: 1100px) { main > .front, main > .dateline, main > .agate-cols { grid-column: 1 / -1; } }
.dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; margin: 0 0 calc(2*var(--u));
            padding: 4px 0; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: .74rem;
            text-transform: uppercase; letter-spacing: .04em; }
.front { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--rule); margin-bottom: calc(3*var(--u)); }
@media (min-width: 900px) { .front { grid-template-columns: 1.6fr 1fr; } .front .lead { padding-right: calc(4*var(--u)); border-right: 1px solid var(--rule); }
                            .front .standings { padding-left: calc(3*var(--u)); } }
.front .lead { padding-bottom: calc(3*var(--u)); }
.front h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.6rem); margin-top: var(--u); }
.front .deck { font-size: 1.12rem; line-height: 1.45; font-style: italic; color: var(--ink-2); }
.standings h3, .agate-cols h3 { font-family: var(--cond); font-size: .82rem; letter-spacing: .14em; margin: 0 0 6px;
                                border-bottom: 2px solid var(--rule); padding-bottom: 4px; }
.standings table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .8rem; line-height: 1.5; }
.standings th { text-align: left; font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--muted); }
.standings td, .standings th { padding: 3px 0; border-bottom: 1px dotted var(--dot); }
.standings td.n, .standings th.n { text-align: right; padding-left: .8rem; }
.standings a { text-decoration: none; } .standings a:hover { text-decoration: underline; }
.agate-cols { display: grid; grid-template-columns: 1fr; gap: calc(3*var(--u)); }
@media (min-width: 760px) { .agate-cols { grid-template-columns: repeat(3, 1fr); } }
.agate-cols h3 { border-top: 3px solid var(--rule); border-bottom: 0; padding-top: 6px; font-size: 1.05rem; letter-spacing: .02em; font-weight: 800; }
.agate { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .78rem; line-height: 1.5; }
.agate li { padding: 5px 0; border-bottom: 1px dotted var(--dot); }
.agate a { font-family: var(--serif); font-weight: 700; font-size: .95rem; text-decoration: none; }
.agate a:hover { text-decoration: underline; }
.agate .y { color: var(--accent); margin-left: .3rem; }
.agate p { margin: 2px 0 0; font-family: var(--serif); font-size: .9rem; color: var(--ink-2); line-height: 1.4; }

@media print { .top .aside { display: none; } }
