/* Layout: a rink drawn in light on a dark grid. Glowing cyan lines frame sections, an amber center line splits the page; one 64rem column. */
:root {
  --bg: #0b1118;
  --panel: #111a24;
  --panel-2: #152130;
  --ink: #dbe6ef;
  --muted: #8a9db0;
  --rule: #1f3142;
  --cyan: #5fd4e8;
  --cyan-dim: rgba(95, 212, 232, .18);
  --amber: #f0a64a;
  --amber-dim: rgba(240, 166, 74, .18);
  --win: #5fd4e8;
  --loss: #f08a6a;
  --display: "Chakra Petch", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(95, 212, 232, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 232, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
a { color: var(--cyan); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.wrap { max-width: 64rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; margin: 0; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 1.25rem; letter-spacing: .02em; }
p { margin: 0; max-width: 65ch; }
.label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.placeholder { font-size: .8rem; color: var(--muted); font-style: italic; }

/* Top bar */
header.top { background: rgba(11, 17, 24, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
header.top .wrap { display: flex; align-items: center; gap: 1rem 1.5rem; padding-block: .7rem; flex-wrap: wrap; }
.mark { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: .12em; }
.mark span { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
nav { flex: 1; min-width: 0; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
nav a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
nav a:hover { color: var(--cyan); }
.tab-private { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--amber); border: 1px solid var(--amber); border-radius: 4px; padding: .35rem .8rem; box-shadow: 0 0 12px var(--amber-dim), inset 0 0 8px var(--amber-dim); }
.tab-private:hover { background: var(--amber-dim); }
.tab-private svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.tab-private[aria-current="page"] { background: var(--amber-dim); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-block: 4rem 3.25rem; }
.hero h1 { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hero h1 em { font-style: normal; display: block; color: var(--cyan); text-shadow: 0 0 18px rgba(95, 212, 232, .35); }
.hero .intro { display: grid; gap: 1.1rem; }
.hero .lede { font-size: 1.15rem; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.tags li { border: 1px solid var(--rule); color: var(--muted); padding: .2rem .7rem; border-radius: 3px; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 6px; border: 1px solid var(--cyan); box-shadow: 0 0 24px var(--cyan-dim), inset 0 0 30px var(--cyan-dim); background: radial-gradient(circle at 50% 38%, var(--panel-2) 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, var(--panel-2) 0 45%, transparent 46%), var(--panel); display: grid; place-items: end center; padding: 1rem; position: relative; }
.portrait::before, .portrait::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); }
.portrait::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.portrait::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }

/* Rink lines in light */
.line { height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan-dim); opacity: .7; }
.line.red { background: var(--amber); box-shadow: 0 0 8px var(--amber), 0 0 22px var(--amber-dim); position: relative; opacity: .85; }
.line.red::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--amber); background: var(--bg); box-shadow: 0 0 10px var(--amber-dim); }

section.block .wrap { padding-block: 3.5rem; display: grid; gap: 1.75rem; }
.head { display: grid; gap: .5rem; }
.head p { color: var(--muted); }

/* Panels */
.panel, .family article, .builds article { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--rule); border-radius: 6px; }
.panel { padding: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.family { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.family article { padding: 1.25rem; display: grid; gap: .4rem; align-content: start; }
.family article p { color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.gallery figure { margin: 0; display: grid; gap: .35rem; }
.shot { aspect-ratio: 3 / 2; max-width: 100%; border-radius: 4px; border: 1px solid var(--rule); filter: saturate(.85); }
.s1 { background: linear-gradient(170deg, #c98f55, #8e3f55 55%, #1d2340); }
.s2 { background: linear-gradient(180deg, #6f93ad, #b8c8d3 60%, #4c5a66); }
.s3 { background: linear-gradient(160deg, #1d3322, #4d6a39 50%, #a39463); }
.s4 { background: linear-gradient(200deg, #0d1424, #2a3a63 60%, #c79b45); }
.s5 { background: linear-gradient(180deg, #a8a197, #615a50 70%, #2c2823); }
.s6 { background: linear-gradient(135deg, #0a2a3f, #20708c 50%, #9fd2da); }
figcaption { font-family: var(--mono); font-size: .7rem; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }

/* Hockey */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.statline { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.statline div { padding: .6rem .25rem; border-left: 1px solid var(--rule); }
.statline div:first-child { border-left: 0; }
.statline b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--cyan); font-variant-numeric: tabular-nums; }
.statline span { font-family: var(--mono); font-size: .68rem; color: var(--muted); letter-spacing: .08em; }
.games-list { list-style: none; padding: 0; margin: 0; display: grid; }
.games-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.games-list li:first-child { border-top: 0; }
.games-list .label { white-space: nowrap; color: var(--muted); }
.pill { font-family: var(--mono); font-size: .7rem; padding: .1rem .5rem; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; align-self: center; }
.pill.w { color: var(--win); } .pill.l { color: var(--loss); }
tr.us td { color: var(--cyan); }

/* Tables and chart */
.tablebox { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
td.num { font-family: var(--mono); }
.up { color: var(--cyan); font-family: var(--mono); font-size: .8rem; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
svg.chart .grid { stroke: var(--rule); stroke-width: 1; }
svg.chart .area { fill: var(--cyan); opacity: .1; }
svg.chart .ln { fill: none; stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(95, 212, 232, .6)); }
svg.chart .dot { fill: var(--amber); }

/* DIY */
.builds { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.builds article { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.builds .shot { border-radius: 0; border: 0; border-bottom: 1px solid var(--rule); aspect-ratio: 16 / 9; }
.builds .body { padding: 1.25rem; display: grid; gap: .75rem; align-content: start; }
.builds .body > p { color: var(--muted); }
dl.specs { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; font-size: .9rem; }
dl.specs dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .2rem; }
dl.specs dd { margin: 0; }

/* Private pages */
.lock { font-family: var(--mono); font-size: .72rem; color: var(--amber); text-transform: uppercase; letter-spacing: .14em; }
.cal { list-style: none; padding: 0; margin: 0; display: grid; }
.cal li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.cal li:first-child { border-top: 0; }
.cal time { font-family: var(--mono); font-size: .85rem; color: var(--amber); }
.draft-banner { border: 1px dashed var(--amber); border-radius: 6px; padding: 1rem 1.25rem; color: var(--muted); display: grid; gap: .35rem; }
.draft-banner strong { color: var(--amber); font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.status { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px solid var(--amber); border-radius: 3px; padding: .05rem .45rem; justify-self: start; }

footer .wrap { padding-block: 2.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
footer code { font-family: var(--mono); color: var(--ink); user-select: all; }

@media (max-width: 760px) {
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 16rem; }
  nav { order: 3; flex-basis: 100%; }
}
