/* Ruhmeshalle SG Speyer-Schwegenheim — Farben und Schrift nach sg-speyer-schwegenheim.de (Neve-Theme):
   Orange-Akzent #ec8524 / #d57113, Dunkelblau #1a3a5c / #084157, warmes Hellgrau #f9f6f2, Text #272626, Schrift Barlow */
:root {
  --paper: #f9f6f2;
  --paper-2: #f1ece4;
  --paper-3: #e4ddd2;
  --ink: #272626;
  --ink-2: #4b4a48;
  --ink-3: #7a7873;
  --line: #ddd6cb;
  --navy: #1a3a5c;
  --navy-2: #084157;
  --navy-3: #2f5f85;
  --orange: #ec8524;
  --orange-2: #d57113;
  --orange-3: #fbe9cf;
  --gold: #f0c040;
  --win: #2e8b57;
  --draw: #b5892a;
  --loss: #be574b;
  --shadow: 0 1px 2px rgba(26, 58, 92, .08), 0 12px 32px -18px rgba(26, 58, 92, .35);
  --radius: 8px;
  --font-display: "Barlow", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Barlow", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.5;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(236, 133, 36, .14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(26, 58, 92, .10), transparent 60%);
  background-attachment: fixed;
}
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--orange-2); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; text-transform: uppercase; margin: 0 0 .4em; line-height: 1.12; font-variant-numeric: lining-nums tabular-nums; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; letter-spacing: .05em; }
h4 { font-size: .95rem; }
.num, td.num, th.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--ink-3); }
.small { font-size: .85em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.5rem;
  background: rgba(8, 65, 87, .97); color: #fff; backdrop-filter: blur(6px); box-shadow: 0 3px 0 var(--orange), 0 8px 24px -14px rgba(0,0,0,.6); }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark { font-size: 2rem; line-height: 1; color: var(--orange); text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-club { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.brand-title { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); font-weight: 600; }
.site-nav { display: flex; gap: .2rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: rgba(255,255,255,.9); padding: .4rem .7rem; border-radius: 6px; font-weight: 600; font-size: .92rem; text-transform: uppercase; letter-spacing: .03em; }
.site-nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.site-nav a.active { background: var(--orange); color: #fff; }
.site-nav a.home-link { border: 1px solid rgba(255,255,255,.35); margin-right: .4rem; color: #fff; }
.site-nav a.home-link:hover { background: var(--orange); border-color: var(--orange); }
.search-wrap { position: relative; }
#quick-search { width: 200px; padding: .45rem .7rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: .9rem; }
#quick-search::placeholder { color: rgba(255,255,255,.6); }
#quick-search:focus { outline: 2px solid var(--orange); background: rgba(255,255,255,.18); }
.quick-results { position: absolute; right: 0; top: 110%; min-width: 280px; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.quick-results a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.quick-results a:last-child { border-bottom: 0; }
.quick-results a:hover { background: var(--orange-3); text-decoration: none; }

/* Layout */
.app { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 2rem 1.5rem 4rem; min-height: 60vh; }
.loading { padding: 4rem; text-align: center; color: var(--ink-3); font-family: var(--font-display); font-size: 1.3rem; }
.page-head { margin-bottom: 1.8rem; animation: rise .5s ease both; }
.page-head h1 { color: var(--navy); }
.kicker { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--orange-2); font-weight: 700; margin-bottom: .4rem; }
.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 70ch; }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); animation: rise .5s ease both; }
.card h2, .card h3 { margin-top: 0; color: var(--navy); }
.card.green { background: var(--navy); color: #fff; border-color: var(--navy); }
.card.green h2, .card.green h3 { color: var(--orange); }
.card.green a { color: #fff; }
.card.green a:hover { color: var(--gold); }
.card.green .muted { color: rgba(255,255,255,.7); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise .5s ease both; }
.stagger > *:nth-child(2) { animation-delay: .06s; } .stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; } .stagger > *:nth-child(5) { animation-delay: .24s; } .stagger > *:nth-child(6) { animation-delay: .3s; }
ol.toplist { padding-left: 1.4rem; margin: .4rem 0; } ol.toplist li { padding: .15rem 0; }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.2rem 0 2rem; }
.tile { background: var(--navy); color: #fff; border-radius: var(--radius); padding: .9rem 1rem; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; right: -20px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: rgba(236,133,36,.2); }
.tile .v { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; color: var(--orange); line-height: 1; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tile .v.text { font-size: 1.2rem; line-height: 1.1; text-transform: uppercase; overflow-wrap: normal; hyphens: manual; }
.tile .l { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-top: .35rem; white-space: normal; line-height: 1.25; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .45rem .7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--paper-2); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); position: sticky; top: 0; cursor: pointer; user-select: none; }
thead th.sorted { color: var(--navy); box-shadow: inset 0 -2px 0 var(--orange); }
tbody tr:hover { background: rgba(236,133,36,.1); }
tbody tr.ours { background: rgba(26,58,92,.08); font-weight: 600; }
tbody tr.ours:hover { background: rgba(26,58,92,.14); }
tr.rank-1 td:first-child { color: var(--orange-2); font-weight: 800; }
td.name a { font-weight: 600; }
.rank { color: var(--ink-3); font-family: var(--font-mono); }
.res { display: inline-block; min-width: 1.6em; text-align: center; font-family: var(--font-mono); font-weight: 600; border-radius: 4px; padding: 0 .3em; }
.res.w { background: var(--win); color: #fff; } .res.d { background: var(--draw); color: #fff; } .res.l { background: var(--loss); color: #fff; } .res.f { background: var(--paper-3); color: var(--ink-3); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .45rem; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); margin-left: .3rem; vertical-align: middle; }
.badge.gold { background: var(--orange); color: #fff; } .badge.green { background: var(--navy-3); color: #fff; } .badge.title { background: var(--navy); color: var(--gold); }
.lvl { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 4px; background: var(--paper-3); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.lvl.l1, .lvl.l2 { background: var(--orange); color: #fff; } .lvl.l3 { background: var(--navy); color: #fff; } .lvl.l4, .lvl.l5 { background: var(--navy-3); color: #fff; }
.pct-bar { display: inline-block; width: 70px; height: 8px; background: var(--paper-3); border-radius: 4px; vertical-align: middle; margin-right: .4rem; overflow: hidden; }
.pct-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); border-radius: 4px; }

/* Tabs & controls */
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.2rem; }
.tabs button, .btn { font: inherit; font-weight: 600; font-size: .85rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.tabs button:hover, .btn:hover { border-color: var(--orange); color: var(--orange-2); text-decoration: none; }
.tabs button.active, .btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.controls input, .controls select { font: inherit; padding: .4rem .6rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.season-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.4rem; }
.season-nav a { padding: .25rem .55rem; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-family: var(--font-mono); font-size: .8rem; }
.season-nav a.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Hall of fame podium */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.pod { position: relative; border-radius: var(--radius); padding: 1.2rem 1.2rem 1rem; background: linear-gradient(160deg, #24507a, var(--navy)); color: #fff; box-shadow: var(--shadow); overflow: hidden; }
.pod .place { position: absolute; right: .8rem; top: .4rem; font-family: var(--font-display); font-size: 4rem; font-weight: 800; color: rgba(255,255,255,.14); line-height: 1; }
.pod .who { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--gold); text-transform: uppercase; }
.pod .who a { color: var(--gold); }
.pod .val { font-family: var(--font-mono); font-size: 1.6rem; margin-top: .3rem; }
.pod .sub { font-size: .8rem; opacity: .85; }
.pod.p1 { background: linear-gradient(160deg, #b85e12, var(--orange) 60%, #f3a24f); color: #fff; }
.pod.p1 .who, .pod.p1 .who a { color: #fff; } .pod.p1 .place { color: rgba(255,255,255,.25); }

/* Player profile */
.profile-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: end; margin-bottom: 1.5rem; }
.profile-head .name { font-size: clamp(2rem, 4vw, 3rem); color: var(--navy); }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-2); font-size: .95rem; }
.facts b { color: var(--ink); font-family: var(--font-mono); }
.awards { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.award { background: var(--orange-3); border: 1px solid var(--orange); color: #8a4a0f; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(46px, 1fr); gap: 3px; align-items: end; height: 120px; margin: .8rem 0 .2rem; }
.timeline .bar { background: var(--navy); border-radius: 4px 4px 0 0; position: relative; min-height: 4px; }
.timeline .bar:hover { background: var(--orange); }
.timeline .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .7rem; font-family: var(--font-mono); color: var(--ink-2); padding-bottom: 2px; }
.timeline-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(46px, 1fr); gap: 3px; font-size: .68rem; color: var(--ink-3); font-family: var(--font-mono); text-align: center; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-3); }
svg.chart .grid line { stroke: var(--line); stroke-width: 1; }
svg.chart .line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; }
svg.chart .dot { fill: #fff; stroke: var(--navy); stroke-width: 2; }
svg.chart .dot:hover { fill: var(--orange); }
svg.chart .area { fill: rgba(26,58,92,.1); }
svg.chart .step { fill: none; stroke: var(--orange); stroke-width: 3; }
svg.chart .step-dot { fill: var(--navy); }
svg.chart .step-dot:hover { fill: var(--orange-2); }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; padding: .35rem .6rem; border-radius: 6px; font-size: .8rem; font-family: var(--font-mono); box-shadow: var(--shadow); }

/* Match detail */
.boards td.center, td.center { text-align: center; }
.score { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--orange-2); font-variant-numeric: lining-nums tabular-nums; }
.match-list .S { color: var(--win); font-weight: 700; } .match-list .U { color: var(--draw); font-weight: 700; } .match-list .N { color: var(--loss); font-weight: 700; }
.note { background: var(--orange-3); border-left: 4px solid var(--orange); padding: .6rem .9rem; border-radius: 6px; font-size: .9rem; margin: 1rem 0; }
.two-col { columns: 2; column-gap: 2rem; } .two-col > * { break-inside: avoid; }
.site-footer { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; color: var(--ink-3); font-size: .82rem; border-top: 1px solid var(--line); display: grid; gap: .3rem; }
dl.defs { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; }
dl.defs dt { font-weight: 700; color: var(--navy); }
dl.defs dd { margin: 0; color: var(--ink-2); }
code { font-family: var(--font-mono); font-size: .85em; background: var(--paper-2); padding: .1em .3em; border-radius: 4px; }
@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; gap: .6rem; padding: .6rem 1rem; }
  .site-nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .search-wrap { margin-left: auto; } #quick-search { width: 150px; }
  .app { padding: 1.2rem 1rem 3rem; }
  .profile-head { grid-template-columns: 1fr; }
  .two-col { columns: 1; }
  .grid-2 { grid-template-columns: 1fr !important; }
}
