/* Shared styles for the Allsvenskan league page and the club pages. */
.wrap { max-width: 820px; margin: 0 auto; padding: 22px 16px 56px; }
.intro { color: var(--ink-muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.updated { color: var(--ink-faint); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 15px; margin: 0 0 12px; }
.empty { color: var(--ink-faint); font-size: 14px; padding: 8px 0; }
.more-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--gold-deep); text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* Crests + linked club names, shared by the table and match rows. */
.crest { width: 20px; height: 20px; object-fit: contain; flex: none; display: inline-block; }
.team-link { color: inherit; text-decoration: none; }
.team-link:hover { text-decoration: underline; }

/* League table. Wide (9 cols), so it scrolls horizontally on narrow screens
   rather than squeezing. The club cell stays a real table-cell — its crest+name
   sit in an inner inline-flex span (display:flex on a <td> breaks the row). */
#table { overflow-x: auto; }
.lt { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; }
.lt th, .lt td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.lt th:nth-child(2), .lt td:nth-child(2) { text-align: left; width: 100%; }
.lt td.club .cc { display: inline-flex; align-items: center; gap: 9px; }
.lt thead th { color: var(--ink-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.lt td.num { font-variant-numeric: tabular-nums; }
.lt td.pts { font-weight: 700; }
.lt tbody tr.self { background: var(--gold-wash); }
.lt tbody tr:hover { background: var(--surface-sunken); }
.lt tbody tr.self:hover { background: var(--gold-wash); }

/* Match rows (kommande / spelschema / a club's matches). */
.match { display: grid; grid-template-columns: 72px minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.match:last-child { border-bottom: 0; }
.match-time { color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.match-home { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.match-away { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; }
.t-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-score { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; min-width: 44px; text-align: center; }
.match-score.live { color: var(--danger); }
.match-vs { color: var(--ink-faint); font-size: 13px; min-width: 44px; text-align: center; }
.day-head { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); font-weight: 600; }
.day-head:first-child { margin-top: 0; }

/* Note legend (Europe / relegation colours). */
.legend-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.leg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* Club hero (club page). */
.club-hero { display: flex; align-items: center; gap: 16px; margin: 4px 0 20px; }
.crest-lg { width: 60px; height: 60px; object-fit: contain; flex: none; }
.club-hero h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.club-meta { color: var(--ink-muted); font-size: 14px; }
.club-meta a { color: inherit; text-decoration: underline; }

/* Sticky in-page section nav (league page). */
html { scroll-behavior: smooth; }
.jumpnav { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.jumpnav-inner { max-width: 820px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.jumpnav-inner::-webkit-scrollbar { display: none; }
.jump { flex: none; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.jump:hover { background: var(--surface-sunken); color: var(--ink); }
.jump.active { background: var(--gold-wash); border-color: var(--gold); color: var(--gold-deep); }
.sec { scroll-margin-top: 60px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
