/* =====================================================================
   GadgetsNews101 - white magazine design system
   Ink navy text · electric blue→violet accents · coral red for breaking
   ===================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #101426;
  --text: #1a1f33;
  --text-2: #61697e;
  --border: #e6e9f2;
  --accent: #2f54ff;
  --accent-deep: #1d39c4;
  --violet: #7b2ff7;
  --accent-grad: linear-gradient(115deg, #2f54ff, #7b2ff7);
  --hot: #ff2e4d;
  --hot-grad: linear-gradient(115deg, #ff2e4d, #ff6a3d);
  --ok: #0e9f6e;
  --warn: #d97917;
  --danger: #e02d3c;
  --shadow-sm: 0 1px 2px rgba(16, 20, 38, .06);
  --shadow: 0 2px 6px rgba(16, 20, 38, .05), 0 14px 34px -18px rgba(16, 20, 38, .18);
  --shadow-lift: 0 4px 10px rgba(16, 20, 38, .06), 0 24px 48px -20px rgba(47, 84, 255, .28);
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { color: var(--ink); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 8px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------------------------ buttons / chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  padding: 11px 22px; font-size: 15px; font-weight: 700; transition: .18s ease;
  background: var(--surface-2); color: var(--ink);
}
.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(47, 84, 255, .65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(123, 47, 247, .55); }
.btn-outline { background: #fff; border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }

.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11.5px;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 4px 10px -4px rgba(47, 84, 255, .5);
}
.chip:hover { filter: brightness(1.12); }
.chip-plain {
  background: var(--surface-2); color: var(--text-2); box-shadow: none;
}
.chip-plain:hover { background: #e2e7f5; color: var(--accent); filter: none; }
.chip-breaking { background: var(--hot-grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(255, 46, 77, .5); }

/* ------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px -12px rgba(16, 20, 38, .14);
  transition: transform .25s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--ink); }
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--accent-grad); color: #fff; font-size: 21px;
  box-shadow: 0 6px 14px -6px rgba(47, 84, 255, .6);
}
.logo-text em { font-style: normal; color: var(--accent); }
.logo-text b { color: var(--violet); }

.main-nav { flex: 1; }
.main-nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a, .main-nav button {
  position: relative; display: block; padding: 10px 13px; font-size: 14.5px; font-weight: 700;
  color: var(--text-2); background: none; border: 0; cursor: pointer; border-radius: 10px;
}
.main-nav > ul > li > a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px; height: 3px;
  border-radius: 3px; background: var(--accent-grad); opacity: 0; transform: scaleX(.4);
  transition: .18s ease;
}
.main-nav > ul > li > a:hover::after { opacity: 1; transform: scaleX(1); }
.main-nav a:hover, .main-nav button:hover { color: var(--accent); }
.main-nav button svg { transition: transform .18s ease; }
.has-dropdown.is-open > button svg { transform: rotate(180deg); }

.has-dropdown { position: relative; }
.main-nav .dropdown {
  position: absolute; top: 100%; right: 0; min-width: 430px; display: none;
  grid-template-columns: repeat(3, 1fr); gap: 2px; list-style: none; margin: 0; padding: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lift); z-index: 60;
}
.main-nav .dropdown a { font-weight: 600; }
.main-nav .dropdown a:hover { background: var(--bg-soft); }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown { display: grid; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border);
  cursor: pointer; background: #fff; color: var(--ink); border-radius: 12px; transition: .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle { display: none; }

.search-bar { border-top: 1px solid var(--border); padding: 15px 0; background: #fff; position: relative; }
.search-bar form { display: flex; align-items: center; gap: 12px; }
.search-bar input {
  flex: 1; border: 0; background: transparent; font-size: 18px; color: var(--ink);
  outline: none; font-family: inherit;
}
.search-suggest { position: absolute; left: 20px; right: 20px; top: 100%; z-index: 50; }
.search-suggest:not(:empty) {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lift); overflow: hidden;
}
.suggest-item { display: flex; gap: 12px; padding: 11px 14px; align-items: center; }
.suggest-item:hover { background: var(--bg-soft); }
.suggest-item img { width: 58px; height: 34px; object-fit: cover; border-radius: 8px; }
.suggest-item span { font-weight: 600; font-size: 14.5px; }
.suggest-item small { color: var(--text-2); display: block; font-weight: 400; }

.progress-bar {
  position: absolute; bottom: -1px; left: 0; height: 3px; width: 0;
  background: var(--accent-grad); transition: width .1s linear;
}

/* ------------------------------------------------ ticker */
.ticker {
  display: flex; align-items: center; gap: 0; overflow: hidden;
  background: var(--ink); color: #fff;
}
.ticker-label {
  flex-shrink: 0; padding: 10px 18px; font-weight: 800; font-size: 12.5px;
  background: var(--hot-grad); text-transform: uppercase; letter-spacing: .08em;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-items { display: inline-flex; gap: 56px; white-space: nowrap; padding-left: 100%; animation: ticker 40s linear infinite; }
.ticker-items a { color: #dfe4ff; font-size: 14px; font-weight: 600; }
.ticker-items a:hover { color: #fff; text-decoration: underline; }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; margin: 28px 0 46px; }
.hero-side { display: grid; gap: 14px; align-content: stretch; }

/* Lead story: headline over image */
.card-hero {
  position: relative; border: 0; border-radius: 20px; overflow: hidden;
  min-height: 460px; display: flex; box-shadow: var(--shadow);
}
.card-hero:hover { transform: none; box-shadow: var(--shadow-lift); }
.card-hero .card-media {
  position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0;
}
.card-hero .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-hero:hover .card-media img { transform: scale(1.04); }
.card-hero .card-body {
  position: relative; z-index: 2; margin-top: auto; width: 100%;
  flex: 0 0 auto; /* size to content so the gradient doesn't cover the whole image */
  display: flex; flex-direction: column; justify-content: flex-end; gap: 9px;
  /* gradient only behind the text, fading to clear over the image */
  padding: 54px 26px 22px;
  background: linear-gradient(to top, rgba(11, 14, 30, .94) 0%, rgba(11, 14, 30, .82) 42%, rgba(11, 14, 30, .35) 78%, rgba(11, 14, 30, 0) 100%);
}
.card-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.card-hero .card-title { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.22; margin: 0; }
.card-hero .card-title a { color: #fff; }
.card-hero .card-title a:hover { color: #cdd7ff; }
.card-hero .card-excerpt { color: #d4d9ee; }
.card-hero .card-foot {
  margin-top: 2px; border: 0; padding-top: 0; gap: 10px;
  justify-content: flex-start; color: #c3c9e8; font-weight: 600;
}
.card-hero .card-foot .card-read { margin-left: auto; }
/* translucent "ghost" chip for the brand on dark overlays */
.chip-ghost { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(4px); box-shadow: none; }
.chip-ghost:hover { background: rgba(255, 255, 255, .3); filter: none; }

/* ------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .22s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: #d8defc; }
.card-media { overflow: hidden; aspect-ratio: 16/9; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 17px 19px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 600; flex-wrap: wrap; }
.card-title {
  margin: 0; font-size: 17.5px; line-height: 1.34; font-weight: 800; letter-spacing: -.01em;
  overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  margin: 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-2); padding-top: 10px; border-top: 1px dashed var(--border);
}
.card-author { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.card-author img { border-radius: 50%; }

.card-compact { flex-direction: row; align-items: stretch; }
.card-compact .card-media { flex: 0 0 40%; max-width: 150px; min-width: 96px; aspect-ratio: 4/3; }
.card-compact .card-body { padding: 12px 14px; gap: 6px; justify-content: center; min-width: 0; }
.card-compact .card-title { font-size: 14.5px; -webkit-line-clamp: 3; }

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

/* ------------------------------------------------ layout */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 324px; gap: 36px; align-items: start; margin-bottom: 60px; }
.feed { min-width: 0; }

.section-head { display: flex; align-items: center; gap: 16px; margin: 10px 0 20px; }
.section-head h2 {
  margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.02em;
  padding-left: 14px; position: relative;
}
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px;
  border-radius: 4px; background: var(--accent-grad);
}
.section-line { flex: 1; height: 1px; background: var(--border); }

.load-more-wrap { text-align: center; margin: 30px 0; }
.infinite-status { text-align: center; color: var(--text-2); font-size: 14px; padding: 18px 0 4px; min-height: 8px; }

/* Full-width dynamic feed (archives) */
.feed-full { margin-bottom: 40px; }
.feed-blocks > .strip { margin-bottom: 22px; }
.cta-newsletter { margin: 8px 0 30px; }
.newsletter-inline { max-width: 520px; margin: 0 auto; }
.cta-newsletter .newsletter-row { display: flex; gap: 8px; }
.cta-newsletter .newsletter-row input {
  flex: 1; padding: 13px 16px; border: 0; border-radius: 12px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.cta-newsletter .btn-primary { background: var(--ink); box-shadow: none; }
.cta-newsletter .btn-primary:hover { background: #000; transform: none; }
.cta-newsletter .newsletter-msg { color: #eef1ff; margin: 10px 0 0; font-size: 13.5px; }

/* ------------------------------------------------ sidebar */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.sidebar-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 22px; }
.widget {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px;
}
.widget-title { margin: 0 0 16px; font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }

.trending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; counter-reset: trend; }
.trending-list li { display: flex; gap: 13px; align-items: flex-start; }
.trending-rank {
  flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center;
  font-weight: 800; font-size: 13.5px; border-radius: 10px;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 5px 12px -5px rgba(47, 84, 255, .55);
}
.trending-list a { font-size: 14px; font-weight: 700; line-height: 1.42; display: block; color: var(--ink); }
.trending-list a:hover { color: var(--accent); }
.trending-list small { color: var(--text-2); font-size: 12px; }

.widget-newsletter {
  background: var(--accent-grad); border: 0; color: #fff;
  box-shadow: 0 18px 38px -16px rgba(47, 84, 255, .55);
}
.widget-newsletter .widget-title, .widget-newsletter p { color: #fff; }
.widget-newsletter p { opacity: .92; font-size: 14px; margin-top: -6px; }
.newsletter-form input[type="email"] {
  width: 100%; padding: 12px 15px; border-radius: 12px; border: 0;
  background: rgba(255, 255, 255, .96); color: var(--ink); font-family: inherit; font-size: 14px; margin-bottom: 10px;
}
.widget-newsletter .btn-primary { background: var(--ink); box-shadow: none; }
.widget-newsletter .btn-primary:hover { background: #000; transform: none; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; margin-bottom: 0 !important; }
.newsletter-msg { font-size: 13px; margin: 8px 0 0; min-height: 1em; }
.newsletter-msg.ok { color: #d7ffe9; }
.newsletter-msg.err { color: #ffd9de; }
.widget-newsletter .newsletter-msg.ok { color: #d7ffe9; }

/* ------------------------------------------------ magazine layouts */
/* Medium overlay card (headline over image) */
.card-overlay { min-height: 300px; }
.card-overlay .card-body { padding: 40px 18px 16px; gap: 7px; }
.card-overlay .card-title { font-size: 19px; }
.card-overlay .card-excerpt { display: none; }
.card-overlay .card-foot { font-size: 12px; }

/* Text-row card: small thumb + headline */
.card-list { display: flex; gap: 13px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.card-list:last-child { border-bottom: 0; }
.card-list-media { flex: 0 0 104px; }
.card-list-media img { width: 104px; height: 68px; object-fit: cover; border-radius: 9px; }
.card-list > div { min-width: 0; flex: 1; }
.card-list-title {
  margin: 0 0 5px; font-size: 14.5px; font-weight: 700; line-height: 1.34;
  overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-list-title a:hover { color: var(--accent); }
.card-list .card-meta { font-size: 11.5px; }

/* Hero band: lead + two secondary + trending rail */
.hero-band {
  display: grid; grid-template-columns: 1.7fr 1fr 0.95fr; gap: 20px;
  margin: 26px 0 42px; align-items: stretch;
}
.hero-lead { display: flex; }
.hero-lead .card-hero { width: 100%; min-height: 460px; }
.hero-secondary { display: grid; gap: 16px; }
.hero-secondary .card-overlay { min-height: 0; }
.hero-aside {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.rail-title { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: r; }
.rail-list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.rail-list li:last-child { border-bottom: 0; }
.rail-rank {
  flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; border-radius: 8px;
  background: var(--accent-grad); color: #fff;
}
.rail-list a { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.rail-list a:hover { color: var(--accent); }

/* Section blocks */
.block { margin: 8px 0 40px; }
.section-head h2 a:hover { color: var(--accent); }
.section-more { font-size: 13.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.section-more:hover { text-decoration: underline; }

/* Top-stories mosaic: feature + 2x2 */
.mosaic { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: stretch; }
.mosaic-feature { display: flex; }
.mosaic-feature .card-overlay { width: 100%; min-height: 380px; }
.mosaic-feature .card-overlay .card-title { font-size: 24px; }
.mosaic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Category spotlight: lead + list, sides alternate */
.spotlight-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.spotlight-reverse .spotlight-grid { grid-template-columns: 1fr 1.4fr; }
.spotlight-reverse .spotlight-lead { order: 2; }
.spotlight-lead .card-overlay { min-height: 340px; }
.spotlight-list { display: flex; flex-direction: column; }

/* Continuous-reading strip variants */
.strip { margin-bottom: 16px; }
.strip-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.strip-feature .card-overlay { min-height: 320px; }
.strip-list { display: flex; flex-direction: column; }
.strip-quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.strip-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.strip-duo .card-overlay { min-height: 240px; }
.strip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.strip-lead { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }

/* ------------------------------------------------ ads */
.ad-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 20px auto; max-width: 100%; border-radius: 12px; overflow: hidden;
  background: var(--bg-soft);
}
.ad-slot--top { margin-top: 24px; }
.ad-slot__label {
  position: absolute; top: 5px; right: 9px; z-index: 1;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-2); opacity: .65;
}
.ad-slot img { border-radius: 8px; max-width: 100%; height: auto; }
.ad-slot__house {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 18px; color: var(--text-2); width: 100%; height: 100%; justify-content: center;
  border: 2px dashed #d4daee; border-radius: 12px; background: #fff;
}
.ad-slot__house span { font-weight: 800; color: var(--ink); }
.ad-slot__house:hover { border-color: var(--accent); }
.ad-slot__house:hover span { color: var(--accent); }

/* ------------------------------------------------ article */
.article { min-width: 0; }
.breadcrumbs { font-size: 13px; color: var(--text-2); margin: 20px 0 8px; display: flex; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.breadcrumbs a:hover { color: var(--accent); }

.article-title {
  font-size: clamp(27px, 4.5vw, 40px); line-height: 1.18; margin: 12px 0 20px;
  font-weight: 800; letter-spacing: -.022em;
}

.article-byline {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-soft); margin-bottom: 22px;
}
.byline-author { display: flex; gap: 12px; align-items: center; }
.byline-author img { border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.byline-author strong { display: block; font-size: 15px; color: var(--ink); }
.byline-author small { color: var(--text-2); }
.byline-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-2); text-align: right; }

.article-figure { margin: 0 0 24px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }

.article-tldr {
  position: relative;
  background: linear-gradient(115deg, #f2f5ff, #f7f1ff);
  border: 1px solid #dfe5ff;
  border-left: 5px solid var(--accent);
  border-radius: 6px 16px 16px 6px; padding: 20px 24px; margin-bottom: 24px;
}
.article-tldr h2 { margin: 0 0 10px; font-size: 16px; }
.article-tldr ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 15.5px; }
.article-tldr li::marker { color: var(--accent); }

.article-toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 15px 22px; margin-bottom: 24px; }
.article-toc summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.article-toc ol { margin: 10px 0 4px; padding-left: 20px; font-size: 14.5px; }
.article-toc li { margin: 6px 0; font-weight: 600; }
.article-toc .toc-l3 { margin-left: 16px; list-style: circle; font-weight: 400; }
.article-toc a:hover { color: var(--accent); }

.article-content { font-size: 17.5px; line-height: 1.78; color: #272d44; }
.article-content h2 {
  font-size: 25px; margin: 38px 0 14px; letter-spacing: -.015em; scroll-margin-top: 92px;
  padding-left: 14px; position: relative;
}
.article-content h2::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 5px;
  border-radius: 4px; background: var(--accent-grad);
}
.article-content h3 { font-size: 20px; margin: 30px 0 12px; scroll-margin-top: 92px; }
.article-content p { margin: 0 0 18px; }
.article-content img { border-radius: 14px; margin: 8px 0; box-shadow: var(--shadow-sm); }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.article-content a:hover { color: var(--violet); }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 26px; }
.article-content li { margin: 7px 0; }
.article-content li::marker { color: var(--accent); font-weight: 700; }
.article-content blockquote {
  margin: 24px 0; padding: 16px 24px; border-left: 5px solid var(--accent);
  background: var(--bg-soft); border-radius: 0 14px 14px 0; font-style: italic; color: var(--text-2);
}
.article-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 24px 0; font-size: 15px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.article-content th, .article-content td { padding: 11px 15px; border-bottom: 1px solid var(--border); text-align: left; }
.article-content tr:last-child td { border-bottom: 0; }
.article-content th { background: var(--ink); color: #fff; font-weight: 700; }
.article-content tbody tr:nth-child(even) { background: var(--bg-soft); }

.article-faq { margin: 36px 0; }
.article-faq h2 { font-size: 23px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; margin: 10px 0; background: #fff; transition: .15s; }
.faq-item:hover, .faq-item[open] { border-color: #ccd6ff; box-shadow: var(--shadow-sm); }
.faq-item summary { padding: 15px 20px; font-weight: 700; cursor: pointer; font-size: 15.5px; color: var(--ink); }
.faq-item summary::marker { color: var(--accent); }
.faq-item p { padding: 0 20px 15px; margin: 0; color: var(--text-2); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }

.article-share {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0;
  padding: 15px 20px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px;
}
.article-share span { font-weight: 800; font-size: 14px; margin-right: 4px; color: var(--ink); }
.article-share a, .article-share button {
  font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); cursor: pointer; color: var(--text); transition: .15s;
}
.article-share a:hover, .article-share button:hover {
  background: var(--accent-grad); color: #fff; border-color: transparent; transform: translateY(-1px);
}

.author-box {
  display: flex; gap: 18px; align-items: center; padding: 22px 24px; margin: 28px 0;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.author-box img { border-radius: 50%; flex-shrink: 0; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.author-box h3 { margin: 0 0 2px; font-size: 17px; }
.author-box h3 a:hover { color: var(--accent); }
.author-role { color: var(--text-2); font-size: 14px; margin: 0 0 8px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0; }
.post-nav-item {
  display: flex; flex-direction: column; gap: 4px; padding: 15px 19px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; transition: .15s;
}
.post-nav-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.post-nav-item small { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.post-nav-item span { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.post-nav-next { text-align: right; grid-column: 2; }

/* ------------------------------------------------ forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------------------------ archive / pages */
.archive-header { text-align: center; padding: 46px 0 28px; }
.archive-header h1 {
  font-size: clamp(30px, 5vw, 44px); margin: 0 0 10px; letter-spacing: -.025em;
  background: linear-gradient(115deg, var(--ink) 30%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.archive-header p { color: var(--text-2); max-width: 640px; margin: 0 auto; font-size: 16.5px; }

.archive-search { display: flex; gap: 10px; max-width: 580px; margin: 0 auto 32px; }
.archive-search input {
  flex: 1; padding: 13px 19px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; color: var(--text); font-size: 16px; font-family: inherit;
}
.archive-search input:focus { outline: 3px solid rgba(47, 84, 255, .18); border-color: var(--accent); }

.pagination { display: flex; gap: 7px; justify-content: center; margin: 34px 0; flex-wrap: wrap; }
.page-link {
  padding: 9px 16px; border-radius: 12px; border: 1px solid var(--border); font-weight: 700;
  font-size: 14px; background: #fff; color: var(--text-2);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(47, 84, 255, .6); }

.empty-state { text-align: center; padding: 64px 20px; color: var(--text-2); }
.empty-state p { font-size: 18px; }

.page-prose { max-width: 760px; margin: 40px auto 70px; font-size: 16.5px; }
.page-prose h1 { font-size: 36px; letter-spacing: -.025em; }
.page-prose h2 { margin-top: 36px; letter-spacing: -.015em; }
.page-prose .lead { font-size: 19px; color: var(--text-2); }
.page-prose a { color: var(--accent); font-weight: 600; }
.page-prose li { margin: 6px 0; }
.page-prose li::marker { color: var(--accent); }

.cta-banner {
  text-align: center; padding: 42px 28px; margin: 38px 0; border-radius: 20px;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 22px 44px -18px rgba(47, 84, 255, .55);
}
.cta-banner h2 { margin: 0 0 6px; color: #fff; letter-spacing: -.015em; }
.cta-banner p { color: rgba(255, 255, 255, .88); margin: 0 0 18px; }
.cta-banner .btn-primary { background: #fff; color: var(--accent-deep); box-shadow: none; }
.cta-banner .btn-primary:hover { transform: translateY(-2px); }

/* ------------------------------------------------ authors */
.author-hero {
  display: flex; gap: 28px; align-items: flex-start; padding: 38px 34px; margin: 30px 0;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px;
}
.author-hero img { border-radius: 50%; flex-shrink: 0; border: 4px solid #fff; box-shadow: var(--shadow); }
.author-hero h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.02em; }
.author-bio { max-width: 640px; }
.author-stats { color: var(--text-2); font-size: 14px; font-weight: 600; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.author-links a {
  font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
}
.author-links a:hover { background: var(--accent-grad); color: #fff; border-color: transparent; }

.authors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; margin-bottom: 32px; }
.author-card {
  text-align: center; padding: 28px 18px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); transition: .2s; box-shadow: var(--shadow-sm);
}
.author-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #d8defc; }
.author-card img { border-radius: 50%; margin: 0 auto 12px; border: 3px solid var(--bg-soft); }
.author-card h2 { font-size: 16.5px; margin: 0 0 2px; }
.author-card p { color: var(--text-2); font-size: 13.5px; margin: 0 0 4px; }
.author-card small { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------ auth / forms */
.auth-card {
  max-width: 470px; margin: 52px auto 76px; padding: 38px 40px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lift);
}
.auth-card-wide { max-width: 730px; }
.auth-card-center { text-align: center; }
.auth-card h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.02em; }
.auth-sub { color: var(--text-2); margin: 0 0 24px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
.auth-card label small { color: var(--text-2); font-weight: 400; }
.auth-card input:not([type="checkbox"]), .auth-card textarea, .auth-card select {
  padding: 12px 15px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 15px;
}
.auth-card input:focus, .auth-card textarea:focus, .auth-card select:focus {
  outline: 3px solid rgba(47, 84, 255, .16); border-color: var(--accent); background: #fff;
}
.check-label { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; }
.check-label input { margin-top: 4px; accent-color: var(--accent); }
.check-label a { color: var(--accent); font-weight: 600; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.auth-alt a { color: var(--accent); font-weight: 700; }
.success-icon { font-size: 54px; margin-bottom: 8px; }

.alert { padding: 14px 19px; border-radius: 14px; margin: 14px 0; font-size: 14.5px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: #e8f8f0; color: #0b7a52; border: 1px solid #b9e9d2; }
.alert-error { background: #fdeef0; color: #c01927; border: 1px solid #f6c6cc; }

/* ------------------------------------------------ advertise */
.advertise-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 40px; }
.stat-pill {
  text-align: center; padding: 22px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stat-pill strong { display: block; font-size: 17px; color: var(--ink); }
.stat-pill span { font-size: 13px; color: var(--text-2); }

.zones-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 16px; }
.zone-card {
  padding: 24px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 9px;
  box-shadow: var(--shadow-sm); transition: .2s;
}
.zone-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #d8defc; }
.zone-card h3 { margin: 0; font-size: 17px; }
.zone-size {
  display: inline-block; align-self: flex-start; padding: 3px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--accent); font-weight: 800; font-size: 13px; margin: 0;
}
.zone-desc { color: var(--text-2); font-size: 13.5px; margin: 0; flex: 1; }
.zone-prices { display: flex; gap: 18px; font-size: 14px; color: var(--text-2); }
.zone-prices strong { color: var(--ink); font-size: 18px; }
.rate-note { color: var(--text-2); font-size: 14px; margin-top: 18px; }
.rate-note a { color: var(--accent); font-weight: 600; }
.price-preview { background: #f2f5ff; border: 1px solid #dfe5ff; padding: 12px 17px; border-radius: 12px; font-size: 15px; }
.price-preview strong { color: var(--accent); }

.order-summary { text-align: left; background: var(--bg-soft); border-radius: 14px; padding: 6px 22px; margin: 22px 0; }
.order-summary p { display: flex; justify-content: space-between; margin: 13px 0; }
.order-summary span { color: var(--text-2); }
.payment-instructions { text-align: left; margin: 18px 0; }

.campaign-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.stat-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 15px 17px; }
.stat-card span { display: block; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.stat-card strong { font-size: 19px; color: var(--ink); }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-ok { background: #e8f8f0; color: #0b7a52; }
.badge-warn { background: #fdf3e4; color: #b3621a; }
.badge-bad { background: #fdeef0; color: #c01927; }
.badge-muted { background: var(--surface-2); color: var(--text-2); }

/* ------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #c4c9e2; margin-top: 40px; }
.site-footer .logo { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 38px; padding: 52px 0 34px; }
.footer-about p { color: #9aa2c4; font-size: 14.5px; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-social a {
  font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #dfe3f7;
}
.footer-social a:hover { background: var(--accent-grad); color: #fff; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: #7e87ad; margin: 4px 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14.5px; color: #c4c9e2; }
.footer-col a:hover { color: #fff; }
.footer-newsletter p { color: #9aa2c4; font-size: 14.5px; }
.footer-newsletter input[type="email"] {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
}
.footer-newsletter input[type="email"]::placeholder { color: #8a92b8; }
.footer-newsletter .newsletter-msg.ok { color: #7fe6b4; }
.footer-newsletter .newsletter-msg.err { color: #ff9aa6; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .09); color: #7e87ad; font-size: 13.5px;
}
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------ engagement */
.engage-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px;
}
.engage-fontsize { display: flex; gap: 4px; }
.engage-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer;
  font-family: inherit; transition: .15s; -webkit-tap-highlight-color: transparent;
}
.engage-btn:hover { border-color: var(--accent); color: var(--accent); }
.engage-btn.is-active {
  background: var(--accent-grad); color: #fff; border-color: transparent;
  box-shadow: 0 5px 12px -5px rgba(47, 84, 255, .55);
}
.engage-btn[data-state="playing"] { background: var(--accent-grad); color: #fff; border-color: transparent; }

.reaction-box {
  margin: 30px 0; padding: 22px 24px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.reaction-box h2 { margin: 0 0 14px; font-size: 17px; }
.reaction-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.reaction-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 64px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; cursor: pointer; font-family: inherit; transition: .16s;
  -webkit-tap-highlight-color: transparent;
}
.reaction-emoji { font-size: 24px; line-height: 1; transition: transform .16s; }
.reaction-count { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.reaction-btn:hover { transform: translateY(-3px); border-color: #ccd6ff; box-shadow: var(--shadow-sm); }
.reaction-btn:hover .reaction-emoji { transform: scale(1.25); }
.reaction-btn.is-active {
  border-color: var(--accent); background: #f2f5ff;
  box-shadow: 0 6px 14px -6px rgba(47, 84, 255, .45);
}
.reaction-btn.is-active .reaction-count { color: var(--accent); }
@keyframes reaction-pop { 40% { transform: scale(1.55) rotate(-8deg); } }
.reaction-btn.is-popping .reaction-emoji { animation: reaction-pop .35s ease; }

.read-next {
  position: fixed; right: 18px; bottom: 18px; z-index: 95; width: 320px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lift); padding: 14px 16px;
  animation: read-next-in .35s ease;
}
@keyframes read-next-in { from { transform: translateY(24px); opacity: 0; } }
.read-next small {
  display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent); margin-bottom: 8px;
}
.read-next a { display: flex; gap: 12px; align-items: center; }
.read-next img { border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.read-next span { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.read-next a:hover span { color: var(--accent); }
.read-next-close {
  position: absolute; top: 8px; right: 10px; border: 0; background: none;
  color: var(--text-2); cursor: pointer; font-size: 14px; padding: 4px;
}

.more-for-you { margin: 40px 0 8px; }

/* Continuous-reading stream */
#storyStream { margin-top: 10px; }
.stream-strip { margin: 44px 0 10px; }
/* Streamed posts read full-container width but the body stays a comfortable
   line length; the "More for you" strips above use the full width. */
.stream-article { margin: 10px auto 0; max-width: 900px; }
.stream-divider {
  display: flex; align-items: center; gap: 16px; margin: 34px 0 26px;
}
.stream-divider::before, .stream-divider::after {
  content: ""; flex: 1; height: 3px; border-radius: 3px;
  background: var(--accent-grad); opacity: .22;
}
.stream-divider span {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); white-space: nowrap;
}
.stream-article-title { margin-bottom: 12px; }
.stream-article-title a:hover { color: var(--accent); }
.stream-byline {
  display: flex; gap: 16px; align-items: center; font-size: 13.5px; color: var(--text-2);
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border);
}
.stream-article-foot {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px;
  padding: 14px 0; border-top: 1px dashed var(--border);
}

/* Saved stories overlay */
.saved-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(16, 20, 38, .45);
  backdrop-filter: blur(3px); display: flex; justify-content: flex-end;
}
.saved-panel {
  width: 400px; max-width: 92vw; height: 100%; background: #fff; overflow-y: auto;
  padding: 20px 22px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: -16px 0 40px -20px rgba(16, 20, 38, .4);
  animation: saved-in .25s ease;
}
@keyframes saved-in { from { transform: translateX(60px); opacity: 0; } }
.saved-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.saved-head h2 { margin: 0; font-size: 19px; }
.saved-list { display: flex; flex-direction: column; gap: 12px; }
.saved-item {
  display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border);
  border-radius: 12px; position: relative;
}
.saved-item img { width: 80px; height: 46px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.saved-item a { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--ink); padding-right: 22px; }
.saved-item a:hover { color: var(--accent); }
.saved-item button {
  position: absolute; top: 6px; right: 8px; border: 0; background: none;
  color: var(--text-2); cursor: pointer; font-size: 13px; padding: 4px;
}
.saved-item button:hover { color: var(--danger); }
.saved-empty { color: var(--text-2); font-size: 14.5px; }
.icon-btn { position: relative; }
.saved-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding: 0 4px;
  background: var(--hot-grad); color: #fff; font-size: 10.5px; font-weight: 800;
  border-radius: 999px;
}

/* ------------------------------------------------ mobile app chrome */
/* Swipeable section tabs under the header (shown ≤1024px) */
.chip-strip {
  display: none; gap: 8px; padding: 10px 16px calc(10px + 2px);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-top: 1px solid var(--border); background: #fff;
}
.chip-strip::-webkit-scrollbar { display: none; }
.chip-strip-item {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; transition: .15s;
}
.chip-strip-item.is-active, .chip-strip-item:active {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 5px 12px -5px rgba(47, 84, 255, .55);
}

/* Fixed bottom tab bar (shown ≤720px) */
.app-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  display: none; align-items: stretch; justify-content: space-around;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px -10px rgba(16, 20, 38, .18);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.app-bar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px; border: 0; background: none; cursor: pointer;
  font-size: 10.5px; font-weight: 700; color: var(--text-2); font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.app-bar-item svg { transition: .15s; }
.app-bar-item.is-active, .app-bar-item:active { color: var(--accent); }
.app-bar-item.is-active svg { transform: translateY(-1px); }

/* ------------------------------------------------ misc */
.back-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; z-index: 90;
  border: 0; border-radius: 14px; background: var(--accent-grad); color: #fff; font-size: 19px;
  cursor: pointer; opacity: 0; pointer-events: none; transition: .25s;
  box-shadow: 0 14px 28px -10px rgba(47, 84, 255, .6);
}
.back-top.is-visible { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ------------------------------------------------ responsive */

/* ---------- Tablet & below: drawer navigation (the inline menu
   overflows under ~1080px, so the drawer takes over here) ---------- */
@media (max-width: 1024px) {
  .header-inner { height: 60px; gap: 10px; justify-content: space-between; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 10px; background: #fff;
    border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: 60px 0 0 0; background: #fff; padding: 18px 20px 90px;
    transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; z-index: 99;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; gap: 4px; }
  .main-nav a, .main-nav button { font-size: 17px; padding: 13px 14px; width: 100%; text-align: left; border-radius: 12px; }
  .main-nav > ul > li > a::after { display: none; }
  .main-nav .dropdown { position: static; display: grid; grid-template-columns: 1fr 1fr; min-width: 0; box-shadow: none; border: 0; background: var(--bg-soft); }

  .chip-strip { display: flex; }

  .hero { grid-template-columns: 1fr; margin-top: 20px; }
  .card-hero { min-height: 400px; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .card-grid, .card-grid-3 { grid-template-columns: 1fr 1fr; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
  .advertise-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* magazine blocks collapse */
  .hero-band { grid-template-columns: 1fr; gap: 18px; margin: 18px 0 32px; }
  .hero-lead .card-hero { min-height: 380px; }
  .hero-secondary { grid-template-columns: 1fr 1fr; }
  .mosaic { grid-template-columns: 1fr; }
  .mosaic-feature .card-overlay { min-height: 300px; }
  .spotlight-grid, .spotlight-reverse .spotlight-grid { grid-template-columns: 1fr; gap: 16px; }
  .spotlight-reverse .spotlight-lead { order: 0; }
  .strip-feature, .strip-lead { grid-template-columns: 1fr; gap: 16px; }
  .strip-quad { grid-template-columns: 1fr 1fr; }
}

/* ---------- Phones: app mode ---------- */
@media (max-width: 720px) {
  body {
    /* room for the fixed bottom tab bar */
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  .app-bar { display: flex; }
  .back-top { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  .read-next { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  .engage-bar { gap: 6px; }
  .engage-btn { padding: 8px 12px; font-size: 12.5px; }

  .container { padding: 0 16px; }
  .header-actions .btn { display: none; }
  .write-cta { display: none; }

  /* Native-app feel: lead story bleeds to the edges */
  .hero { margin: 14px -16px 30px; gap: 14px; }
  .card-hero { min-height: 350px; border-radius: 0 0 22px 22px; }
  .card-hero .card-body { padding: 48px 18px 18px; }
  .card-hero .card-title { font-size: 22px; }
  .card-hero .card-excerpt { display: none; }
  .hero-side { grid-template-columns: 1fr; padding: 0 16px; }

  .card-grid, .card-grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .card-title { font-size: 16.5px; }
  .section-head h2 { font-size: 20px; }

  /* magazine blocks: phone */
  .hero-band { margin: 12px 0 28px; }
  .hero-lead .card-hero { min-height: 320px; }
  .hero-secondary { grid-template-columns: 1fr; }
  .mosaic-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  /* small cards stack (image on top) on phones - no cramped image-left clipping */
  .card-compact { flex-direction: column; }
  .card-compact .card-media { flex-basis: auto; width: 100%; max-width: none; aspect-ratio: 16/9; }
  .strip-quad, .strip-duo, .strip-pair { grid-template-columns: 1fr; }
  .card-list-media { flex-basis: 92px; }
  .card-list-media img { width: 92px; height: 60px; }
  .section-more { font-size: 12px; }

  .ticker-label { padding: 9px 12px; font-size: 11px; }

  .article-title { font-size: 26px; }
  .article-figure { margin-inline: -16px; border-radius: 0; box-shadow: none; }
  .article-content { font-size: 16.5px; }
  .article-byline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .byline-meta { text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { grid-column: auto; text-align: left; }

  .author-hero { flex-direction: column; align-items: center; text-align: center; padding: 28px 20px; }
  .author-links { justify-content: center; }
  .archive-header { padding: 30px 0 20px; }
  .campaign-stats { grid-template-columns: 1fr 1fr; }
  .advertise-stats { gap: 10px; }
  .auth-card { padding: 28px 20px; margin: 28px auto 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 38px 0 26px; }

  /* Larger touch targets */
  .btn { padding: 13px 22px; }
  .btn-sm { padding: 9px 16px; }
  .page-link { padding: 11px 18px; }
}

/* ---------- Tiny phones ---------- */
@media (max-width: 380px) {
  .logo-text { font-size: 17px; }
  .card-hero { min-height: 300px; }
  .app-bar-item span { font-size: 10px; }
}
