/* Unified modern light design system for Homepage, Blog, and Editorial Reader pages. */
:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted-2: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --panel: #f8fafc;
  --panel-alt: #f1f5f9;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --emerald: #059669;
  --emerald-dark: #065f46;
  --emerald-soft: #ecfdf5;
  --emerald-border: #a7f3d0;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --amber-ink: #92400e;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 56px -16px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(15, 23, 42, 0.06);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.product-page {
  background: #ffffff;
  color: var(--ink);
  --product-ink: #0f172a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --muted: #475569;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font: 650 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.kicker-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-dark);
  font: 650 12px/1.35 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  text-transform: none;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
  flex: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-band {
  position: relative;
  background:
    radial-gradient(900px 420px at 50% -60px, rgba(37, 99, 235, 0.08), transparent 70%),
    radial-gradient(600px 360px at 85% 10%, rgba(5, 150, 105, 0.06), transparent 65%),
    #ffffff;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 76px) clamp(52px, 6.5vw, 84px);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4.5vw, 48px);
}

.hero-header {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.hero-header h1 {
  font-size: clamp(38px, 5.2vw, 66px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0;
}

html[lang="zh-Hans"] .hero-header h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.hero-header h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 64ch;
  margin: 20px auto 0;
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 660;
  line-height: 1.3;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--panel);
  border-color: #94a3b8;
  color: var(--ink);
}

.hero-trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted-2);
}

.hero-trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-strip svg {
  width: 15px;
  height: 15px;
  color: var(--emerald);
  flex: none;
}

/* ==========================================================================
   Interactive Product Stage (Hero Showcase)
   ========================================================================== */
.stage-card {
  max-width: 1040px;
  width: 100%;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.stage-window-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stage-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.stage-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #e2e8f0;
  border-radius: 10px;
}

.stage-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font: 620 13px/1.3 system-ui, -apple-system, sans-serif;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.stage-tab:hover {
  color: var(--ink);
}

.stage-tab[aria-selected="true"] {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1.3 var(--mono);
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 4px 10px;
  border-radius: 999px;
}

.stage-panel {
  padding: clamp(16px, 2.5vw, 28px);
  background:
    radial-gradient(#cbd5e1 1px, transparent 1px),
    #f8fafc;
  background-size: 18px 18px;
}

.stage-panel[hidden] {
  display: none;
}

.stage-figure {
  margin: 0;
}

.stage-shot-link {
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
}

.stage-shot-link img {
  display: block;
  width: 100%;
  height: auto;
}

.stage-shot-popup {
  padding: clamp(20px, 3vw, 36px);
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.stage-shot-popup img {
  width: auto;
  max-width: 100%;
  max-height: 440px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.stage-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.stage-shot-link:hover .stage-zoom-hint {
  opacity: 1;
}

.stage-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

.stage-caption a {
  color: var(--brand);
  font-weight: 640;
}

.stage-caption a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Local-First Architecture Section (Core Highlight #1)
   ========================================================================== */
.section-block {
  padding-block: clamp(56px, 7vw, 92px);
}

.section-surface {
  background: var(--panel);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--ink);
}

html[lang="zh-Hans"] .section-head h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.section-head p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.local-architecture {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 3.5vw, 42px);
  border-radius: 20px;
  background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 55%, #eff6ff 100%);
  border: 1px solid #d1fae5;
  box-shadow: var(--shadow-md);
}

.local-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.local-pillars li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.local-pillars li strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 2px;
}

.local-pillars svg {
  width: 18px;
  height: 18px;
  color: var(--emerald);
  flex: none;
  margin-top: 2px;
}

.arch-diagram {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.arch-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.arch-node-local {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.arch-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--brand);
  flex: none;
}

.arch-node-local .arch-icon {
  color: var(--emerald);
  border-color: var(--emerald-border);
}

.arch-icon svg {
  width: 20px;
  height: 20px;
}

.arch-node strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.arch-node span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 11.5px/1.2 var(--mono);
  color: var(--muted-2);
}

.arch-blocked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12.5px;
  font-weight: 600;
}

.arch-blocked span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fee2e2;
}

/* ==========================================================================
   Feature Bento Grid (Full Archive, Background Download, Formats, etc.)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bento-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.bento-wide {
  grid-column: span 3;
}

.bento-featured {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-color: #cbd5e1;
}

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}

.bento-icon-emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.bento-icon svg {
  width: 21px;
  height: 21px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.status-tag-blue {
  background: var(--brand-soft);
  color: #1d4ed8;
  border: 1px solid var(--brand-border);
}

.status-tag-emerald {
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  border: 1px solid var(--emerald-border);
}

.status-tag-amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border: 1px solid var(--amber-border);
}

.bento-card h3 {
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

.bento-card p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.bento-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.bento-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bento-list li::before {
  content: "✓";
  color: var(--emerald);
  font-weight: 750;
  flex: none;
}

.bento-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--amber-ink);
}

.bento-link {
  margin-top: auto;
  padding-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 660;
}

.bento-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Interactive 5-Format Sample Explorer
   ========================================================================== */
.format-explorer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.format-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.format-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-soft);
  font: 650 13px/1.3 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.format-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.format-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.format-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(20px, 3.5vw, 40px);
  padding: clamp(20px, 3vw, 34px);
  align-items: center;
}

.format-panel[hidden] {
  display: none;
}

.format-meta h3 {
  font-size: 24px;
  font-weight: 760;
  color: var(--ink);
  margin: 10px 0 0;
}

.format-meta p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.format-specs {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.format-specs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-specs li::before {
  content: "•";
  color: var(--brand);
  font-weight: 900;
}

.format-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.format-preview-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.format-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  font: 600 12px/1.3 var(--mono);
  color: var(--muted-2);
}

.format-preview-pdf {
  display: block;
  padding: 18px 24px 0;
  max-height: 360px;
  overflow: hidden;
  background: #e2e8f0;
}

.format-preview-pdf img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

.format-code {
  margin: 0;
  padding: 18px;
  font: 500 12.5px/1.65 var(--mono);
  color: #1e293b;
  background: #ffffff;
  overflow-x: auto;
  white-space: pre;
}

.format-doc-card {
  padding: 22px;
  background: #ffffff;
  display: grid;
  gap: 14px;
}

.format-doc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.format-doc-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.format-doc-row strong {
  color: var(--ink);
}

.format-doc-row span {
  color: var(--ink-soft);
  text-align: right;
}

/* ==========================================================================
   4-Step Workflow
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  position: relative;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font: 750 13px/1 var(--mono);
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 730;
  color: var(--ink);
}

.step-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ==========================================================================
   SEO-Optimized Interactive FAQ
   ========================================================================== */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.faq-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  appearance: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-soft);
  font: 600 13px/1.3 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.faq-toggle-all {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-soft);
  padding: 7px 13px;
  border-radius: 8px;
  font: 600 12.5px/1.3 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}

.faq-toggle-all:hover {
  background: var(--panel);
  color: var(--ink);
}

.faq-accordion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item[hidden] {
  display: none;
}

.faq-item[open] {
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 660;
  line-height: 1.45;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  content: "";
}

.faq-item .faq-plus {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--panel-alt);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  flex: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.faq-item[open] .faq-plus {
  transform: rotate(45deg);
  background: var(--brand-soft);
}

.faq-item .faq-answer {
  padding: 0 20px 18px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-soft);
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.faq-item .faq-answer p {
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-soft);
}

.faq-item .faq-answer p + p {
  margin-top: 10px;
}

.faq-item .faq-answer a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Final CTA Banner
   ========================================================================== */
.cta-banner {
  margin-block: clamp(44px, 6vw, 72px) 20px;
  padding: clamp(32px, 5vw, 52px);
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}

.cta-banner h2 {
  color: #ffffff;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 780;
  letter-spacing: -0.035em;
  margin: 0;
}

.cta-banner p {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 15.5px;
  max-width: 54ch;
  line-height: 1.6;
}

.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-banner .btn-primary {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-banner .btn-primary:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.cta-banner .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cta-banner .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* ==========================================================================
   Blog Framework & Editorial Reader
   ========================================================================== */
.blog-hero {
  padding-block: clamp(44px, 6vw, 72px) clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.blog-hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.blog-hero .lede {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-block: 24px 20px;
}

.blog-count {
  font-size: 13px;
  color: var(--muted-2);
  font-weight: 560;
}

.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.blog-featured:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-lg);
}

.blog-featured[hidden] {
  display: none;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 12px;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #1d4ed8;
  font-weight: 660;
  font-size: 12px;
}

.blog-featured h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 780;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

.blog-featured p {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--ink-soft);
}

.blog-featured-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.blog-featured-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.blog-card[hidden] {
  display: none;
}

a.blog-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card-planned {
  background: var(--panel);
  border-style: dashed;
}

.blog-card h3 {
  font-size: 18px;
  font-weight: 730;
  line-height: 1.32;
  color: var(--ink);
  margin: 4px 0 0;
}

.blog-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.blog-card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 640;
  color: var(--brand);
}

.blog-card-planned .blog-card-footer {
  color: var(--muted-2);
}

.blog-section-title {
  margin: 44px 0 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-section-title h2 {
  font-size: 22px;
  font-weight: 750;
  color: var(--ink);
}

.blog-section-title span {
  font-size: 13.5px;
  color: var(--muted-2);
}

.blog-empty {
  padding: 36px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted-2);
  font-size: 14.5px;
}

.blog-empty[hidden] {
  display: none;
}

/* Editorial Reader (Article & Guide pages) */
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(36px, 5vw, 64px);
}

.reader {
  max-width: 760px;
  padding-block: clamp(36px, 5vw, 68px);
}

.article-shell .reader {
  padding-block: 0;
  max-width: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.reader header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 28px;
}

.reader h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.reader .lede {
  margin-top: 14px;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.reader h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 36px 0 12px;
}

.reader p,
.reader li {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.reader li + li,
.reader p + p {
  margin-top: 12px;
}

.reader p a,
.reader strong a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 12px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  font-size: 14.5px;
  line-height: 1.65;
  color: #1e3a8a;
}

.callout-emerald {
  border-left-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--emerald-dark);
}

.toc-sidebar {
  position: sticky;
  top: var(--header-offset, 96px);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.toc-sidebar h2 {
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  margin: 0 0 12px;
}

.toc-sidebar ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc-sidebar a {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.toc-sidebar a:hover {
  color: var(--brand);
}

.article-footer-box {
  margin-top: 40px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.article-footer-box h3 {
  font-size: 18px;
  margin: 0;
}

.article-footer-box p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ==========================================================================
   Examples Page: Live Side-by-Side Preview Stage
   ========================================================================== */
.examples-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}

.examples-preview-col {
  min-width: 0;
}

.examples-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.examples-panel[hidden] {
  display: none;
}

.examples-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.examples-panel-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.examples-raw-link {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.examples-raw-link:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.examples-pdf-body {
  display: block;
  position: relative;
  padding: 20px;
  background: #e2e8f0;
  max-height: 600px;
  overflow: auto;
}

.examples-pdf-body img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

.examples-code-body {
  margin: 0;
  padding: 20px;
  max-height: 600px;
  overflow: auto;
  font: 500 12.5px/1.65 var(--mono);
  color: #1e293b;
  background: #ffffff;
  white-space: pre-wrap;
  word-break: break-word;
}

.examples-sheet-wrap {
  padding: 20px;
  background: #edf1f7;
  max-height: 600px;
  overflow: auto;
}

.examples-sheet {
  background: #ffffff;
  border: 1px solid #d5dde9;
  border-radius: 8px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 16px;
  color: var(--ink);
}

.examples-sheet-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.examples-sheet-head h3 {
  font-size: 20px;
  margin: 0;
  color: var(--ink);
}

.examples-sheet-head span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-2);
  font-family: var(--mono);
}

.examples-turn-label {
  display: inline-block;
  font: 700 11px/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 6px;
}

.examples-turn-label.is-model {
  color: var(--emerald-dark);
}

.examples-sheet p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.examples-math-box {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
  font: 600 13.5px/1.5 Georgia, "Times New Roman", serif;
  color: var(--ink);
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.examples-table th,
.examples-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.examples-table th {
  background: var(--panel);
  font-weight: 680;
  color: var(--ink);
}

.examples-mini-code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font: 500 12px/1.55 var(--mono);
  overflow-x: auto;
}

.examples-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.examples-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  font: 600 11.5px/1.3 var(--mono);
  color: var(--ink-soft);
}

.examples-panel-foot {
  padding: 11px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}

.examples-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 22px 18px;
}

.examples-selector {
  appearance: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.examples-selector:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.examples-selector:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.examples-selector[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.examples-selector-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  font-weight: 660;
  color: var(--ink);
}

.examples-selector[aria-selected="true"] .examples-selector-label {
  color: #1d4ed8;
}

.examples-selector-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.examples-bundle-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.examples-bundle-note a {
  color: var(--brand);
  font-weight: 640;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .examples-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .examples-copy-col {
    order: -1;
  }
}

/* ==========================================================================
   Native Lightbox Dialog
   ========================================================================== */
.lightbox-dialog {
  max-width: min(94vw, 1240px);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.lightbox-dialog::backdrop {
  background: rgba(15, 23, 42, 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 13.5px;
  font-weight: 640;
  color: var(--ink);
}

.lightbox-close {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  padding: 5px 11px;
  font: 650 13px/1.2 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--panel-alt);
}

.lightbox-body {
  padding: 16px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  max-height: calc(92vh - 54px);
  overflow: auto;
}

.lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 86px);
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1020px) {
  .local-architecture,
  .format-panel,
  .blog-featured {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento-card,
  .bento-wide {
    grid-column: span 3;
  }
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 760px) {
  .bento-card,
  .bento-wide {
    grid-column: span 6;
  }
  .local-pillars,
  .faq-accordion,
  .steps-grid,
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-window-dots {
    display: none;
  }
  .stage-toolbar {
    justify-content: center;
  }
  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .bento-card,
  .blog-card,
  .faq-item .faq-plus {
    transition: none !important;
  }
}
