/* ==========================================================================
   ILLRC Personal — v2 main stylesheet (RTL, Persian)
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FBF9F4;
  --surface: #FFFFFF;
  --surface-2: #F4EFE4;
  --ink: #16211F;
  --ink-2: #3F4A4B;
  --muted: #5C6768;
  --line: #E6DDCB;
  --teal: #14474A;
  --teal-deep: #0E3335;
  --on-teal: #FFFFFF;
  --gold: #B08A4F;
  --gold-text: #83612B;
  --gold-soft: #F4EBDA;
  --chip: #EFE8D9;
  --shadow: 0 1px 2px rgba(20, 40, 40, .04), 0 10px 30px rgba(20, 40, 40, .07);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --gutter: 24px;
  --logo-h: 96px;
  --font: 'Vazirmatn', Tahoma, sans-serif;
  --entry-size: 17px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.6; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
mark { background: #F4E3BF; color: inherit; padding: 0 3px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ic { flex-shrink: 0; vertical-align: middle; }

.screen-reader-text, .skip-link {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { clip: auto; width: auto; height: auto; top: 8px; right: 8px; z-index: 999; background: var(--teal); color: #fff; padding: 8px 16px; border-radius: 8px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 880px; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

/* ---------- Pattern placeholders ---------- */
.ph-teal { background: url('../img/pattern-teal.svg') center/cover; }
.ph-ink { background: url('../img/pattern-ink.svg') center/cover; }
.ph-sand { background: url('../img/pattern-sand.svg') center/cover; }
.ph-green { background: url('../img/pattern-green.svg') center/cover; }
.ph-clay { background: url('../img/pattern-clay.svg') center/cover; }

.thumb { display: block; width: 100%; height: 100%; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--teal); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-gold { background: var(--gold); color: #1A1406; }
.btn-gold:hover { background: #c29a5c; color: #1A1406; }
.btn-lg { min-height: 60px; padding: 0 36px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent; color: var(--ink);
}
.icon-btn:hover { background: var(--chip); }
.round-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.round-btn.is-primary { background: var(--teal); border-color: var(--teal); color: #fff; }

.chip, .badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.chip { padding: 4px 12px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.chip-outline { background: var(--surface); border: 1px solid var(--line); }
.badge { padding: 3px 10px; border-radius: 8px; background: var(--chip); color: var(--ink-2); }
.badge-gold { background: var(--gold-soft); color: var(--gold-text); font-weight: 700; }
.pill { padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.pill-gold { background: var(--gold-soft); color: var(--gold-text); font-weight: 700; }
.pill-light { background: rgba(255, 255, 255, .93); color: var(--teal); font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-row-center { justify-content: center; }
.chip-row-lg { margin-bottom: 18px; }
.chip-btn {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px;
}
.chip-btn.is-active, .chip-btn:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.count-pill { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 11px; line-height: 22px; text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--gold-text); }
.meta-text { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta-dots { flex-wrap: wrap; gap: 4px 0; }
.meta-dots > span + span::before { content: ''; display: inline-block; width: 1px; height: 12px; margin-inline: 10px; background: var(--line); vertical-align: middle; }

.segmented { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.segmented button {
  min-height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 13px;
}
.segmented button[aria-selected="true"] { background: var(--teal); color: #fff; font-weight: 700; }
.segmented-sm button { min-height: 32px; padding: 0 12px; font-size: 12px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.lift { transition: transform .25s ease, box-shadow .25s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 40, 40, .12); }
.card-media { position: relative; display: block; overflow: hidden; }
.card-media .pill { position: absolute; top: 16px; right: 16px; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.card-title { font-size: 18px; line-height: 1.8; font-weight: 800; color: var(--ink); }
.card-excerpt { font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.empty { color: var(--muted); padding: 24px 0; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: relative; z-index: 20; background: var(--surface); box-shadow: 0 1px 0 rgba(176, 138, 79, .12), 0 8px 24px rgba(20, 40, 40, .05); }

.topbar { background: var(--teal-deep); color: rgba(217, 226, 224, .9); font-size: 13px; }
.topbar-inner { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-start { display: flex; align-items: center; gap: 10px; }
.topbar-start > .ic { color: #CFAA6C; }
.topbar-social { display: flex; gap: 2px; }
.topbar-social a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: rgba(255, 255, 255, .85); }
.topbar-social a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar-search {
  width: 340px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .8);
}
.topbar-search:focus-within { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.topbar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 13px; }
.topbar-search input::placeholder { color: rgba(255, 255, 255, .7); }
.topbar-search kbd { font-family: inherit; font-size: 11px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; }

.masthead { position: relative; height: 300px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ornament { position: absolute; top: 0; height: 100%; width: auto; pointer-events: none; user-select: none; }
.ornament-right { right: 0; }
.ornament-left { left: 0; }
.masthead-brand { position: relative; display: flex; flex-direction: column; align-items: center; }
.brand-logo img { height: var(--logo-h); width: auto; }
.brand-subtitle { display: flex; align-items: center; gap: 18px; margin-top: 34px; font-size: 19px; font-weight: 700; color: var(--gold-text); }
.brand-subtitle .line { width: 190px; height: 1px; background: var(--gold); }
.brand-rosette { margin-top: 10px; color: var(--gold); }
.masthead-btn { display: none; }

.main-nav { border-top: 1px solid rgba(176, 138, 79, .16); }
.main-nav .menu { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.main-nav .menu > li { position: relative; }
.main-nav .menu > li > a { position: relative; height: 60px; padding: 0 18px; display: flex; align-items: center; color: var(--ink-2); }
.main-nav .menu > li > a:hover { color: var(--teal); background: var(--chip); }
.main-nav .menu > .current-menu-item > a,
.main-nav .menu > .current-menu-ancestor > a,
.main-nav .menu > .current_page_item > a {
  color: var(--teal); font-weight: 800; background: linear-gradient(to top, rgba(20, 71, 74, .08), rgba(20, 71, 74, 0) 70%);
}
.main-nav .menu > .current-menu-item > a::after,
.main-nav .menu > .current-menu-ancestor > a::after,
.main-nav .menu > .current_page_item > a::after {
  content: ''; position: absolute; bottom: 0; right: 12px; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal);
}
.main-nav .menu > .current-menu-item > a::before,
.main-nav .menu > .current-menu-ancestor > a::before,
.main-nav .menu > .current_page_item > a::before {
  content: ''; position: absolute; bottom: -4px; left: 50%; width: 8px; height: 8px; margin-left: -6px; transform: rotate(45deg);
  background: var(--gold); border: 2px solid var(--surface); z-index: 1;
}
.main-nav .sub-menu {
  position: absolute; top: 100%; right: 0; min-width: 220px; list-style: none; padding: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; z-index: 30;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.main-nav .sub-menu a:hover { background: var(--chip); }

/* Drawer & overlay */
.drawer, .search-overlay { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden], .search-overlay[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 21, .45); backdrop-filter: blur(2px); }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(390px, 100%); background: var(--surface);
  display: flex; flex-direction: column; overflow-y: auto; animation: drawer-in .25s ease;
}
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-head { position: relative; height: 76px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); overflow: hidden; }
.drawer-ornament { position: absolute; top: 0; right: 0; height: 80px; width: auto; opacity: .85; }
.drawer-logo { position: relative; margin-inline: auto; }
.drawer-logo img { height: 36px; width: auto; }
.drawer-close { position: absolute; left: 12px; color: var(--gold-text); border: 0; }
.drawer-search { margin: 14px 16px 8px; height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.drawer-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.drawer-nav { flex: 1; padding: 4px 8px; }
.drawer-menu { list-style: none; }
.drawer-menu a { min-height: 52px; padding: 0 14px; display: flex; align-items: center; border-radius: 14px; font-size: 15px; }
.drawer-menu a:hover { background: var(--chip); }
.drawer-menu .current-menu-item > a { background: var(--gold-soft); color: var(--gold-text); font-weight: 700; }
.drawer-menu .sub-menu { list-style: none; margin: 0 24px 6px 8px; padding-right: 14px; border-right: 1px solid var(--line); }
.drawer-menu .sub-menu a { min-height: 40px; font-size: 14px; color: var(--ink-2); }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); background: var(--bg); text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-foot .social-row { justify-content: center; margin-top: 10px; }
.drawer-foot .social-row a { background: var(--chip); color: var(--ink); border: 0; }

.search-overlay-box {
  position: absolute; top: 12vh; left: 50%; transform: translateX(-50%); width: min(680px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); color: var(--muted);
}
.search-overlay-box input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; font-size: 18px; background: transparent; color: var(--ink); }
.search-overlay-box .icon-btn { border: 0; }
body.is-locked { overflow: hidden; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 72px 0; }
.section-band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home > .section:first-child { padding-top: 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; }
.section-title .ic { color: var(--gold); }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--teal); }
.list-card .section-head { margin-bottom: 8px; }
.list-card .section-title { font-size: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-popular { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.grid-popular > :only-child, .grid-2 > :only-child { grid-column: 1 / -1; }

/* Editorials */
.editorials-grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 24px; }
.editorial-card { display: flex; overflow: hidden; box-shadow: var(--shadow); color: var(--ink); }
.editorial-card.is-featured { grid-row: span 2; flex-direction: column; }
.editorial-card.is-featured .card-media { height: 270px; }
.editorial-card.is-featured .card-title { font-size: 22px; }
.editorial-card.is-featured .card-body { padding: 24px 28px; gap: 12px; }
.editorial-card:not(.is-featured) .card-media { width: 180px; flex-shrink: 0; }
.editorial-card:not(.is-featured) .card-media .pill { display: none; }
.editorial-card:not(.is-featured) .card-body { justify-content: space-between; }
.editorial-card:not(.is-featured) .badge { align-self: flex-start; }
.editorial-card:not(.is-featured) .meta > span + span { display: none; }
.carousel-dots { display: none; }

/* Articles */
.article-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.article-card .chip { align-self: flex-start; border-radius: 8px; }
.article-card .card-title a { color: var(--ink); }
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-actions { display: flex; gap: 12px; font-size: 12px; font-weight: 700; }
.card-actions a { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); }
.tab-panel[hidden] { display: none; }

/* List cards (notes / talks) */
.list-card { padding: 28px; }
.list-rows { list-style: none; }
.list-rows li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 8px; border-radius: 14px; color: var(--ink); }
.list-row-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.list-row-title { font-size: 15px; font-weight: 700; }
.icon-tile { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold-text); }
.talk-thumb { position: relative; width: 116px; height: 72px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.talk-thumb-icon { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(8, 20, 21, .35); }

/* Books */
.scroller-arrows { display: flex; gap: 8px; margin-inline-start: auto; }
.section-books .section-link { order: 3; }
.book-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 96px) / 4); gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 4px 18px; }
.book-shelf::-webkit-scrollbar { display: none; }
.book { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; scroll-snap-align: start; color: var(--ink); }
.book-cover {
  position: relative; width: 190px; max-width: 100%; aspect-ratio: 190 / 260; border-radius: 4px 10px 10px 4px; overflow: hidden;
  background: var(--cover, #14474A); color: #F3E6CC; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 16px 30px rgba(10, 30, 30, .22);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-spine { position: absolute; top: 0; bottom: 0; right: 0; width: 12px; background: rgba(0, 0, 0, .18); }
.book-frame { position: absolute; inset: 12px 24px 12px 12px; border: 1px solid rgba(212, 178, 122, .6); border-radius: 4px; }
.book-cover-title { position: relative; padding: 32px 22px 0 14px; font-size: 13px; line-height: 1.9; font-weight: 700; }
.book-cover-rosette { position: relative; margin-top: auto; margin-bottom: 30px; color: #D4B27A; }
.book-title { font-size: 15px; font-weight: 700; line-height: 1.8; max-width: 230px; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }

/* Media bento */
.media-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 180px 180px; gap: 16px; }
.media-tile { position: relative; border-radius: 18px; overflow: hidden; color: #fff; }
.media-tile.is-big { grid-column: span 2; grid-row: span 2; border-radius: 22px; }
.media-bento.count-4 > .media-tile:last-child, .media-bento.count-3 > .media-tile:not(.is-big) { grid-column: span 2; }
.media-bento.count-2 > .media-tile:not(.is-big) { grid-column: span 2; grid-row: span 2; }
.media-bento.count-1 > .media-tile { grid-column: 1 / -1; }
.media-tile > .thumb { position: absolute; inset: 0; }
.media-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 14, 16, .88), rgba(6, 14, 16, 0) 65%); }
.play-btn { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--teal); }
.media-tile.is-big .play-btn { top: 50%; right: 50%; width: 76px; height: 76px; margin: -38px -38px 0 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.duration { position: absolute; top: 18px; left: 14px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .6); font-size: 12px; }
.media-tile .pill { position: absolute; top: 14px; right: 14px; }
.media-caption { position: absolute; right: 16px; left: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.media-kicker { font-size: 12px; font-weight: 700; color: #E7C98F; }
.media-title { font-size: 14px; font-weight: 700; line-height: 1.7; }
.media-tile.is-big .media-caption { right: 28px; left: 28px; bottom: 24px; }
.media-tile.is-big .media-title { font-size: 22px; font-weight: 800; }

/* Popular & links */
.rank-list { list-style: none; }
.rank-list li { border-top: 1px solid var(--line); }
.rank-list a { display: flex; align-items: center; gap: 16px; padding: 12px 4px; color: var(--ink); }
.rank { width: 36px; flex-shrink: 0; text-align: center; font-size: 26px; font-weight: 800; color: var(--gold); }
.rank-title { flex: 1; font-size: 15px; font-weight: 600; }
.rank-list-sm .rank { width: 24px; font-size: 20px; }
.rank-list-sm .rank-title { font-size: 13px; line-height: 1.9; }
.link-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.link-tile { padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.link-tile .ic { color: var(--teal); }
.link-tile:hover { border-color: var(--gold); }

/* Newsletter */
.section-newsletter { padding-top: 0; }
.newsletter { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 48px; padding: 52px 56px; border-radius: 28px; background: #14474A; color: #fff; }
.newsletter-pattern { position: absolute; top: 0; bottom: 0; left: 0; width: 46%; background: url('../img/pattern-teal.svg') center/cover; opacity: .55; -webkit-mask-image: linear-gradient(to left, transparent, #000 60%); mask-image: linear-gradient(to left, transparent, #000 60%); }
.newsletter-text { position: relative; max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.newsletter .eyebrow { color: #E7C98F; }
.newsletter h2 { font-size: 30px; font-weight: 800; }
.newsletter p { color: rgba(255, 255, 255, .82); line-height: 1.9; }
.newsletter-form { position: relative; width: 440px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.newsletter-form label { font-size: 13px; color: rgba(255, 255, 255, .85); }
.newsletter-field { display: flex; gap: 8px; padding: 6px; border-radius: 16px; background: #fff; }
.newsletter-field input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; background: transparent; color: var(--ink); text-align: right; }
.newsletter-field button { min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--gold); color: #1A1406; font-weight: 800; }
.rss-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .78); }
.rss-link:hover { color: #fff; }
.form-msg { font-size: 13px; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .12); }

/* ==========================================================================
   Page head, toolbar, archive layout
   ========================================================================== */
.page-head { padding-top: 32px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 18px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 12px; font-size: 38px; font-weight: 800; }
.page-title .ic { color: var(--gold); }
.page-desc { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.page-head-side { display: flex; align-items: center; gap: 12px; }
.count { font-size: 14px; color: var(--muted); }
.count strong { font-size: 22px; color: var(--teal); }

.toolbar { display: flex; align-items: center; gap: 12px; padding: 12px; box-shadow: var(--shadow); }
.toolbar-search { flex: 1; height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.toolbar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.toolbar-select { height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.toolbar-select select { border: 0; outline: 0; background: transparent; font-weight: 600; color: var(--ink); }

.layout-sidebar { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 56px; }
.layout-sidebar.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget { padding: 20px 22px; }
.widget-title { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 800; }
.widget-title .ic { color: var(--gold); }
.widget ul, .widget ol { list-style: none; }
:where(.widget) li > a { display: block; padding: 6px 0; }
/* Core/block widgets added from Appearance → Widgets */
.widget h2, .widget .wp-block-heading, .widget .widgettitle { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 800; }
.widget :where(ul, ol):not(.rank-list):not(.mini-list):not(.count-list) li + li { border-top: 1px dashed var(--line); }
.widget :where(ul, ol) li { font-size: 13px; line-height: 1.9; }
.widget .wp-block-latest-comments { padding: 0; }
.widget .wp-block-latest-comments__comment { margin: 0; padding: 8px 0; }
.widget .wp-block-search__inside-wrapper, .widget .search-form { display: flex; gap: 6px; }
.widget .wp-block-search__label { display: none; }
.widget input[type=search], .widget input[type=text] { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.widget .wp-block-search__button, .widget input[type=submit], .widget .search-submit, .widget form button[type=submit] { min-height: 42px; margin: 0; padding: 0 14px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 700; }
.widget select { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; }
.widget img { border-radius: 12px; }
.promo-box, .pdf-card { position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius); background: #14474A; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.promo-box > *, .pdf-card > * { position: relative; }
.promo-pattern { position: absolute !important; inset: 0; background: url('../img/pattern-teal.svg') center/cover; opacity: .28; }
.promo-box span:not(.promo-pattern), .pdf-card span:not(.promo-pattern) { font-size: 13px; color: rgba(255, 255, 255, .85); }
.promo-box .btn, .pdf-card .btn { align-self: flex-start; }
.pdf-card { background: #1A2230; }
.pdf-card .ic { color: #E7C98F; }

.row-list { display: flex; flex-direction: column; gap: 16px; }
.row-card { display: flex; gap: 22px; padding: 16px; }
.row-media { position: relative; width: 220px; height: 164px; flex-shrink: 0; border-radius: 14px; overflow: hidden; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-title { font-size: 19px; font-weight: 800; line-height: 1.7; }
.row-title a { color: var(--ink); }
.row-excerpt { font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.row-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12px; color: var(--muted); }
.row-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.row-actions { margin-inline-start: auto; }
.mini-btn { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; color: var(--teal); }
.play-sm { top: 50%; right: 50%; margin: -20px -20px 0 0; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; font-size: 14px; font-weight: 700; }
.pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.pagination .current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pagination .dots { border: 0; background: transparent; }

.banner-slot { padding-bottom: 64px; }
.banner-slot img { border-radius: var(--radius); width: 100%; }
.ad-placeholder { min-height: 140px; border-radius: var(--radius); border: 1.5px dashed var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.ad-placeholder strong { font-size: 17px; color: var(--ink-2); }
.ad-placeholder-tall { min-height: 300px; }
.ad-widget { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ad-label { font-size: 11px; color: var(--muted); text-align: center; }
.ad-widget img { border-radius: 12px; width: 100%; }

.empty-state { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 22px; }
.error-404 { margin: 48px auto; max-width: 640px; }
.big-num { font-size: 72px; font-weight: 900; color: var(--gold); line-height: 1; }
.search-inline { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 420px; padding: 6px 6px 6px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.search-inline input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-inline button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 700; }

/* Archive sort bar */
.sort-bar { display: flex; align-items: center; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sort-bar .meta-text { margin-inline-end: 8px; }
.sort-link { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.sort-link:hover { background: var(--chip); color: var(--ink); }
.sort-link.is-active { background: var(--teal); color: #fff; font-weight: 700; }

/* Search page */
.search-hero { display: flex; gap: 12px; padding: 10px; border-radius: 22px; box-shadow: var(--shadow); }
.search-hero-field { flex: 1; height: 60px; padding: 0 18px; display: flex; align-items: center; gap: 12px; border-radius: 14px; background: var(--bg); border: 1.5px solid var(--teal); color: var(--muted); }
.search-hero-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; font-weight: 600; color: var(--ink); }
.clear-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: var(--ink-2); }
.search-summary .num { color: var(--teal); font-size: 18px; }
.type-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.type-tabs::-webkit-scrollbar { display: none; }
.type-tabs a { flex-shrink: 0; height: 52px; margin-bottom: -1px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border-bottom: 3px solid transparent; color: var(--ink-2); font-size: 15px; }
.type-tabs a.is-active { border-bottom-color: var(--teal); color: var(--teal); font-weight: 800; }
.type-tabs a.is-active .count-pill { background: var(--teal); color: #fff; }
.radio-list { display: flex; flex-direction: column; gap: 4px; }
.radio-link { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.radio-dot { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--line); }
.radio-link.is-active .radio-dot { border: 5px solid var(--teal); }
.trend-list a { display: flex; align-items: center; gap: 10px; }
.trend-list li + li { border-top: 1px dashed var(--line); }
.trend-list .ic { color: var(--gold); }
.result-card .row-media { width: 160px; height: 116px; }
.result-card .row-title { font-size: 18px; }

/* ==========================================================================
   Single article
   ========================================================================== */
.article-head { padding-top: 32px; padding-bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.badges-center { justify-content: center; }
.article-lead-kicker { font-size: 14px; font-weight: 700; color: var(--gold-text); }
.article-title { max-width: 900px; font-size: 44px; line-height: 1.55; font-weight: 800; text-wrap: balance; }
.article-lead { max-width: 780px; font-size: 18px; line-height: 2; color: var(--ink-2); }
.meta-bar { width: 100%; margin-top: 8px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; text-align: right; }
.meta-author { display: flex; align-items: center; gap: 14px; }
.meta-author > div { display: flex; flex-direction: column; }
.meta-author strong { font-size: 15px; }
.avatar { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-weight: 800; }
.avatar.is-author { background: var(--teal); color: #fff; }
.avatar-img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.meta-actions { display: flex; align-items: center; gap: 8px; }

.article-hero { margin-top: 0; margin-bottom: 12px; }
.article-hero img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 26px; }
.article-hero figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }

.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 48px; align-items: start; padding-top: 28px; padding-bottom: 48px; }
.article-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.textsize { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: 13px; font-weight: 700; }
.textsize div { display: flex; gap: 4px; }
.textsize > span { display: inline-flex; align-items: center; gap: 8px; }
.textsize > span .ic { color: var(--gold); }
.widget.textsize button, .textsize button { width: 40px; height: 40px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.widget.textsize button:hover, .textsize button:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.mini-list li + li { border-top: 1px dashed var(--line); }
.mini-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; font-size: 13px; line-height: 1.8; font-weight: 600; }
.mini-list small { font-size: 11px; font-weight: 400; color: var(--muted); }
.count-list li + li { border-top: 1px dashed var(--line); }
.count-list a { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; }
.share-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.share-grid a, .share-grid button { height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--chip); color: var(--ink); }
.share-grid a:hover, .share-grid button:hover { background: var(--teal); color: #fff; }

.summary-box { padding: 22px 26px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid rgba(176, 138, 79, .35); }
.summary-box strong { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--gold-text); font-size: 15px; }
.summary-box ul { padding-right: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.9; }

/* Entry content typography & Gutenberg blocks live in assets/css/content.css */

/* Galleries: WordPress gallery block & classic gallery */
.entry-content .wp-block-gallery, .entry-content .gallery {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px !important; margin: 1.6em 0;
}
.entry-content .wp-block-gallery > figure, .entry-content .gallery .gallery-item { width: auto !important; margin: 0 !important; border-radius: 14px; overflow: hidden; position: relative; }
.entry-content .wp-block-gallery > figure:first-child, .entry-content .gallery .gallery-item:first-child { grid-column: span 2; grid-row: span 2; border-radius: 16px; }
.entry-content .wp-block-gallery > figure, .entry-content .gallery .gallery-item { height: 100% !important; align-self: stretch; display: block !important; }
.entry-content .wp-block-gallery > figure > a, .entry-content .gallery .gallery-icon, .entry-content .gallery .gallery-icon a { display: block; width: 100%; height: 100%; }
.entry-content .wp-block-gallery img, .entry-content .gallery img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; border-radius: 0; cursor: zoom-in; }
.entry-content .wp-block-gallery > figure:nth-child(n+6), .entry-content .gallery .gallery-item:nth-child(n+6) { display: none; }
.entry-content .wp-block-gallery > figure:nth-child(5)::after, .entry-content .gallery .gallery-item:nth-child(5)::after {
  content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 25, 27, .62); color: #fff; font-size: 22px; font-weight: 800; pointer-events: none; direction: ltr;
}
.entry-content .wp-block-gallery > figure:nth-child(5):not([data-more])::after, .entry-content .gallery .gallery-item:nth-child(5):not([data-more])::after { display: none; }
.entry-content .wp-block-gallery figcaption.blocks-gallery-caption { grid-column: 1 / -1; }
.entry-content .wp-block-gallery figure figcaption { display: none; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: -8px; font-size: 13px; color: var(--muted); }
.gallery-head strong { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--ink); }
.gallery-head .ic { color: var(--gold); }

.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.tag-row a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); }
.tag-row a:hover { border-color: var(--teal); color: var(--teal); }

.cite-box { padding: 22px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.cite-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cite-head strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.cite-body { display: flex; align-items: flex-start; gap: 12px; }
.cite-text { flex: 1; min-width: 0; margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); font-family: var(--font); font-size: 13px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; text-align: start; max-width: 100%; }

.author-box { padding: 24px; display: flex; align-items: center; gap: 20px; }
.author-photo { width: 88px; height: 104px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; border-radius: 44px 44px 12px 12px; background: url('../img/pattern-sand.svg') center/cover; color: var(--teal); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.author-text strong { font-size: 18px; }
.author-text p { font-size: 14px; color: var(--ink-2); }

.embed-box { border-radius: 18px; overflow: hidden; background: #000; }
.embed-box iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
.book-details { display: flex; gap: 28px; align-items: center; padding: 24px; }
.book-details dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.book-details dt { color: var(--muted); }
.book-details dd { margin: 0; font-weight: 600; }

.prev-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: 56px; }
.prev-next-card { padding: 16px; display: flex; align-items: center; gap: 16px; color: var(--ink); }
.prev-next-card > span:not(.thumb) { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.prev-next-card strong { font-size: 15px; line-height: 1.7; }
.prev-next-card.is-next { text-align: left; }
.prev-next-card.is-next > span:not(.thumb) { text-align: right; }
.pn-thumb { width: 110px !important; height: 72px !important; flex-shrink: 0; border-radius: 12px; }

.section-related { padding: 56px 0; }
.ornament-title { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 28px; font-size: 26px; font-weight: 800; }
.ornament-title .ic { color: var(--gold); }
.ornament-title .line { width: 80px; height: 1px; background: var(--gold); }
.related-card { overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.related-card .card-media { height: 180px; }

/* Comments */
.comments-area { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: start; padding: 56px 0 72px; }
.comments-title { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.comment-list, .comment-list .children { list-style: none; }
.comment-list > li + li { margin-top: 16px; }
.comment-list .children { margin-top: 12px; padding-right: 58px; }
.comment-card { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.children .comment-card { background: var(--bg); }
.comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment-meta { display: flex; justify-content: space-between; gap: 8px; }
.comment-author { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.comment-meta time { font-size: 12px; color: var(--muted); }
.comment-text { font-size: 14px; line-height: 2; color: var(--ink-2); }
.comment-actions a { font-size: 13px; font-weight: 700; color: var(--teal); }
.comment-awaiting { font-size: 12px; color: var(--gold-text); }
.comment-form { padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.comment-reply-title { font-size: 18px; font-weight: 800; }
.comment-reply-title small { margin-inline-start: 8px; font-size: 13px; }
.comment-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical;
}
.comment-form .form-submit { margin: 0; }
.comment-form .btn { min-height: 48px; font-size: 15px; }

.page-card { padding: 32px; }
.page-hero img { width: 100%; border-radius: 18px; margin-bottom: 24px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--teal-deep); color: #D9E2E0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; padding-top: 64px; padding-bottom: 48px; }
.footer-about { display: flex; flex-direction: column; gap: 14px; }
.footer-logo img { height: 48px; width: auto; }
.footer-about p { font-size: 14px; line-height: 2; color: rgba(217, 226, 224, .85); }
.site-footer h3 { font-size: 15px; font-weight: 800; color: #E7C98F; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-row a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.social-row a:hover { background: rgba(255, 255, 255, .1); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: rgba(217, 226, 224, .75); }
.footer-rosette { color: var(--gold); }
.back-to-top { display: inline-flex; align-items: center; gap: 8px; color: #fff; }

.bottom-nav, .reading-bar { display: none; }

/* ==========================================================================
   Tablet (≤ 1100px)
   ========================================================================== */
@media (max-width: 1100px) {
  :root { --gutter: 32px; --logo-h: 76px; }
  .masthead { height: 230px; }
  .brand-subtitle { margin-top: 26px; font-size: 16px; }
  .brand-subtitle .line { width: 120px; }
  .main-nav .container { padding: 0; }
  .main-nav .menu { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline: 16px; font-size: 14px; }
  .main-nav .menu::-webkit-scrollbar { display: none; }
  .main-nav .menu > li > a { height: 56px; padding: 0 14px; white-space: nowrap; }
  .main-nav .sub-menu { display: none; }
  .topbar-text { display: none; }
  .topbar-search { width: 300px; }

  .section { padding: 56px 0; }
  .editorials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .editorial-card.is-featured { grid-column: 1 / -1; grid-row: auto; }
  .editorial-card:not(.is-featured) { flex-direction: column; }
  .editorial-card:not(.is-featured) .card-media { width: 100%; height: 150px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > :nth-child(3) { display: none; }
  .section-related .grid-3 > :nth-child(3) { display: flex; }
  .grid-2, .grid-popular { grid-template-columns: 1fr; }
  .book-shelf { grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; }
  .book-cover { width: 150px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .media-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 260px 160px 160px; }
  .media-tile.is-big { grid-row: auto; }
  .newsletter { flex-direction: column; align-items: stretch; padding: 36px 32px; }
  .newsletter-form { width: 100%; }

  .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
  .layout-sidebar .sidebar { order: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .article-layout .sidebar-right { order: 2; }
  .article-layout .sidebar-left { order: 3; }
  .article-layout .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .article-title { font-size: 34px; }
  .comments-area { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
}

/* ==========================================================================
   Mobile (≤ 720px)
   ========================================================================== */
@media (max-width: 720px) {
  :root { --gutter: 20px; --logo-h: 51px; --entry-size: 16px; }
  body { font-size: 14px; }
  body.has-bottom-nav { padding-bottom: 96px; }

  .topbar, .main-nav { display: none; }
  .masthead { height: auto; padding: 30px 0 16px; }
  .ornament { height: 150px; opacity: .85; }
  .masthead-btn {
    display: grid; place-items: center; position: absolute; top: 12px; z-index: 2; width: 44px; height: 44px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 2px 8px rgba(20, 40, 40, .08);
  }
  .masthead-search { right: 12px; }
  .masthead-menu { left: 12px; }
  .brand-subtitle { margin-top: 18px; gap: 8px; font-size: 14px; }
  .brand-subtitle .line { width: 64px; }
  .brand-rosette { margin-top: 6px; }
  .brand-rosette .ic { width: 20px; height: 20px; }

  .section { padding: 32px 0; }
  .home > .section:first-child { padding-top: 28px; }
  .section-head { margin-bottom: 16px; }
  .section-title { font-size: 20px; }
  .list-card .section-title { font-size: 20px; }
  .section-link { font-size: 13px; }
  .section-head .segmented { order: 3; width: 100%; background: transparent; border: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
  .section-head .segmented button { min-height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .section-head .segmented button[aria-selected="true"] { background: var(--teal); border-color: var(--teal); }

  /* Editorials: one card per view, swipe */
  .editorials-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; grid-template-columns: none; grid-template-rows: none; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .editorials-grid::-webkit-scrollbar { display: none; }
  .editorial-card, .editorial-card.is-featured { grid-column: auto; flex-direction: column; scroll-snap-align: start; box-shadow: none; }
  .editorial-card .card-media, .editorial-card.is-featured .card-media, .editorial-card:not(.is-featured) .card-media { width: 100%; height: 190px; }
  .editorial-card:not(.is-featured) .card-media .pill { display: inline-flex; }
  .editorial-card .badge, .editorial-card .card-excerpt { display: none !important; }
  .editorial-card .card-body, .editorial-card.is-featured .card-body { padding: 14px 16px; gap: 8px; }
  .editorial-card .card-title, .editorial-card.is-featured .card-title { font-size: 15px; }
  .editorial-card .meta { font-size: 12px; }
  .carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .carousel-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: width .2s, background .2s; }
  .carousel-dots span.is-active { width: 18px; background: var(--teal); }

  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .grid-3 > :nth-child(3) { display: flex; }
  .article-card { padding: 16px; }
  .list-card { padding: 18px; }
  .list-row { padding: 12px 0; }
  .talk-thumb { width: 88px; height: 64px; }
  .list-row .chip { display: none; }

  .scroller-arrows { display: none; }
  .book-shelf { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 14px; overflow: visible; }
  .book-shelf .book:nth-child(n+4) { display: none; }
  .book-cover { width: 100%; }
  .book-cover-title { padding: 14px 14px 0 8px; font-size: 10px; }
  .book-cover-rosette { margin-bottom: 14px; }
  .book-cover-rosette .ic { width: 26px; height: 26px; }
  .book-frame { inset: 8px 16px 8px 8px; }
  .book-title { font-size: 12px; }
  .book .meta-text { display: none; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }

  .media-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 200px 140px 140px; gap: 10px; }
  .media-tile.is-big .media-title { font-size: 17px; }
  .media-tile.is-big .play-btn { width: 56px; height: 56px; margin: -28px -28px 0 0; }
  .link-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .newsletter { padding: 24px 20px; border-radius: 22px; gap: 16px; }
  .newsletter h2 { font-size: 18px; }
  .newsletter-pattern { width: 100%; opacity: .35; -webkit-mask-image: none; mask-image: none; }
  .newsletter-field { flex-direction: column; background: transparent; padding: 0; }
  .newsletter-field input { min-height: 48px; border-radius: 12px; background: #fff; }

  .page-head { padding-top: 22px; padding-bottom: 18px; gap: 14px; }
  .page-title { font-size: 26px; }
  .page-title .ic { width: 22px; height: 22px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-select { justify-content: space-between; }
  .layout-sidebar .sidebar, .article-layout .sidebar { grid-template-columns: 1fr; }
  .row-card { flex-direction: column; gap: 12px; padding: 12px; }
  .row-media, .result-card .row-media { width: 100%; height: 180px; }
  .row-title { font-size: 16px; }
  .row-actions { margin-inline-start: 0; }
  .search-hero { flex-direction: column; }
  .search-hero-field input { font-size: 16px; }
  .btn-lg { min-height: 52px; }

  .article-head { text-align: right; align-items: stretch; padding-top: 22px; }
  .badges-center { justify-content: flex-start; }
  .article-title { font-size: 25px; line-height: 1.7; }
  .article-lead { font-size: 15px; }
  .meta-bar { padding: 12px; }
  .meta-actions .btn { display: none; }
  .article-hero img { border-radius: 20px; max-height: 240px; }
  .entry-content .wp-block-gallery, .entry-content .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
  .cite-body { flex-direction: column; }
  .author-box { flex-wrap: wrap; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-thumb { display: none !important; }
  .comments-area { padding: 32px 0 48px; }
  .comment-list .children { padding-right: 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; text-align: center; }
  .footer-about { align-items: center; }
  .footer-contact li { justify-content: center; }
  .social-row { justify-content: center; }
  .footer-bottom-inner { flex-direction: column; justify-content: center; padding: 16px 0; }
  .footer-rosette { display: none; }

  .bottom-nav {
    position: fixed; right: 16px; left: 16px; bottom: 16px; z-index: 50; height: 68px; padding: 0 8px;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 40px rgba(10, 30, 30, .18);
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; font-size: 10px; color: var(--muted); }
  .bottom-nav span { width: 44px; height: 30px; display: grid; place-items: center; border-radius: 999px; }
  .bottom-nav .is-active { color: var(--teal); font-weight: 700; }
  .bottom-nav .is-active span { background: var(--gold-soft); }

  .single .bottom-nav { display: none; }
  .reading-bar {
    position: fixed; right: 16px; left: 16px; bottom: 16px; z-index: 50; height: 60px; padding: 0 8px;
    display: flex; align-items: center; justify-content: space-around; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 40px rgba(10, 30, 30, .18);
  }
  .reading-bar > * { min-width: 44px; height: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 800; }
  .reading-bar .is-primary { background: var(--teal); color: #fff; }
}

@media print {
  .site-header, .site-footer, .sidebar, .bottom-nav, .reading-bar, .prev-next, .section-related, .comments-area, .meta-actions, .cite-box button { display: none !important; }
  .article-layout { display: block; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
