/* ============================================================
   THỜI BÁO CÔNG NGHỆ — Vintage newspaper design system
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --paper: #f4ecd8;
  --paper-2: #ede1c6;
  --paper-3: #e6d7b6;
  --ink: #2a2018;
  --ink-soft: #4c4030;
  --muted: #8a7a5c;
  --gold: #a4793a;
  --crimson: #8a1f1f;
  --line: #c9b78e;
  --line-soft: #d8c9a4;
  --shadow: 0 1px 2px rgba(42, 32, 24, .08), 0 8px 28px rgba(42, 32, 24, .10);
  --font-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --font-ui: 'Be Vietnam Pro', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 118px;
}

html[data-theme="dark"] {
  --paper: #17130e;
  --paper-2: #1f1a13;
  --paper-3: #262015;
  --ink: #e9dcc0;
  --ink-soft: #cfc2a2;
  --muted: #95876a;
  --gold: #c9a45e;
  --crimson: #c0554b;
  --line: #3c3424;
  --line-soft: #322b1e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .5);
}

/* ---------- reset lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  transition: background .45s var(--ease), color .45s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--crimson); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
button { font-family: var(--font-ui); cursor: pointer; }
input, button { font-size: 15px; }
::selection { background: var(--gold); color: #fff8ea; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 860px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  font-family: var(--font-ui); font-size: 14px; transition: top .25s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px dashed var(--crimson); outline-offset: 3px; }

/* ---------- giấy cũ: texture + vignette ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.35 0 0 0 0 0.22 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body::before { mix-blend-mode: overlay; opacity: .18; }
main, .topbar, .masthead, .mainnav, .footer { position: relative; z-index: 1; }

/* ---------- topbar ---------- */
.topbar {
  background: var(--ink); color: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui); font-size: 12px; letter-spacing: .08em;
}
.topbar-in { display: flex; justify-content: space-between; gap: 14px; padding: 7px 22px; }
.tb-left { text-transform: uppercase; opacity: .92; }
.tb-right { opacity: .85; }
html[data-theme="dark"] .topbar { background: #0e0b08; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 4px double var(--ink); background: var(--paper); }
.masthead-in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 26px 22px 20px; gap: 18px;
}
.mast-side { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-ui); font-size: 11px; letter-spacing: .22em; color: var(--muted); }
.mast-side.left { align-items: flex-end; text-align: right; }
.mast-orn { font-size: 22px; color: var(--gold); line-height: 1; }
.mast-center { text-align: center; }
.mast-title {
  display: inline-block;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(34px, 6vw, 68px);
  letter-spacing: .015em; text-decoration: none;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 252, 240, .5);
  transition: transform .3s var(--ease);
}
.mast-title:hover { transform: none; color: var(--ink); }
.mast-slogan {
  margin: 6px 0 0; font-family: var(--font-ui); font-size: 12.5px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.mast-slogan .orn { color: var(--gold); }

/* ---------- main nav ---------- */
.mainnav {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.mainnav.scrolled { box-shadow: 0 6px 24px rgba(42, 32, 24, .14); }
.nav-in { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex: 1; }
.nav-list a {
  display: block; padding: 8px 13px; text-decoration: none;
  font-family: var(--font-ui); font-weight: 600; font-size: 13.5px;
  letter-spacing: .04em; color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  transition: color .25s, border-color .25s, background .25s;
}
.nav-list a:hover { color: var(--crimson); background: color-mix(in srgb, var(--paper-3) 60%, transparent); }
.nav-list a.is-active { color: var(--crimson); border-color: var(--crimson); }
.nav-tools { display: flex; gap: 6px; margin-left: auto; }
.tool-btn {
  position: relative;
  width: 36px; height: 36px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); border-radius: 50%;
  font-size: 16px; line-height: 1;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.tool-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.rl-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--crimson); color: #fff8ea; border-radius: 9px;
  font-size: 10.5px; font-weight: 700; line-height: 17px;
}
.nav-burger { display: none; background: none; border: none; font-size: 22px; color: var(--ink); padding: 6px 10px; }

/* ---------- ticker ---------- */
.ticker { border-bottom: 1px solid var(--line); background: var(--paper-2); overflow: hidden; }
.ticker-in { display: flex; align-items: stretch; gap: 0; min-height: 40px; }
.ticker-label {
  display: flex; align-items: center; padding: 0 14px;
  background: var(--crimson); color: #fff6e6;
  font-family: var(--font-ui); font-weight: 700; font-size: 11.5px;
  letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-move { display: flex; align-items: center; white-space: nowrap; animation: ticker 70s linear infinite; }
.ticker-track:hover .ticker-move { animation-play-state: paused; }
.ticker-move a {
  color: var(--ink); text-decoration: none; font-size: 14.5px; padding: 9px 10px;
  font-family: var(--font-ui); font-weight: 500;
}
.ticker-move a:hover { color: var(--crimson); text-decoration: underline; }
.tk-sep { color: var(--gold); padding: 0 10px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-bottom: 3px double var(--line); margin: 0 0 22px; padding-bottom: 10px;
}
.sec-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; margin: 0; position: relative; }
.sec-title::after { content: ""; display: block; width: 56px; height: 4px; background: var(--crimson); margin-top: 8px; }
.sec-title-xl { font-size: clamp(30px, 4.5vw, 46px); font-weight: 900; margin: 0 0 .2em; }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-style: italic; font-size: 14.5px; }
.sec-link {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--crimson); white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.sec-link:hover { border-color: var(--crimson); }
.orn { color: var(--gold); font-size: 1.05em; }
.orn.sm { font-size: .8em; }
.orn-xl { font-size: 64px; color: var(--gold); margin: 20px 0 0; line-height: 1; }

/* ---------- cards ---------- */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 3px 6px rgba(42,32,24,.08), 0 16px 40px rgba(42,32,24,.16); }
.card-media { overflow: hidden; display: block; position: relative; }
.card-media::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(42,32,24,.25), inset 0 -40px 40px -30px rgba(42,32,24,.25);
  pointer-events: none;
}
.card-media img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  filter: sepia(.22) contrast(1.03) saturate(.82) brightness(1.01);
  transition: filter .6s var(--ease), transform .8s var(--ease);
}
.card:hover .card-media img { filter: none; transform: scale(1.045); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { margin: 0; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.card-cat a { color: var(--cat, var(--crimson)); text-decoration: none; }
.kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.kicker span { color: var(--muted); font-weight: 500; letter-spacing: .1em; }
.card-title { font-size: 19px; margin: 0; }
.card-title a, .card-title-lg a { text-decoration: none; color: var(--ink); }
.card-title a:hover, .card-title-lg a:hover { color: var(--crimson); }
.card-title-lg { font-size: clamp(24px, 3vw, 32px); margin: 0 0 6px; }
.card-sapo { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.card-meta { margin: auto 0 0; padding-top: 8px; color: var(--muted); font-family: var(--font-ui); font-size: 12.5px; letter-spacing: .03em; }

/* ---------- lead grid (trang chủ + chuyên mục) ---------- */
.lead-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px;
  margin: 26px 0 40px; align-items: start;
}
.lead-side { display: grid; gap: 24px; }
.lead-list, .latest-list, .cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.latest-list { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.two-col { grid-template-columns: 1fr 1fr; }
.list-item {
  display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start;
  padding-bottom: 14px; border-bottom: 1px solid var(--line-soft);
}
.list-item:last-child { border-bottom: none; }
.list-thumb { display: block; overflow: hidden; border: 1px solid var(--line); }
.list-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: sepia(.22) saturate(.82); transition: filter .5s, transform .7s var(--ease); }
.list-item:hover .list-thumb img { filter: none; transform: scale(1.06); }
.list-body h3 { font-size: 16.5px; margin: 2px 0 4px; line-height: 1.35; }
.list-body h3 a { text-decoration: none; color: var(--ink); background-image: linear-gradient(var(--gold), var(--gold)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease); }
.list-item:hover .list-body h3 a { background-size: 100% 2px; }
.list-body h3 a:hover { color: var(--crimson); }

/* ---------- home columns ---------- */
.home-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; margin: 0 0 46px; align-items: start; }
.panel {
  background: var(--paper-2); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 22px;
}
.panel-title {
  margin: 0 0 14px; font-family: var(--font-ui); font-weight: 700; font-size: 13px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--crimson);
  border-bottom: 3px double var(--line); padding-bottom: 8px;
}
.top-list { list-style: none; margin: 0; padding: 0; counter-reset: top; }
.top-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.top-item:last-child { border: none; }
.top-num {
  font-family: var(--font-display); font-weight: 900; font-size: 26px; line-height: 1;
  color: var(--gold); min-width: 30px; font-style: italic;
}
.top-item a { text-decoration: none; color: var(--ink); font-size: 15px; line-height: 1.45; }
.top-item a:hover { color: var(--crimson); }
.quote p { font-family: var(--font-display); font-style: italic; font-size: 18.5px; line-height: 1.5; margin: 0 0 8px; }
.quote cite { color: var(--muted); font-size: 13px; font-family: var(--font-ui); font-style: normal; }
.quote { margin: 0; transition: opacity .4s; }
.quote.fading { opacity: 0; }
.cat-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips a {
  display: inline-block; padding: 6px 12px; text-decoration: none;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--cat); border: 1px solid var(--cat);
  transition: background .25s, color .25s;
}
.cat-chips a:hover { background: var(--cat); color: #fff8ea; }

/* newsletter */
.newsletter p { font-size: 14.5px; color: var(--ink-soft); }
.newsletter input {
  width: 100%; padding: 11px 13px; margin-bottom: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-family: var(--font-ui);
}
.newsletter input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn {
  display: inline-block; padding: 11px 22px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; letter-spacing: .06em;
  transition: transform .2s var(--ease), box-shadow .2s, opacity .2s;
  box-shadow: 3px 3px 0 var(--gold);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gold); color: var(--paper); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--gold); }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.form-msg { margin: 10px 0 0; font-family: var(--font-ui); font-size: 13px; min-height: 1.4em; }
.form-msg.ok { color: #2e6b3a; font-weight: 600; }
.form-msg.err { color: var(--crimson); font-weight: 600; }
html[data-theme="dark"] .form-msg.ok { color: #8fc79a; }

/* ---------- category blocks ---------- */
.cat-block { margin: 0 0 50px; }
.cat-grid { display: grid; grid-template-columns: 1.2fr 1.4fr; gap: 26px; align-items: start; }
.cat-header { text-align: center; margin: 30px 0 34px; padding: 0 0 22px; border-bottom: 3px double var(--line); }
.cat-tagline { font-family: var(--font-ui); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--cat, var(--gold)); margin: 0 0 10px; }
.cat-desc { max-width: 720px; margin: 0 auto; color: var(--ink-soft); font-size: 16px; }
.cat-arch { margin-bottom: 50px; }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  padding: 20px 0 6px; font-family: var(--font-ui); font-size: 12.5px;
  letter-spacing: .05em; color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--crimson); }
.breadcrumb span[aria-hidden] { color: var(--gold); padding: 0 7px; }
.breadcrumb [aria-current] { color: var(--ink-soft); }

/* ---------- article ---------- */
.article-head { max-width: 860px; margin: 6px auto 0; text-align: center; }
.article-title { font-size: clamp(30px, 4.6vw, 50px); font-weight: 900; margin: 10px 0 14px; }
.article-sapo { font-size: clamp(17px, 2vw, 20px); font-style: italic; color: var(--ink-soft); line-height: 1.6; margin-bottom: 18px; }
.byline { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 16px; font-family: var(--font-ui); font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.byline strong { color: var(--ink); }
.article-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 26px; font-family: var(--font-ui);
}
.fs-group { display: flex; border: 1px solid var(--line); }
.fs-group button {
  background: transparent; border: none; border-right: 1px solid var(--line);
  padding: 7px 12px; font-size: 13px; color: var(--ink-soft); transition: background .2s, color .2s;
}
.fs-group button:last-child { border-right: none; }
.fs-group button:hover { background: var(--ink); color: var(--paper); }
.btn-ghost {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-soft); text-decoration: none; font-size: 13px;
  font-weight: 600; transition: all .25s var(--ease);
}
.btn-ghost:hover { background: var(--crimson); border-color: var(--crimson); color: #fff8ea; }
.btn-ghost.saved { background: var(--crimson); border-color: var(--crimson); color: #fff8ea; }
.share-group { display: flex; gap: 8px; }

.hero { margin: 0 0 30px; border: 1px solid var(--line); padding: 10px; background: var(--paper-2); box-shadow: var(--shadow); }
.hero img { width: 100%; filter: sepia(.14) contrast(1.02); }
.hero figcaption { padding: 10px 6px 2px; font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); text-align: center; font-style: italic; }

.article-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 38px; align-items: start; }
.sticky-panel { position: sticky; top: 76px; }
.mini-index { list-style: none; margin: 0 0 22px; padding: 0; font-family: var(--font-ui); font-size: 13.5px; }
.mini-index li { padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.mini-index a { text-decoration: none; color: var(--ink-soft); }
.mini-index a:hover { color: var(--crimson); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-item { padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.mini-item:last-child { border: none; }
.mini-item h4 { font-size: 14px; margin: 0; line-height: 1.4; }
.mini-item a { text-decoration: none; color: var(--ink); }
.mini-item a:hover { color: var(--crimson); }
.mini-item .card-meta { padding: 2px 0 0; }

.article-body { font-size: 18px; line-height: 1.85; color: var(--ink); }
.article-body p { margin-bottom: 1.25em; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display); font-weight: 900; font-size: 3.6em;
  float: left; line-height: .82; padding: 6px 12px 0 0; color: var(--crimson);
}
.article-body h2 { font-size: 26px; margin: 1.6em 0 .5em; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.article-body h3 { font-size: 20px; margin: 1.4em 0 .4em; }
.article-body h3::before { content: "✦ "; color: var(--gold); font-size: .8em; }
.article-body ul li, .article-body ol li { margin-bottom: .5em; }
.article-body a { color: var(--crimson); }
.article-body blockquote {
  margin: 1.4em 0; padding: 18px 26px; border-left: 4px solid var(--gold);
  background: var(--paper-2); font-family: var(--font-display); font-style: italic;
  font-size: 19.5px; line-height: 1.6; color: var(--ink-soft);
}
.article-body blockquote p:last-child { margin: 0; }

/* callout boxes */
.tip, .note, .warn {
  margin: 1.5em 0; padding: 16px 20px 14px;
  border: 1px solid var(--line); border-left-width: 4px;
  background: var(--paper-2); font-size: 16px;
}
.tip { border-left-color: #2e6b3a; }
.note { border-left-color: var(--gold); }
.warn { border-left-color: var(--crimson); }
.tip::before, .note::before, .warn::before {
  display: block; font-family: var(--font-ui); font-weight: 700; font-size: 11.5px;
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px;
}
.tip::before { content: "Mẹo hay lắm ✦"; color: #2e6b3a; }
.note::before { content: "Biết không ❦"; color: var(--gold); }
.warn::before { content: "Chú ý ⚠"; color: var(--crimson); }
html[data-theme="dark"] .tip::before { color: #8fc79a; }

/* TL;DR — AEO */
.tldr {
  margin: 0 0 26px; padding: 18px 22px;
  background: var(--paper-3); border: 1px solid var(--gold);
  outline: 1px solid var(--gold); outline-offset: 3px;
  font-size: 16.5px; line-height: 1.7;
}
.tldr-head {
  margin: 0 0 8px; font-family: var(--font-ui); font-weight: 700; font-size: 12.5px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.tldr p { margin: 0; }

/* HowTo */
.howto { margin: 30px 0; padding: 22px 24px; background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.howto-head { font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); margin: 0 0 16px; }
.howto-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.howto-steps li { counter-increment: step; position: relative; padding: 0 0 18px 54px; }
.howto-steps li::before {
  content: counter(step, upper-roman); counter-increment: none;
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--gold);
  background: var(--paper);
}
.howto-steps h3 { font-size: 17px; margin: 6px 0 4px; }
.howto-steps p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.howto-time { font-family: var(--font-ui); font-size: 13px; color: var(--muted); font-style: italic; margin: 4px 0 0; }

/* FAQ — AEO */
.faq { margin: 34px 0; }
.faq-title { font-size: 26px; border-bottom: 3px double var(--line); padding-bottom: 8px; }
.faq-item { border: 1px solid var(--line); border-top: none; background: var(--paper-2); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
  padding: 14px 44px 14px 18px; cursor: pointer; position: relative;
  font-family: var(--font-ui); font-weight: 600; font-size: 15.5px; color: var(--ink);
  list-style: none; transition: background .25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--gold); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { background: var(--paper-3); }
.faq-a { padding: 0 18px 16px; font-size: 15.5px; color: var(--ink-soft); border-top: 1px dashed var(--line-soft); padding-top: 12px; }

/* sources */
.sources { margin: 30px 0; padding: 16px 20px; border-top: 3px double var(--line); }
.sources-head { font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sources ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.sources li { padding: 4px 0; }
.sources a { color: var(--ink-soft); }
.sources a::after { content: " ↗"; color: var(--gold); }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 26px 0; font-family: var(--font-ui); }
.tags-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tag {
  text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px;
  transition: all .25s var(--ease);
}
.tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* author card */
.author-card { display: flex; gap: 18px; padding: 22px; background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow); margin: 10px 0 34px; }
.avatar {
  min-width: 64px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  border: 2px solid var(--gold);
}
.author-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin: 0; }
.author-role { font-family: var(--font-ui); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); margin: 2px 0 8px; }
.author-bio { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.authors-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }

/* related + prevnext */
.related { margin: 14px 0 34px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 46px; }
.pn { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 16px 18px; border: 1px solid var(--line); background: var(--paper-2); transition: transform .3s var(--ease), box-shadow .3s; }
.pn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pn span { font-family: var(--font-ui); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.pn strong { font-family: var(--font-display); font-size: 16px; color: var(--ink); line-height: 1.4; }
.pn.next { text-align: right; }

/* ---------- 404 / static ---------- */
.nf { text-align: center; padding: 60px 22px 90px; }
.nf-text { max-width: 560px; margin: 10px auto 26px; color: var(--ink-soft); }
.searchpage-form { display: flex; gap: 10px; max-width: 560px; margin: 18px auto 30px; }
.searchpage-form input {
  flex: 1; padding: 13px 16px; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--ink); font-family: var(--font-ui);
}
.searchpage-form input:focus { outline: 2px solid var(--gold); }
.searchpage-count { font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.search-empty { text-align: center; padding: 40px 0; color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */
.footer { background: #201812; color: #d8c9a4; margin-top: 40px; border-top: 4px double var(--gold); }
html[data-theme="dark"] .footer { background: #0e0b08; }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding: 44px 22px 34px; }
.foot-title { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: #f0e4c8; margin: 0 0 4px; }
.foot-slogan { font-family: var(--font-ui); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: #a4793a; margin-bottom: 14px; }
.foot-head { font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #c9a45e; margin: 0 0 12px; }
.foot-text { font-size: 13.5px; line-height: 1.7; color: #b8a67f; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { padding: 4px 0; }
.foot-col a { color: #d8c9a4; text-decoration: none; font-size: 14px; transition: color .2s, padding-left .25s; }
.foot-col a:hover { color: #f0e4c8; padding-left: 5px; }
.footer-bar { border-top: 1px solid #3c3424; padding: 14px 0; }
.footer-bar p { margin: 0; font-family: var(--font-ui); font-size: 12px; color: #93866c; text-align: center; }

/* ---------- utilities: totop, progress, search overlay, reading list ---------- */
.totop {
  position: fixed; right: 22px; bottom: 24px; z-index: 80;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--ink); color: var(--paper);
  font-size: 18px; opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: all .35s var(--ease);
}
.totop.show { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { background: var(--crimson); border-color: var(--crimson); }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--crimson), var(--gold)); z-index: 120; transition: width .1s linear; }

.search-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: color-mix(in srgb, #1a1410 62%, transparent);
  backdrop-filter: blur(6px);
  display: flex; justify-content: center; padding: 9vh 20px 20px;
  animation: fadeIn .25s var(--ease);
}
.search-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-box {
  width: min(680px, 100%); height: fit-content; max-height: 74vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--gold);
  outline: 1px solid var(--gold); outline-offset: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: riseIn .3s var(--ease);
}
@keyframes riseIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.search-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 3px double var(--line); }
.search-orn { font-size: 22px; color: var(--gold); }
.search-row input {
  flex: 1; border: none; background: transparent; color: var(--ink);
  font-family: var(--font-display); font-size: 20px; padding: 6px 2px;
}
.search-row input:focus { outline: none; }
.search-close {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 11px; padding: 5px 9px; letter-spacing: .08em;
}
.search-close:hover { background: var(--ink); color: var(--paper); }
.search-results { padding: 8px 0; }
.search-hit { display: block; padding: 12px 18px; text-decoration: none; border-bottom: 1px dashed var(--line-soft); transition: background .2s; }
.search-hit:hover { background: var(--paper-3); }
.search-hit h4 { margin: 0 0 3px; font-size: 16.5px; color: var(--ink); }
.search-hit:hover h4 { color: var(--crimson); }
.search-hit p { margin: 0; font-size: 13px; color: var(--muted); font-family: var(--font-ui); }
.search-hits-empty { padding: 26px 18px; text-align: center; color: var(--muted); font-style: italic; }

.rl-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 140;
  width: min(360px, 92vw); background: var(--paper);
  border-left: 1px solid var(--gold); box-shadow: -18px 0 50px rgba(0, 0, 0, .3);
  padding: 18px 20px; overflow: auto;
  animation: slideIn .3s var(--ease);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.rl-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px double var(--line); padding-bottom: 10px; margin-bottom: 12px; font-family: var(--font-ui); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.rl-head button { border: none; background: none; font-size: 22px; color: var(--muted); }
.rl-hint { font-size: 13.5px; color: var(--muted); font-style: italic; }
#rl-list { list-style: none; margin: 0; padding: 0; }
#rl-list li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
#rl-list a { flex: 1; text-decoration: none; color: var(--ink); font-size: 14.5px; line-height: 1.45; }
#rl-list a:hover { color: var(--crimson); }
#rl-list button { border: none; background: none; color: var(--crimson); font-size: 17px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- search page results ---------- */
#search-page-results .search-hit { border-bottom: 1px solid var(--line-soft); padding: 16px 6px; }
#search-page-results h4 { font-family: var(--font-display); font-size: 19px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .lead-grid { grid-template-columns: 1fr; }
  .home-cols { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .article-side { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar-in { justify-content: center; }
  .tb-right { display: none; }
  .masthead-in { grid-template-columns: 1fr; padding: 18px 16px 14px; }
  .mast-side { display: none; }
  .nav-in { flex-wrap: wrap; padding: 4px 14px; }
  .nav-burger { display: block; order: -1; }
  .nav-list {
    display: none; flex-basis: 100%; flex-direction: column;
    border-top: 1px solid var(--line-soft); padding: 6px 0;
  }
  .nav-list.open { display: flex; }
  .lead-grid { gap: 18px; margin: 18px 0 30px; }
  .lead-side { gap: 18px; }
  .list-item { grid-template-columns: 104px 1fr; }
  .rel-grid { grid-template-columns: 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  .footer-in { grid-template-columns: 1fr; gap: 22px; }
  .article-actions { gap: 8px; }
  .share-group { flex-wrap: wrap; }
  .ticker-move { animation-duration: 45s; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-move { animation: none; }
  .card-media img, .card, .pn, .tool-btn { transition: none; }
}

/* ---------- print ---------- */
@media print {
  .topbar, .mainnav, .ticker, .footer, .article-actions, .article-side, .related, .prevnext, .totop, .progress, .tags, .newsletter, .rl-panel, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .article-body { font-size: 12pt; }
}
