/* thehole :: spike.news-style block layout
   refined palette, serif display, fleuron ornaments */

:root {
  --bg: #121214;            /* deep neutral charcoal */
  --bg-soft: #1a1a1d;

  --block: #18181b;
  --fg: #e8e6e3;            /* soft off-white */
  --fg-dim: #8d8a86;        /* muted grey for times */
  --src: #b8451f;           /* muted terracotta for source names (not yellow) */
  --line: #2c2c30;
  --accent: #b8451f;        /* terracotta accent */
  --accent-soft: #7a5a52;   /* dusty rose for ornaments */
  --num: #57575c;
  --maxw: 1280px;
  --radius: 4px;
}
:root[data-theme="light"] {
  --bg: #f5f3ef;
  --bg-soft: #fbfaf7;
  --block: #fbfaf7;
  --fg: #1c1b19;
  --fg-dim: #6b6862;
  --src: #9c3a17;
  --line: #e4e1da;
  --accent: #9c3a17;
  --accent-soft: #c4a89f;
  --num: #b2aea6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

/* masthead */
.masthead {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.masthead-inner { display: flex; align-items: baseline; gap: .75rem; padding: .7rem 1rem; }
.logo {
  font-weight: 700; font-size: 1.5rem; letter-spacing: .5px;
  font-style: italic;
}
/* fleuron flanking the wordmark */
.logo::before { content: "❦ "; color: var(--accent-soft); font-style: normal; font-size: .85em; }
.logo::after  { content: " ❧"; color: var(--accent-soft); font-style: normal; font-size: .85em; }
.tagline { color: var(--fg-dim); font-size: .8rem; font-style: italic; }
.masthead-controls { margin-left: auto; display: flex; gap: .4rem; }

.btn {
  background: var(--bg-soft); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .35rem .6rem; font-size: .8rem; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-block { display: block; width: 100%; margin-top: .8rem; }

/* ---- SINGLE COLUMN of blocks ---- */
.grid {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
}
.block { margin-bottom: 1rem; }

/* ads between blocks */
.ad-row { display: flex; justify-content: center; margin: 1rem 0 1.4rem; }
.ad-row .ad-tile { display: flex; align-items: center; justify-content: center; max-width: 100%; overflow: hidden; min-height: 60px; }

/* the mix spans the full width of the grid and stands out */
.block-mix { grid-column: 1 / -1; border-color: var(--accent); }

.block {
  background: var(--block);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem 1rem;
}

.block-head {
  display: flex; align-items: baseline; gap: .5rem;
  padding-bottom: .55rem; margin-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}
.block-title { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: .2px; }
.block-title a:hover { color: var(--accent); }
.block-mix .block-title { color: var(--accent); font-size: 1.35rem; font-style: italic; }
/* a small fleuron before the mix title */
.block-mix .block-title::before { content: "❧ "; color: var(--accent-soft); font-style: normal; }
.block-sub { margin-left: auto; color: var(--fg-dim); font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; }

/* numbered headline lists */
.headlines { list-style: none; margin: 0; padding: 0; counter-reset: h; }
.headline {
  counter-increment: h;
  display: flex; align-items: baseline; gap: .55rem;
  padding: .4rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.headline:last-child { border-bottom: 0; }
.headline::before {
  content: counter(h);
  color: var(--num); font-size: .72rem; font-variant-numeric: tabular-nums;
  min-width: 1.25rem; text-align: right; flex-shrink: 0;
}
.headline-link { flex: 1; min-width: 0; }
.headline-text {
  color: var(--fg);                 /* HEADLINE: brightest, primary */
  font-size: .92rem; line-height: 1.35;
}
.headline-link:hover .headline-text { color: var(--accent); }

.headline-meta { flex-shrink: 0; display: flex; align-items: baseline; gap: .5rem; white-space: nowrap; }
.headline-meta .src {
  color: var(--src);                /* SOURCE: accent color, distinct */
  font-size: .72rem; font-weight: 600;
}
.headline-meta .time {
  color: var(--fg-dim);             /* TIME: dimmest, least important */
  font-size: .72rem; font-variant-numeric: tabular-nums;
}

/* the mix block: two columns of headlines on wide screens for density */
.mix-headlines { columns: 2; column-gap: 2rem; }
.mix-headlines .headline { break-inside: avoid; }
@media (max-width: 700px) { .mix-headlines { columns: 1; } }

/* density toggle: tighter rows, hide source label tweaks */
body.dense .headline { padding: .25rem 0; }
body.dense .headline-text { font-size: .86rem; }

.empty { padding: 1.5rem 0; color: var(--fg-dim); }
.empty code { background: var(--bg-soft); padding: .1rem .35rem; border-radius: 5px; }
.empty-small { color: var(--fg-dim); font-size: .82rem; padding: .3rem 0; list-style: none; }

/* ad tile (300x250 sits among source blocks) */
.block-ad { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.ad-tile { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 300px; overflow: hidden; }
.ad-tile :where(iframe, ins, div) { max-width: 100%; }

/* top banner: desktop 728x90 vs mobile 320x50 */
.ad-top { text-align: center; padding: .8rem 1rem .2rem; min-height: 50px; }
.ad-top-mobile { display: none; }
@media (max-width: 760px) {
  .ad-top-desktop { display: none; }
  .ad-top-mobile { display: block; }
}

/* ads */
.ad-slot { text-align: center; }
.ad-slot-top { padding: .8rem 1rem 0; }
.ad-slot-bottom { padding: 0 1rem 2rem; }
.ad-infeed-wrap { list-style: none; padding: .6rem 0; break-inside: avoid; }
.ad-placeholder {
  border: 1px dashed var(--line); color: var(--fg-dim);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .15em;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--bg-soft);
}
.ad-leaderboard { height: 90px; max-width: 728px; margin: 0 auto; }
.ad-infeed { height: 70px; }
.ad-rectangle { height: 250px; width: 300px; margin: 0 auto; }

/* footer */
.footer { border-top: 1px solid var(--line); color: var(--fg-dim); font-size: .8rem; padding: 1.4rem 0; }

/* customizer drawer */
.drawer { position: fixed; inset: 0; z-index: 1000; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1; }
.drawer-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 88vw);
  background: var(--bg-soft); border-left: 1px solid var(--line);
  padding: 1.2rem; overflow-y: auto; z-index: 2;
  -webkit-overflow-scrolling: touch;
}
/* when the drawer is open, lock the page behind it from scrolling */
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; font-size: 1rem; }
.drawer-note { color: var(--fg-dim); font-size: .82rem; margin: .5rem 0 1rem; }
.feed-toggles { display: flex; flex-direction: column; gap: .15rem; }
.toggle { display: flex; align-items: center; gap: .6rem; padding: .5rem .3rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.toggle span { flex: 1; }
.toggle-cat { color: var(--fg-dim); font-size: .72rem; font-style: normal; }

/* add-feed form */
.addfeed { margin: 1rem 0 1.2rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); }
.addfeed-title { margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; }
.addfeed-input { width: 100%; margin-bottom: .5rem; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: .5rem; font-size: .85rem; }
.addfeed-msg { color: var(--fg-dim); font-size: .78rem; margin: .5rem 0 0; min-height: 1em; }

@media (max-width: 760px) {
  .tagline { display: none; }
  .grid { grid-template-columns: 1fr; }
  .block-ad { display: none; }   /* drop the 300x250 box on phones; native in-feed ad carries mobile */
}

/* ============================================================
   EXTRA SECTIONS — sports, movies, comics
   ============================================================ */

/* drawer: section toggles sit above feed toggles */
.toggle-section span { font-style: italic; }

/* SPORTS — grouped by league */
.scorebox { list-style: none; margin: 0 0 .6rem; padding: 0; }
.scorebox li { padding: .45rem 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.scorebox li:last-child { border-bottom: 0; }
.game { display: grid; grid-template-columns: 1fr auto; gap: 0 1.2rem; align-items: center; }
.game-teams { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.team { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: baseline; }
.team-name { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-score { font-size: .95rem; font-variant-numeric: tabular-nums; color: var(--fg); text-align: right; min-width: 1.6rem; }
.team.win .team-name { color: var(--fg); font-weight: 600; }
.team.win .team-score { color: var(--accent); font-weight: 700; }
.team.lose .team-name, .team.lose .team-score { color: var(--fg-dim); }
.game-status { font-size: .68rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .1em;
  text-align: right; white-space: nowrap; align-self: center; }
.game-status.live { color: var(--accent); font-weight: 600; }
.league-tag { font-size: .64rem; color: var(--src); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin: .7rem 0 .1rem; padding-bottom: .25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.league-tag:first-of-type { margin-top: .2rem; }
.odds-line { font-size: .7rem; color: var(--fg-dim); margin-top: .3rem; font-variant-numeric: tabular-nums; }
.odds-line span { color: var(--accent-soft); }

/* COMICS — link tiles */
.comic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (max-width: 480px) { .comic-grid { grid-template-columns: 1fr; } }
.comic-tile { display: flex; align-items: baseline; gap: .5rem; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.comic-tile:hover { border-color: var(--accent); }
.comic-name { font-size: .9rem; color: var(--fg); }
.comic-tile:hover .comic-name { color: var(--accent); }
.comic-by { font-size: .68rem; color: var(--fg-dim); margin-left: auto; white-space: nowrap; }
.comic-tile::before { content: "\2767"; color: var(--accent-soft); font-size: .8rem; }
