:root {
  --ink: #171714;
  --muted: #706f68;
  --paper: #f4f0e7;
  --surface: #fffdf8;
  --line: #dcd6ca;
  --accent: #d3542f;
  --accent-dark: #a93b1d;
  --green: #275d51;
  --gold: #c3942f;
  --silver: #8b9297;
  --bronze: #9a6040;
  --shadow: 0 18px 50px rgba(40, 34, 24, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23,23,20,.12); background: rgba(244,240,231,.92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 900; letter-spacing: -.08em; border-radius: 4px; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.privacy { font-size: 12px; color: var(--muted); }
main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.season-bar { margin: 28px 0 0; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: white; background: var(--green); border-radius: 7px; box-shadow: var(--shadow); }
.season-title span { display: block; color: rgba(255,255,255,.72); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.season-title strong { display: block; margin-top: 2px; font: 500 27px/1.15 Georgia, serif; }
.season-actions { display: flex; align-items: center; gap: 9px; }
.season-actions select { min-width: 150px; padding: 10px 34px 10px 13px; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; background: white; color: var(--ink); font-weight: 800; }
.season-actions .button { border-color: rgba(255,255,255,.5); }
.ranking-season { color: var(--accent); white-space: nowrap; }
.hero { min-height: 420px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 70px; align-items: center; padding: 68px 0 54px; }
.eyebrow, .step { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; max-width: 800px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6.2vw, 82px); line-height: .98; letter-spacing: -.05em; font-weight: 500; }
h1 em { color: var(--accent); font-weight: 500; }
.lede { max-width: 720px; margin: 28px 0 0; font-size: 17px; color: #55534d; }
.rule-card { min-height: 220px; padding: 30px; background: var(--ink); color: white; border-radius: 6px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.rule-number { font-family: Georgia, serif; font-size: 76px; line-height: 1; color: #f2b247; }
.rule-card p { margin: 6px 0 0; color: #bbb9b2; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 22px; }
.import-panel, .ranking-panel, .warnings-panel { padding: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.section-heading > p { margin: 0; color: var(--muted); max-width: 500px; text-align: right; }
.step { margin-bottom: 5px; }
.edition-grid { display: grid; grid-template-columns: repeat(var(--edition-cols, 4), 1fr); gap: 12px; }
.ranking-config { margin: -4px 0 22px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #f2eee5; border: 1px solid var(--line); border-radius: 6px; }
.ranking-config p { max-width: 470px; margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.config-kicker { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.config-controls { display: flex; align-items: center; gap: 9px; font-weight: 800; white-space: nowrap; }
.config-controls label { display: inline-flex; align-items: center; gap: 7px; }
.config-controls select { min-width: 56px; padding: 7px 26px 7px 10px; border: 1px solid #bcb5a8; border-radius: 4px; background: white; color: var(--ink); font-weight: 850; }
.edition-card { border: 1px dashed #c7c0b3; border-radius: 6px; padding: 18px; min-height: 154px; display: flex; flex-direction: column; background: #faf7f0; transition: .2s ease; }
.edition-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.edition-card.loaded { border-style: solid; border-color: #9bb9af; background: #f4faf7; }
.edition-top { display: flex; justify-content: space-between; align-items: center; }
.edition-label { border: 0; background: transparent; width: 120px; padding: 0; font-weight: 800; color: var(--ink); }
.edition-index { font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.drop-button { margin-top: auto; border: 0; background: none; padding: 18px 0 0; text-align: left; color: var(--accent-dark); font-weight: 750; }
.file-meta { color: var(--muted); font-size: 12px; margin: 12px 0 0; word-break: break-word; }
.remove-edition { border: 0; background: transparent; color: var(--muted); padding: 2px 5px; font-size: 18px; }
.import-summary { margin-top: 18px; min-height: 22px; color: var(--green); font-weight: 650; }
.button { border-radius: 4px; border: 1px solid transparent; padding: 10px 15px; font-weight: 750; transition: .18s ease; }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button.ghost { padding: 8px 12px; background: transparent; border-color: #c6c0b4; color: var(--muted); font-size: 12px; }
.export-actions { display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-bottom: 22px; }
.stat { padding: 18px 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ranking-filters { display: grid; gap: 9px; }
.division-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.division-tab { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: transparent; color: var(--muted); font-size: 13px; }
.division-tab.active { border-color: var(--ink); background: var(--ink); color: white; }
.category-tabs { display: flex; gap: 16px; min-height: 25px; align-items: center; }
.category-tab { border: 0; border-bottom: 2px solid transparent; padding: 3px 1px 5px; background: transparent; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.category-tab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.search input { width: 260px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 4px; background: #fff; outline: 0; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(211,84,47,.12); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
table { width: 100%; border-collapse: collapse; min-width: 820px; background: white; }
th, td { padding: 13px 14px; border-bottom: 1px solid #ebe6dc; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: #f2eee5; z-index: 1; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffbf2; }
.rank { width: 66px; font-family: Georgia, serif; font-size: 22px; }
.rank-badge { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; }
.podium-1 .rank-badge { background: #f3d376; color: #5f4407; }
.not-qualified { color: var(--muted); background: #faf8f3; }
.not-qualified .rank-badge { width: auto; min-width: 38px; padding: 0 7px; border-radius: 999px; background: #e8e3d9; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 700; }
.not-qualified .score-total { color: var(--muted); }
html.wordpress-loading body { visibility: hidden; }
html.viewer-mode .import-panel,
html.viewer-mode #clearButton,
html.viewer-mode .warnings-panel,
html.viewer-mode .hero,
html.viewer-mode .method,
html.viewer-mode .export-actions { display: none; }
html.viewer-mode main { padding-top: 32px; }
html.viewer-mode .season-bar { margin-top: 0; }
html.viewer-mode #addSeasonButton { display: none; }
html.viewer-mode .ranking-heading .step { display: none; }
html.viewer-mode footer span:last-child { display: none; }
.podium-2 .rank-badge { background: #d8dde0; color: #41484d; }
.podium-3 .rank-badge { background: #d4a180; color: #59301c; }
.athlete strong { display: block; }
.athlete small { color: var(--muted); }
.score-total { font-weight: 900; color: var(--accent-dark); }
.score-dropped { background: #f5f1e8; color: #4f4d48; }
.dropped-score { display: inline-flex; flex-direction: column; align-items: flex-end; font-weight: 700; text-decoration: line-through 2px var(--accent); text-decoration-skip-ink: none; }
.dropped-score small { margin-top: 2px; color: var(--accent-dark); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.empty-state { padding: 66px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 5px; }
.empty-icon { font-size: 34px; color: var(--accent); transform: rotate(-45deg); }
.empty-state h3 { margin: 10px 0 4px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.empty-state p { margin: 0; color: var(--muted); }
.section-heading.compact { margin-bottom: 18px; }
.warning-count { color: var(--accent-dark); font-weight: 800; }
.warnings-list { display: grid; gap: 8px; }
.warning { padding: 13px 15px; border-left: 3px solid var(--gold); background: #fff8e8; color: #5f4a1f; }
.warning strong { display: block; color: var(--ink); }
.method { padding: 70px 0 60px; }
.method > h2 { margin: 0 0 30px; font: 500 36px/1.1 Georgia, serif; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.method article { border-top: 2px solid var(--ink); padding-top: 18px; }
.method article > span { color: var(--accent); font-weight: 900; }
.method h3 { margin: 24px 0 8px; font-size: 17px; }
.method p { margin: 0; color: var(--muted); }
footer { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 34px; border-top: 1px solid rgba(23,23,20,.15); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .rule-card { min-height: 160px; transform: none; }
  .edition-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .privacy { display: none; }
  main { width: min(100% - 24px, 1240px); }
  .hero { padding-top: 44px; min-height: 0; }
  h1 { font-size: 46px; }
  .panel { padding: 20px; }
  .section-heading, .ranking-heading, .toolbar, .ranking-config { align-items: stretch; flex-direction: column; }
  .ranking-config p { text-align: left; }
  .section-heading > p { text-align: left; }
  .edition-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .search input { width: 100%; }
  .export-actions .button { flex: 1; }
  .season-bar, .season-actions { align-items: stretch; flex-direction: column; }
  .season-actions select, .season-actions .button { width: 100%; }
}
