/* ==========================================================================
   FairPlayStory — fairplaystory.com
   Editorial design system. Mobile-first, no external dependencies.
   ========================================================================== */

/* ------------------------------------------------------------------ TOKENS */
:root {
  --ink:            #101828;
  --ink-soft:       #344054;
  --ink-mute:       #667085;
  --ink-faint:      #98a2b3;

  --paper:          #ffffff;
  --paper-alt:      #f7f6f3;
  --paper-sink:     #efece6;

  --line:           #e4e0d8;
  --line-strong:    #cfc9bd;

  --accent:         #c1272d;
  --accent-dark:    #9a1d22;
  --accent-soft:    #fdf0f0;
  --accent-text:    #ffffff;

  --link:           #1c4b8f;

  --radius-sm:      3px;
  --radius:         6px;
  --radius-lg:      12px;

  --shadow-xs:      0 1px 2px rgba(16, 24, 40, .06);
  --shadow-sm:      0 2px 8px rgba(16, 24, 40, .07);
  --shadow-md:      0 10px 28px rgba(16, 24, 40, .10);
  --shadow-lg:      0 24px 60px rgba(16, 24, 40, .16);

  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --wrap-narrow: 760px;

  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --ink:            #f3f1ec;
  --ink-soft:       #d3cfc7;
  --ink-mute:       #a09a90;
  --ink-faint:      #7b756c;

  --paper:          #14161a;
  --paper-alt:      #1b1e23;
  --paper-sink:     #23262c;

  --line:           #2c3037;
  --line-strong:    #3b4048;

  --accent:         #e8524f;
  --accent-dark:    #c1272d;
  --accent-soft:    #2a1a1b;
  --accent-text:    #14161a;

  --link:           #7fb0ee;

  --shadow-xs:      0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm:      0 2px 8px rgba(0, 0, 0, .45);
  --shadow-md:      0 10px 28px rgba(0, 0, 0, .5);
  --shadow-lg:      0 24px 60px rgba(0, 0, 0, .6);
}

/* ------------------------------------------------------------------ RESET */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; border: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1.15em; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .5em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--accent-text); }

/* --------------------------------------------------------------- UTILITIES */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: var(--radius); font-weight: 600; transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }
.no-scroll { overflow: hidden; }

/* ---------------------------------------------------------------- HEADER */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-top {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 700; letter-spacing: -.02em;
  font-size: 1.45rem; white-space: nowrap; flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -.03em;
}
.brand__text em { font-style: normal; color: var(--accent); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center; color: var(--ink-soft);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.icon-btn:hover { background: var(--paper-alt); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

.nav-toggle { display: inline-grid; }
@media (min-width: 1000px) { .nav-toggle { display: none; } }

.site-nav { display: none; }
@media (min-width: 1000px) {
  .site-nav {
    display: flex; align-items: center; gap: 2px;
    border-top: 1px solid var(--line);
    height: 46px;
  }
  .site-nav a {
    position: relative;
    padding: 0 14px; height: 46px;
    display: inline-flex; align-items: center;
    font-size: .875rem; font-weight: 600; letter-spacing: .01em;
    color: var(--ink-soft); text-transform: uppercase;
  }
  .site-nav a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
    height: 2px; background: var(--accent); transform: scaleX(0);
    transition: transform .2s var(--ease); transform-origin: left;
  }
  .site-nav a:hover { color: var(--ink); }
  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav a[aria-current="page"] { color: var(--ink); }
}

/* ------------------------------------------------------------- TICKER */
.ticker {
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #f3f1ec;
  height: 40px; overflow: hidden; font-size: .82rem;
}
[data-theme="dark"] .ticker { background: var(--paper-sink); }
.ticker__label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  font-size: .68rem; color: #fff; padding-left: 20px;
}
.ticker__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.9s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.75); }
}
.ticker__viewport { position: relative; overflow: hidden; flex: 1; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent); }
.ticker__track {
  display: flex; align-items: center; gap: 42px;
  position: absolute; white-space: nowrap; will-change: transform;
  animation: ticker-scroll 46s linear infinite;
  padding-right: 42px;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span { color: rgba(243, 241, 236, .88); }
.ticker__track span::before {
  content: "—"; margin-right: 10px; color: var(--accent);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .ticker__dot { animation: none; }
}

/* ----------------------------------------------------------- MOBILE DRAWER */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  transform: translateX(-100%);
  transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 20px; border-bottom: 1px solid var(--line);
}
.drawer__body { overflow-y: auto; padding: 18px 20px 40px; flex: 1; }
.drawer__body .site-nav-mobile { display: flex; flex-direction: column; }
.drawer__body .site-nav-mobile a {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.drawer__body .site-nav-mobile a svg { width: 16px; height: 16px; color: var(--ink-faint); }
.drawer__label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint);
  margin: 26px 0 10px;
}
.drawer__pages { display: flex; flex-direction: column; gap: 9px; }
.drawer__pages a { font-size: .95rem; color: var(--ink-soft); font-weight: 500; }

/* ------------------------------------------------------------ SEARCH PANEL */
.search-panel {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility .22s;
  padding: 72px 20px;
}
.search-panel.is-open { opacity: 1; visibility: visible; }
.search-panel__inner {
  max-width: 660px; margin: 0 auto; background: var(--paper);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; transform: translateY(-14px);
  transition: transform .28s var(--ease);
}
.search-panel.is-open .search-panel__inner { transform: translateY(0); }
.search-panel__field {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px; border-bottom: 1px solid var(--line);
}
.search-panel__field svg { width: 20px; height: 20px; color: var(--ink-faint); flex-shrink: 0; }
.search-panel__field input {
  flex: 1; border: 0; background: none; outline: none;
  font-size: 1.1rem; padding: 14px 0;
}
.search-panel__hint {
  padding: 12px 18px; font-size: .78rem; color: var(--ink-faint);
  display: flex; justify-content: space-between; align-items: center;
}
.search-panel__hint kbd {
  font-family: var(--sans); font-size: .7rem; background: var(--paper-sink);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 6px; color: var(--ink-mute);
}
.search-results { max-height: 52vh; overflow-y: auto; }
.search-results__empty { padding: 26px 18px; color: var(--ink-mute); font-size: .92rem; }
.search-result {
  display: flex; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); align-items: center;
  transition: background .14s var(--ease);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--paper-alt); color: inherit; }
.search-result img {
  width: 66px; height: 48px; object-fit: cover;
  border-radius: var(--radius-sm); flex-shrink: 0; background: var(--paper-sink);
}
.search-result__cat {
  font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 3px;
}
.search-result h4 { font-size: .97rem; margin: 0; line-height: 1.35; }

/* -------------------------------------------------------------------- HERO */
.hero { padding: 30px 0 8px; }
.hero__grid { display: grid; gap: 26px; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.62fr 1fr; gap: 34px; align-items: start; }
}

.lead-story { display: block; }
.lead-story__media {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--paper-sink); box-shadow: var(--shadow-sm);
}
.lead-story__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.lead-story:hover .lead-story__media img { transform: scale(1.035); }
.lead-story__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(8, 12, 20, .74));
}
.lead-story__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; z-index: 2; }
.lead-story__body h2 {
  color: #fff; font-size: clamp(1.4rem, 3.3vw, 2.2rem); margin: 10px 0 8px;
}
.lead-story__body p {
  color: rgba(255, 255, 255, .82); margin: 0; font-size: .94rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lead-story__meta {
  color: rgba(255, 255, 255, .78); font-size: .8rem; margin-top: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lead-story__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.hero__side { display: flex; flex-direction: column; gap: 18px; }
.hero__side-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-mute);
  padding-bottom: 10px; border-bottom: 2px solid var(--ink);
  margin: 0; font-family: var(--sans);
}

/* ------------------------------------------------------------------- BADGE */
.badge {
  display: inline-block;
  font-family: var(--sans); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; line-height: 1.5;
}
.badge--onimage { background: var(--accent); }
.badge--soft { background: var(--accent-soft); color: var(--accent); }
.badge--outline {
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}

/* ------------------------------------------------------------------- CARDS */
.story { display: flex; gap: 15px; align-items: flex-start; }
.story__media {
  width: 108px; flex-shrink: 0; aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden; background: var(--paper-sink);
}
.story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.story:hover .story__media img { transform: scale(1.05); }
.story__body { min-width: 0; }
.story__cat {
  font-size: .64rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 5px; display: block;
}
.story h3 {
  font-size: 1.02rem; line-height: 1.32; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story__meta { font-size: .74rem; color: var(--ink-faint); display: flex; gap: 7px; align-items: center; }
.story__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }

.story--ranked { counter-increment: rank; }
.story--ranked .story__rank {
  font-family: var(--serif); font-size: 2.1rem; font-weight: 700;
  color: var(--line-strong); line-height: 1; flex-shrink: 0; width: 40px;
  margin-top: -4px;
}
.story--ranked:hover .story__rank { color: var(--accent); }

/* -------------------------------------------------------------- CARD (grid) */
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--line);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-sink); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__tag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: 1.16rem; line-height: 1.28; margin: 0 0 9px; }
.card__body h3 a { transition: color .15s var(--ease); }
.card:hover .card__body h3 { color: var(--accent); }
.card__body p {
  font-size: .89rem; color: var(--ink-mute); margin: 0 0 15px; line-height: 1.62;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .74rem; color: var(--ink-faint); gap: 10px;
}

/* -------------------------------------------------------------- SECTION UI */
.section { padding: 40px 0; }
.section--alt { background: var(--paper-alt); }
.section--tight { padding: 30px 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 26px;
  padding-bottom: 13px; border-bottom: 1px solid var(--line);
  position: relative;
}
.section-head::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 62px; height: 3px; background: var(--accent);
}
.section-head h2 { margin: 0; font-size: clamp(1.35rem, 2.7vw, 1.75rem); }
.section-head p { margin: 6px 0 0; color: var(--ink-mute); font-size: .9rem; }
.section-head__link {
  flex-shrink: 0; font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding-bottom: 2px;
}
.section-head__link svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.section-head__link:hover svg { transform: translateX(3px); }

/* ------------------------------------------------------------- LAYOUT GRID */
.layout { display: grid; gap: 40px; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; }
}

.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.paged-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 620px) { .paged-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .paged-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 30px; }

.widget {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
}
.widget--flush { padding: 0; overflow: hidden; }
.widget__title {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 16px; padding-bottom: 11px; border-bottom: 2px solid var(--ink);
}
.widget__list { display: flex; flex-direction: column; gap: 17px; counter-reset: rank; }

.widget--sticky { position: sticky; top: calc(var(--header-h) + 20px); }

.widget--subscribe {
  background: var(--ink); border-color: var(--ink); color: #f3f1ec;
  padding: 26px 22px;
}
[data-theme="dark"] .widget--subscribe { background: var(--paper-sink); border-color: var(--line); }
.widget--subscribe .widget__title { color: #fff; border-color: rgba(255, 255, 255, .28); }
[data-theme="dark"] .widget--subscribe .widget__title { color: var(--ink); border-color: var(--line-strong); }
.widget--subscribe p { font-size: .87rem; color: rgba(243, 241, 236, .75); margin-bottom: 16px; }
[data-theme="dark"] .widget--subscribe p { color: var(--ink-mute); }
.subscribe-form { display: flex; flex-direction: column; gap: 9px; }
.subscribe-form input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08); color: #fff; font-size: .92rem;
}
[data-theme="dark"] .subscribe-form input { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.subscribe-form input::placeholder { color: rgba(243, 241, 236, .5); }
[data-theme="dark"] .subscribe-form input::placeholder { color: var(--ink-faint); }
.subscribe-form button {
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-weight: 700; font-size: .88rem;
  letter-spacing: .03em; transition: background .18s var(--ease);
}
.subscribe-form button:hover { background: var(--accent-dark); }
.subscribe-note { font-size: .7rem; color: rgba(243, 241, 236, .5); margin: 10px 0 0; }
[data-theme="dark"] .subscribe-note { color: var(--ink-faint); }
.subscribe-ok { font-size: .85rem; color: #7ee0a8; margin: 10px 0 0; }
[data-theme="dark"] .subscribe-ok { color: #4fbf85; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  font-size: .78rem; padding: 5px 11px; border-radius: 40px;
  background: var(--paper-alt); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 500;
  transition: all .16s var(--ease);
}
.tag-cloud a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cat-list { display: flex; flex-direction: column; }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: .93rem; transition: padding .18s var(--ease), color .18s var(--ease);
}
.cat-list a:last-child { border-bottom: 0; }
.cat-list a:hover { padding-left: 6px; color: var(--accent); }
.cat-list .count {
  font-size: .72rem; font-weight: 700; color: var(--ink-faint);
  background: var(--paper-alt); border-radius: 40px; padding: 2px 9px;
}

/* ------------------------------------------------------- FILTER / CHIPS */
.chips {
  display: flex; gap: 9px; overflow-x: auto; padding: 4px 0 14px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 40px;
  border: 1px solid var(--line-strong); background: var(--paper);
  font-size: .83rem; font-weight: 600; color: var(--ink-soft);
  transition: all .16s var(--ease); white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 30px; border-radius: 40px;
  font-weight: 700; font-size: .88rem; letter-spacing: .04em; text-transform: uppercase;
  transition: all .18s var(--ease); border: 1px solid transparent;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.load-count { font-size: .78rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------- ARTICLE */
.article-header { padding: 34px 0 0; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .78rem; color: var(--ink-mute); margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 13px; height: 13px; opacity: .5; }
.breadcrumb span[aria-current] { color: var(--ink-soft); }

.article-header h1 { margin: 14px 0 14px; }
.article-standfirst {
  font-family: var(--serif); font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink-soft); line-height: 1.55; margin: 0 0 24px;
  max-width: 68ch;
}

.byline {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.byline__avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; background: var(--paper-sink);
}
.byline__who { font-size: .88rem; font-weight: 700; }
.byline__role { font-size: .74rem; color: var(--ink-mute); }
.byline__dates {
  margin-left: auto; display: flex; gap: 16px; font-size: .76rem; color: var(--ink-mute);
  flex-wrap: wrap;
}
.byline__dates b { color: var(--ink-soft); font-weight: 600; }

.article-hero { margin: 28px 0 0; }
.article-hero img {
  width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--paper-sink);
}
.article-hero figcaption {
  font-size: .76rem; color: var(--ink-faint); margin-top: 10px; line-height: 1.5;
}

.article-layout { display: grid; gap: 42px; padding: 34px 0 50px; }
@media (min-width: 1040px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
}

.prose { max-width: 72ch; font-size: 1.075rem; line-height: 1.78; }
.prose > p:first-of-type::first-letter { }
.prose h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.68rem);
  margin: 2.1em 0 .65em; scroll-margin-top: 100px;
}
.prose h3 { font-size: 1.2rem; margin: 1.7em 0 .55em; }
.prose p { color: var(--ink-soft); }
.prose > p > strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: .62em; }
.prose ol { counter-reset: item; list-style: none; padding-left: 0; }
.prose ol > li { counter-increment: item; position: relative; padding-left: 2.6em; }
.prose ol > li::before {
  content: counter(item); position: absolute; left: 0; top: .08em;
  width: 1.75em; height: 1.75em; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-family: var(--sans);
  font-size: .78rem; font-weight: 700;
}
.prose ul > li::marker { color: var(--accent); }

.prose blockquote {
  margin: 2em 0; padding: 4px 0 4px 24px;
  border-left: 4px solid var(--accent);
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.55;
  color: var(--ink); font-style: italic;
}
.prose blockquote cite {
  display: block; margin-top: 10px; font-family: var(--sans); font-style: normal;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-mute);
}

.prose .callout {
  margin: 2em 0; padding: 20px 22px 20px 24px;
  background: var(--paper-alt); border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .96rem; color: var(--ink-soft);
}
.prose .callout strong {
  display: block; font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 8px;
}

.prose .keytakeaways {
  margin: 2em 0; padding: 24px 26px;
  background: var(--accent-soft); border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.prose .keytakeaways h3 {
  margin: 0 0 12px; font-size: 1rem; font-family: var(--sans);
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.prose .keytakeaways ul { margin: 0; }

/* TOC */
.toc {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; background: var(--paper-alt);
}
.toc__title {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
  margin: 0 0 12px;
}
.toc ol { margin: 0; padding-left: 1.15em; font-size: .88rem; }
.toc li { margin-bottom: .45em; color: var(--ink-soft); }
.toc a:hover { color: var(--accent); }
.toc a.is-active { color: var(--accent); font-weight: 700; }

/* Share + tags */
.share-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 38px 0 0; padding: 20px 0; border-top: 1px solid var(--line);
}
.share-row__label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute); margin-right: 4px;
}
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  color: var(--ink-soft); transition: all .18s var(--ease);
}
.share-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.share-btn svg { width: 16px; height: 16px; }
.share-row__copy {
  margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--ink-mute);
  display: inline-flex; align-items: center; gap: 7px;
}
.share-row__copy svg { width: 15px; height: 15px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag-row a {
  font-size: .76rem; padding: 5px 12px; border-radius: 40px;
  background: var(--paper-alt); border: 1px solid var(--line); color: var(--ink-soft);
}
.tag-row a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Author box */
.author-box {
  display: flex; gap: 18px; margin-top: 30px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper-alt);
}
.author-box img {
  width: 62px; height: 62px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.author-box h4 { margin: 0 0 3px; font-size: 1.05rem; }
.author-box .role {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block;
}
.author-box p { font-size: .87rem; color: var(--ink-mute); margin: 0; line-height: 1.65; }

/* Prev / next */
.article-nav {
  display: grid; gap: 14px; margin-top: 34px;
  border-top: 1px solid var(--line); padding-top: 30px;
}
@media (min-width: 640px) { .article-nav { grid-template-columns: 1fr 1fr; } }
.article-nav a {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: all .18s var(--ease); display: block;
}
.article-nav a:hover { border-color: var(--ink); background: var(--paper-alt); color: inherit; }
.article-nav .dir {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 7px;
}
.article-nav h4 { font-size: .95rem; margin: 0; line-height: 1.35; }
.article-nav .next { text-align: right; }

/* Reading progress */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 120; transition: width .1s linear;
}

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .24s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); color: #fff; }
.to-top svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------ PAGE / STATIC */
.page-hero {
  background: var(--paper-alt); border-bottom: 1px solid var(--line);
  padding: 46px 0 40px;
}
.page-hero__kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block;
}
.page-hero h1 { margin: 0 0 14px; max-width: 20ch; }
.page-hero__intro {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.6;
  color: var(--ink-soft); max-width: 62ch; margin: 0 0 18px;
}
.page-hero__updated { font-size: .78rem; color: var(--ink-faint); }

.page-body { padding: 44px 0 60px; }
.page-body .layout { align-items: start; }

.page-nav {
  position: sticky; top: calc(var(--header-h) + 20px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; background: var(--paper);
}
.page-nav__title {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
  margin: 0 0 12px;
}
.page-nav ol { margin: 0; padding-left: 1.15em; font-size: .86rem; }
.page-nav li { margin-bottom: .5em; color: var(--ink-soft); }

.legal-note {
  margin-top: 36px; padding: 20px 24px; border-radius: var(--radius-lg);
  background: var(--paper-alt); border-left: 4px solid var(--accent);
  font-size: .9rem; color: var(--ink-soft);
}

/* Contact page */
.contact-grid { display: grid; gap: 34px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }

.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex; gap: 15px; padding: 20px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--paper); align-items: flex-start;
}
.contact-card__icon {
  width: 40px; height: 40px; border-radius: var(--radius); flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.contact-card__icon svg { width: 19px; height: 19px; }
.contact-card h4 { margin: 0 0 3px; font-size: 1rem; }
.contact-card p { margin: 0; font-size: .86rem; color: var(--ink-mute); }
.contact-card a { color: var(--link); word-break: break-word; }

.form-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; background: var(--paper);
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .8rem; font-weight: 700; margin-bottom: 7px;
  letter-spacing: .02em;
}
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--paper);
  font-size: .93rem; outline: none; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 150px; resize: vertical; }
.field__hint { font-size: .74rem; color: var(--ink-faint); margin: 6px 0 0; }
.field__error { font-size: .76rem; color: var(--accent); margin: 6px 0 0; display: none; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--accent); }
.field.has-error .field__error { display: block; }
.form-status {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius);
  font-size: .88rem; display: none;
}
.form-status.is-ok { display: block; background: #e9f7ef; color: #1c6b40; border: 1px solid #b9e3cb; }
.form-status.is-err { display: block; background: var(--accent-soft); color: var(--accent); border: 1px solid #f0c9c6; }
[data-theme="dark"] .form-status.is-ok { background: #14281d; color: #7ee0a8; border-color: #24512f; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper); overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 17px 20px; font-weight: 700; font-size: .98rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.35rem; color: var(--accent); font-weight: 400;
  line-height: 1; flex-shrink: 0; transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq__body { padding: 16px 20px 20px; font-size: .92rem; color: var(--ink-mute); }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- CATEGORY */
.cat-hero {
  background: var(--paper-alt); border-bottom: 1px solid var(--line); padding: 44px 0 36px;
}
.cat-hero h1 { margin: 12px 0 12px; }
.cat-hero p { max-width: 62ch; color: var(--ink-mute); margin: 0 0 16px; }
.cat-hero__stats {
  display: flex; gap: 20px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-faint);
}
.cat-hero__stats b { color: var(--ink-soft); }

/* ---------------------------------------------------------------- FOOTER */
.site-footer {
  background: var(--ink); color: rgba(243, 241, 236, .72);
  padding: 54px 0 0; margin-top: 20px; font-size: .89rem;
}
[data-theme="dark"] .site-footer { background: #0d0f12; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 44px; } }

.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand:hover { color: #fff; }
.footer-brand p { color: rgba(243, 241, 236, .62); font-size: .87rem; line-height: 1.68; margin-bottom: 16px; }
.footer-social { display: flex; gap: 9px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  display: grid; place-items: center; color: rgba(243, 241, 236, .78);
  transition: all .18s var(--ease);
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: #fff; margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(243, 241, 236, .68); font-size: .87rem; }
.footer-col a:hover { color: #fff; }
.footer-col address { font-style: normal; color: rgba(243, 241, 236, .62); font-size: .85rem; line-height: 1.8; }
.footer-col address a { color: rgba(243, 241, 236, .82); }

.footer-disclaimer {
  margin-top: 44px; padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .78rem; color: rgba(243, 241, 236, .48); line-height: 1.72;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: .78rem; color: rgba(243, 241, 236, .5);
}
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: rgba(243, 241, 236, .62); }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------------ SKELETON */
.skeleton {
  background: linear-gradient(90deg, var(--paper-alt) 25%, var(--paper-sink) 50%, var(--paper-alt) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ REVEAL */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------- MISC */
.empty-state {
  text-align: center; padding: 70px 20px; color: var(--ink-mute);
}
.empty-state h2 { margin-bottom: 10px; }
.divider-label {
  display: flex; align-items: center; gap: 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); margin: 34px 0 20px;
}
.divider-label::before, .divider-label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
