/* ==========================================================================
   WINMORA "DESK" design system
   A dark board with one rule: colour belongs to grades and results.
   ========================================================================== */
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070a12; --s1: #0d1220; --s2: #121a2e; --s3: #19233c; --s4: #223052;
  --panel: #0d1220; --panel2: #121a2e;
  --line: #1d2742; --line2: #2b3a60;
  --tx: #f2f5fb; --tx2: #a4b0cc; --tx3: #6b789a;
  --green: #1fe68e; --yellow: #ffd23f; --orange: #ff8a2b; --red: #ff4d5e; --grey: #8a93a6;
  --win: #1fe68e; --loss: #ff4d5e; --push: #a4b0cc;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px; --r-sm: 8px; --bar-h: 54px;
  --gutter: clamp(14px, 3vw, 28px); --max: 1240px; --cell-h: 66px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
body { margin: 0; color: var(--tx); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background: radial-gradient(900px 500px at 12% -10%, rgba(52,92,255,.22), transparent 60%), radial-gradient(700px 420px at 100% 0%, rgba(31,230,142,.10), transparent 55%), var(--bg); background-attachment: fixed; }
a { color: inherit; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.035em; line-height: 1.05; margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--tx); color: var(--bg); padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--tx); outline-offset: 2px; border-radius: 4px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 50; background: rgba(7,10,18,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: var(--max); margin: 0 auto; height: var(--bar-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; letter-spacing: -.03em; font-size: 19px; }
.brand img { border-radius: 50%; }
.bar-nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar-nav::-webkit-scrollbar { display: none; }
.bar-nav a, .bar-nav .soon { padding: 7px 12px; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; color: var(--tx2); white-space: nowrap; }
.bar-nav a:hover { color: var(--tx); background: var(--s2); }
.bar-nav a.on { color: var(--tx); background: var(--s3); }
.bar-nav .soon { color: var(--tx3); cursor: default; }
.bar-find { position: relative; }
.bar-find input { width: 190px; height: 34px; padding: 0 30px 0 12px; background: var(--s1); border: 1px solid var(--line2); border-radius: 999px; font-size: 14px; }
.bar-find input::placeholder { color: var(--tx3); }
.bar-find input:focus { outline: none; border-color: var(--tx2); }
.bar-find kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--tx3); border: 1px solid var(--line2); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.bar-menu, .bar-find2 { display: none; }
@media (max-width: 820px) {
  .bar-in { position: relative; gap: 10px; justify-content: space-between; }
  .bar-find { display: none; }
  .bar-menu { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 40px; padding: 0 11px; background: var(--s1); border: 1px solid var(--line2); border-radius: var(--r-sm); }
  .bar-menu i { display: block; height: 2px; background: var(--tx); border-radius: 2px; transition: transform .18s, opacity .18s; }
  .bar.open .bar-menu i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .bar.open .bar-menu i:nth-child(2) { opacity: 0; }
  .bar.open .bar-menu i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .bar-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex: none; flex-direction: column; gap: 2px; padding: 10px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(0,0,0,.45); overflow: visible; }
  .bar.open .bar-nav { display: flex; }
  .bar-nav a, .bar-nav .soon { padding: 13px 12px; font-size: 16px; }
  .bar-find2 { display: block; margin-top: 8px; }
  .bar-find2 input { width: 100%; height: 42px; padding: 0 14px; background: var(--s1); border: 1px solid var(--line2); border-radius: 999px; font-size: 16px; }
  .bar-find2 input:focus { outline: none; border-color: var(--tx2); }
}
@media (max-width: 640px) { .brand span { display: inline; } }

.page { max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 130px; min-height: 70vh; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; background: var(--s2); border: 1px solid var(--line2); border-radius: 999px; text-decoration: none; font-size: 14px; }
.btn:hover { background: var(--s3); }
.empty { padding: 48px 0; color: var(--tx2); }
.empty h2 { color: var(--tx); font-size: 24px; margin-bottom: 8px; }

/* footer */
.foot { border-top: 1px solid var(--line); background: rgba(13,18,32,.7); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px; display: grid; gap: 18px; }
.foot-brand strong { font-size: 17px; letter-spacing: -.03em; }
.foot-brand p, .foot-rg { color: var(--tx2); font-size: 13px; max-width: 78ch; margin: 6px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a, .foot-links button { color: var(--tx2); font-size: 13px; background: none; border: 0; padding: 2px 0; text-decoration: none; }
.foot-links a:hover, .foot-links button:hover { color: var(--tx); text-decoration: underline; }
.foot-copy { color: var(--tx3); font-size: 12px; margin: 0; }

/* Padlock icons (provisional = open, locked = closed) */
.lk { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: .2em; }
.lk.open { color: var(--yellow, #f5b942); }
.lk.shut { color: var(--win, #2fd27f); }

/* Eight nav items plus search: tighten between phone menu and wide desktop so nothing is cut off. */
@media (min-width: 821px) and (max-width: 1160px) {
  .bar-nav a, .bar-nav .soon { padding: 7px 8px; font-size: 13.5px; }
  .bar-find input { width: 130px; }
}
@media (min-width: 821px) and (max-width: 920px) {
  .bar-in { gap: 14px; }
  .bar-nav a, .bar-nav .soon { padding: 7px 6px; font-size: 13px; }
  .bar-find input { width: 100px; }
}

/* RIBBON TRIAL (2026-11-18): five-segment grade ribbon across the top of the header, as on /cc.
   To remove: delete this block and the .spectrum line in includes/header.php. */
.bar .spectrum { position: absolute; top: 0; left: 0; right: 0; height: 3px; display: grid; grid-template-columns: repeat(5, 1fr); pointer-events: none; z-index: 1; }
.bar .spectrum i:nth-child(1) { background: var(--green); }
.bar .spectrum i:nth-child(2) { background: var(--yellow); }
.bar .spectrum i:nth-child(3) { background: var(--orange); }
.bar .spectrum i:nth-child(4) { background: var(--red); }
.bar .spectrum i:nth-child(5) { background: var(--grey); }
/* END RIBBON TRIAL */

/* Wordmark "Winmora" in the /cc display face (Bricolage Grotesque, weight 800), header and footer */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
.brand span, .foot-brand strong { font-family: "Bricolage Grotesque", var(--sans); font-weight: 800; letter-spacing: -.03em; }
