/*
 * Vzhled /benchmarks. Navazuje na hlavní web: černý pás s tečkovou mřížkou, písmo Oxygen,
 * černobílá paleta. Jedinou barvou na stránce jsou barvy modelů, aby šlo výsledky snadno spárovat.
 */
:root {
  --ink: #000;
  --muted: #575757;
  --line: #dedede;
  --paper: #fff;
  --mist: #f3f3f3;
  --on-dark: #fff;
  --on-dark-muted: #a6a6a6;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Oxygen', system-ui, sans-serif; font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--paper); }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.25rem; }
p { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
img { max-width: 100%; display: block; }
small { color: var(--muted); font-size: .82rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--on-dark); }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--paper); padding: .5rem 1rem; border-radius: 6px; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .45rem; flex: none; vertical-align: .05em; }

/* Hlavička */
.top nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; }
.brand span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px; background: var(--ink); color: var(--on-dark); font-size: .85rem; }
.links { display: flex; gap: 1.5rem; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover, .links a[aria-current] { color: var(--ink); }
.links a[aria-current] { font-weight: 700; }

/* Černý pás: stejná tečková mřížka jako na hlavní stránce */
.hero { color: var(--on-dark); background: #000 radial-gradient(rgba(255, 255, 255, .17) 1px, transparent 1px) 0 0 / 28px 28px; padding: 4.5rem 0 4rem; }
.hero.compact { padding: 3rem 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 4.5rem; align-items: end; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); letter-spacing: -0.045em; line-height: 1; }
.hero.compact h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
.lead { font-size: 1.15rem; max-width: 34rem; color: #e6e6e6; margin-top: 1.5rem; }
.tally, .meta { color: var(--on-dark-muted); margin-top: 1rem; }
.crumbs { color: var(--on-dark-muted); margin-bottom: 1.25rem; font-size: .92rem; }
.crumbs a { color: var(--on-dark); }

/* Celkové pořadí v černém pásu */
.standings h2 { font-size: 1rem; letter-spacing: 0; color: var(--on-dark-muted); font-weight: 400; margin-bottom: .5rem; }
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-items: start; padding: 1.1rem 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.leaderboard .place { font-size: 2.4rem; font-weight: 700; line-height: .9; color: #6e6e6e; font-variant-numeric: tabular-nums; }
.leaderboard .leader .place { color: var(--on-dark); }
.standing-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .55rem; }
.standing-head strong { font-size: 1.15rem; }
.standing-head small { color: var(--on-dark-muted); }
.standing-head .pct { margin-left: auto; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.leaderboard small { color: var(--on-dark-muted); }
.standing > small { display: block; margin-top: .45rem; }
.hero .bar { background: rgba(255, 255, 255, .14); }
.hero .empty { color: var(--on-dark-muted); border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 1rem; }

.bar { height: .4rem; background: var(--mist); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; }

/* Bloky */
.block { padding-top: 4rem; scroll-margin-top: 1rem; }
.hint { color: var(--muted); margin: -.6rem 0 1.75rem; }
.empty { color: var(--muted); }

/* Seznam zadání */
.tasks { border-bottom: 1px solid var(--line); }
.task { border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.task > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1.5rem; align-items: center; padding: 1.6rem 0; }
.task > summary::-webkit-details-marker { display: none; }
.task-title h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
.task > summary:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.task-title p { margin-top: .3rem; color: var(--muted); }
.task-state { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.chevron { width: .65rem; height: .65rem; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-25%) rotate(45deg); transition: transform .2s; margin-right: .3rem; }
.task[open] .chevron { transform: translateY(25%) rotate(225deg); }
.task-body { padding: 0 0 2.5rem; }
.entrants { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: -.4rem 0 1.5rem; padding: 0; color: var(--muted); font-size: .92rem; }
.more { margin-top: 1.75rem; font-weight: 700; }

.prompt { background: var(--mist); border-radius: var(--radius); padding: .9rem 1.25rem; margin-bottom: 1.75rem; }
.prompt summary { cursor: pointer; font-weight: 700; }
.prompt div { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .75rem; font-size: .95rem; max-width: 72ch; }

/* Výsledky modelů */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 2.5rem 2rem; }
.result { display: flex; flex-direction: column; }
.shot { display: block; border-radius: var(--radius); overflow: hidden; background: #000; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot:hover img { opacity: .9; }
.result-body { padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.result header { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.result h3 { font-size: 1.2rem; }
.place-tag { font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.winner .place-tag { color: var(--on-dark); background: var(--ink); border-radius: 4px; padding: .1rem .5rem; }
.total { color: var(--muted); display: flex; align-items: baseline; gap: .4rem; margin-top: .4rem; }
.total strong { font-size: 2.3rem; line-height: 1; color: var(--ink); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.total span { margin-left: auto; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.waiting { color: var(--muted); margin-top: .25rem; }
.note { white-space: pre-wrap; color: #333; font-size: .95rem; }
.button { display: inline-block; background: var(--ink); color: var(--on-dark); text-decoration: none; border-radius: 8px; padding: .8rem 1.4rem; font-weight: 700; text-align: center; }
.button:hover { background: #333; }
.button.small { padding: .55rem 1.1rem; font-size: .92rem; margin-top: auto; align-self: flex-start; }
.result-body .button.small { margin-top: .75rem; }

/* Tabulka bodů */
.subhead { font-size: 1.2rem; margin: 3rem 0 .9rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: .65rem 1rem; border-bottom: 1px solid var(--line); text-align: center; }
thead th { white-space: nowrap; border-bottom: 2px solid var(--ink); font-size: .9rem; }
th[scope="row"], thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); min-width: 9.5rem; font-weight: 400; }
thead th:first-child { font-weight: 700; }
td strong { display: block; font-weight: 400; font-size: 1.05rem; }
td small { display: block; }
td.best { background: color-mix(in srgb, var(--model) 10%, #fff); }
td.best strong { font-weight: 700; }
td.best small { color: var(--ink); }
td.missing strong { color: #b3261e; }
td.none { color: #9a9a9a; }
tfoot th, tfoot td { border-bottom: 0; border-top: 2px solid var(--ink); }
tfoot th[scope="row"] { font-weight: 700; }
tfoot td strong { font-weight: 700; }
.categories-preview { color: var(--muted); margin-top: 1.75rem; max-width: 72ch; }

/* Další zadání (stránka zadání) */
.others { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.others li { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1.5rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 1.1rem 0; }
.others a { font-size: 1.2rem; font-weight: 700; }
.others span { color: var(--muted); font-size: .95rem; }

/* Metodika */
.method { padding-top: 5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem 4.5rem; }
.method-text { max-width: 62ch; }
.method-text p + p { margin-top: 1rem; }
.disclaimer { color: var(--muted); font-size: .9rem; }

/* Závěr */
.closing { margin-block: 5rem 4rem; padding-top: 2.5rem; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; flex-wrap: wrap; }
.closing h2 { margin-bottom: .4rem; }
.closing p { color: var(--muted); }
.bottom { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: .88rem; }
.bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bottom-links { display: flex; gap: 1.25rem; }

@media (max-width: 860px) {
  .hero-grid, .method { grid-template-columns: 1fr; }
  .hero { padding: 3.25rem 0 2.5rem; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 2rem); }
  .task > summary { grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; padding: 1.3rem 0; }
  .task-state { grid-column: 1; grid-row: 2; white-space: normal; }
  .chevron { grid-column: 2; grid-row: 1; }
  .standing-head { flex-wrap: wrap; row-gap: 0; }
  th, td { padding: .6rem .7rem; }
  th[scope="row"], thead th:first-child { min-width: 7.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
