/* Dead Leagues Club: 70s print palette, light and dark */

/* Swap "Fraunces" out once TAN Headline's webfont is in static/fonts (see README). */
:root {
  --display: "TAN Headline", "Fraunces", Georgia, serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --radius: 14px;

  /* Brand colors: the same in both modes */
  --plum: #5A2D4C;
  --lemon: #FFF3C2;
  --cream: #E2DACA;
  --gold: #E4BD78;
  --orange: #E07A5A;
  --coral: #CF5C57;
  --maroon: #984249;
}

/* Light (default) */
:root, [data-theme="light"] {
  --bg: #F3EDE1;
  --panel: #E2DACA;
  --card: #FFF9EE;
  --ink: #5A2D4C;
  --head: #5A2D4C;
  --muted: #6E5563;
  --link: #984249;
  --link-hover: #5A2D4C;
  --border: #5A2D4C;
  --rule: rgba(90, 45, 76, 0.2);
  --btn-bg: #5A2D4C;
  --btn-ink: #FFF3C2;
  --btn-hover: #984249;
  --header: #5A2D4C;
  --loss: #A23A34;
  --right-bg: #E3F0DD; --right-ink: #1F4A27; --right-line: #2F6B3A;
  --wrong-bg: #F8E1DE; --wrong-ink: #7A2420; --wrong-line: #A23A34;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1E141B;
  --panel: #2A1D26;
  --card: #33232E;
  --ink: #EDE3D6;
  --head: #FFF3C2;
  --muted: #CDBBC4;
  --link: #E4BD78;
  --link-hover: #FFF3C2;
  --border: #6B4A60;
  --rule: #4A3342;
  --btn-bg: #FFF3C2;
  --btn-ink: #5A2D4C;
  --btn-hover: #E4BD78;
  --header: #140D12;
  --loss: #F0958C;
  --right-bg: #1F3A24; --right-ink: #CDEBC3; --right-line: #6FB37A;
  --wrong-bg: #45201E; --wrong-ink: #F7C9C3; --wrong-line: #E07A5A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 780px; }
.col { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.col--wide { max-width: 880px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--plum); color: var(--lemon); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.fine { font-size: 0.9rem; color: var(--muted); }
.meta { font-size: 0.95rem; color: var(--muted); margin: 0; }
.empty { color: var(--muted); font-style: italic; }

/* Display type */
h1, h2, h3, .section__title, .card__title, .box__title, .feature__title, .story-head__title,
.join__title, .footer__tag, .banner__title, .shop__title, .wear__title, .list__name, .quiz__q, .quiz__score, .masthead__brand {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.01em;
  color: var(--head);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.02; margin: 0 0 0.35em; }
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); margin: 0 0 8px; }
.kicker--gold { color: var(--gold); }
.more { font-weight: 600; color: var(--link); }

/* Stripes */
.stripes { display: flex; flex-direction: column; }
.stripes i { display: block; height: 9px; }
.stripes--thin i { height: 5px; }
.stripes i:nth-child(1) { background: var(--gold); }
.stripes i:nth-child(2) { background: var(--orange); }
.stripes i:nth-child(3) { background: var(--coral); }
.stripes i:nth-child(4) { background: var(--maroon); }

/* Header */
.masthead { background: var(--header); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.masthead__brand { display: flex; align-items: center; gap: 12px; color: var(--lemon); text-decoration: none; font-size: 1.5rem; }
.masthead__brand img { width: 46px; height: 46px; border-radius: 50%; }
.masthead__brand:hover { color: var(--lemon); }
.masthead__nav { display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; }
.masthead__nav a { color: var(--lemon); font-weight: 600; text-decoration: none; padding: 10px 0; }
.masthead__nav a:hover { color: var(--lemon); text-decoration: underline; }
.theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255, 243, 194, 0.45); background: transparent; color: var(--lemon); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.theme-toggle:hover { border-color: var(--lemon); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.draft-banner { margin: 0; padding: 10px 20px; background: var(--gold); color: var(--plum); font-weight: 600; text-align: center; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--btn-bg); color: var(--btn-ink); font: inherit; font-weight: 600; text-decoration: none; padding: 13px 26px; border-radius: 999px; border: 0; min-height: 48px; cursor: pointer; line-height: 1.2; }
.button:hover { background: var(--btn-hover); color: var(--btn-ink); }
.button--lemon { background: var(--lemon); color: var(--plum); }
.button--lemon:hover { background: var(--gold); color: var(--plum); }
.button--small { padding: 10px 20px; font-size: 0.95rem; min-height: 44px; white-space: nowrap; }
.linklike { background: none; border: 0; padding: 12px 0; font: inherit; font-weight: 600; color: var(--link); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 12px 22px; flex-wrap: wrap; align-items: center; }

/* Photo placeholders: plum duotone with stripes until a real image is set */
.photo { position: relative; overflow: hidden; background: var(--plum) center / cover no-repeat; }
.photo i { position: absolute; left: 0; right: 0; height: 7%; }
.photo i:nth-child(1) { bottom: 27%; background: var(--gold); }
.photo i:nth-child(2) { bottom: 20%; background: var(--orange); }
.photo i:nth-child(3) { bottom: 13%; background: var(--coral); }
.photo i:nth-child(4) { bottom: 6%; background: var(--maroon); }
.photo--feature { aspect-ratio: 4 / 3; border-radius: 16px; }
.photo--hero { aspect-ratio: 21 / 9; border-radius: 16px; }
.photo--card { aspect-ratio: 16 / 9; }
.photo--thumb { width: 112px; height: 112px; border-radius: 10px; flex: none; }
.photo--thumb i { height: 9%; }

/* Featured story */
.feature { background: var(--panel); padding: 56px 0; }
.feature__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 40px; align-items: center; }
.feature__text { display: flex; flex-direction: column; gap: 14px; }
.feature__text .kicker { margin: 0; }
.feature__title { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.02; margin: 0; }
.feature__title a { color: inherit; text-decoration: none; }
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.feature__lede { font-size: 1.2rem; color: var(--muted); margin: 0; }
.feature--empty { text-align: center; }

/* Sections */
.section { padding: 56px 0; }
.section--tight { padding: 24px 0; }
.section--alt { background: var(--panel); }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.1; margin: 0 0 24px; }
.section__title--sm { font-size: 1.6rem; margin-bottom: 14px; }
.section__title a { color: inherit; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 20px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 12px; margin-bottom: 28px; }
.section__head .section__title { margin: 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px 48px; align-items: start; }

.page-head { background: var(--panel); padding: 48px 0 40px; }
.page-head--center { text-align: center; padding: 96px 0; }
.page-head__lede { font-size: 1.2rem; max-width: 760px; color: var(--muted); margin: 0 0 16px; }
.crumbs { font-size: 0.9rem; margin-bottom: 12px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 16px 0 0; }
.facts dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.badge { font-size: 0.78rem; font-weight: 600; background: var(--lemon); color: var(--plum); padding: 3px 10px; border-radius: 999px; }

/* Cards (supporting stories) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--orange); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--orange); color: var(--ink); }
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.card__body .kicker { margin: 0; }
.card__title { font-size: 1.6rem; line-height: 1.1; margin: 0; }
.card__text { margin: 0; color: var(--muted); font-size: 1rem; }

/* Feed boxes */
.boxes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.box__link { display: flex; gap: 18px; height: 100%; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.box__link:hover { border-color: var(--border); color: var(--ink); }
.box__link:hover .box__title { text-decoration: underline; }
.box__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.box__body .kicker { margin: 0; font-size: 0.75rem; }
.box__title { margin: 0; font-size: 1.3rem; line-height: 1.15; }
.box__text { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.feed-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 36px; }
.feed-more__note { margin: 0; color: var(--muted); font-size: 0.95rem; }
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; }
.dots span:nth-child(1) { background: var(--gold); }
.dots span:nth-child(2) { background: var(--orange); }
.dots span:nth-child(3) { background: var(--coral); }
.feed-more.is-loading .dots span { animation: pulse 1s infinite ease-in-out; }
.feed-more.is-loading .dots span:nth-child(2) { animation-delay: .15s; }
.feed-more.is-loading .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.pager { text-align: center; margin-top: 20px; }

/* Plum banners (gear roundup, shop the story, wear the story) */
.banner, .shop, .wear { background: var(--plum); color: var(--cream); border-radius: 18px; }
.banner { padding: 32px 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.banner__title { margin: 0; font-size: 2rem; color: var(--lemon); line-height: 1.1; }
.banner__text { margin: 6px 0 0; }
.shop { padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; margin: 12px 0 28px; }
.shop__title { margin: 0; font-size: 1.6rem; color: var(--lemon); line-height: 1.15; }
.shop__text { margin: 4px 0 0; font-size: 1rem; }

/* Story page */
.story-head { padding-top: 48px; display: flex; flex-direction: column; gap: 10px; }
.story-head .kicker { margin: 0; }
.story-head__title { font-size: clamp(2.5rem, 5.5vw, 3.9rem); line-height: 1.02; margin: 0; }
.story-head__lede { margin: 0; font-size: 1.3rem; color: var(--muted); }
.story-photo { margin-top: 32px; margin-bottom: 8px; }
.credit { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }
.prose { padding-top: 24px; }
.prose h2 { font-size: 2rem; line-height: 1.1; margin: 1.5em 0 0.5em; }
.prose h3 { font-size: 1.4rem; margin: 1.3em 0 0.4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--orange); border-radius: 0; font-style: italic; }
.prose table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.prose img { border-radius: 12px; }
.ledger-block { margin-top: 24px; }
.ledger-wrap { overflow-x: auto; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); }
.ledger { border-collapse: collapse; width: 100%; min-width: 480px; font-variant-numeric: tabular-nums; font-size: 1rem; }
.ledger th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--link); padding: 14px 18px; border-bottom: 2px solid var(--border); }
.ledger td { padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num { text-align: right; white-space: nowrap; font-weight: 600; }
.ledger .loss { color: var(--loss); }
.story-foot { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 26px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-block; border: 2px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 1rem; text-decoration: none; color: var(--ink); background: var(--card); }
a.chip:hover { background: var(--lemon); color: var(--plum); border-color: var(--plum); }
.chip--off { opacity: 0.6; border-style: dashed; }
.quiz-nudge { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; background: var(--panel); border-radius: var(--radius); padding: 20px 24px; text-decoration: none; color: var(--ink); }
.quiz-nudge:hover { color: var(--ink); }
.sources ol { margin: 0; padding-left: 1.2em; font-size: 0.95rem; color: var(--muted); }
.cards--plain .card { box-shadow: 6px 6px 0 var(--orange); }

/* Team page */
.team-head { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.team-head__main { flex: 999 1 560px; min-width: 0; }
.wear { flex: 1 1 300px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.wear .kicker { margin: 0; }
.wear__title { margin: 0; font-size: 1.6rem; color: var(--lemon); line-height: 1.1; }
.wear__text { margin: 0; font-size: 0.95rem; }

/* Gear */
.disclosure-note { font-size: 0.95rem; color: var(--muted); }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 28px; margin-bottom: 20px; }
.gear-group { margin-bottom: 24px; }
.gear { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gear__item { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 20px; }
.gear__name { margin: 0; font-weight: 600; }
.gear__meta { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }
.gear__note { margin: 6px 0 0; font-size: 0.95rem; }
.guide { margin: 40px 0 24px; padding: 28px; background: var(--panel); border-radius: var(--radius); }
.guide h2 { margin-top: 0; font-size: 1.6rem; }
.guide dl { margin: 0; display: grid; gap: 14px; }
.guide dt { font-weight: 600; }
.guide dd { margin: 2px 0 0; color: var(--muted); }
.roundup { padding-top: 16px; }
.roundup__team { margin-top: 32px; }

/* Lists (leagues, teams, cities) */
.list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--border); }
.list > li { border-bottom: 1px solid var(--rule); }
.list__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding: 18px 4px; text-decoration: none; color: var(--ink); }
.list__row:hover .list__name { text-decoration: underline; }
.list__item { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding: 16px 4px; }
.list__name { font-size: 1.45rem; color: var(--head); }
a.list__name { text-decoration: none; }
a.list__name:hover { text-decoration: underline; }
.list__meta { color: var(--muted); font-size: 0.95rem; }

/* Trivia */
.quiz-teaser { background: var(--card); border: 2px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.quiz-teaser__q { margin: 0 0 4px; font-weight: 600; font-size: 1.15rem; color: var(--head); }
.quiz-teaser__opt { display: block; border: 2px solid var(--border); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); font-weight: 600; }
.quiz-teaser__opt:hover { background: var(--lemon); color: var(--plum); border-color: var(--plum); }
.quiz { display: flex; flex-direction: column; gap: 20px; }
.quiz__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.quiz__count { margin: 0; font-weight: 600; }
.quiz__pips { display: flex; gap: 6px; }
.quiz__pips span { width: 36px; height: 8px; border-radius: 4px; background: var(--rule); }
.quiz__pips span.is-done { background: var(--orange); }
.quiz__pips span.is-now { background: var(--head); }
.quiz__card { background: var(--card); border: 2px solid var(--border); border-radius: 18px; box-shadow: 8px 8px 0 var(--orange); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.quiz__q { margin: 0; font-size: 1.8rem; line-height: 1.15; }
.quiz__opts { display: flex; flex-direction: column; gap: 12px; }
.quiz__opt { display: block; width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: 1.05rem; border: 2px solid var(--border); background: var(--card); color: var(--ink); border-radius: 14px; padding: 15px 20px; min-height: 56px; cursor: pointer; }
.quiz__opt:hover:not(:disabled) { background: var(--lemon); color: var(--plum); border-color: var(--plum); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-right { background: var(--right-bg); color: var(--right-ink); border-color: var(--right-line); }
.quiz__opt.is-wrong { background: var(--wrong-bg); color: var(--wrong-ink); border-color: var(--wrong-line); }
.quiz__reveal { border-top: 2px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.quiz__reveal p { margin: 0; }
.quiz__verdict { font-weight: 600; font-size: 1.15rem; }
.quiz__done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--border); border-radius: 18px; box-shadow: 8px 8px 0 var(--orange); padding: 36px 28px; }
.quiz__score { font-size: 3.5rem; line-height: 1; margin: 0; }
.quiz__done .actions { justify-content: center; }

/* Join the club */
.join { background: var(--plum); color: var(--lemon); padding: 56px 0; }
.join__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px 48px; align-items: center; }
.join__title { color: var(--lemon); font-size: clamp(2.2rem, 4.5vw, 3rem); margin: 0 0 8px; }
.join__lede { margin: 0; color: var(--cream); }
.join__form label { display: block; font-weight: 600; margin-bottom: 8px; }
.join__row { display: flex; gap: 10px; flex-wrap: wrap; }
.join__row input[type="email"] { flex: 1 1 220px; min-height: 52px; padding: 12px 18px; font: inherit; border-radius: 999px; border: 2px solid var(--lemon); background: var(--bg); color: var(--ink); }
.join__row button { min-height: 52px; padding: 12px 26px; font: inherit; font-weight: 600; border-radius: 999px; border: 0; background: var(--gold); color: var(--plum); cursor: pointer; }
.join__row button:hover { background: var(--lemon); }
.join__soon p { margin: 0 0 8px; }
.join__social { display: flex; gap: 18px; flex-wrap: wrap; }
.join a { color: var(--lemon); font-weight: 600; }

/* Footer */
.footer { background: var(--header); color: var(--cream); }
.footer__inner { padding-top: 32px; padding-bottom: 40px; }
.footer__tag { font-size: 1.5rem; color: var(--lemon); margin: 0 0 14px; }
.footer__links { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-bottom: 16px; }
.footer__links a { color: var(--lemon); }
.footer__fine { font-size: 0.85rem; margin: 0; color: var(--cream); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .section { padding: 40px 0; }
  .feature { padding: 32px 0 40px; }
  .photo--thumb { width: 84px; height: 84px; }
  .gear__item .button { width: 100%; }
  .banner, .shop { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .feed-more.is-loading .dots span { transition: none; animation: none; }
}
