/* ==========================================================================
   Nori Articles, Design System
   Modern RTL Arabic reading experience. Article content is rendered on a
   light "paper" surface in both themes so the original authored colors
   always stay legible. All legacy-markup rules are overrides only —
   the article HTML content itself is never modified.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-ui: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-article: "Noto Naskh Arabic", "Amiri", "Simplified Arabic", "Traditional Arabic", serif;

  --bg: #f5f0e6;
  --bg-2: #ede5d5;
  --surface: #fbf8f1;
  --paper: #fffdf6;
  --paper-ink: #2b2318;
  --paper-muted: #6f6152;
  --ink: #2b2318;
  --muted: #756753;
  --accent: #9c2f1e;
  --accent-strong: #a82c14;
  --accent-soft: rgba(156, 47, 30, 0.09);
  --gold: #a67c1b;
  --gold-soft: rgba(166, 124, 27, 0.14);
  --link: #8a3417;
  --rule: #e4dac6;
  --rule-strong: #cbbfa5;
  --shadow-sm: 0 2px 8px rgba(60, 42, 20, 0.08);
  --shadow-md: 0 10px 30px rgba(60, 42, 20, 0.12);
  --shadow-lg: 0 24px 60px rgba(60, 42, 20, 0.18);
  --header-bg: rgba(245, 240, 230, 0.82);
  --card-bg: #fffdf6;
  --chip-bg: rgba(156, 47, 30, 0.08);
  --hero-glow-1: rgba(166, 124, 27, 0.22);
  --hero-glow-2: rgba(156, 47, 30, 0.16);
  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 76rem;
  --article-maxw: 54rem;
}

[data-theme="dark"] {
  --bg: #17120c;
  --bg-2: #1f1810;
  --surface: #211a11;
  --paper: #f7f1e2;
  --paper-ink: #2b2318;
  --paper-muted: #6f6152;
  --ink: #ece3d2;
  --muted: #b3a68e;
  --accent: #e0a458;
  --accent-strong: #d9924a;
  --accent-soft: rgba(224, 164, 88, 0.12);
  --gold: #d4a94f;
  --gold-soft: rgba(212, 169, 79, 0.15);
  --link: #e0a458;
  --rule: #372c1d;
  --rule-strong: #4d3f2a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(23, 18, 12, 0.82);
  --card-bg: #241c12;
  --chip-bg: rgba(224, 164, 88, 0.12);
  --hero-glow-1: rgba(212, 169, 79, 0.12);
  --hero-glow-2: rgba(156, 47, 30, 0.22);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 500px at 85% -100px, var(--hero-glow-1), transparent 60%),
    radial-gradient(900px 500px at 8% -80px, var(--hero-glow-2), transparent 55%);
  background-repeat: no-repeat;
}

::selection { background: var(--gold-soft); }

a { color: var(--link); }

img { max-width: 100%; }

.skip-link {
  position: absolute;
  top: -60px;
  right: 1rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Reading progress ---------- */
.progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 4px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.08s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.2px;
}
.brand img, .brand svg { width: 34px; height: 34px; border-radius: 9px; }
.brand .b-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.site-header nav {
  display: flex;
  gap: 0.25rem;
  margin-inline-start: auto;
  align-items: center;
}
.site-header nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle {
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s, border-color 0.2s;
  flex: none;
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.06); border-color: var(--gold); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.icon-sun { display: none; }

/* ---------- Hero (homepage) ---------- */
.hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem 2.5rem;
  text-align: center;
  position: relative;
}
.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.8rem;
  background: linear-gradient(120deg, var(--accent), var(--gold) 65%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  max-width: 44rem;
  margin: 0 auto 2rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.stat {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.3rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}
.stat b { color: var(--accent); font-size: 1.15rem; margin-inline-end: 0.35rem; font-weight: 800; }

/* ---------- Search ---------- */
.search-wrap {
  max-width: 38rem;
  margin: 0 auto;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  inset-inline-start: 1.1rem;
  top: 50%;
  translate: 0 -50%;
  width: 21px;
  height: 21px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
#search {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  padding: 0.95rem 3.1rem 0.95rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--rule-strong);
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#search::placeholder { color: var(--muted); opacity: 0.75; }
#search:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-md);
}
.search-count {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.6rem 1.25rem;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 1.4rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0;
  color: var(--ink);
}
.section-head .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}
.section-head .count-badge {
  background: var(--chip-bg);
  color: var(--accent);
  font-weight: 800;
  border-radius: 999px;
  font-size: 0.85rem;
  padding: 0.15rem 0.9rem;
}

/* ---------- Series cards ---------- */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.2rem;
}
.series-card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.series-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  border-radius: 0 4px 4px 0;
}
.series-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.series-card h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
}
.series-card .series-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.9rem; font-weight: 600; }
.series-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 16.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
.series-card ol li { border-top: 1px dashed var(--rule); }
.series-card ol li:first-child { border-top: 0; }
.series-card ol a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.97rem;
  transition: color 0.15s, padding-inline-start 0.2s;
}
.series-card ol a:hover { color: var(--accent); padding-inline-start: 0.5rem; }
.series-card .n {
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Article cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.card .thumb {
  height: 150px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  display: grid;
  place-items: center;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.card .thumb .glyph {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.55;
}
.card .body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 0.6rem; font-size: 1.05rem; line-height: 1.65; font-weight: 700; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--accent); }
.card .meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.card .meta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; vertical-align: -2px; margin-inline-end: 4px; }

.no-results {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  font-size: 1.1rem;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Article page ---------- */
.article-hero {
  max-width: var(--article-maxw);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.2rem) 1.25rem 1.2rem;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:not(:last-child)::after { content: "‹"; margin-inline-start: 0.45rem; color: var(--rule-strong); }
.breadcrumb li:last-child { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18rem; }
.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.6vw, 2.7rem);
  line-height: 1.5;
  margin: 0 0 1rem;
  color: var(--ink);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.article-meta .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--chip-bg);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.28rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 700;
}
.article-meta .chip svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.article-wrap {
  max-width: var(--article-maxw);
  margin-inline: auto;
  padding: 0.5rem 1.25rem 2rem;
}
.paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  padding: clamp(1.3rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.paper::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  opacity: 0.85;
}

/* ---------- Pager ---------- */
.pager {
  max-width: var(--article-maxw);
  margin-inline: auto;
  padding: 0 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pager a {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.pager a:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow-md); }
.pager .dir { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 700; margin-bottom: 0.2rem; }
.pager .t {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pager .next { text-align: end; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
  margin-top: 2rem;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer a { color: var(--accent); text-decoration: none; font-weight: 700; }
.site-footer a:hover { text-decoration: underline; }
.verse {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.05rem;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  inset-inline-start: 1.2rem;
  bottom: 1.2rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--card-bg);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  translate: 0 14px;
  pointer-events: none;
  transition: opacity 0.25s, translate 0.25s, transform 0.2s;
}
.to-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* ==========================================================================
   LEGACY CONTENT OVERRIDES
   Everything below restyles the original (untouched) article markup.
   ========================================================================== */

.article-body {
  font-family: var(--font-article);
  font-size: 1.22rem;
  line-height: 2.05;
  color: var(--paper-ink);
  overflow-wrap: break-word;
}

/* Unify typography. Word/FrontPage markup carries hard-coded faces
   (Bookman Old Style, Simplified Arabic, …) both as attributes and
   inline styles, so !important is required. */
.article-body :is(p, div, span, font, b, i, u, em, strong, h1, h2, h3, h4, h5, h6,
                  td, th, li, a, center, blockquote, sup, sub) {
  font-family: var(--font-article) !important;
}
/* …except Symbol-font glyphs (e.g. µ rendered as ∞), changing their font
   would change what the reader sees. */
.article-body [face="Symbol" i],
.article-body [face="Symbol" i] *,
.article-body [style*="Symbol"] {
  font-family: Symbol, serif !important;
}

.article-body p { margin: 0 0 1.05em; }

/* <font size=…> mapping to a modern scale */
.article-body font[size="1"] { font-size: 0.9rem; }
.article-body font[size="2"] { font-size: 1.02rem; }
.article-body font[size="3"] { font-size: 1.13rem; }
.article-body font[size="4"] { font-size: 1.26rem; }
.article-body font[size="5"] { font-size: 1.55rem; line-height: 1.9; }
.article-body font[size="6"] { font-size: 1.85rem; line-height: 1.75; }

/* <font color=…> harmonized to the palette (hue kept, tone refined) */
.article-body font[color="000000" i],
.article-body font[color="#000000" i] { color: var(--paper-ink); }
.article-body font[color="CC3300" i],
.article-body font[color="#CC3300" i],
.article-body font[color="#BD0000" i],
.article-body font[color="red" i] { color: #a82c14; }
.article-body font[color="00FFF0" i] { color: #0e7c86; }

/* Soften harsh pure-red inline spans (scripture highlights), same hue,
   easier on the eyes. Word writes these lowercase without spaces. */
.article-body [style*="color:red"] { color: #a82c14 !important; }

/* Headings that live inside the content (signatures, dates) */
.article-body :is(h1, h2, h3) {
  font-size: 1.4rem;
  line-height: 1.9;
  margin: 1.2em 0 0.6em;
  font-weight: 700;
}

/* Links inside articles */
.article-body a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.article-body a:hover { color: var(--accent-strong); }

/* Images: photos get a card treatment, decorative gifs stay plain */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(60, 42, 20, 0.22);
  margin: 0.4rem 0.35rem;
  vertical-align: middle;
}
.article-body img[src$=".gif" i],
.article-body img[src$=".GIF"] {
  border-radius: 0;
  box-shadow: none;
}

/* The decorative full-width wrapper table (pink frame from 2004) is
   linearized: its own boxes disappear, its content flows normally.
   Genuine content tables (fixed widths / MsoTableGrid) are untouched here. */
.article-body table[width="100%"],
.article-body table[width="100%"] > tbody,
.article-body table[width="100%"] > tbody > tr,
.article-body table[width="100%"] > tbody > tr > td {
  display: block;
  width: auto !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0;
  margin: 0;
}

/* Real content tables: clean modern grid, horizontally scrollable on
   small screens instead of breaking the layout. */
.article-body table:not([width="100%"]) {
  border-collapse: collapse;
  margin: 1.6rem auto;
  display: block;
  overflow-x: auto;
  max-width: 100%;
  width: fit-content !important;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.article-body table:not([width="100%"]) td,
.article-body table:not([width="100%"]) th {
  border: 1px solid var(--rule-strong) !important;
  padding: 0.55rem 0.85rem !important;
  background: transparent !important;
}

.article-body hr {
  border: 0;
  height: 2px;
  margin: 1.8rem auto;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
}

.article-body u { text-underline-offset: 4px; }

/* ---------- English (LTR) article support ---------- */
[dir="ltr"] .article-body { font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; }

/* ---------- 404 ---------- */
.error-hero { text-align: center; padding: clamp(4rem, 12vw, 8rem) 1.25rem; }
.error-hero .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1rem;
}
.error-hero p { color: var(--muted); font-size: 1.15rem; margin: 0 0 2rem; }
.btn {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 0.8rem 2.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .progress, .to-top, .pager, .theme-toggle, .skip-link { display: none !important; }
  body { background: #fff; }
  .paper { box-shadow: none; border: 0; padding: 0; }
}

@media (max-width: 640px) {
  .brand .b-sub { display: none; }
  .site-header nav a:not(.keep) { display: none; }
  .breadcrumb li:last-child { max-width: 11rem; }
  .article-body { font-size: 1.12rem; }
}
