/* D3vil Sports — shared styles */

:root {
  --bg: #0c0605;
  --bg-elevated: #1c1210;
  --bg-raised: #241713;
  --border: #3a221c;
  --text: #f5ede9;
  --text-dim: #b09a92;
  --accent: #e0554a;

  --nfl: #6f9de3;
  --nba: #e8a33d;
  --wnba: #d4649a;
  --mlb: #d94f4f;
  --nhl: #7fd0c9;
  --cfb: #9b8cff;
  --ncaam: #5fd88f;
  --ncaaw: #ff9ecb;
  --ufc: #ff3b3b;
  --boxing: #c9a15a;
  --golf: #a8c15a;
  --horse: #a0673f;
}

/* Dark is the default (above). Light only applies when explicitly
   chosen via the toggle -- never from system prefers-color-scheme, so
   the site always starts dark regardless of visitor OS settings. */
:root[data-theme="light"] {
  --bg: #f5efe9;
  --bg-elevated: #fffaf7;
  --bg-raised: #fdf5f1;
  --border: #e8ddd4;
  --text: #1c1210;
  --text-dim: #7a655c;
  --accent: #b3261e;
}

.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.theme-toggle:hover { border-color: var(--accent); }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(255, 90, 60, 0.07), transparent 60%),
    radial-gradient(900px 620px at 0% 100%, rgba(150, 20, 10, 0.12), transparent 60%),
    var(--bg);
}

h1, h2, h3, .brand {
  font-family: "Sora", "Inter", -apple-system, sans-serif;
}

a { color: inherit; }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

.spectrum-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #2b0805, var(--accent), #ffb347, var(--accent), #2b0805
  );
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 32px 0 24px;
  overflow: visible;
  background:
    radial-gradient(650px 240px at 12% -25%, rgba(255, 90, 60, 0.18), transparent 70%),
    radial-gradient(500px 200px at 92% 110%, rgba(180, 30, 15, 0.16), transparent 70%);
}

header.site .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-align: center;
}

.brand .mascot {
  /* Fixed width matching .brand-text's rendered width (~168px) -- the
     text's font-size never changes with viewport, so the icon shouldn't
     either, or the two drift out of proportion at narrow widths. */
  width: 168px;
  height: auto;
  display: block;
  margin-bottom: -8px;
}

/* Two colorways of the mark: cream-on-dark (default) and charcoal-on-light
   (toggled theme) -- the icon's own line color doesn't auto-adapt like text
   does, so it needs a real second asset rather than a CSS filter (a filter
   would also wreck the red sun accent, which needs to switch between
   #e0554a on dark and #b3261e on light -- same two shades --accent uses
   per theme, matching D3vil World News). Swapped the same way the sun/moon
   toggle icons already are. */
.brand .mascot-light { display: none; }
:root[data-theme="light"] .brand .mascot-dark { display: none; }
:root[data-theme="light"] .brand .mascot-light { display: block; }

.brand .brand-sub {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}

.brand .accent-char { color: var(--accent); }

.tagline {
  color: var(--text-dim);
  font-size: 14px;
}

main { padding: 36px 0 80px; }

.leagues-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 32px;
}

.notice-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.notice-kicker {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.subscribe-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 32px;
}

.recap-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 32px;
}

.recap-label {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.recap-sub {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.recap-box audio {
  width: 100%;
  display: block;
  margin-bottom: 14px;
}

.recap-speed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recap-speed-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recap-speed-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.recap-speed-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.recap-speed-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.recap-speed-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.subscribe-details { list-style: none; }
.subscribe-details summary::-webkit-details-marker { display: none; }
.subscribe-details summary::marker { content: ""; }

.subscribe-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.subscribe-toggle-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}

.subscribe-toggle-text span {
  display: block;
  color: var(--text-dim);
  font-size: 13.5px;
}

.subscribe-toggle-btn {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.subscribe-details[open] .subscribe-toggle-btn { display: none; }

.subscribe-form-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Kit embed overrides: strip the default template's photo/heading,
   keep just the functional input + button, restyled to match. */
.subscribe-form-wrap .formkit-background,
.subscribe-form-wrap .formkit-header,
.subscribe-form-wrap .formkit-subheader,
.subscribe-form-wrap .formkit-column:first-child {
  display: none !important;
}

.subscribe-form-wrap form > div {
  display: block !important;
}

.subscribe-form-wrap .formkit-column:last-child {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.subscribe-form-wrap .seva-fields.formkit-fields {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}

.subscribe-form-wrap .formkit-field {
  flex: 1 1 220px !important;
  margin: 0 !important;
}

.subscribe-form-wrap .formkit-input {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 11px 14px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-family: inherit !important;
}

.subscribe-form-wrap .formkit-submit {
  padding: 11px 20px !important;
  border-radius: 8px !important;
  border: none !important;
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  cursor: pointer !important;
}

.subscribe-form-wrap .formkit-powered-by-convertkit-container {
  margin-top: 10px !important;
  opacity: 0.5 !important;
  transform: scale(0.8) !important;
  transform-origin: left !important;
}

.chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

a.chip:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.chip.NFL { border-color: var(--nfl); color: var(--nfl); }
.chip.NBA { border-color: var(--nba); color: var(--nba); }
.chip.WNBA { border-color: var(--wnba); color: var(--wnba); }
.chip.MLB { border-color: var(--mlb); color: var(--mlb); }
.chip.NHL { border-color: var(--nhl); color: var(--nhl); }
.chip.CFB { border-color: var(--cfb); color: var(--cfb); }
.chip.NCAAM { border-color: var(--ncaam); color: var(--ncaam); }
.chip.NCAAW { border-color: var(--ncaaw); color: var(--ncaaw); }
.chip.UFC { border-color: var(--ufc); color: var(--ufc); }
.chip.Boxing { border-color: var(--boxing); color: var(--boxing); }
.chip.Golf { border-color: var(--golf); color: var(--golf); }
.chip.HorseRacing { border-color: var(--horse); color: var(--horse); }

/* Post cards on index */
.post-card {
  display: block;
  text-decoration: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 90, 60, 0.14), 0 8px 22px rgba(0, 0, 0, 0.3);
}

.post-card .date {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.post-card h2 {
  margin: 8px 0 8px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.post-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* Post detail page */
.post-header { margin-bottom: 28px; }

.post-header .date {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.post-header h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

/* Quick-jump nav on post pages */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.jump-nav a {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.jump-nav a:hover { border-color: var(--accent); color: var(--text); }

.league-section {
  margin-bottom: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 20px;
}

.league-section h2 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  padding: 4px 0;
  border-bottom: 3px solid currentColor;
  display: inline-block;
}

.league-section.NFL h2 { color: var(--nfl); }
.league-section.NBA h2 { color: var(--nba); }
.league-section.WNBA h2 { color: var(--wnba); }
.league-section.MLB h2 { color: var(--mlb); }
.league-section.NHL h2 { color: var(--nhl); }
.league-section.CFB h2 { color: var(--cfb); }
.league-section.NCAAM h2 { color: var(--ncaam); }
.league-section.NCAAW h2 { color: var(--ncaaw); }
.league-section.UFC h2 { color: var(--ufc); }
.league-section.Boxing h2 { color: var(--boxing); }
.league-section.Golf h2 { color: var(--golf); }
.league-section.HorseRacing h2 { color: var(--horse); }

.story {
  margin-bottom: 18px;
}

.story h3 {
  font-size: 16.5px;
  margin: 0 0 4px;
  font-weight: 700;
}

.story p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 15px;
}

.story .src {
  font-size: 12.5px;
}

.story .src a {
  color: var(--text-dim);
  text-decoration: underline;
}

.story .src a:hover { color: var(--accent); }

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 13px;
}
