/* =====================================================================
   Kapitaalkompas — editorial financial blog (money-column style)
   Direction: independent newspaper / editorial money blog.
   Masthead, ruled section nav, two-column list + sidebar.
   Type: Newsreader (editorial serif) + Archivo (grotesque UI).
   Palette: white, navy, muted green, soft blue, grey tones.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500;1,6..72,600&family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
  --white: #ffffff;
  --paper: #f6f6f3;       /* warm-neutral editorial paper */
  --paper-2: #ecedea;
  --navy: #112236;
  --navy-900: #0a1626;
  --navy-700: #203a59;
  --green: #2f6b57;
  --green-deep: #245446;
  --green-soft: #e8f0ec;
  --blue: #3f689b;
  --blue-soft: #e8eef6;
  --ink: #181d22;
  --muted: #565f68;
  --muted-2: #878f98;
  --line: #e1e0db;
  --line-2: #c9c8c1;
  --rule: #181d22;        /* strong editorial rule */

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, system-ui, sans-serif;
  --mono: 'Archivo', system-ui, sans-serif;

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --container: 1180px;
  --shadow-sm: 0 1px 2px rgba(17, 34, 54, .06);
  --shadow-md: 0 10px 30px rgba(17, 34, 54, .10);
  --shadow-lg: 0 30px 70px rgba(17, 34, 54, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -.012em; color: var(--navy); }
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { color: var(--ink); }
em { font-style: italic; }
.lead { font-family: var(--serif); font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: var(--muted); line-height: 1.5; font-weight: 400; }

/* kicker / eyebrow (category label) */
.kicker, .eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.kicker::before {
  content: ''; width: 16px; height: 2px; background: var(--green); display: inline-block;
}
.kicker--plain::before { display: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.section { padding: clamp(48px, 6vw, 84px) 0; }
.section--tight { padding: clamp(36px, 4vw, 60px) 0; }
.rule-top { border-top: 1px solid var(--line); }
.bg-paper { background: var(--paper); }
.text-center { text-align: center; }

/* Section header — editorial ruled heading */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding-bottom: 14px; border-bottom: 2px solid var(--rule); }
.sec-head .kicker { display: block; margin-bottom: 8px; }
.sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.sec-head .more { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--navy); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 3px; border-bottom: 1.5px solid transparent; transition: border-color .2s, gap .2s; }
.sec-head .more:hover { border-color: var(--green); gap: 9px; }
.sec-head .more svg { width: 15px; height: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-family: var(--sans); font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s, border-color .2s;
}
.btn svg { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-900); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-deep); }
.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--navy); background: var(--paper); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 14px 28px; font-size: 1rem; }

/* text link with arrow */
.tlink { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sans); font-weight: 600; font-size: .88rem; color: var(--navy); border-bottom: 1.5px solid var(--green); padding-bottom: 2px; transition: gap .2s, color .2s; }
.tlink svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.tlink:hover { color: var(--green); }
.tlink:hover svg { transform: translateX(3px); }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #b9c4d1; font-size: .76rem; letter-spacing: .03em; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar .tb-date { font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; color: #8595a6; }
.topbar .tb-right { display: flex; align-items: center; gap: 18px; }
.topbar .tb-right a { color: #b9c4d1; transition: color .2s; font-weight: 500; }
.topbar .tb-right a:hover { color: #fff; }

/* ---------- Header / masthead ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative; padding: 10px 14px; font-family: var(--sans);
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
  transition: color .2s;
}
.nav-links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--green); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); }
.nav-toggle svg { width: 22px; height: 22px; color: var(--navy); }

/* ---------- Lead story (home hero) ---------- */
.lead-wrap { padding: clamp(28px, 4vw, 48px) 0 clamp(36px, 5vw, 56px); }
.lead-story { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.lead-figure { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16/11; background: var(--paper-2); }
.lead-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.lead-story:hover .lead-figure img { transform: scale(1.03); }
.lead-figure .flag { position: absolute; left: 16px; top: 16px; background: var(--navy); color: #fff; font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-sm); }
.lead-copy .kicker { margin-bottom: 16px; }
.lead-copy h1 { margin-bottom: 18px; }
.lead-copy h1 em { color: var(--green); }
.lead-copy .lead { margin-bottom: 22px; max-width: 42ch; }
.lead-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; color: var(--muted-2); font-family: var(--sans); font-size: .82rem; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* meta line with clock icon */
.meta { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: .78rem; color: var(--muted-2); font-weight: 500; }
.meta svg { width: 14px; height: 14px; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* category tag */
.tag { font-family: var(--sans); font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--green); }
.tag--blue { color: var(--blue); }
.tag--navy { color: var(--navy); }
.tag--amber { color: #9a6a1f; }

/* ---------- Two-column blog layout ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }

/* ---------- Post list (editorial rows) ---------- */
.post-list { display: grid; }
.post {
  display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.post:first-child { padding-top: 4px; }
.post-figure { position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4/3; background: var(--paper-2); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post:hover .post-figure img { transform: scale(1.05); }
.post-body { min-width: 0; }
.post-cat { margin-bottom: 9px; }
.post h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); margin-bottom: 9px; transition: color .2s; }
.post:hover h3 { color: var(--green); }
.post-dek { color: var(--muted); font-size: .98rem; line-height: 1.55; margin-bottom: 14px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.post-byline { font-family: var(--sans); font-size: .78rem; color: var(--muted-2); }
.post-read { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--navy); }
.post-read svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.post:hover .post-read svg { transform: translateX(3px); }

/* Featured grid on home (lead + supporting) */
.feature-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 4vw, 48px); }
.feature-side { display: grid; gap: 22px; align-content: start; }
.fcard { display: grid; gap: 12px; }
.fcard--lead .fcard-figure { aspect-ratio: 16/10; }
.fcard-figure { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16/9; background: var(--paper-2); }
.fcard-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.fcard:hover .fcard-figure img { transform: scale(1.04); }
.fcard--row { grid-template-columns: 130px 1fr; align-items: start; }
.fcard--row .fcard-figure { aspect-ratio: 1/1; border-radius: var(--radius-sm); }
.fcard h3 { transition: color .2s; }
.fcard--lead h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
.fcard--row h3 { font-size: 1.1rem; }
.fcard:hover h3 { color: var(--green); }
.fcard p { color: var(--muted); font-size: .96rem; margin-top: 2px; }
.fcard .meta { margin-top: 4px; }

/* ---------- Sidebar widgets ---------- */
.sidebar { display: grid; gap: 30px; position: sticky; top: 100px; }
.widget { }
.widget-title { font-family: var(--sans); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--navy); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 2px solid var(--rule); }
/* numbered popular list */
.pop-list li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pop-list li:last-child { border-bottom: none; }
.pop-list .n { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--line-2); line-height: 1; }
.pop-list a { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; color: var(--navy); line-height: 1.25; transition: color .2s; }
.pop-list a:hover { color: var(--green); }
.pop-list .meta { margin-top: 5px; display: flex; }
/* category list */
.cat-list li { border-bottom: 1px solid var(--line); }
.cat-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-family: var(--sans); font-weight: 600; font-size: .92rem; color: var(--navy); transition: color .2s, padding .2s; }
.cat-list a:hover { color: var(--green); padding-left: 6px; }
.cat-list .count { font-family: var(--sans); font-size: .78rem; font-weight: 600; color: var(--muted-2); background: var(--paper); border-radius: 100px; padding: 2px 10px; }
/* about widget */
.widget-note { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.widget-note .mk { width: 38px; height: 38px; margin-bottom: 14px; }
.widget-note h4 { font-size: 1.2rem; margin-bottom: 8px; }
.widget-note p { font-size: .9rem; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
/* sidebar newsletter */
.widget-sub { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; }
.widget-sub h4 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.widget-sub p { color: #aebac8; font-size: .88rem; margin-bottom: 16px; line-height: 1.55; }
.widget-sub .input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.widget-sub .input::placeholder { color: #8d9bab; }
.widget-sub .input:focus { border-color: #7fb8a3; box-shadow: 0 0 0 3px rgba(127,184,163,.18); }
.widget-sub .form-note { color: #8595a6; }

/* ---------- Topics ---------- */
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.topic { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background .25s; position: relative; }
.topic:nth-child(4n) { border-right: none; padding-right: 0; }
.topic { padding-left: 24px; }
.topic:nth-child(4n+1) { padding-left: 0; }
.topic:hover { background: var(--paper); }
.topic-num { font-family: var(--sans); font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--muted-2); margin-bottom: 16px; }
.topic-icon { width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--green-soft); display: grid; place-items: center; margin-bottom: 16px; }
.topic-icon svg { width: 24px; height: 24px; color: var(--green); }
.topic h3 { font-size: 1.2rem; margin-bottom: 7px; transition: color .2s; }
.topic:hover h3 { color: var(--green); }
.topic p { color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---------- Explainer (market insights) ---------- */
.explainer { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.explainer-copy .kicker { margin-bottom: 14px; }
.explainer-copy h2 { margin-bottom: 16px; }
.explainer-copy p { color: var(--muted); margin-bottom: 22px; }
.insight-list { display: grid; gap: 12px; }
.insight-list li { display: flex; gap: 13px; align-items: flex-start; color: var(--ink); font-size: .98rem; }
.insight-list .chk { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; margin-top: 1px; }
.insight-list .chk svg { width: 14px; height: 14px; color: var(--green); }
.chart-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--white); box-shadow: var(--shadow-sm); }
.chart-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chart-panel-head .t { font-family: var(--sans); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--navy); }
.chart-panel-head .badge { font-family: var(--sans); font-size: .7rem; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 4px 10px; border-radius: 100px; letter-spacing: .04em; text-transform: uppercase; }
.chart { width: 100%; height: 150px; }
.chart .area { fill: url(#chartGrad); }
.chart .line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.chart-stat { border-top: 2px solid var(--rule); padding-top: 11px; }
.chart-stat .v { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.chart-stat .l { font-family: var(--sans); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; font-weight: 600; }
.chart-note { font-family: var(--sans); font-size: .72rem; color: var(--muted-2); margin-top: 16px; }

/* ---------- Newsletter band ---------- */
.newsletter-band { border: 2px solid var(--rule); border-radius: var(--radius); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.newsletter-band .kicker { margin-bottom: 12px; }
.newsletter-band h2 { margin-bottom: 12px; }
.newsletter-band p { color: var(--muted); }

/* ---------- Forms ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.form-row label { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.input, .textarea, select.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--white); transition: border-color .2s, box-shadow .2s; font-size: .96rem; font-family: var(--sans);
}
.input:focus, .textarea:focus, select.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.input.invalid, .textarea.invalid { border-color: #b9442b; box-shadow: 0 0 0 3px rgba(185,68,43,.1); }
.field-error { color: #b9442b; font-size: .78rem; min-height: 1em; font-family: var(--sans); }
.consent { display: flex; gap: 11px; align-items: flex-start; margin: 4px 0 16px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.consent label { font-size: .84rem; color: var(--muted); line-height: 1.5; font-family: var(--sans); }
.consent a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.form-note { font-family: var(--sans); font-size: .74rem; color: var(--muted-2); margin-top: 12px; }
.form-success {
  display: none; align-items: center; gap: 12px; padding: 15px 16px; border-radius: var(--radius-sm);
  background: var(--green-soft); border: 1px solid #bfdccf; color: var(--green-deep); font-size: .9rem; font-weight: 600; margin-top: 4px; font-family: var(--sans);
}
.form-success.show { display: flex; animation: fadeUp .4s var(--ease); }
.form-success svg { width: 20px; height: 20px; flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b3bfcc; padding: clamp(48px, 6vw, 76px) 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: #93a1b2; font-size: .92rem; margin: 16px 0 0; max-width: 34ch; line-height: 1.6; }
.footer-col h4 { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #76879a; font-weight: 700; margin-bottom: 16px; }
.footer-col a { display: block; color: #b3bfcc; font-size: .9rem; padding: 6px 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; flex-wrap: wrap; }
.footer-bottom p { font-size: .8rem; color: #76879a; }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { font-size: .8rem; color: #93a1b2; }
.footer-legal a:hover { color: #fff; }
.footer-disclaimer { font-size: .78rem; color: #687a8c; line-height: 1.65; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(40px, 5vw, 72px) 0 clamp(28px, 3vw, 44px); border-bottom: 2px solid var(--rule); }
.page-hero .container { max-width: 820px; }
.page-hero .kicker { display: block; margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero .lead { max-width: 62ch; }
.breadcrumb { font-family: var(--sans); font-size: .76rem; color: var(--muted-2); margin-bottom: 22px; letter-spacing: .03em; }
.breadcrumb a { color: var(--muted-2); transition: color .2s; }
.breadcrumb a:hover { color: var(--green); }

/* ---------- Blog filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-btn {
  padding: 8px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2);
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); background: var(--white);
  transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.is-hidden { display: none !important; }

/* ---------- Article modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(10,22,38,.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: clamp(14px, 3vw, 48px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; overflow-y: auto; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--white); border-radius: var(--radius); max-width: 740px; width: 100%; box-shadow: var(--shadow-lg); transform: translateY(24px) scale(.98); transition: transform .35s var(--ease); overflow: hidden; margin: auto; }
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-media { position: relative; aspect-ratio: 21/9; background: var(--paper-2); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .2s, background .2s; }
.modal-close:hover { transform: rotate(90deg); }
.modal-close svg { width: 20px; height: 20px; color: var(--navy); }
.modal-body { padding: clamp(26px, 4vw, 46px); }
.modal-body .meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.modal-body h2 { margin-bottom: 22px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.article-content { font-family: var(--serif); }
.article-content p { margin-bottom: 18px; line-height: 1.72; font-size: 1.12rem; color: var(--ink); }
.article-content h3 { margin: 30px 0 12px; font-family: var(--serif); }
.article-content ul.bullets { margin: 0 0 18px; display: grid; gap: 10px; }
.article-content ul.bullets li { position: relative; padding-left: 24px; font-size: 1.08rem; line-height: 1.6; color: var(--ink); }
.article-content ul.bullets li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.article-content blockquote { border-left: 3px solid var(--green); padding: 4px 0 4px 22px; margin: 24px 0; font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--navy); line-height: 1.45; }
.disclaimer { display: flex; gap: 12px; margin-top: 30px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); color: var(--muted); font-family: var(--sans); font-size: .84rem; line-height: 1.6; }
.disclaimer svg { width: 20px; height: 20px; flex: none; color: var(--blue); margin-top: 1px; }
.disclaimer strong { color: var(--navy); }

/* ---------- About / generic sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split--reverse .split-media { order: 2; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 5/4; background: var(--paper-2); border: 1px solid var(--line); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-copy .kicker { margin-bottom: 14px; }
.split-copy h2 { margin-bottom: 14px; }
.split-copy p { color: var(--muted); margin-bottom: 14px; line-height: 1.7; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.value-card { padding: 30px 26px 30px 0; border-right: 1px solid var(--line); transition: background .2s; }
.value-card:nth-child(3n) { border-right: none; padding-right: 0; }
.value-card { padding-left: 26px; }
.value-card:nth-child(3n+1) { padding-left: 0; }
.value-card .topic-icon { margin-bottom: 18px; }
.value-card h3 { margin-bottom: 8px; }
.value-card p { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.notice { background: var(--blue-soft); border: 1px solid #ccdcef; border-radius: var(--radius); padding: 26px 28px; display: flex; gap: 16px; align-items: flex-start; }
.notice svg { width: 26px; height: 26px; flex: none; color: var(--blue); margin-top: 2px; }
.notice h3 { font-size: 1.2rem; margin-bottom: 8px; }
.notice p { color: var(--navy-700); font-size: .96rem; line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq { display: grid; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 22px 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 1.18rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { flex: none; width: 26px; height: 26px; display: grid; place-items: center; transition: transform .3s var(--ease); }
.faq-item summary .ico svg { width: 18px; height: 18px; color: var(--green); }
.faq-item[open] summary .ico { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 4px 24px; color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 70ch; }

/* ---------- Legal ---------- */
.legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.legal-nav { position: sticky; top: 100px; }
.legal-nav h4 { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; font-weight: 700; }
.legal-nav a { display: block; padding: 9px 14px; border-radius: var(--radius-sm); font-family: var(--sans); font-size: .88rem; font-weight: 500; color: var(--muted); transition: all .2s; border-left: 2px solid transparent; }
.legal-nav a:hover { color: var(--navy); background: var(--paper); }
.legal-nav a.active { color: var(--green); border-left-color: var(--green); background: var(--green-soft); font-weight: 600; }
.legal-section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { margin-bottom: 6px; }
.legal-section .upd { font-family: var(--sans); font-size: .76rem; color: var(--muted-2); margin-bottom: 20px; }
.legal-section h3 { margin: 26px 0 10px; font-size: 1.2rem; }
.legal-section p { color: var(--ink); margin-bottom: 14px; line-height: 1.72; }
.legal-section ul.bullets { display: grid; gap: 9px; margin-bottom: 16px; }
.legal-section ul.bullets li { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.6; }
.legal-section ul.bullets li::before { content: ''; position: absolute; left: 3px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); bottom: clamp(12px, 3vw, 28px); z-index: 300; max-width: 460px; background: var(--white); border: 2px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px 28px; transform: translateY(150%); opacity: 0; transition: transform .5s var(--ease), opacity .4s; }
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner .ico-head { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--green-soft); display: grid; place-items: center; margin-bottom: 14px; }
.cookie-banner .ico-head svg { width: 24px; height: 24px; color: var(--green); }
.cookie-banner h3 { font-size: 1.3rem; margin-bottom: 8px; }
.cookie-banner p { font-size: .88rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.cookie-banner p a { color: var(--green); text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 18px; font-size: .85rem; }
.cookie-actions .btn--link { padding: 10px 6px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.cookie-actions .btn--link:hover { color: var(--navy); }

/* Preferences modal */
.pref-overlay { position: fixed; inset: 0; z-index: 310; background: rgba(10,22,38,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.pref-overlay.open { opacity: 1; visibility: visible; }
.pref-modal { background: var(--white); border-radius: var(--radius); max-width: 540px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; transform: scale(.97); transition: transform .3s var(--ease); }
.pref-overlay.open .pref-modal { transform: scale(1); }
.pref-head { padding: 28px 28px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pref-head h3 { font-size: 1.4rem; margin-bottom: 6px; }
.pref-head p { font-size: .88rem; color: var(--muted); }
.pref-list { padding: 8px 28px; }
.pref-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.pref-item:last-child { border-bottom: none; }
.pref-item-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.pref-item-head h4 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--navy); }
.pref-item p { font-size: .86rem; color: var(--muted); line-height: 1.55; }
.pref-foot { padding: 20px 28px 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.locked { font-family: var(--sans); font-size: .72rem; font-weight: 700; color: var(--green); letter-spacing: .04em; text-transform: uppercase; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider { position: absolute; inset: 0; background: var(--line-2); border-radius: 100px; transition: background .25s; }
.switch .slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .25s var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .topics { grid-template-columns: repeat(2, 1fr); }
  .topic:nth-child(4n) { border-right: 1px solid var(--line); padding-right: 24px; }
  .topic:nth-child(2n) { border-right: none; padding-right: 0; }
  .topic:nth-child(2n+1) { padding-left: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .legal-nav h4 { width: 100%; }
  .legal-nav a { border-left: none; border: 1px solid var(--line); }
  .value-grid { grid-template-columns: 1fr 1fr; }
  .value-card:nth-child(3n) { border-right: 1px solid var(--line); padding-right: 26px; }
  .value-card:nth-child(2n) { border-right: none; padding-right: 0; }
  .value-card:nth-child(2n+1) { padding-left: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar .tb-right a:not(.tb-keep) { display: none; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .site-header.menu-open .nav-links { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 78px; background: var(--white); border-bottom: 2px solid var(--rule); padding: 14px clamp(18px,4vw,40px) 22px; gap: 2px; box-shadow: var(--shadow-md); }
  .site-header.menu-open .nav-links a { padding: 12px 8px; }
  .site-header.menu-open .nav-links a::after { display: none; }
  .lead-story, .explainer, .newsletter-band, .split, .feature-grid { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .post { grid-template-columns: 110px 1fr; gap: 16px; }
  .post h3 { font-size: 1.18rem; }
  .post-dek { display: none; }
  .topics, .value-grid, .sidebar { grid-template-columns: 1fr; }
  .topic, .value-card { border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cookie-banner { max-width: none; }
  .chart-stats { grid-template-columns: 1fr 1fr; }
  .fcard--row { grid-template-columns: 96px 1fr; }
}
@media (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .lead-actions, .hero-actions { flex-direction: column; align-items: stretch; }
  .lead-actions .btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
