/* osu!Romania: neutral, quiet interface; the Romanian colours appear only as small accents. */
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0d0d10; --head: #111114; --panel: #141418; --panel-2: #1b1b21; --line: #26262d;
  --text: #ececf1; --muted: #9b9ba8; --link: #8fa8ff; --cobalt: #4f6df0;
  --safran: #f2c94c; --on-safran: #0d0d10; --rosu: #e0424f; --warn: #f2c94c;
  --serif: "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f8; --head: #ffffff; --panel: #ffffff; --panel-2: #f0f0f4; --line: #e2e2e9;
  --text: #16161c; --muted: #61616f; --link: #2a46c8; --cobalt: #2a46c8; --warn: #8a6500; color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6f8; --head: #ffffff; --panel: #ffffff; --panel-2: #f0f0f4; --line: #e2e2e9;
    --text: #16161c; --muted: #61616f; --link: #2a46c8; --cobalt: #2a46c8; --warn: #8a6500; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); font-feature-settings: "kern" 1; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--safran); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }


header.site { background: var(--head); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header.site .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 21px/1 var(--serif); white-space: nowrap; }
.brand img { width: 18px; height: 30px; display: block; }
nav { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a {
  display: flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--muted);
  font-weight: 500; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--safran); }
button.theme {
  margin-left: auto; appearance: none; border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 8px; width: 36px; height: 34px; font-size: 16px; cursor: pointer; flex: none;
}
button.theme:hover { color: var(--text); border-color: var(--muted); }

main { padding: 40px 0 72px; }
h1 { font: 400 clamp(40px, 7.2vw, 68px)/1 var(--serif);  margin: 0; }
h2 { font: 400 24px/1.2 var(--serif); margin: 44px 0 14px; }
.sub { color: var(--muted); margin: 12px 0 0; max-width: 46ch; }
.muted { color: var(--muted); }

.top { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: end; margin: 0 0 34px; }
.season { min-width: 270px; padding: 14px 18px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.season b { font: 400 17px/1.3 var(--serif); display: block; }
.season .when { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }
.season .left { font-size: 14px; margin-top: 10px; }
@media (max-width: 760px) { .top { grid-template-columns: 1fr; } .season { min-width: 0; } }

/* segmented, cross-stitch style bars */
.stitch { height: 10px; background: repeating-linear-gradient(90deg, var(--panel-2) 0 6px, transparent 6px 8px); }
.stitch > i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--cobalt) 0 6px, transparent 6px 8px); }
.season .stitch > i { background: repeating-linear-gradient(90deg, var(--safran) 0 6px, transparent 6px 8px); }

.tabs { display: flex; gap: 4px 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.tabs button {
  appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  color: var(--muted); font: 500 16px/1 var(--sans); padding: 12px 0 13px; cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--safran); }
.tabs .count { color: var(--muted); font-weight: 400; margin-left: 7px; font-size: 14px; }

.tools { margin: 0 0 14px; }
input[type="search"] {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 11px 14px; font: 400 16px var(--sans);
}
input[type="search"]::placeholder { color: var(--muted); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 13px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tbody tr:hover td { background: var(--panel-2); }
tr.cutoff td, tr.cutoff:hover td { background: none; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.dash { display: flex; align-items: center; gap: 12px; }
.dash::before, .dash::after { content: ""; flex: 1; height: 4px; background: repeating-linear-gradient(90deg, var(--rosu) 0 4px, transparent 4px 8px); }

td.place { width: 64px; color: var(--muted); }
.romb {
  display: grid; place-items: center; width: 38px; height: 38px; margin-left: -4px;
  background: var(--safran); color: var(--on-safran); font-weight: 600; font-size: 14px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.player { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.player img, .avatar { width: 34px; height: 34px; border-radius: 8px; background: var(--panel-2); flex: none; object-fit: cover; }
.player b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.player:hover b { color: var(--link); }
.pts { font-weight: 600; font-size: 17px; }
.note { color: var(--muted); font-size: 14px; margin: 14px 2px 0; max-width: 70ch; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.tag { color: var(--safran); font-size: 13px; font-weight: 500; margin-left: 10px; white-space: nowrap; }
:root[data-theme="light"] .tag { color: var(--warn); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .tag { color: var(--warn); } }

/* player page */
.who { display: flex; gap: 22px; align-items: center; margin: 0 0 30px; }
.who .avatar { width: 92px; height: 92px; border-radius: 14px; }
.who h1 { font-size: clamp(34px, 6vw, 54px); overflow-wrap: anywhere; }
.score { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.score > div { padding: 18px 26px; }
.score > div + div { border-left: 1px solid var(--line); }
.score .big { font: 400 clamp(46px, 8vw, 68px)/1 var(--serif); }
.score .v { font: 400 32px/1.1 var(--serif); }
.score .l { color: var(--muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 640px) {
  .score { grid-template-columns: 1fr 1fr; }
  .score > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .score > div:nth-child(2) { border-left: 0; }
}
.bars { padding: 10px 22px 16px; }
.bar { display: grid; grid-template-columns: 170px 1fr 54px; gap: 16px; align-items: center; padding: 7px 0; font-size: 15px; }
.bar .n { text-align: right; font-weight: 600; }

.group { padding: 12px 20px; background: var(--panel-2); font: 400 17px/1.3 var(--serif); display: flex; justify-content: space-between; gap: 14px; border-left: 4px solid var(--cobalt); border-bottom: 1px solid var(--line); }
.ev { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .rule { font-weight: 600; font-size: 15px; }
.ev .detail { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.ev .side { text-align: right; white-space: nowrap; }
.ev .p { font-weight: 600; font-size: 17px; }
a.match { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--link); text-decoration: none; }
a.match:hover { text-decoration: underline; }
a.match svg { width: 11px; height: 11px; }
.prov { font-size: 13px; color: var(--warn); }

.rules td:first-child { width: 28%; font-weight: 600; }
.rules td.v { font-weight: 500; }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; margin: 0 8px 8px 0; font-size: 15px; background: var(--panel); }

footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 40px; }
@media (max-width: 560px) {
  header.site .wrap { gap: 10px; }
  nav a { padding: 0 7px; font-size: 14px; }
  header.site .wrap { padding: 0 12px; gap: 6px; }
  th, td { padding: 9px 10px; }
  td.place { width: 52px; }
  .bar { grid-template-columns: 112px 1fr 44px; gap: 10px; }
  .hide-sm { display: none; }
  .who { gap: 14px; } .who .avatar { width: 64px; height: 64px; }
  .score > div { padding: 14px 16px; }
}

/* ---- calm overrides: plain sans, flat bars, no ornaments ---- */
.brand { font: 600 18px/1 var(--sans); gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 50%; }
h1 { font: 600 clamp(28px, 4.6vw, 38px)/1.15 var(--sans);  }
h2 { font: 600 19px/1.3 var(--sans); margin: 36px 0 12px; }
main { padding: 34px 0 64px; }
.top { margin-bottom: 26px; }
.season b { font: 600 15px/1.3 var(--sans); }
.stitch { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.stitch > i { border-radius: 3px; background: var(--cobalt); }
.season .stitch > i { background: var(--cobalt); }
.panel, .season, .score { border-radius: 8px; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--cobalt); }
nav a[aria-current="page"] { border-bottom-color: var(--cobalt); }
.romb { display: inline; width: auto; height: auto; margin: 0; background: none; clip-path: none; color: var(--safran); font-weight: 600; font-size: 15px; }
:root[data-theme="light"] .romb { color: var(--warn); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .romb { color: var(--warn); } }
.dash::before, .dash::after { height: 0; background: none; border-top: 1px dashed var(--muted); opacity: .45; }
tr.cutoff td { font-size: 12.5px; }
.score .big { font: 600 clamp(36px, 6vw, 48px)/1 var(--sans); }
.score .v { font: 600 26px/1.1 var(--sans); }
.group { font: 600 15px/1.3 var(--sans); border-left: 3px solid var(--cobalt); }
.who .avatar { width: 80px; height: 80px; border-radius: 10px; }
.who h1 { font-size: clamp(26px, 5vw, 36px); }
.player img, .avatar { border-radius: 50%; }
.who .avatar { border-radius: 12px; }
.pill { border-radius: 6px; }
button.theme { border-radius: 6px; }

/* ---- full site: tiles, columns, tiers, controls ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 8px; }
.tile { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 14px 18px; min-width: 0; }
.tile .v { font: 600 22px/1.25 var(--sans); overflow-wrap: anywhere; }
.tile .l { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
h3 { font: 600 15px/1.3 var(--sans); margin: 28px 0 10px; color: var(--muted); }
.more { margin: 12px 2px 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; }
.more a { color: var(--link); text-decoration: none; } .more a:hover { text-decoration: underline; }
.tools.row { display: flex; gap: 10px; }
.tools.row input { flex: 1; min-width: 0; }
select { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0 12px; font: 400 15px var(--sans); }
.btn { display: block; margin: 14px auto 0; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 22px; font: 500 15px var(--sans); cursor: pointer; }
.btn:hover { border-color: var(--muted); }
button.sort { appearance: none; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
button.sort:hover, button.sort[aria-pressed="true"] { color: var(--text); }
.tier { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; --tc: var(--muted); }
.tier i { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); display: block; }
.tier[data-tier="Bronze"] { --tc: #c08457; } .tier[data-tier="Silver"] { --tc: #a7b0bd; } .tier[data-tier="Gold"] { --tc: #e3b93c; }
.tier[data-tier="Platinum"] { --tc: #3fb8c1; } .tier[data-tier="Diamond"] { --tc: #5f86f2; } .tier[data-tier="Master"] { --tc: #a066f2; }
.tier[data-tier="Grandmaster"] { --tc: #ea5656; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.chips .pill { margin: 0; }
a.pill.link { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--link); }
a.pill.link svg { width: 11px; height: 11px; }
details.stage { margin: 0 0 10px; }
details.stage summary { cursor: pointer; padding: 10px 2px; list-style: none; }
details.stage summary::-webkit-details-marker { display: none; }
details.stage summary::before { content: "▸"; display: inline-block; width: 18px; color: var(--muted); }
details.stage[open] summary::before { content: "▾"; }
.desc { max-width: 70ch; white-space: pre-line; margin: 18px 0 0; }
.pad { padding: 18px; margin: 0; }
.who .sub { margin-top: 6px; }
.score .l .tier { margin-right: 4px; }
section + section, .score + h3 { margin-top: 0; }

/* header: five links need a second row on a phone */
@media (max-width: 700px) {
  header.site .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; row-gap: 0; }
  header.site nav { order: 3; width: 100%; height: 44px; margin: 0 -4px; }
  button.theme.lang { margin-left: auto; }
  button.theme:not(.lang) { margin-left: 0; }
  nav a { padding: 0 11px; }
}

/* ====================== site v2: header, home, forms, new pages ====================== */
header.site .wrap { max-width: 1120px; }
.wrap { max-width: 1080px; }
header.site .brand span { font-size: 19px; }
nav { flex: 1; align-items: stretch; overflow: visible; }
nav a.big { font-size: 16px; font-weight: 600; color: var(--text); padding: 0 16px; gap: 7px; }
nav a svg, .btn svg.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
nav .sep { width: 1px; background: var(--line); margin: 16px 10px; flex: none; }
.moremenu { position: relative; display: flex; }
.moremenu .morebtn { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: 500 15px var(--sans); padding: 0 14px; cursor: pointer; display: flex; align-items: center; gap: 5px; margin-bottom: -1px; }
.moremenu .morebtn:hover, .moremenu .morebtn[aria-current="page"] { color: var(--text); }
.moremenu .morebtn[aria-current="page"] { border-bottom-color: var(--safran); }
.moremenu .menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.moremenu.open .menu { display: block; }
.moremenu .menu a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; margin: 0; border-radius: 6px; height: auto; }
.moremenu .menu a:hover { background: var(--panel-2); }
header.site .right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
header.site .right button.theme { margin-left: 0; }
.account { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.account img { width: 26px; height: 26px; border-radius: 50%; }
.account a, .account button { color: var(--muted); font: 500 14px var(--sans); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 4px 6px; }
.account a:hover, .account button:hover { color: var(--text); }
.tag.editor { color: var(--safran); border-color: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; text-decoration: none; cursor: pointer; border-radius: 8px; padding: 9px 18px; font: 500 15px var(--sans); background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 26px; font-size: 17px; }
.btn.small { padding: 6px 13px; font-size: 14px; }
.btn.danger:hover { border-color: var(--rosu); color: var(--rosu); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 12px; height: 12px; }

/* home */
main.home { padding: 0; }
.hero { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 48px 20px 90px; position: relative; background: radial-gradient(900px 420px at 50% 28%, color-mix(in srgb, var(--cobalt) 14%, transparent), transparent 70%); }
.hero-in { max-width: 720px; animation: heroIn .7s ease both; }
.hero-logo { width: 104px; height: 104px; margin: 0 auto 22px; display: block; }
.hero h1 { font-size: clamp(38px, 7vw, 66px); }
.hero-sub { color: var(--muted); font-size: 19px; margin: 18px auto 30px; max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-actions.left { justify-content: flex-start; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; }
.scroll-hint svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; animation: nudge 1.8s ease-in-out infinite; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 50% { transform: translateY(5px); } }
.block { padding: 18px 0 30px; }
.block h2 { margin-top: 26px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero-in, .scroll-hint svg { animation: none; } html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }
.features, .cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.card b { font: 500 18px var(--sans); }
.card span { color: var(--muted); font-size: 15px; }
.banner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.banner h2 { margin: 0 0 4px; }
.banner p { margin: 0; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.season.wide { max-width: 520px; margin: 0 0 6px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.sec-head h2 { margin-bottom: 4px; }
.more-link { color: var(--link); text-decoration: none; font-size: 15px; }
.more-link:hover { text-decoration: underline; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.panel.mini { padding: 12px 14px; }
.mini-h { font-weight: 600; margin-bottom: 6px; }
.mini-r { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; padding: 3px 0; font-size: 15px; align-items: center; }
.mini-r .n { color: var(--muted); } .mini-r .pts, .pts { font-variant-numeric: tabular-nums; }
.mini-e { padding: 6px 0; }

/* news */
.news { display: grid; gap: 12px; margin-top: 14px; }
.post { padding: 18px 22px; }
.post h3 { font: 500 20px/1.3 var(--sans); color: var(--text); margin: 6px 0 8px; }
.post-meta { display: flex; gap: 10px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.post-body { white-space: pre-line; margin: 0; max-width: 70ch; }
.post-actions { display: flex; gap: 8px; margin-top: 14px; }
.newsbar { margin: 12px 0 0; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

/* recent matches */
.rm { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rm:last-child { border-bottom: 0; }
.rm-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.rm-teams span:first-child { text-align: right; } .rm-teams b { font-variant-numeric: tabular-nums; }
.rm-sub { font-size: 13.5px; margin-top: 3px; text-align: center; }
.rm-sub a { color: var(--link); text-decoration: none; margin: 0 4px; }

/* forms */
.formbox { padding: 18px 20px; display: grid; gap: 12px; margin-top: 14px; }
.formbox.edit { margin-top: 44px; }
.formbox.edit h2 { margin: 0; }
.formbox.edit h3 { margin: 10px 0 0; }
input[type="text"], input[type="number"], input[type="search"], input[type="url"], textarea, select { font: 400 15px var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; width: 100%; }
select { padding: 9px 12px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--cobalt); outline: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 16px; }
.field { display: grid; gap: 4px; font-size: 14px; } .field > span { color: var(--muted); } .field.wide { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.formrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.formmsg { font-size: 14px; color: var(--muted); } .formmsg.bad { color: var(--rosu); }
.linkadd { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; }
@media (max-width: 640px) { .linkadd { grid-template-columns: 1fr; } }
.pill .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 0 0 4px; }
.pill .x:hover { color: var(--rosu); }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 20; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cobalt); border-radius: 8px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast.bad { border-left-color: var(--rosu); }
.why { font-size: 13px; color: var(--muted); margin-top: 8px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }

/* tiers, bars, sparkline, staff */
.tierstrip { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tier-chip { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--text); font: 400 14px var(--sans); }
.tier-chip[aria-pressed="true"] { border-color: var(--cobalt); background: var(--panel-2); }
.tier-chip .n { color: var(--muted); }
.bars { padding: 14px 18px; display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: minmax(70px, 150px) 1fr 54px; gap: 12px; align-items: center; font-size: 14.5px; }
.bar .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 14px 16px; }
.spark i { flex: 1; background: var(--cobalt); border-radius: 2px 2px 0 0; min-height: 3px; opacity: .85; }
.spark i:hover { opacity: 1; }
.staff { display: grid; gap: 6px; }
.sgroup h3 { margin: 18px 0 10px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; text-decoration: none; min-width: 0; }
a.person:hover { border-color: var(--cobalt); }
.person img, .person .noimg { width: 40px; height: 40px; border-radius: 8px; flex: none; background: var(--panel-2); }
.sn { display: grid; min-width: 0; } .sn b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; } .sn .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.how { max-width: 70ch; padding-left: 20px; } .how li { margin: 6px 0; }

/* docs */
.docgrid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 84px; display: grid; gap: 4px; font-size: 15px; }
.toc a { color: var(--muted); text-decoration: none; padding: 4px 0; } .toc a:hover { color: var(--text); }
.doc { max-width: 72ch; } .doc h2:first-child { margin-top: 0; }
.doc section { scroll-margin-top: 80px; }
code { font: 14px ui-monospace, monospace; background: var(--panel-2); padding: 2px 6px; border-radius: 4px; }
@media (max-width: 800px) { .docgrid { grid-template-columns: 1fr; gap: 10px; } .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px 16px; } }

/* header on small screens */
@media (max-width: 900px) {
  header.site .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; row-gap: 0; gap: 10px; }
  header.site nav { order: 3; width: 100%; height: 46px; overflow-x: auto; margin: 0 -6px; flex: none; }
  nav a, .moremenu .morebtn { padding: 0 11px; white-space: nowrap; }
  nav a.big { padding: 0 12px; }
  .moremenu .menu { position: fixed; top: auto; left: 12px; right: 12px; }
  .brand span { display: none; }
}
@media (max-width: 560px) { .rm-teams { grid-template-columns: 1fr; text-align: center; } .rm-teams span:first-child { text-align: center; } .hero-sub { font-size: 17px; } }

.moremenu .morebtn { white-space: nowrap; }
footer .flinks { display: inline-flex; gap: 18px; }
header.site .wrap { gap: 14px; }
nav a { padding: 0 11px; }
nav a.big { padding: 0 13px; }
.moremenu .morebtn { padding: 0 11px; }

/* ====================== v3: news, circuit spotlight, notes, circuit page ====================== */
h2.bar { border-left: 4px solid var(--safran); padding-left: 12px; margin-bottom: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.chip.hot { background: color-mix(in srgb, var(--safran) 20%, transparent); color: var(--safran); }
:root[data-theme="light"] .chip.hot { color: #7a5a00; }
.feat-post { display: block; text-decoration: none; padding: 26px 28px; margin-top: 14px; transition: border-color .15s; }
.feat-post:hover, .mini-post:hover { border-color: var(--cobalt); }
.feat-post h3 { font: 600 clamp(22px, 3.4vw, 30px)/1.25 var(--sans); color: var(--text); margin: 14px 0 10px; }
.feat-post p { color: var(--muted); max-width: 70ch; margin: 0 0 14px; white-space: pre-line; }
.readmore { color: var(--link); font-weight: 600; }
.mini-posts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.mini-post { display: grid; gap: 10px; align-content: space-between; padding: 16px 20px; text-decoration: none; transition: border-color .15s; }
.mini-post b { font-weight: 600; font-size: 16.5px; line-height: 1.35; }
@media (max-width: 640px) { .mini-posts { grid-template-columns: 1fr; } }
.post.hit { border-color: var(--safran); }

/* the circuit: set apart from the rest */
.spotlight { padding: 40px 0 44px; margin: 34px 0 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--cobalt) 10%, var(--bg)), var(--bg) 140%); border-block: 1px solid var(--line); }
.spotlight h3 { margin: 30px 0 12px; }
.spotlight .banner-actions { margin-top: 24px; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.sp-title { max-width: 460px; }
.sp-title h2 { margin: 12px 0 6px; font-size: 28px; }
.sp-title p { margin: 0; }
.flagbar { display: inline-flex; height: 6px; width: 54px; border-radius: 3px; overflow: hidden; }
.flagbar i { flex: 1; } .flagbar i:nth-child(1) { background: #002B7F; } .flagbar i:nth-child(2) { background: #FCD116; } .flagbar i:nth-child(3) { background: #CE1126; }
.countdown { text-align: center; }
.cd-label { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; }
.cd-row { display: flex; gap: 10px; justify-content: center; }
.cd { min-width: 76px; padding: 12px 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 2px; }
.cd b { font: 600 34px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.cd span { font-size: 12.5px; color: var(--muted); }
.cd-day { display: flex; gap: 8px; align-items: baseline; justify-content: center; }
.cd-day b { font: 600 56px/1 var(--sans); } .cd-day span { color: var(--muted); font-size: 20px; }
@media (max-width: 520px) { .cd { min-width: 62px; } .cd b { font-size: 27px; } .cd-row { gap: 7px; } }
.timeline { margin-top: 26px; }
.tl-track { position: relative; display: flex; height: 12px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.tl-fill { position: absolute; inset: 0 auto 0 0; background: var(--safran); }
.tl-seg { position: relative; z-index: 1; border-right: 2px solid var(--bg); } .tl-seg:last-child { border-right: 0; }
.tl-labels { display: flex; margin-top: 6px; font-size: 13px; color: var(--muted); }
.tl-labels span { text-align: center; }
.mini-r { position: relative; padding: 5px 2px 7px; }
.mini-r::after { content: ""; position: absolute; left: 0; bottom: 2px; height: 2px; width: var(--w, 0%); background: var(--cobalt); opacity: .55; border-radius: 1px; }
.minis { gap: 14px; }

/* the community notes: uneven on purpose, nothing to click */
.notes { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin-top: 14px; }
.note { display: grid; gap: 6px; align-content: start; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.note b { font: 600 18px var(--sans); }
.note span { color: var(--muted); font-size: 15px; max-width: 46ch; }
.n1 { grid-column: span 7; } .n2 { grid-column: span 5; background: var(--panel-2); }
.n3 { grid-column: span 5; background: var(--panel-2); } .n4 { grid-column: span 3; } .n5 { grid-column: span 4; }
.n1, .n4 { border-left: 3px solid var(--cobalt); } .n3 { border-left: 3px solid var(--safran); } .n5 { border-left: 3px solid var(--rosu); }
@media (max-width: 760px) { .notes { grid-template-columns: 1fr; } .note { grid-column: auto !important; } }

/* circuit page */
.subnav { display: flex; justify-content: center; gap: 10px; margin: 6px auto 34px; flex-wrap: wrap; }
.subnav a { text-decoration: none; padding: 13px 34px; font-size: 17px; font-weight: 600; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); min-width: 150px; text-align: center; }
.subnav a:hover { color: var(--text); border-color: var(--muted); }
.subnav a[aria-current="page"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.hub-title { text-align: center; font-size: clamp(38px, 6vw, 56px); margin: 0 0 24px; }
.hub-cd { max-width: 640px; margin: 0 auto 46px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 44px; align-items: start; }
@media (max-width: 900px) { .post-layout { grid-template-columns: 1fr; } .facts { order: -1; } }
.article { max-width: 760px; }
.art-sec { margin-bottom: 14px; scroll-margin-top: 80px; }
.art-sec h2 { margin-top: 34px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.art-sec p { max-width: 68ch; }
.facts { position: sticky; top: 84px; padding: 18px 20px; }
.facts h3 { margin: 0 0 12px; }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dt { font-size: 13.5px; color: var(--muted); } .facts dd { margin: 2px 0 0; font-weight: 600; }
.side-links { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
table.points td:first-child { max-width: 520px; }
table.points tr.grp th { text-align: left; background: var(--panel-2); font-size: 14px; padding: 8px 14px; }
.cal-row { display: flex; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cal-row:last-child { border-bottom: 0; }
.cal-date { width: 52px; text-align: center; flex: none; display: grid; line-height: 1.1; }
.cal-date b { font: 600 22px var(--sans); } .cal-date span { font-size: 13px; color: var(--muted); }
.small { font-size: 13.5px; }
.article .minis { grid-template-columns: repeat(2, 1fr); }
table.points td.num { min-width: 110px; white-space: nowrap; }

/* v4: standings, rules, calendar, mini cups, text editing */
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 18px; }
.leader { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; min-width: 0; }
.leader:hover { border-color: var(--cobalt); }
.leader img { width: 44px; height: 44px; border-radius: 8px; flex: none; background: var(--panel-2); }
.lp { font: 600 22px var(--sans); color: var(--muted); width: 18px; text-align: center; flex: none; }
.leader:first-child .lp { color: var(--safran); }
.ln { display: grid; min-width: 0; } .ln b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ln .muted { font-size: 13.5px; }
table.standings tr.final td:first-child { box-shadow: inset 3px 0 0 var(--safran); }
.pts-cell { text-align: right; width: 150px; position: relative; }
.pts-cell .pts { font-weight: 600; display: block; }
.ptsbar { display: block; height: 2px; margin: 3px 0 0 auto; background: var(--cobalt); opacity: .55; border-radius: 1px; }
.toc-box { top: 84px; } .toc-box .toc { position: static; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; gap: 6px; } .cal-title { margin: 0; font-size: 22px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-grid .wd { background: var(--panel-2); padding: 8px 10px; font-size: 13px; color: var(--muted); }
.cal-grid .day { background: var(--panel); min-height: 104px; padding: 6px 7px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-grid .day.pad { background: var(--bg); }
.cal-grid .day.season { background: color-mix(in srgb, var(--cobalt) 6%, var(--panel)); }
.cal-grid .day.today .dn { background: var(--safran); color: var(--on-safran); border-radius: 50%; }
.dn { font-size: 13px; color: var(--muted); width: 24px; height: 24px; display: inline-grid; place-items: center; }
.ev { font-size: 12.5px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; background: var(--panel-2); border-left: 3px solid var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:hover { filter: brightness(1.2); }
.ev.registration { border-left-color: var(--safran); } .ev.ongoing { border-left-color: var(--rosu); } .ev.finished { border-left-color: var(--cobalt); opacity: .8; }
.ev.mini { font-style: italic; }
.more-ev { font-size: 12px; }
@media (max-width: 760px) {
  .cal-grid { display: block; background: var(--panel); }
  .cal-grid .wd, .cal-grid .day.pad, .cal-grid .day.empty-day { display: none; }
  .cal-grid .day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .ev { max-width: 100%; }
}
.hostbox { padding: 18px 22px; margin: 22px 0 6px; display: grid; gap: 8px; justify-items: start; } .hostbox h3 { margin: 0; color: var(--text); } .hostbox p { margin: 0; }
.subnav a { min-width: 120px; padding: 12px 24px; }
/* owner editing of texts */
body.editing [data-t] { outline: 1px dashed color-mix(in srgb, var(--safran) 60%, transparent); outline-offset: 3px; cursor: text; }
body.editing [data-t]:hover { outline-style: solid; background: color-mix(in srgb, var(--safran) 8%, transparent); }
.text-editor { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--safran); border-radius: 8px; background: var(--panel); margin: 6px 0; }
.text-editor textarea { min-height: 60px; }
.tabs button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--cobalt); color: var(--text); font-weight: 600; }
@media (max-width: 1280px) { .account .who-name, .account .tag.editor { display: none; } }

/* ---- v5: skeletons, news popup, match calendar, mini cups, docs ---- */
.sk { display: block; background: var(--panel-2); border-radius: 8px; height: 14px; position: relative; overflow: hidden; }
.sk.round { border-radius: 50%; flex: none; }
.sk.flat { border-radius: 0; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 9%, transparent), transparent); animation: sk-shimmer 1.4s ease-in-out infinite; }
@keyframes sk-shimmer { to { transform: translateX(100%); } }
.skel { display: grid; gap: 14px; }
.skel > .panel { overflow: hidden; }
.sk-tools { display: block; }
.sk-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: 0; }
.sk-row .sk:nth-child(2) { flex: none; }
.sk-row .sk:last-child { margin-left: auto; }
.sk-card { padding: 20px 22px; display: grid; gap: 12px; }
@media (max-width: 640px) { .sk-row .hide-sm { display: none; } }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }

/* buttons that look like text */
button.linkbtn { all: unset; cursor: pointer; color: inherit; font: inherit; }
button.linkbtn:hover { color: var(--link); }
button.linkbtn:focus-visible { outline: 2px solid var(--safran); outline-offset: 2px; border-radius: 4px; }
.post h3 .linkbtn { font-weight: 500; }
button.readmore { display: inline-block; margin-top: 10px; color: var(--link); font-weight: 600; }
button.feat-post, button.mini-post { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.feat-post .chips, button.mini-post .chips { display: flex; }

/* news popup */
body.modal-open { overflow: hidden; }
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 8, .66); display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; animation: modal-fade .14s ease-out; }
.modal { width: min(720px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); animation: modal-rise .16s ease-out; }
.modal-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); font-weight: 500; }
.modal-x { appearance: none; background: none; border: 0; color: var(--muted); font-size: 28px; line-height: 1; padding: 2px 8px; cursor: pointer; border-radius: 6px; }
.modal-x:hover { color: var(--text); background: var(--panel-2); }
.modal-body { padding: 22px 26px 28px; }
.modal-body h2 { margin: 0 0 12px; font-size: clamp(22px, 4vw, 30px); line-height: 1.25; border: 0; padding: 0; }
.modal-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0 18px; }
.modal-body p { margin: 0 0 14px; max-width: 64ch; overflow-wrap: anywhere; }
.modal-body a { color: var(--link); }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .modal-back, .modal { animation: none; } }

/* the page layout of the circuit articles: centred, with the box beside it */
.post-layout { max-width: 1080px; margin-inline: auto; }
.article { max-width: none; }
.article > p, .art-sec > p, .art-sec > ul { max-width: 70ch; }
.article .lead { font-size: 19px; line-height: 1.6; color: var(--text); margin-top: 0; }

/* calendar of matches */
.cal-grid .day { font: inherit; color: inherit; text-align: left; border: 0; cursor: pointer; align-items: flex-start; }
.cal-grid .day:hover { background: var(--panel-2); }
.cal-grid .day.picked { box-shadow: inset 0 0 0 2px var(--cobalt); }
.cal-grid .day.pad { cursor: default; }
.cal-grid .day.cup { background: var(--safran); color: var(--on-safran); }
.cal-grid .day.cup:hover { filter: brightness(1.06); background: var(--safran); }
.cal-grid .day.cup .dn { color: var(--on-safran); font-weight: 700; }
.cal-grid .day.cup.today .dn { background: var(--on-safran); color: var(--safran); }
.cup-mark { font-weight: 800; font-size: 15px; line-height: 1.15; }
.mcount { font-size: 12.5px; color: var(--muted); }
.cal-grid .day.cup .mcount { color: var(--on-safran); opacity: .8; }
.cup-banner { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; padding: 26px 30px; margin: 0 0 26px; border-radius: 12px; background: var(--safran); color: var(--on-safran); }
.cb-kicker { font-weight: 700; font-size: 15px; opacity: .85; }
.cup-banner h2 { margin: 2px 0 6px; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; color: var(--on-safran); border: 0; padding: 0; }
.cup-banner p { margin: 0; font-size: 18px; font-weight: 600; }
.cup-banner .cb-sub { font-weight: 500; opacity: .8; font-size: 16px; }
.cb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cup-banner .btn { background: var(--on-safran); color: var(--safran); border-color: var(--on-safran); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mday h3 { margin: 22px 0 8px; font-size: 16px; text-transform: capitalize; color: var(--muted); font-weight: 500; }
.cup-strip { display: flex; gap: 12px; align-items: baseline; padding: 10px 16px; border-radius: 10px 10px 0 0; background: var(--safran); color: var(--on-safran); margin-top: 8px; }
.cup-strip + .panel { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.mrow { display: grid; grid-template-columns: 76px 1fr auto; gap: 8px 16px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow.mini { background: color-mix(in srgb, var(--safran) 9%, transparent); }
.mtime { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.mteams { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-weight: 600; }
.mvs { color: var(--muted); font-weight: 400; font-size: 14px; }
.mscore { font-variant-numeric: tabular-nums; }
.msub { font-size: 14px; margin-top: 2px; }
.minitag { background: var(--safran); color: var(--on-safran); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
@media (max-width: 640px) { .mrow { grid-template-columns: 60px 1fr; } .minitag { grid-column: 2; justify-self: start; } .cup-banner { padding: 20px; } }
@media (max-width: 720px) { .cal-grid .day.empty-day { display: none; } .cal-grid .day { width: 100%; } }

/* mini cup article */
.stages { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 640px; }
.stages li { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
@media (max-width: 640px) { .stages { grid-template-columns: 1fr 1fr; } }
.facts dt { color: var(--muted); font-size: 13px; margin-top: 10px; } .facts dd { margin: 2px 0 0; font-weight: 600; }

/* home before the season */
.pre { display: grid; gap: 12px; margin-top: 18px; } .pre h3 { margin: 0; } .pre p { margin: 0; max-width: 64ch; }

/* documentation */
.docgrid .doc { max-width: 880px; }
.docgrid .toc { max-height: calc(100vh - 110px); overflow-y: auto; }
.toc-sub { margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.ref-title { margin: 56px 0 4px; font-size: 30px; }
table.cmds td:first-child { white-space: normal; width: 36%; vertical-align: top; }
table.cmds code { font-size: 13.5px; overflow-wrap: anywhere; }
.docnote { margin: 12px 0 0; padding: 12px 16px; border-left: 3px solid var(--cobalt); background: var(--panel); border-radius: 0 8px 8px 0; }
.docnote p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 640px) { table.cmds td:first-child { width: auto; } }

/* the menu buttons of the circuit: text centred (the header nav rule made them flex) */
.subnav a { display: flex; align-items: center; justify-content: center; }

/* shaped skeletons */
.sk.pill { border-radius: 999px; }
.sk-feat { padding: 26px 28px; display: grid; gap: 14px; margin-top: 14px; }
.sk-chips { display: flex; gap: 8px; }
.sk-spot-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.sk-spot-title { display: grid; gap: 12px; }
.sk-cd { display: flex; gap: 10px; }
.skel .tiles .tile { display: grid; gap: 10px; }
.skel .sgrid .person { display: flex; align-items: center; gap: 12px; }
.skel .bars .bar { align-items: center; }
.sk-calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sk-calgrid .sk { border-radius: 0; background: var(--panel); }
.sk-calgrid .sk::after { opacity: .7; }

/* calendar: days with matches stand out, open a popup */
.cal-grid .day.has:not(.cup) { background: color-mix(in srgb, var(--cobalt) 11%, var(--panel)); box-shadow: inset 0 3px 0 var(--cobalt); }
.cal-grid .day.has:not(.cup):hover { background: color-mix(in srgb, var(--cobalt) 20%, var(--panel)); }
.cal-grid .day.has .mcount { align-self: flex-start; background: var(--cobalt); color: #fff; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; margin-top: auto; }
.cal-grid .day.cup.has .mcount { background: var(--on-safran); color: var(--safran); opacity: 1; }
.cal-grid .day.has .dn { color: var(--text); font-weight: 700; }
.modal.wide { width: min(860px, 100%); }
.daymatches { display: grid; gap: 10px; }
.daymatches .mrow { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 14px 18px; }
.daymatches .mrow:last-child { border-bottom: 1px solid var(--line); }
.daymatches .mrow.mini { border-color: var(--safran); }
.mtime { display: grid; gap: 2px; } .mdate { font-size: 12.5px; font-weight: 500; }
.mteams { font-size: 17px; }
.more-btn { margin: 14px auto 0; display: block; }
.cal-grid .day.empty-day { cursor: default; } .cal-grid .day.empty-day:hover { background: var(--panel); }
