/* ============================================================
   SPTX — Editorial stylesheet
   Typography: Source Serif 4 (display/body) · Libre Franklin (UI)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink: #17130d;
  --ink-soft: #4a443a;
  --ink-mute: #6e6759;
  --paper: #fdfcf9;
  --paper-soft: #f6f3ee;
  --paper-deep: #efeae1;
  --line: #e4ded3;
  --line-soft: #eee9e0;
  --accent: #d8262c;
  --accent-deep: #b11f24;
  --cat-color: #d8262c;
  --gold: #caa64e;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Libre Franklin', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wrap: 1220px;
  --gutter: 28px;
  --radius: 6px;

  --shadow-soft: 0 1px 2px rgba(23, 19, 13, .05), 0 8px 24px -18px rgba(23, 19, 13, .25);
  --hover-ease: opacity .2s ease, transform .25s ease, background-color .2s ease, color .2s ease, box-shadow .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; background: var(--paper-deep); }
a { color: inherit; text-decoration: none; transition: var(--hover-ease); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 999; }
.skip-link:focus { left: 0; }
::selection { background: rgba(216, 38, 44, .18); }

/* ---------- Typography helpers ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cat-color);
  display: inline-block;
}
.kicker--sm { font-size: 10.5px; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-meta__time {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}
.card-byline { font-size: 12.5px; color: var(--ink-mute); font-weight: 600; }
.card-byline a:hover { color: var(--accent); }
.badge { font-family: var(--sans); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; }
.badge--live { background: var(--accent); color: #fff; }
.live-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; animation: pulse 1.6s ease infinite; margin-right: 8px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(216,38,44,.5); } 60% { box-shadow: 0 0 0 7px rgba(216,38,44,0); } }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #d8d2c6; font-size: 12px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar__date { font-weight: 600; letter-spacing: .03em; text-transform: uppercase; font-size: 11px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.topbar__tagline { color: #a59d8e; font-style: italic; font-family: var(--serif); }
.social-links { display: flex; gap: 4px; }
.social-links a { display: flex; align-items: center; justify-content: center; padding: 8px 10px; color: #d8d2c6; opacity: .85; }
.social-links a:hover { color: #fff; opacity: 1; transform: translateY(-1px); }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__inner { display: flex; align-items: center; gap: 24px; padding: 18px var(--gutter); }
.brand { display: inline-flex; align-items: baseline; }
.brand__word {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -0.045em;
  color: var(--ink);
  line-height: 1;
}
.brand__dot { color: var(--accent); }
.brand__img { max-height: 56px; width: auto; }
.masthead__ad { flex: 1; display: flex; justify-content: center; }
.masthead__ad:empty::before {
  content: 'Space tersedia — pasang iklan melalui dasbor SPTX';
  font-size: 11px; color: var(--ink-mute);
  border: 1px dashed var(--line);
  padding: 14px 28px; border-radius: 4px; letter-spacing: .05em;
}
.masthead__right { display: flex; justify-content: flex-end; }
.searchbar { display: flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.searchbar input { border: 0; outline: 0; padding: 9px 16px; width: 210px; font-size: 14px; font-family: var(--sans); background: transparent; }
.searchbar button { border: 0; background: var(--ink); color: #fff; padding: 9px 14px; display: flex; align-items: center; }
.searchbar button:hover { background: var(--accent); }

/* ---------- Main nav ---------- */
.mainnav { border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 60; box-shadow: 0 1px 0 rgba(23,19,13,.02); }
.mainnav__inner { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); }
.mainnav__inner::-webkit-scrollbar { display: none; }
.mainnav a {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 13px 13px;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  color: var(--ink);
}
.mainnav a:hover { color: var(--cat-color, var(--accent)); border-color: var(--cat-color, var(--accent)); }
.mainnav a.is-active { border-color: var(--ink); }
.mainnav__trending { color: var(--accent) !important; display: flex; align-items: center; }
.mainnav__home { text-transform: uppercase; letter-spacing: .06em; }
.nav-shadow { height: 3px; background: linear-gradient(to bottom, rgba(23,19,13,.06), transparent); }

/* ---------- Mobile toggle ---------- */
.nav-toggle { display: none; border: 0; background: transparent; padding: 6px; align-items: center; color: var(--ink); }

/* ---------- Breaking ticker ---------- */
.ticker { background: #fff; border-bottom: 1px solid var(--line); }
.ticker__inner { display: flex; align-items: stretch; }
.ticker__label {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  display: flex; align-items: center; padding: 9px 16px; flex: 0 0 auto;
}
.ticker__viewport { overflow: hidden; flex: 1; position: relative; }
.ticker__track {
  display: flex; align-items: center; gap: 22px; white-space: nowrap;
  padding: 9px 0; animation: ticker 42s linear infinite; width: max-content;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track a { font-family: var(--sans); font-size: 13.5px; font-weight: 600; }
.ticker__track a:hover { color: var(--accent); text-decoration: underline; }
.ticker__sep { color: var(--accent); font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding: 30px 0 10px; }
.hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; }
.hero__side { display: flex; flex-direction: column; gap: 22px; }
.hero__strip {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px;
}

/* Lead card */
.card-lead__media { display: block; aspect-ratio: 16/9.5; overflow: hidden; border-radius: var(--radius); }
.card-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.card-lead__media:hover img { transform: scale(1.03); opacity: .94; }
.card-lead__body { padding-top: 16px; }
.card-lead__title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 900; margin: 4px 0 10px; }
.card-lead__title a:hover { color: var(--cat-color); }
.card-lead__excerpt { font-family: var(--serif); font-size: 16.5px; color: var(--ink-soft); line-height: 1.6; max-width: 62ch; }

/* Secondary card */
.card-secondary__media { display: block; aspect-ratio: 16/9.5; overflow: hidden; border-radius: var(--radius); position: relative; }
.card-secondary__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.card-secondary__media:hover img { transform: scale(1.04); opacity: .94; }
.card-secondary__body { padding-top: 12px; }
.card-secondary__title { font-size: 20px; font-weight: 800; margin: 2px 0 6px; }
.card-secondary__title a:hover { color: var(--cat-color); }

/* Row card */
.card-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.card-row:last-child { border-bottom: 0; }
.card-row__media { flex: 0 0 116px; aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; }
.card-row__media img { width: 100%; height: 100%; object-fit: cover; }
.card-row__title { font-size: 16.5px; font-weight: 700; line-height: 1.32; margin: 2px 0 6px; }
.card-row__title a:hover { color: var(--cat-color); }

/* ---------- Section scaffolding ---------- */
.section { padding: 30px 0 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 18px; }
.section-title { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; display: flex; align-items: center; gap: 12px; }
.section-title--rule { border-top: 3px solid var(--ink); padding-top: 10px; }
.section-title__bar { width: 9px; height: 22px; background: var(--cat-color); display: inline-block; }
.section-more { font-size: 13px; font-weight: 700; color: var(--ink-mute); }
.section-more:hover { color: var(--accent); }

/* ---------- Picks band ---------- */
.picks-band { background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.picks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.pick { position: relative; padding-top: 8px; }
.pick__n { font-family: var(--serif); font-size: 46px; font-weight: 900; line-height: 1; color: var(--paper-deep); -webkit-text-stroke: 1.5px var(--ink-mute); position: absolute; top: -10px; right: 0; z-index: 0; opacity: .8; }
.pick__title { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1; }
.pick__title a:hover { color: var(--accent); }
.pick__excerpt { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- Latest + rail ---------- */
.latest-rail__grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 40px; }
.latest-col .card-row { padding: 16px 0; }
.line-item { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.line-item__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 5px; }
.line-item__title { font-size: 17px; font-weight: 700; }
.line-item__title a:hover { color: var(--accent); }
.line-item--bordered .pick__excerpt { font-size: 13.5px; margin: 6px 0 0; color: var(--ink-soft); font-family: var(--serif); }

.rail { display: flex; flex-direction: column; gap: 30px; }
.rail__box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-soft); }
.rail__box .section-title { font-size: 17px; }
.rail__more { display: block; text-align: center; margin-top: 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); padding: 9px; border: 1px solid var(--line); border-radius: 999px; }
.rail__more:hover { border-color: var(--ink); color: var(--ink); }

/* Numbered card */
.card-numbered { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.card-numbered:last-of-type { border-bottom: 0; }
.card-numbered__n { font-family: var(--serif); font-size: 27px; font-weight: 900; color: var(--accent); line-height: 1.15; min-width: 36px; font-style: italic; }
.card-numbered__title { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.card-numbered__title a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-numbered__body .card-meta__time { font-size: 11px; margin-top: 4px; }

/* Mini item (article sidebar) */
.mini-item { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mini-item__cat { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cat-color); }
.mini-item__title { font-size: 14px; font-weight: 700; margin: 4px 0 3px; line-height: 1.35; }
.mini-item__title a:hover { color: var(--accent); }

/* ---------- Category bands ---------- */
.cat-band { border-top: 1px solid var(--line); }
.cat-band--alt { background: var(--paper-soft); }
.cat-band__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; }
.cat-band__list .line-item:first-child { padding-top: 0; }

/* ---------- Popular band ---------- */
.pop-band { background: var(--ink); color: #e9e4d8; }
.pop-band .section-title--rule { border-color: var(--gold); }
.pop-band .section-title, .pop-band .section-title * { color: #fff; }
.pop-band .section-more { color: #b7b0a0; }
.pop-band .section-more:hover { color: #fff; }
.pop-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.pop-card { position: relative; }
.pop-card__media { display: block; aspect-ratio: 4/5; overflow: hidden; border-radius: var(--radius); position: relative; }
.pop-card__media img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: transform .5s ease, opacity .3s ease; }
.pop-card__media:hover img { transform: scale(1.05); opacity: 1; }
.pop-card__n {
  position: absolute; top: 8px; left: 10px; z-index: 2;
  font-family: var(--serif); font-size: 42px; font-weight: 900; font-style: italic;
  color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); line-height: 1;
}
.pop-card__body { padding-top: 10px; }
.pop-card__title { font-size: 14.5px; font-weight: 700; line-height: 1.35; margin: 4px 0 5px; }
.pop-card__title a:hover { color: var(--gold); }
.pop-card__body .kicker, .pop-card__body .card-meta__time { color: #b7b0a0; }
.pop-band .kicker { color: var(--gold); }
.pop-band .card-meta__time { color: #9a937f; }

/* ---------- Newsletter band ---------- */
.newsletter-band { background: var(--accent-deep); color: #fff; padding: 40px 0; }
.newsletter-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.newsletter-band__title { font-size: 26px; font-weight: 900; color: #fff; }
.newsletter-band__text { color: #f3d9d9; margin: 8px 0 0; font-family: var(--serif); font-size: 15.5px; }
.newsletter-form { display: flex; min-width: min(420px, 100%); }
.newsletter-form input {
  flex: 1; border: 0; outline: 0; padding: 14px 18px; font-size: 15px; border-radius: 4px 0 0 4px; font-family: var(--sans);
}
.newsletter-form button { border: 0; background: var(--ink); color: #fff; padding: 14px 26px; font-weight: 800; letter-spacing: .03em; border-radius: 0 4px 4px 0; }
.newsletter-form button:hover { background: #000; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c9c2b3; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 48px var(--gutter) 34px; }
.footer__brand { font-family: var(--sans); font-weight: 800; font-size: 34px; color: #fff; letter-spacing: -0.04em; }
.footer__desc { font-family: var(--serif); font-size: 14.5px; color: #b3ac9c; margin: 14px 0 18px; line-height: 1.65; }
.footer__contact { font-size: 13px; color: #8f8878; line-height: 1.8; }
.footer__contact a { color: #d8d2c6; text-decoration: underline; text-underline-offset: 3px; }
.footer__head { font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8f8878; margin-bottom: 16px; }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { margin-bottom: 9px; }
.footer__links a { font-size: 14px; color: #d8d2c6; }
.footer__links a:hover { color: #fff; padding-left: 3px; }
.footer .ad-slot { margin: 0 var(--gutter) 0; padding: 0; }
.footer__bar { border-top: 1px solid #2c281f; }
.footer__bar-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: 12.5px; color: #8f8878; }

/* ---------- Category hero ---------- */
.cat-hero { padding: 34px 0 6px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--paper-soft), var(--paper)); }
.cat-hero__title { font-size: clamp(30px, 4vw, 44px); font-weight: 900; margin: 8px 0 10px; }
.cat-hero__desc { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); max-width: 72ch; }
.cat-hero__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 14px 0 20px; flex-wrap: wrap; }
.cat-hero__count { font-size: 13px; color: var(--ink-mute); font-weight: 600; }
.cat-hero__count strong { color: var(--ink); }
.cat-hero__sort { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-mute); }
.cat-hero__sort a { font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid transparent; color: var(--ink-mute); }
.cat-hero__sort a:hover { border-color: var(--line); }
.cat-hero__sort a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-mute); margin-bottom: 14px; }
.breadcrumb a { font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--accent); }
.breadcrumb__current { color: var(--ink-soft); }

/* ---------- Grids of standard cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 22px; padding: 6px 0 14px; }
.cat-first-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 22px; margin-bottom: 28px; }
.cat-first-row .card-secondary__media { aspect-ratio: 16/9; }
.cat-first-row .card-secondary__title { font-size: 24px; }
.card-standard__media { display: block; aspect-ratio: 16/9.5; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; }
.card-standard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.card-standard__media:hover img { transform: scale(1.04); opacity: .94; }
.card-standard__title { font-size: 18px; font-weight: 800; margin: 2px 0 8px; }
.card-standard__title a:hover { color: var(--cat-color); }
.card-standard__excerpt { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); }

/* ---------- Article page ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: 48px; padding-top: 30px; padding-bottom: 50px; }
.article-rail { padding-top: 4px; }
.article-title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; margin: 6px 0 16px; letter-spacing: -0.015em; }
.article-standfirst { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink-soft); line-height: 1.55; border-left: 3px solid var(--accent); padding-left: 18px; margin: 0 0 24px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article-meta__author { display: flex; align-items: center; gap: 12px; }
.article-meta__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.article-meta__avatar--ini { display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; font-family: var(--sans); }
.article-meta__label { display: block; font-size: 13px; font-weight: 700; }
.article-meta__label a:hover { color: var(--accent); }
.article-meta__time { display: block; font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.article-meta__stats { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-mute); font-weight: 600; align-items: center; }
.share-row { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.share-row a, .share-row button {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 10px 14px; border-radius: 999px;
}
.share-row a:hover, .share-row button:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-soft); }
.share-row button.copy-link { font: inherit; }

.article-figure { margin: 0 0 28px; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: 12.5px; color: var(--ink-mute); margin-top: 10px; display: flex; justify-content: space-between; gap: 16px; }
.article-figure__credit { white-space: nowrap; font-style: italic; }

/* Article typography */
.article-body { font-family: var(--serif); font-size: 17.5px; line-height: 1.78; color: #241f16; }
.article-body > p:first-of-type::first-letter {
  float: left; font-size: 64px; line-height: .82; font-weight: 900;
  padding: 6px 10px 0 0; color: var(--accent);
}
.article-body p { margin: 0 0 1.15em; }
.article-body h2 { font-size: 26px; margin: 1.5em 0 .6em; font-weight: 900; }
.article-body h2::before { content: ''; display: block; width: 44px; height: 3px; background: var(--accent); margin-bottom: 12px; }
.article-body h3 { font-size: 21px; margin: 1.3em 0 .5em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; color: var(--accent-deep); }
.article-body ul, .article-body ol { margin: 0 0 1.2em 1.2em; padding: 0; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote {
  margin: 1.6em 0; padding: 18px 26px; border-left: 4px solid var(--accent);
  background: var(--paper-soft); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; font-size: 19px; color: #3d372c;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body img { border-radius: var(--radius); margin: 1.4em auto; }
.article-body figcaption { text-align: center; font-size: 12.5px; color: var(--ink-mute); font-family: var(--sans); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-family: var(--sans); font-size: 14px; }
.article-body th { background: var(--ink); color: #fff; text-align: left; padding: 10px 12px; }
.article-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em auto; width: 120px; }
.article-source { font-family: var(--sans); font-size: 13px; color: var(--ink-mute); margin-top: 2.2em; border-top: 1px dashed var(--line); padding-top: 14px; }
.article-source a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 30px 0; }
.tag-row__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.tag-pill {
  font-size: 13px; font-weight: 700; background: var(--paper-soft); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; color: var(--ink-soft);
}
.tag-pill:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.author-box { display: flex; gap: 20px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 40px; }
.author-box__photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.author-box__photo--ini { display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 800; font-size: 24px; }
.author-box__name { font-size: 20px; margin: 2px 0 8px; }
.author-box__bio { font-family: var(--serif); font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.author-box__name a:hover { color: var(--accent); }

.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ---------- Author hero ---------- */
.author-hero { padding: 40px 0 10px; border-bottom: 1px solid var(--line); background: var(--paper-soft); }
.author-hero__inner { display: flex; gap: 30px; align-items: center; }
.author-hero__photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow-soft); }
.author-hero__photo--ini { display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 800; font-size: 36px; }
.author-hero__name { font-size: 38px; font-weight: 900; margin: 2px 0 10px; }
.author-hero__bio { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); max-width: 70ch; margin: 0 0 4px; }

/* ---------- Search ---------- */
.search-hero { display: flex; gap: 10px; max-width: 640px; margin: 18px 0 8px; }
.search-hero input { flex: 1; border: 2px solid var(--ink); border-radius: 6px; padding: 14px 18px; font-size: 16px; font-family: var(--sans); outline: none; }
.search-hero input:focus { box-shadow: 0 0 0 4px rgba(216,38,44,.12); }
.search-results { display: flex; flex-direction: column; }
.search-item { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.search-item__media { flex: 0 0 180px; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); }
.search-item__media img { width: 100%; height: 100%; object-fit: cover; }
.search-item__title { font-size: 21px; font-weight: 800; margin: 2px 0 8px; }
.search-item__title a:hover { color: var(--accent); }
.search-item__excerpt { font-family: var(--serif); color: var(--ink-soft); font-size: 15px; margin-bottom: 8px; }
mark { background: rgba(216, 38, 44, .16); color: inherit; padding: 0 2px; border-radius: 2px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 36px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination span {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px; background: #fff;
}
.pagination a:hover { border-color: var(--ink); }
.pagination a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination__dots { border: 0; background: transparent; padding: 8px 4px; }
.pagination__arrow { display: inline-flex; gap: 6px; }

/* ---------- Ads ---------- */
.ad-slot { margin: 8px 0 26px; display: flex; flex-direction: column; align-items: center; position: relative; }
.ad-slot__label {
  align-self: flex-start; font-size: 9.5px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 4px;
}
.ad-slot img { border-radius: 4px; border: 1px solid var(--line); }
.ad-slot__fallback { font-size: 11px; color: var(--ink-mute); border: 1px dashed var(--line); border-radius: 4px; padding: 26px 20px; text-align: center; letter-spacing: .08em; text-transform: uppercase; width: 100%; }
.ad-slot--sidebar { align-items: stretch; }
.ad-slot--sidebar img { width: 100%; }
.ad-slot--in_article { margin: 30px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.ad-slot--header img { max-height: 90px; width: auto; }
.ad-slot--header .ad-slot__label { position: absolute; top: -6px; left: 0; background: var(--paper); padding: 0 6px; }
.ad-slot--footer { margin: 0 var(--gutter); }

/* ---------- Buttons & empty state ---------- */
.btn { display: inline-block; font-family: var(--sans); font-weight: 800; font-size: 13px; letter-spacing: .05em; padding: 12px 22px; border-radius: 4px; border: 1.5px solid var(--ink); transition: var(--hover-ease); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.empty-state { text-align: center; padding: 50px 20px; font-family: var(--serif); color: var(--ink-soft); }
.empty-state h2 { font-size: 24px; margin-bottom: 10px; color: var(--ink); }
.empty-state__code { font-size: 74px; font-weight: 900; color: var(--paper-deep); -webkit-text-stroke: 1.5px var(--ink-mute); display: block; margin-bottom: 6px; }
.empty-state__list { list-style: none; padding: 0; margin: 18px auto 26px; max-width: 520px; text-align: left; }
.empty-state__list li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.empty-state__list a { font-weight: 700; }
.empty-state__list a:hover { color: var(--accent); }

/* ---------- Toasts ---------- */
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  animation: toastIn .3s ease; max-width: min(92vw, 480px); text-align: center;
}
.toast--ok { background: #1d6b40; }
.toast--err { background: var(--accent-deep); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Page body (static pages) ---------- */
.page-body { max-width: 760px; margin: 0 auto; font-size: 16.5px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1.5fr 1fr; gap: 20px; }
  .latest-rail__grid { grid-template-columns: 1.6fr 1fr; gap: 30px; }
  .pop-grid { grid-template-columns: repeat(3, 1fr); }
  .picks-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .article-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; }
  .footer__inner { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav-toggle { display: inline-flex; }
  .mainnav { position: fixed; top: 0; left: 0; right: 0; transform: translateY(-110%); transition: transform .3s ease; z-index: 70; border-top: 3px solid var(--accent); }
  body.nav-open .mainnav { transform: translateY(0); box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); }
  body.nav-open { overflow: hidden; }
  .mainnav__inner { flex-direction: column; padding: 10px var(--gutter) 18px; overflow: visible; }
  .mainnav__inner::before {
    content: 'SPTX — Menu'; font-weight: 800; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-mute); padding: 12px 2px 8px;
  }
  .mainnav a { padding: 13px 2px; font-size: 16px; border-bottom: 1px solid var(--line-soft); }
  .mainnav a:hover { border-color: var(--line-soft); }
  .nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(23,19,13,.4); z-index: 65; }
  body.nav-open .nav-backdrop { display: block; }
  .nav-toggle { position: relative; z-index: 80; }
  body.nav-open .nav-toggle svg { transform: rotate(90deg); }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__strip { grid-template-columns: 1fr; }
  .latest-rail__grid { grid-template-columns: 1fr; }
  .rail { flex-direction: row; flex-wrap: wrap; }
  .rail__box { flex: 1 1 320px; }
  .cat-band__grid { grid-template-columns: 1fr; gap: 22px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-rail { border-top: 1px solid var(--line); padding-top: 26px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-first-row { grid-template-columns: 1fr; }
  .related__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .pop-grid { grid-template-columns: repeat(2, 1fr); }
  .search-item { flex-direction: column; gap: 12px; }
  .search-item__media { flex: 0 0 auto; aspect-ratio: 16/8; }
  .author-hero__inner { flex-direction: column; text-align: center; }
  .share-row { margin-left: 0; }
}

@media (max-width: 600px) {
  .brand__word { font-size: 34px; }
  .masthead__inner { padding: 12px var(--gutter); gap: 14px; }
  .masthead__ad { display: none; }
  .masthead__right { flex: 1; }
  .searchbar input { width: 0; padding: 9px 0; transition: width .25s ease; }
  .searchbar:focus-within input { width: min(52vw, 220px); padding: 9px 16px; }
  .topbar__tagline { display: none; }
  .card-lead__title { font-size: 25px; }
  .card-secondary__title { font-size: 18px; }
  .picks-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .pop-grid { grid-template-columns: 1fr; }
  .pop-card__media { aspect-ratio: 16/9; }
  .related__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; padding-top: 36px; }
  .newsletter-band__inner { flex-direction: column; align-items: flex-start; }
  .newsletter-form { min-width: 100%; }
  .card-row__media { flex-basis: 96px; }
  .article-body { font-size: 16.5px; }
  .article-standfirst { font-size: 17px; padding-left: 12px; }
  .author-box { flex-direction: column; }
  .ticker__label { padding: 8px 12px; }
  .section { padding: 22px 0 28px; }
  .hero { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .live-dot { animation: none; }
  * { transition: none !important; }
}

@media print {
  .topbar, .mainnav, .ticker, .rail, .newsletter-band, .footer, .share-row, .ad-slot { display: none !important; }
  .article-grid { grid-template-columns: 1fr; }
}
