/* ============================================================
   TOPICAL MAPS — Main Theme CSS
   Works standalone or on top of Bootstrap 5.
   Fonts loaded via Google Fonts in master.php (Inter + Instrument Serif)
   ============================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-light:  #eff6ff;
  --brand-subtle: #dbeafe;
  --accent:       #f59e0b;
  --accent-light: #fffbeb;
  --green:        #059669;
  --green-light:  #ecfdf5;
  --surface:      #ffffff;
  --surface-alt:  #f8fafc;
  --surface-dark: #0f172a;
  --text-1:       #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;
  --line:         #e2e8f0;
  --line-light:   #f1f5f9;
  --r:            12px;
  --r-lg:         20px;
  --sh-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --sh-lg:  0 20px 48px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
}

/* ── BASE ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.6;
  color: var(--text-1); background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.display-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 400; line-height: 1.12;
  letter-spacing: -.5px; color: var(--text-1);
}
.display-title em { font-style: italic; color: var(--brand); }

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 400; line-height: 1.2;
  letter-spacing: -.3px; color: var(--text-1);
}

.section-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--brand); display: block; margin-bottom: 10px;
}

.lead-text {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2); line-height: 1.65; font-weight: 400;
}

/* ── LAYOUT HELPERS ─────────────────────────────────────────── */
.container     { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.section-wrap  { padding: 80px 0; }
.section-sm    { padding: 56px 0; }
.section-alt   { background: var(--surface-alt); }
.section-head  { margin-bottom: 48px; }
.section-head .section-title { margin-top: 8px; }

/* Bootstrap-style helpers (if not using Bootstrap) */
.row   { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.g-3   > * { padding: 12px; }
.g-4   > * { padding: 16px; }
.g-5   > * { padding: 24px; }
.col-md-4  { width: 33.333%; }
.col-md-6  { width: 50%; }
.col-lg-2  { width: 16.666%; }
.col-lg-4  { width: 33.333%; }
.col-lg-6  { width: 50%; }
.col-lg-8  { width: 66.666%; }
.col-6     { width: 50%; }
.d-flex    { display: flex; }
.gap-3     { gap: 12px; }
.gap-4     { gap: 16px; }
.align-items-center   { align-items: center; }
.align-items-end      { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-center  { justify-content: center; }
.flex-wrap  { flex-wrap: wrap; }
.text-center { text-align: center; }
.mb-4  { margin-bottom: 16px; }
.mb-5  { margin-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.position-relative { position: relative; }

/* ── GLOBAL LINK RESET ──────────────────────────────────────── */
a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ── NAV ────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: 64px; display: flex; align-items: center;
}
.site-nav .container {
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; white-space: nowrap;
}
.nav-logo:hover .nav-logo-text { color: var(--brand); }
.nav-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 900; letter-spacing: .04em;
  padding: 5px 8px; border-radius: 8px; line-height: 1;
}
.nav-logo-text {
  font-size: 17px; font-weight: 600; color: var(--text-1);
  letter-spacing: -.3px; transition: color .15s;
}
.nav-logo-text strong { font-weight: 900; color: var(--brand); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  padding: 6px 13px; border-radius: 8px; transition: all .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--brand); background: var(--brand-light);
}
.nav-links a.active { font-weight: 700; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #fff !important;
  font-size: 14px; font-weight: 700;
  padding: 8px 18px; border-radius: 8px;
  text-decoration: none; transition: background .15s; white-space: nowrap;
}
.nav-cta:hover { background: var(--brand-dark) !important; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-brand {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 700;
  padding: 13px 28px; border-radius: 10px;
  text-decoration: none; border: none; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

.btn-soft {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-alt); color: var(--text-1);
  font-size: 15px; font-weight: 600;
  padding: 12px 24px; border-radius: 10px;
  text-decoration: none; border: 1px solid var(--line);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-soft:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

.btn-white {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--brand);
  font-size: 15px; font-weight: 800;
  padding: 13px 28px; border-radius: 10px;
  text-decoration: none; border: none; transition: background .15s;
}
.btn-white:hover { background: var(--brand-light); color: var(--brand); }

.cta-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 12px 24px; border-radius: 10px;
  text-decoration: none; border: 1px solid rgba(255,255,255,.25);
  transition: all .15s;
}
.cta-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ── SEARCH BAR ──────────────────────────────────────────────── */
.search-wrap {
  position: relative; max-width: 660px; margin: 0 auto;
}
.search-wrap input {
  width: 100%; padding: 18px 150px 18px 52px;
  font-size: 16px; font-family: inherit;
  border: 2px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--text-1);
  box-shadow: var(--sh-lg); outline: none; transition: border-color .2s;
}
.search-wrap input:focus { border-color: var(--brand); }
.search-wrap input::placeholder { color: var(--text-3); }
.search-icon {
  position: absolute; left: 17px; top: 50%;
  transform: translateY(-50%); color: var(--text-3); pointer-events: none;
}
.search-wrap button {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  padding: 10px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 700; font-family: inherit; transition: background .15s;
}
.search-wrap button:hover { background: var(--brand-dark); }

/* ── TOPIC CHIPS ─────────────────────────────────────────────── */
.topic-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.topic-chip {
  font-size: 13px; color: var(--text-2);
  background: #fff; border: 1px solid var(--line);
  padding: 5px 13px; border-radius: 20px;
  cursor: pointer; transition: all .15s; user-select: none;
}
.topic-chip:hover {
  border-color: var(--brand); color: var(--brand); background: var(--brand-light);
}

/* ── STAT STRIP ──────────────────────────────────────────────── */
.stat-strip {
  display: flex; justify-content: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-md);
  overflow: hidden; max-width: 820px; margin: 0 auto;
}
.stat-item {
  flex: 1; padding: 20px 16px; text-align: center;
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: none; }
.stat-val  { font-size: 26px; font-weight: 900; color: var(--text-1); letter-spacing: -1px; line-height: 1; display: block; }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 5px; display: block; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(170deg, #f0f5ff 0%, #ffffff 55%, #fafbff 100%);
  padding: 36px 0 44px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -120px; left: 50%;
  transform: translateX(-50%); width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(37,99,235,.05) 0%, transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-light); color: var(--brand);
  border: 1px solid var(--brand-subtle);
  font-size: 13px; font-weight: 600; padding: 5px 15px;
  border-radius: 20px; margin-bottom: 14px;
}
.hero-badge-dot {
  width: 6px; height: 6px; background: var(--brand);
  border-radius: 50%; animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
.hero .display-title { margin-bottom: 14px; }
.hero .lead-text     { max-width: 620px; margin: 0 auto 28px; }
.hero .search-wrap   { max-width: 680px; margin-bottom: 16px; }
.hero .topic-chips   { max-width: 820px; margin: 0 auto 32px; }

/* ── CATEGORY CARDS ──────────────────────────────────────────── */
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 20px;
  text-decoration: none; color: var(--text-1);
  transition: all .2s; box-shadow: var(--sh-sm); height: 100%;
}
.cat-card:hover {
  border-color: var(--brand); box-shadow: var(--sh-md);
  transform: translateY(-3px); color: var(--text-1);
}
.cat-icon  { font-size: 30px; line-height: 1; }
.cat-name  { font-size: 15px; font-weight: 700; line-height: 1.3; }
.cat-desc  { font-size: 12px; color: var(--text-3); line-height: 1.4; flex: 1; }
.cat-count {
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-light); padding: 3px 9px;
  border-radius: 20px; margin-top: auto;
}

/* ── MAP CARDS ───────────────────────────────────────────────── */
.map-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); transition: all .2s;
  text-decoration: none; color: var(--text-1); height: 100%;
}
.map-card:hover {
  box-shadow: var(--sh-lg); transform: translateY(-4px);
  border-color: var(--brand-subtle); color: var(--text-1);
}
.map-card-top  { padding: 20px 20px 0; }
.map-card-body { padding: 14px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.map-card-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; color: var(--text-1); }
.map-card-desc  { font-size: 13px; color: var(--text-2); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.map-card-meta  {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--line-light);
}
.map-meta-item { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.map-meta-item b { color: var(--text-2); font-weight: 600; }
.map-card-features {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 20px; border-top: 1px solid var(--line-light);
}
.map-card-feature {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2); line-height: 1.4;
}
.map-card-feature-icon {
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
.map-card-cat-row {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 20px 0;
}
.map-card-cat-icon {
  font-size: 16px; line-height: 1;
}
.map-card-footer {
  background: var(--surface-alt); border-top: 1px solid var(--line);
  padding: 11px 20px; display: flex; align-items: center;
  justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--brand);
}

/* ── BADGES ──────────────────────────────────────────────────── */
.cat-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
}
.cb-health { background: #fff1f2; color: #be123c; }
.cb-seo    { background: #eff6ff; color: #1d4ed8; }
.cb-tech   { background: #f0fdf4; color: #166534; }
.cb-fin    { background: #fffbeb; color: #92400e; }
.cb-biz    { background: #fdf4ff; color: #7e22ce; }
.cb-life   { background: #fff7ed; color: #c2410c; }

.badge-info  { background: #eff6ff; color: #1d4ed8; font-size:11px; font-weight:700; padding:2px 8px; border-radius:20px; display:inline-block; }
.badge-comm  { background: #fef9c3; color: #854d0e; font-size:11px; font-weight:700; padding:2px 8px; border-radius:20px; display:inline-block; }
.badge-trans { background: #f0fdf4; color: #166534; font-size:11px; font-weight:700; padding:2px 8px; border-radius:20px; display:inline-block; }

/* ── EXPLAINER ───────────────────────────────────────────────── */
.explainer-visual {
  background: linear-gradient(135deg, var(--brand) 0%, #3b82f6 100%);
  border-radius: var(--r-lg); padding: 28px; color: #fff; box-shadow: var(--sh-lg);
}
.explainer-visual h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; opacity: .85; }
.explainer-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.explainer-row:last-child { border-bottom: none; }
.er-num {
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(255,255,255,.2); font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.er-title { font-size: 13px; font-weight: 600; }
.er-meta  { font-size: 11px; opacity: .65; margin-top: 2px; }

/* ── BENEFIT LIST ────────────────────────────────────────────── */
.benefit-list {
  list-style: none; padding: 0; margin: 24px 0;
  display: flex; flex-direction: column; gap: 13px;
}
.benefit-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--text-2); line-height: 1.5;
}
.benefit-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 1px;
}

/* ── STEP CARDS ──────────────────────────────────────────────── */
.step-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 24px;
  box-shadow: var(--sh-sm); height: 100%; position: relative;
}
.step-num  { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--text-3); text-transform: uppercase; margin-bottom: 16px; }
.step-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.step-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.step-connector { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-3); z-index: 1; }

/* ── CTA BAND ────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(140deg, #1a3fa8 0%, #2563eb 55%, #3b82f6 100%);
  padding: 80px 0; text-align: center; color: #fff;
}
.cta-band .section-title { color: #fff; margin-bottom: 14px; }

/* ── VIEW ALL LINK ───────────────────────────────────────────── */
.view-all-link {
  font-size: 14px; font-weight: 700; color: var(--brand);
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.view-all-link:hover { color: var(--brand-dark); }

/* ── PAGE HERO (inner pages) ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(170deg, #f0f5ff 0%, #ffffff 60%);
  padding: 56px 0 48px; border-bottom: 1px solid var(--line);
}

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb-nav  { font-size: 13px; }
.breadcrumb-list {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  color: var(--text-3);
}
.breadcrumb-list li + li::before { content: '/'; margin-right: 6px; color: var(--text-3); }
.breadcrumb-list a { color: var(--text-2); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--brand); }
.breadcrumb-list li[aria-current] { color: var(--text-1); font-weight: 600; }

/* ── TOPIC HEADER ────────────────────────────────────────────── */
.topic-header-wrap {
  background: linear-gradient(170deg, #f0f5ff 0%, #fff 65%);
  border-bottom: 1px solid var(--line); padding: 40px 0 0;
}
.topic-header { padding-bottom: 0; }
.topic-header-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.topic-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 400; line-height: 1.2; letter-spacing: -.3px;
  color: var(--text-1); margin: 0 0 12px;
}
.topic-title-suffix {
  color: var(--text-3); font-size: .7em;
  font-weight: 400; display: inline;
}
.topic-summary {
  font-size: 15px; color: var(--text-2); line-height: 1.75;
  max-width: 720px; margin: 0 0 28px;
}
.topic-stats-strip {
  display: flex; border-top: 1px solid var(--line);
  margin: 0 -24px; padding: 0 24px;
}
.topic-stat {
  flex: 1; padding: 16px 20px; border-right: 1px solid var(--line); text-align: center;
}
.topic-stat:last-child { border-right: none; }
.topic-stat-val   { display: block; font-size: 22px; font-weight: 900; color: var(--text-1); line-height: 1; }
.topic-stat-label { display: block; font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 4px; }

/* ── TAB BAR ─────────────────────────────────────────────────── */
.topic-tab-bar {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 64px; z-index: 900;
}
.topic-tab-bar .container { display: flex; }
.topic-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 16px 20px; font-size: 14px; font-weight: 600;
  color: var(--text-2); text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.topic-tab:hover { color: var(--brand); }
.topic-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── TOPIC LAYOUT (two-column) ───────────────────────────────── */
.topic-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px; align-items: start;
}
.topic-main  { min-width: 0; }
.topic-sidebar { position: sticky; top: 120px; }

/* ── PILLAR CARD ─────────────────────────────────────────────── */
.pillar-card {
  background: linear-gradient(135deg, var(--brand) 0%, #3b82f6 100%);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-md); margin-bottom: 24px; color: #fff;
}
.pillar-card-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 12px 22px; background: rgba(0,0,0,.15);
}
.pillar-badge {
  display: inline-block; background: #fff; color: var(--brand);
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
}
.pillar-card-body { padding: 20px 22px 24px; }
.pillar-title {
  font-size: 19px; font-weight: 700; margin: 10px 0 8px; line-height: 1.3; color: #fff;
}
.pillar-desc  { font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.6; margin: 0; }

/* ── CLUSTER SECTION ─────────────────────────────────────────── */
.cluster-section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.cluster-section-title {
  font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.cluster-count {
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
}
.cluster-legend {
  display: flex; gap: 14px; align-items: center;
}
.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
}

/* ── ARTICLE ROW ─────────────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-row {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--sh-sm); transition: box-shadow .15s, border-color .15s;
}
.article-row:hover { box-shadow: var(--sh-md); border-color: var(--brand-subtle); }
.article-order {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-alt); border: 1px solid var(--line);
  font-size: 12px; font-weight: 800; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.article-row-content { flex: 1; min-width: 0; }
.article-row-top {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.article-row-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.article-title {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--text-1); margin: 0 0 6px;
}
.article-desc  { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 8px; }
.article-query-row { display: flex; align-items: center; }
.article-query { font-size: 11px; color: var(--text-3); font-style: italic; }
.article-wc    { font-size: 11px; color: var(--text-3); font-weight: 600; }

/* Priority indicator */
.priority-dot   {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.priority-label { font-size: 11px; font-weight: 700; margin-left: 4px; }

/* ── WRITING ORDER TAB ───────────────────────────────────────── */
.order-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--line-light);
  transition: background .1s;
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { background: var(--surface-alt); }
.order-row-pillar { background: #eff6ff; }
.order-row-pillar:hover { background: #dbeafe; }
.order-step {
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--surface-alt); color: var(--text-3); border: 1px solid var(--line);
}
.order-step-pillar { background: var(--brand); color: #fff; border-color: var(--brand); }
.order-high   { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.order-medium { background: #fffbeb; color: #d97706; border-color: #fcd34d; }
.order-low    { background: var(--surface-alt); color: var(--text-3); border-color: var(--line); }
.order-row-body { flex: 1; min-width: 0; }
.order-title { font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.4; }

/* ── SIDEBAR CARDS ───────────────────────────────────────────── */
.sidebar-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--sh-sm); margin-bottom: 16px;
}
.sidebar-card:last-child { margin-bottom: 0; }
.sidebar-card-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-3); margin: 0 0 16px;
}
.sidebar-dl { display: flex; flex-direction: column; gap: 0; }
.sidebar-dl-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line-light);
  font-size: 13px;
}
.sidebar-dl-row dt { color: var(--text-2); font-weight: 500; }
.sidebar-dl-row dd { margin: 0; text-align: right; }

/* ── CATEGORIES PAGE: large cat cards ───────────────────────── */
.cat-card-lg {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
  text-decoration: none; color: var(--text-1);
  box-shadow: var(--sh-sm); transition: all .2s; height: 100%;
}
.cat-card-lg:hover {
  border-color: var(--brand); box-shadow: var(--sh-md);
  transform: translateY(-3px); color: var(--text-1);
}
.cat-card-lg-head {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px;
}
.cat-card-title   { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.cat-card-desc    { font-size: 13px; color: var(--text-2); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.cat-examples     { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cat-ex-chip      { font-size: 11px; background: var(--surface-alt); border: 1px solid var(--line); padding: 3px 9px; border-radius: 20px; color: var(--text-2); }
.cat-card-footer  { font-size: 13px; font-weight: 700; color: var(--brand); margin-top: auto; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination-wrap { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text-2); background: #fff; border: 1px solid var(--line);
  transition: all .15s;
}
.pg-btn:hover { border-color: var(--brand); color: var(--brand); }
.pg-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pg-active:hover { color: #fff; background: var(--brand-dark); }

/* ── btn-outline ─────────────────────────────────────────────── */
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--brand);
  font-size: 15px; font-weight: 700;
  padding: 12px 24px; border-radius: 10px;
  text-decoration: none; border: 2px solid var(--brand);
  transition: all .15s;
}
.btn-outline:hover { background: var(--brand); color: #fff; }

/* ── TAB PANEL transitions ───────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--line); padding: 20px 0; color: var(--text-2); }
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 12px; }
.footer-tagline { font-size: 13px; color: var(--text-2); line-height: 1.65; margin: 0; }
.footer-col-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 14px; color: var(--text-2); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--brand); }
.footer-divider { border: none; border-top: 1px solid var(--line); margin: 32px 0 20px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-3); }
.footer-bottom a { color: var(--text-3); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .section-wrap   { padding: 60px 0; }
  .col-lg-2, .col-lg-4, .col-lg-6, .col-lg-8 { width: 100%; }
  .step-connector { display: none; }
  .topic-layout   { grid-template-columns: 1fr; }
  .topic-sidebar  { position: static; }
  .topic-stats-strip { margin: 0 -24px; }
  .topic-stat-val { font-size: 18px; }
}
@media (max-width: 767px) {
  .section-wrap  { padding: 48px 0; }
  .hero          { padding: 40px 0 36px; }
  .col-md-4, .col-md-6 { width: 100%; }
  .stat-strip    { flex-wrap: wrap; }
  .stat-item     { min-width: 120px; }
  .nav-links     { display: none; }
  .cta-band      { padding: 56px 0; }
  .d-flex.justify-content-between { flex-direction: column; align-items: flex-start; }
  .topic-stats-strip { flex-wrap: wrap; }
  .topic-stat    { min-width: 50%; border-bottom: 1px solid var(--line); }
  .topic-tab     { padding: 12px 14px; font-size: 13px; }
  .col-sm-6      { width: 50%; }
}
@media (max-width: 480px) {
  .col-6         { width: 100%; }
  .col-sm-6      { width: 100%; }
  .search-wrap input  { padding-right: 120px; font-size: 15px; }
  .search-wrap button { padding: 9px 14px; font-size: 13px; }
  .topic-tab-bar .container { overflow-x: auto; }
  .article-row   { flex-direction: column; gap: 10px; }
  .article-order { width: 100%; height: auto; padding: 4px 10px; flex-direction: row; justify-content: flex-start; font-size: 11px; }
}
