/* =====================================================================
   ENERGY MARKET NEWS — Editorial design system
   Premium financial-news styling for an AFR-calibre readership.
   Shared by the WordPress theme and the static preview.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. Design tokens                                                    */
/* ------------------------------------------------------------------ */
:root {
  /* Brand palette */
  --ink:        #0b1f33;   /* masthead / headlines / footer */
  --ink-2:      #12263d;
  --ink-soft:   #33465c;
  --paper:      #f7f5f0;   /* warm newsprint background */
  --paper-2:    #efece4;
  --white:      #ffffff;
  --amber:      #e8912b;   /* signal amber — energy accent / CTAs */
  --amber-dark: #c9761a;
  --line:       #e3ddd1;   /* hairline rules */
  --line-2:     #d9d2c4;
  --muted:      #6d7683;   /* meta text */
  --muted-2:    #99a0aa;

  /* Category chip colours (per sector) */
  --c-electricity: #2f6fed;
  --c-gas:         #d1483a;
  --c-renewables:  #1f9d6b;
  --c-coaloil:     #6b5b4a;
  --c-policy:      #7b4dd8;
  --c-companies:   #0e7c86;
  --c-markets:     #1f9d6b;
  --c-storage:     #d98a00;
  --c-hydrogen:    #0aa3c2;
  --c-grid:        #4a5568;
  --c-deals:       #b8862b;
  --c-reports:     #334155;
  --c-default:     #33465c;

  /* Typography */
  --serif: "Fraunces", "Source Serif 4", Georgia, "Times New Roman", serif;
  --serif-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --gap: 32px;
  --radius: 4px;      /* editorial-sharp: chips, thumbs, controls */
  --radius-lg: 8px;   /* larger surfaces: media, callouts, cards */
  --shadow-sm: 0 1px 2px rgba(11,31,51,.06);
  --shadow-md: 0 10px 34px -8px rgba(11,31,51,.22);
}

/* ------------------------------------------------------------------ */
/* 2. Reset / base                                                     */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.14; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Small functional label (e.g. "Topics") — not a decorative eyebrow */
.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber-dark);
}

/* Tabular figures wherever numbers are read as data */
.topbar .ticker, .meta time, .rank-list .num, .pagination,
.byline .role, .archive-head .count { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ------------------------------------------------------------------ */
/* Browser surfaces — selection, focus, scrollbar, skip link           */
/* (the parts not drawn still carry the design)                        */
/* ------------------------------------------------------------------ */
::selection { background: var(--ink); color: var(--paper); }
.topbar ::selection, .site-footer ::selection,
.newsletter ::selection, .author-box ::selection { background: var(--amber); color: var(--ink); }

:focus-visible { outline: 2px solid var(--amber-dark); outline-offset: 2px; border-radius: 2px; }
.btn:focus-visible, .icon-btn:focus-visible,
.share-rail a:focus-visible, .share-rail button:focus-visible,
.byline .share a:focus-visible { outline-offset: 3px; }
.chip:focus-visible { outline-color: var(--ink); }
a:focus:not(:focus-visible) { outline: none; }

html { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 200;
  background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600; font-size: 14px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ------------------------------------------------------------------ */
/* 3. Top bar (date + ticker + subscribe)                              */
/* ------------------------------------------------------------------ */
.topbar {
  background: var(--ink);
  color: #cdd6e0;
  font-size: 12.5px;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar .date { text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: #9fb0c4; font-size: 11.5px; }
.topbar .ticker { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; margin: 0 22px; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.ticker-viewport { overflow: hidden; flex: 1; }
.ticker-track { display: inline-flex; align-items: center; gap: 22px; animation: emn-marquee 46s linear infinite; will-change: transform; }
.topbar .ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes emn-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.topbar .ticker .item { color: #cdd6e0; }
.topbar .ticker .up { color: #4ade80; font-weight: 600; }
.topbar .ticker .down { color: #f87171; font-weight: 600; }
.topbar .ticker .flat { color: #9fb0c4; font-weight: 600; }
.topbar .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex: none; animation: emn-pulse 2s infinite; }
@keyframes emn-pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.5); } 70% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.topbar .links { display: flex; gap: 18px; align-items: center; }
.topbar .links a { color: #cdd6e0; }
.topbar .links a:hover { color: var(--white); }
@media (max-width: 900px){ .topbar .ticker { display: none; } }

/* ------------------------------------------------------------------ */
/* 4. Leaderboard ad                                                   */
/* ------------------------------------------------------------------ */
.ad { display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.ad .ad-label { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.ad-leaderboard { padding: 18px 0 6px; }
.ad-slot {
  width: 100%;
  background: linear-gradient(120deg, #0b1f33, #1c3a5e);
  color: #dbe4ef;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border-radius: var(--radius);
  text-align: center;
}
.ad-leaderboard .ad-slot { max-width: 970px; height: 110px; }
.ad-slot .ad-head { font-family: var(--serif); font-size: 22px; color: #fff; }
.ad-slot .ad-sub { font-size: 13px; color: #9fb6d0; }
.ad-mpu .ad-slot { height: 250px; }
/* Custom (admin-pasted) ad code — centres whatever tag/image is provided */
.ad-custom { display: flex; justify-content: center; align-items: center; width: 100%; }
.ad-custom img { max-width: 100%; height: auto; }
.ad-inarticle { max-width: var(--wrap-narrow); margin: 8px auto 24px; }
.article-inarticle-ad:empty { display: none; }

/* ------------------------------------------------------------------ */
/* 5. Masthead / header                                                */
/* ------------------------------------------------------------------ */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 16px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-mark { width: 40px; height: 40px; flex: none; }
.brand .logo-text { display: flex; flex-direction: column; line-height: 1; }
.brand .logo-title {
  font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: -.02em; color: var(--ink);
}
.brand .logo-title .accent { color: var(--amber); }
.brand .logo-tag { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--amber); color: var(--ink); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: var(--amber-dark); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn { width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* Primary nav */
.primary-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.primary-nav .wrap { display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block; padding: 14px 16px; font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink); border-bottom: 3px solid transparent;
}
.nav-menu > li > a:hover, .nav-menu > li.current > a { color: var(--amber-dark); border-bottom-color: var(--amber); }
.nav-menu .has-children > a::after { content: "▾"; font-size: 10px; margin-left: 6px; color: var(--muted); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  border-radius: var(--radius); padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 60;
}
.nav-menu > li:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 12px; font-size: 14px; font-weight: 500; border-radius: 3px; color: var(--ink-soft); }
.submenu a:hover { background: var(--paper-2); color: var(--ink); }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 860px){
  .primary-nav .wrap { justify-content: flex-start; }
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 8px; z-index: 60; }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-menu .has-children > a::after { float: right; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 8px 14px; }
}

/* ------------------------------------------------------------------ */
/* 6. Category chips                                                   */
/* ------------------------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--c-default); padding: 4px 10px; border-radius: 3px; line-height: 1.4;
}
.chip:hover { color: #fff; filter: brightness(1.08); }
.chip.electricity { background: var(--c-electricity); }
.chip.gas         { background: var(--c-gas); }
.chip.renewables  { background: var(--c-renewables); }
.chip.coal-oil    { background: var(--c-coaloil); }
.chip.policy      { background: var(--c-policy); }
.chip.companies   { background: var(--c-companies); }
.chip.markets     { background: var(--c-markets); }
.chip.storage     { background: var(--c-storage); }
.chip.hydrogen    { background: var(--c-hydrogen); }
.chip.grid        { background: var(--c-grid); }
.chip.deals       { background: var(--c-deals); }
.chip.reports     { background: var(--c-reports); }

/* Meta line */
.meta { font-family: var(--sans); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* ------------------------------------------------------------------ */
/* 7. Section headings                                                 */
/* ------------------------------------------------------------------ */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); margin-bottom: 26px; padding-bottom: 10px; }
.section-head h2 { font-size: 30px; margin: 0; }
.section-head .more { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--amber-dark); }
.section-head .more:hover { color: var(--ink); }

/* ------------------------------------------------------------------ */
/* 8. Cards                                                            */
/* ------------------------------------------------------------------ */
.card { display: flex; flex-direction: column; }
/* Thumb is a positioned container; the image link and the chip are SIBLINGS
   (never nest an <a> chip inside an <a> image link — the browser hoists it out). */
.thumb { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 16/10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.thumb-link { display: block; width: 100%; height: 100%; }
.card:hover .thumb img,
.list-row:hover .thumb img,
.hero-side .list-item:hover .thumb img { transform: scale(1.04); }
.thumb .chip { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card .card-body { padding-top: 14px; }
.card h3 { font-size: 20px; margin: 8px 0 8px; }
.card h3 a:hover { color: var(--amber-dark); }
.card .excerpt { color: var(--ink-soft); font-size: 15px; margin: 0 0 12px; }

/* Featured hero card */
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--gap); align-items: stretch; }
.hero-main .thumb { aspect-ratio: 16/9; }
.hero-main h2 { font-size: 38px; margin: 16px 0 10px; }
.hero-main .excerpt { font-size: 17px; color: var(--ink-soft); max-width: 60ch; }
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side .list-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.hero-side .list-item:last-child { border-bottom: none; padding-bottom: 0; }
.hero-side .list-item .thumb { aspect-ratio: 1/1; }
.hero-side .list-item h3 { font-size: 16px; margin: 6px 0; line-height: 1.2; }

/* Grid of cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Compact list (sidebar / most read) */
.rank-list { list-style: none; }
.rank-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: none; }
.rank-list .num { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--amber); line-height: 1; }
.rank-list h4 { font-size: 15.5px; font-family: var(--serif); font-weight: 600; margin: 0 0 4px; line-height: 1.22; }

/* Horizontal list card (sector rows) */
.list-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .thumb { aspect-ratio: 16/10; }
.list-row h3 { font-size: 21px; margin: 8px 0; }

/* ------------------------------------------------------------------ */
/* 9. Layout: content + sidebar                                        */
/* ------------------------------------------------------------------ */
.content-grid { display: grid; grid-template-columns: 1fr 330px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 34px; }
.widget { }
.widget .widget-head { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--amber); padding-bottom: 8px; margin-bottom: 16px; }

/* ------------------------------------------------------------------ */
/* 10. Newsletter                                                      */
/* ------------------------------------------------------------------ */
.newsletter { background: var(--ink); color: #e7edf4; border-radius: var(--radius-lg); padding: 44px; position: relative; overflow: hidden; }
.newsletter::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(232,145,43,.25), transparent 70%); }
.newsletter .kicker { color: var(--amber); }
.newsletter h2 { color: #fff; font-size: 30px; margin: 8px 0 8px; max-width: 20ch; }
.newsletter p { color: #aebccb; max-width: 46ch; }
.newsletter form { display: flex; gap: 10px; max-width: 480px; margin-top: 18px; position: relative; z-index: 2; }
.newsletter input[type=email] { flex: 1; padding: 13px 16px; border-radius: 999px; border: 1px solid #34506e; background: #0e243b; color: #fff; font-size: 15px; }
.newsletter input[type=email]::placeholder { color: #7f92a6; }
.newsletter .form-note { font-size: 12px; color: #7f92a6; margin-top: 10px; }
.widget .newsletter { padding: 26px; }
.widget .newsletter h2 { font-size: 21px; }
.widget .newsletter form { flex-direction: column; }
.widget .newsletter input[type=email] { width: 100%; }

/* ------------------------------------------------------------------ */
/* 11. Single article                                                  */
/* ------------------------------------------------------------------ */
.article-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.article-head { max-width: 780px; padding: 30px 0 4px; }
.breadcrumbs { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a:hover { color: var(--amber-dark); }
.article-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.article-eyebrow .stamp { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.article-title { font-size: 47px; line-height: 1.06; letter-spacing: -.02em; margin: 4px 0 20px; }
.article-standfirst { font-family: var(--serif-body); font-size: 22px; line-height: 1.5; color: var(--ink-soft); font-weight: 400; margin: 0 0 24px; }
.byline { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--paper-2); object-fit: cover; flex: none; }
.byline .who { font-size: 14px; line-height: 1.45; }
.byline .who strong { font-weight: 700; }
.byline .who a:hover { color: var(--amber-dark); }
.byline .who .role { color: var(--muted); }
.byline .share { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.byline .share .share-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.byline .share a { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); background: var(--white); }
.byline .share a:hover { border-color: var(--ink); color: var(--ink); }
.byline .share svg { width: 15px; height: 15px; }
@media (max-width: 640px){ .byline .share .share-label { display: none; } }

/* Hero */
.article-hero { margin: 24px 0 6px; }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; max-height: 600px; object-fit: cover; border-radius: var(--radius-lg); }
.article-hero figcaption { font-size: 12.5px; color: var(--muted); padding: 10px 2px 0; }

/* Layout: share rail | body | sidebar */
.article-layout { display: grid; grid-template-columns: 48px minmax(0, 1fr) 320px; gap: 46px; align-items: start; padding-top: 26px; }
.article-content { max-width: 720px; }

.share-rail { position: sticky; top: 88px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share-rail .rail-label { writing-mode: vertical-rl; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.share-rail a, .share-rail button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); background: var(--white); cursor: pointer; transition: .15s; }
.share-rail a:hover, .share-rail button:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.share-rail svg { width: 17px; height: 17px; }
.share-rail .copied { border-color: var(--renewables, #1f9d6b); color: #1f9d6b; }

.article-sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 30px; }

/* Body — reading serif, generous measure, drop cap, end mark */
.article-body { font-family: var(--serif-body); font-size: 20px; line-height: 1.75; color: #16283b; }
.article-body p { margin: 0 0 1.35em; }
.article-body > p:first-of-type::first-letter { float: left; font-family: var(--serif); font-weight: 600; font-size: 74px; line-height: .8; padding: 8px 14px 0 0; color: var(--ink); }
.article-body > p:last-of-type::after { content: "\25A0"; color: var(--amber); font-size: .62em; margin-left: 8px; vertical-align: middle; }
.article-body h2 { font-family: var(--serif); font-size: 28px; margin: 1.5em 0 .45em; }
.article-body h3 { font-family: var(--serif); font-size: 22px; margin: 1.3em 0 .4em; }
.article-body a { color: var(--amber-dark); text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { margin: 0 0 1.35em 1.1em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote { border: 0; margin: 1.5em 0 1.6em; padding: 4px 0 4px 30px; position: relative; font-family: var(--serif); font-size: 27px; line-height: 1.34; color: var(--ink); }
.article-body blockquote::before { content: "\201C"; position: absolute; left: -4px; top: 6px; font-size: 62px; line-height: 1; color: var(--amber); font-family: var(--serif); }
.article-body blockquote cite { display: block; font-family: var(--sans); font-size: 13px; font-style: normal; color: var(--muted); margin-top: 12px; letter-spacing: .02em; }
.article-body figure { margin: 1.8em 0; }
.article-body figure img { border-radius: var(--radius-lg); }
.article-body figcaption { font-size: 12.5px; color: var(--muted); padding-top: 8px; font-family: var(--sans); }

/* Key points card */
.pull-key { background: linear-gradient(180deg, #ffffff, #fbf9f3); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 26px; margin: 0 0 34px; }
.pull-key h4 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--amber-dark); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.pull-key h4::before { content: ""; width: 20px; height: 2px; background: var(--amber); }
.pull-key ul { list-style: none; }
.pull-key li { padding-left: 24px; position: relative; margin-bottom: 11px; font-family: var(--sans); font-size: 16px; line-height: 1.45; color: var(--ink); }
.pull-key li:last-child { margin-bottom: 0; }
.pull-key li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* In-article ad */
.article-inarticle-ad { margin: 8px 0 24px; }
.article-inarticle-ad:empty { display: none; }

/* Tags */
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.tag-pill { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; }
.tag-pill:hover { border-color: var(--ink); }

/* Author box — dark, editorial */
.author-box { margin: 30px 0 0; background: var(--ink); color: #e7edf4; border-radius: var(--radius-lg); padding: 26px; display: flex; gap: 18px; }
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--ink-soft); object-fit: cover; }
.author-box .role { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--amber); margin: 0 0 6px; font-weight: 700; }
.author-box h4 { margin: 0 0 8px; font-size: 19px; color: #fff; }
.author-box p { font-size: 14.5px; color: #aebccb; margin: 0; }

/* Article responsive */
@media (max-width: 1040px){
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .share-rail { display: none; }
}
@media (max-width: 860px){
  .article-layout { grid-template-columns: 1fr; gap: 34px; }
  .article-content { max-width: none; }
  .article-sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 28px; }
  .article-sidebar .widget { flex: 1 1 280px; }
  .article-title { font-size: 34px; }
}
/* (phone-level article sizing consolidated in the responsive layer, section 14) */

/* ------------------------------------------------------------------ */
/* 12. Archive header                                                  */
/* ------------------------------------------------------------------ */
.archive-head { border-bottom: 2px solid var(--ink); padding: 36px 0 22px; margin-bottom: 34px; }
.archive-head .kicker { margin-bottom: 8px; display: block; }
.archive-head h1 { font-size: 44px; margin: 0 0 10px; }
.archive-head p { color: var(--ink-soft); max-width: 60ch; margin: 0; font-size: 16px; }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 40px 0 10px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 4px; font-weight: 600; font-size: 14px; padding: 0 12px; }
.pagination a:hover { border-color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------------ */
/* 13. Footer                                                          */
/* ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #b9c4d1; margin-top: 60px; }
.footer-top { padding: 54px 0 40px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo-title { font-family: var(--serif); font-size: 24px; color: #fff; }
.footer-brand .logo-title .accent { color: var(--amber); }
.footer-brand p { font-size: 14px; color: #93a2b3; max-width: 34ch; margin: 14px 0 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #cdd6e0; }
.footer-social a:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col h4 { color: #fff; font-family: var(--sans); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #b9c4d1; font-size: 14px; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: #8695a6; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: #8695a6; }
.footer-bottom a:hover { color: var(--amber); }

/* ------------------------------------------------------------------ */
/* 14. Utilities & responsive                                          */
/* ------------------------------------------------------------------ */
.divider { height: 1px; background: var(--line); margin: 40px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.mt-0 { margin-top: 0; }
.error-title { font-size: 72px; line-height: 1.02; margin: 6px 0 14px; }

/* --- Small desktop / large tablet --- */
@media (max-width: 1040px){
  .content-grid { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 28px; }
  .sidebar .widget { flex: 1 1 300px; }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Tablet --- */
@media (max-width: 880px){
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid, .card-grid.cols-4, .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 30px; }
  .hero-main h2 { font-size: 30px; }
  .list-row { grid-template-columns: 160px 1fr; gap: 16px; }
  .list-row h3 { font-size: 19px; }
}

/* --- Narrow: scale the masthead + big headings --- */
@media (max-width: 680px){
  .masthead { padding: 14px 0 12px; gap: 10px; }
  .brand { gap: 9px; min-width: 0; }
  .brand .logo-mark { width: 32px; height: 32px; }
  .brand .logo-title { font-size: 21px; }
  .header-actions { gap: 6px; flex: none; }
  .btn { padding: 8px 14px; font-size: 12.5px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .primary-nav .wrap { padding: 4px 0; }
  .archive-head h1 { font-size: 34px; }
}

/* --- Phones --- */
@media (max-width: 560px){
  body { font-size: 16px; }
  .wrap, .article-wrap { padding: 0 18px; }
  .section { padding: 30px 0; }
  .card-grid, .card-grid.cols-4, .card-grid.cols-2 { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-top { padding: 40px 0 30px; }
  .site-footer { margin-top: 44px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head h2 { font-size: 23px; }
  .archive-head { padding: 26px 0 18px; margin-bottom: 26px; }
  .archive-head h1 { font-size: 30px; }
  .article-head { padding: 22px 0 4px; }
  .article-title { font-size: 28px; }
  .article-standfirst { font-size: 19px; }
  .article-body { font-size: 18px; }
  .article-body > p:first-of-type::first-letter { font-size: 56px; padding: 6px 10px 0 0; }
  .article-layout { padding-top: 20px; }
  .byline { flex-wrap: wrap; row-gap: 12px; }
  .newsletter { padding: 26px; }
  .newsletter h2 { font-size: 23px; }
  .newsletter form { flex-direction: column; }
  .hero-side .list-item { grid-template-columns: 88px 1fr; }
  .list-row { grid-template-columns: 1fr; gap: 12px; }
  .error-title { font-size: 44px; }
}

/* --- Very small phones --- */
@media (max-width: 400px){
  .brand .logo-tag { display: none; }
  .brand .logo-title { font-size: 18px; }
  .btn { padding: 8px 12px; }
  .topbar .links { gap: 12px; }
}
/* Belt-and-braces: never allow sideways scroll on phones */
@media (max-width: 680px){ html, body { overflow-x: hidden; } }
