/* ==========================================================================
   TiziCN Blog (tizicn.blog) - Editorial Broadsheet & Bento Workbench Framework
   Warm Paper Surface | Deep Charcoal Ink | Emerald-Teal Accent | Zero Bloat
   ========================================================================== */

:root {
  --bg-page: #f7f6f2;
  --bg-surface: #ffffff;
  --bg-muted: #efede7;
  --bg-tint: #f0fdfa;
  --bg-dark: #111827;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #ccfbf1;
  --amber-bg: #fef3c7;
  --amber-text: #92400e;
  --border: #e2e0d8;
  --border-strong: #c9c5ba;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --warn-bg: #fffbeb;
  --warn-text: #92400e;
  --info-bg: #f0fdfa;
  --info-text: #0f766e;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 6px 20px rgba(17, 24, 39, 0.06);
  --container-max: 1200px;
  --prose-max: 790px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.7;
  overflow-x: clip;
  font-variant-numeric: tabular-nums;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.32;
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.85rem; }
h2 { font-size: clamp(1.28rem, 2vw, 1.55rem); margin-bottom: 0.7rem; }
h3 { font-size: 1.08rem; margin-bottom: 0.45rem; }

p { margin: 0 0 1rem; color: var(--text-secondary); }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--text-secondary); }
li { margin-bottom: 0.35rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-muted);
  padding: 0.14em 0.38em;
  border-radius: 3px;
  color: var(--text-primary);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; border-radius: var(--radius-sm); }

/* ==========================================================================
   Header & Navigation (Editorial Top Masthead)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--text-primary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
}
.logo-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 0.45rem;
  border-left: 1px solid var(--border-strong);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
.nav-desktop a {
  color: var(--text-secondary);
  font-size: 0.9125rem;
  font-weight: 600;
  padding: 0.4rem 0.68rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a.is-active {
  background: var(--bg-tint);
  color: var(--accent);
  text-decoration: none;
}

.header-actions { display: flex; align-items: center; gap: 0.45rem; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-contact-nav {
  background: var(--bg-tint);
  color: var(--accent);
  border-color: #99f6e4;
}
.btn-contact-nav:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
@media (max-width: 479px) {
  .logo-sub { display: none; }
}

.menu-toggle { display: inline-flex; }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0.75rem 1rem 1rem;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.nav-mobile a:hover,
.nav-mobile a.is-active {
  background: var(--bg-tint);
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .menu-toggle, .nav-mobile { display: none !important; }
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 36px; padding: 0.35rem 0.8rem; font-size: 0.84rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  white-space: nowrap;
}
.badge-official { background: var(--info-bg); color: var(--info-text); border: 1px solid #99f6e4; }
.badge-editorial { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #fde68a; }
.badge-unverified { background: var(--bg-muted); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.badge-neutral { background: var(--bg-muted); color: var(--text-secondary); border: 1px solid var(--border); }

/* ==========================================================================
   Sections & Layouts (Editorial Broadsheet + Bento Workbench)
   ========================================================================== */
.section { padding: 2.5rem 0; }
.section-tight { padding: 1.75rem 0; }
.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}
.section-desc { color: var(--text-muted); margin: 0; font-size: 0.9375rem; }

/* Split Hero Workbench */
.hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.25fr 0.95fr; gap: 2.25rem; }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-tint);
  border: 1px solid #99f6e4;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.hero-lead { font-size: 1.02rem; color: var(--text-secondary); margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1rem; }
.hero-note { font-size: 0.84rem; color: var(--text-muted); margin: 0; }

/* Right Hero Interactive Node Globe Panel */
.globe-panel {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #1e293b;
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow-md);
}
.globe-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.86rem;
  font-weight: 700;
}
.globe-head a { color: #5eead4; font-size: 0.8rem; font-weight: 600; }
.globe-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
  margin-right: 0.4rem;
}
.globe-stage {
  position: relative;
  width: 100%;
  height: 255px;
  margin: 0.45rem 0 0.5rem;
  touch-action: pan-y;
}
@media (min-width: 960px) {
  .globe-stage { height: 270px; }
}
.globe-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.globe-hud {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.6rem;
}
.globe-hud-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5eead4;
  margin-bottom: 0.15rem;
}
.globe-hud-meta {
  font-size: 0.76rem;
  color: #cbd5e1;
}
.globe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.globe-chip {
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-sm);
  padding: 0.22rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.globe-chip:hover,
.globe-chip.is-active {
  background: rgba(15, 118, 110, 0.32);
  border-color: #5eead4;
  color: #f0fdfa;
}

/* Numbered Editorial Strip (Quick Answers) */
.strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .strip-grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.strip-item {
  border-top: 2px solid var(--text-primary);
  padding-top: 0.85rem;
}
.strip-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* Split Directory Rows (Featured Brands & Directories) */
.brand-ledger {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 820px) {
  .brand-ledger { grid-template-columns: repeat(2, 1fr); }
}
.brand-row-card {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.brand-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.brand-row-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  font-size: 0.84rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* Editorial Broadsheet Split Columns */
.split-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 900px) {
  .split-columns { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.editorial-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.editorial-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.editorial-list li:last-child { border-bottom: none; }
.editorial-list h3 { margin-bottom: 0.25rem; font-size: 1.02rem; }
.editorial-list p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* Compact 2-Column Directory Grid (for 100 blog & 30 guides hubs) */
.compact-dir {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .compact-dir { grid-template-columns: repeat(2, 1fr); gap: 0.85rem 1.25rem; }
}
.compact-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.compact-item:hover {
  border-left-color: var(--accent);
  border-color: var(--border-strong);
  background: #fdfdfc;
}
.compact-item h3 { font-size: 0.98rem; margin-bottom: 0.25rem; }
.compact-item p { font-size: 0.84rem; color: var(--text-muted); margin: 0; }

/* High-contrast Dark Spotlight Banner */
.banner-dark {
  background: var(--bg-dark);
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.banner-dark h2 { color: #ffffff; margin-bottom: 0.35rem; }
.banner-dark p { color: #cbd5e1; margin: 0; }

/* Standard Grid Systems (kept for compatibility across subpages) */
.grid { display: grid; gap: 1.15rem; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card-hover:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; }
.card-title { font-size: 1.08rem; margin-bottom: 0.45rem; }
.card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin: 0.75rem 0;
  font-size: 0.85rem;
}
.spec-item dt { color: var(--text-muted); font-size: 0.74rem; }
.spec-item dd { margin: 0; font-weight: 600; color: var(--text-primary); }

.pros-cons { font-size: 0.875rem; margin: 0.5rem 0 0.75rem; }
.pros-cons p { margin: 0 0 0.35rem; }

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 0; }
th, td {
  padding: 0.68rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: break-word;
}
th {
  background: var(--bg-muted);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
}
.prose table { font-size: 0.82rem; }
.prose th, .prose td { padding: 0.58rem 0.48rem; }
.prose th { font-size: 0.79rem; }
@media (max-width: 639px) {
  .table-wrap { overflow-x: hidden; }
  table, .prose table { font-size: 0.74rem; }
  th, td, .prose th, .prose td { padding: 0.42rem 0.28rem; overflow-wrap: anywhere; }
  th, .prose th { font-size: 0.72rem; overflow-wrap: anywhere; }
}
tbody tr:nth-child(even) { background: #fafaf8; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-tint); }

/* Callouts */
.callout {
  background: var(--bg-tint);
  border: 1px solid #99f6e4;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.callout-warn {
  background: var(--warn-bg);
  border-color: #fde68a;
  border-left-color: #b45309;
}
.callout-title { font-weight: 700; color: var(--text-primary); margin-bottom: 0.35rem; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.84rem; color: var(--text-muted); padding: 0.9rem 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 0.4rem; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.breadcrumbs li + li::before { content: "›"; color: var(--border-strong); }

/* Article / Prose + Sidebar */
.page-head {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.65rem;
}
.page-head-inner { padding-top: 0.9rem; max-width: 900px; }
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.layout-article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0 3rem;
}
@media (min-width: 960px) {
  .layout-article {
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: 1.75rem;
    align-items: start;
  }
}

.prose {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
@media (min-width: 640px) { .prose { padding: 1.75rem 1.85rem; } }
.prose > p, .prose > ul, .prose > ol { max-width: var(--prose-max); }
.prose h2 { margin-top: 1.85rem; padding-top: 1.15rem; border-top: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { margin-top: 1.35rem; }

.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 960px) { .sidebar { position: sticky; top: 84px; } }
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}
.sidebar-box h3 {
  font-size: 0.94rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-list { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; }
.sidebar-list li { margin-bottom: 0.45rem; }

/* FAQ Accordion */
.faq-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .faq-split { grid-template-columns: 0.8fr 1.6fr; gap: 2.5rem; }
}
.faq-list { display: grid; gap: 0.65rem; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
}
.faq-item summary {
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.15rem; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Compare Tool */
.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.compare-chip-group { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 36px;
}
.compare-chip.is-selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.empty-state {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Search Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 300;
  padding: 4rem 1rem 1rem;
  overflow-y: auto;
}
.modal-backdrop.is-open { display: block; }
.modal-dialog {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.25);
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.search-input { flex: 1; border: none; outline: none; font-size: 1rem; font-family: inherit; color: var(--text-primary); background: transparent; }
.search-results { max-height: 400px; overflow-y: auto; padding: 0.5rem; }
.search-item { display: block; padding: 0.72rem 0.9rem; border-radius: var(--radius-sm); color: var(--text-primary); }
.search-item:hover { background: var(--bg-tint); text-decoration: none; }
.search-item-title { font-weight: 600; margin-bottom: 0.2rem; }
.search-item-desc { font-size: 0.82rem; color: var(--text-muted); }

/* Contact Modal */
.contact-dialog {
  max-width: 580px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--accent);
  box-shadow: 0 22px 54px rgba(17, 24, 39, 0.28);
  overflow: hidden;
}
.contact-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
}
.contact-modal-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.contact-modal-head p { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
.contact-modal-body { padding: 1.15rem 1.25rem 1.25rem; display: grid; gap: 0.85rem; }
.contact-channel-card {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
}
.contact-channel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.contact-channel-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-primary);
}
.contact-channel-val {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  word-break: break-all;
}
.contact-channel-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 0.7rem;
}
.contact-channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.contact-modal-foot {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.79rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* In-Page Quick TOC & Brand KPI Strip */
.toc-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  margin: 1rem 0 1.35rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.toc-strip-label {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 0.25rem;
}
.toc-strip a {
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}
.toc-strip a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 1rem 0 1.35rem;
}
@media (min-width: 640px) {
  .kpi-strip { grid-template-columns: repeat(4, 1fr); }
}
.kpi-card {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}
.kpi-label { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.kpi-val { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Related Reading & Sequential Pager Navigation */
.related-box {
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.related-box h3 {
  font-size: 0.96rem;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
.related-grid li { margin: 0; font-size: 0.87rem; }
.related-grid a { display: inline-flex; align-items: baseline; gap: 0.35rem; color: var(--text-secondary); font-weight: 600; }
.related-grid a::before { content: "→"; color: var(--accent); font-size: 0.8rem; }
.related-grid a:hover { color: var(--accent); }

.pager-nav {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-strong);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .pager-nav { grid-template-columns: repeat(2, 1fr); }
}
.pager-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.pager-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--bg-tint);
  box-shadow: var(--shadow-sm);
}
.pager-next {
  border-left: 3px solid var(--accent);
  text-align: left;
}
@media (min-width: 640px) {
  .pager-next { text-align: right; border-left: 1px solid var(--border-strong); border-right: 3px solid var(--accent); }
}
.pager-dir {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pager-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}
.pager-hub-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.45rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  right: 1.15rem;
  bottom: 1.25rem;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-dark);
  color: #ffffff;
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--accent); }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 2.75rem 0 2rem;
  margin-top: 2rem;
  border-top: 4px solid var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1f2937;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-title { color: #ffffff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #5eead4; }
.footer-bottom {
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #9ca3af;
}
