:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #14b8a6;
  --line: #e2e8f0;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--text);
  color: #ffffff;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero & Above-the-Fold Tool */
.hero {
  padding-top: 24px;
  padding-bottom: 48px;
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-lead {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 66ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.engage-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.engage-btn[data-gf-liked],
.engage-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: #eff6ff;
  color: var(--accent);
}

.engage-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.engage-btn[data-gf-liked] .engage-count {
  color: var(--accent);
}

.share-msg {
  font-size: 13px;
  color: #0f766e;
  font-weight: 600;
}

/* Key Facts Summary Panel */
.facts-panel {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.facts-title {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}

.facts-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}

.fact-item {
  margin: 0;
}

.fact-item dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.fact-item dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.fact-item dd a {
  font-weight: 600;
}


/* Sections — explicit base vertical padding for desktop + mobile */
.section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.section-surface {
  background: var(--card);
}

.section-head {
  margin-bottom: 32px;
}

.kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prose {
  margin: 0 0 16px;
  max-width: 70ch;
  color: var(--muted);
  font-size: 16px;
}

.prose:last-child {
  margin-bottom: 0;
}

/* Visual Example Diagrams */
.diagram-card {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.diagram-card img {
  width: 100%;
  border-radius: 6px;
}

.diagram-card figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.diagram-spaced {
  margin-top: 32px;
}

/* Step Rail (Numbered Horizontal Timeline — NOT boxed cards) */
.step-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-item {
  border-top: 2px solid var(--accent);
  padding-top: 20px;
}

.step-num {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.step-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text);
}

.step-item p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* Asymmetric Split: Prose + Spec Table */
.split-spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}

.spec-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spec-table thead th {
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.spec-table tbody tr:last-child td {
  border-bottom: 0;
}

.spec-table td {
  color: var(--muted);
}

.spec-table td strong {
  color: var(--text);
}

/* 2x2 Architectural Use-Case Grid */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.case-cell {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-cell h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text);
}

.case-cell p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.case-tag {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f766e;
}

/* FAQ Accordion */
.faq-list {
  max-width: 780px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 18px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  flex: none;
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--accent);
}

.faq-answer {
  padding-bottom: 18px;
}

.faq-answer p {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 16px;
}

/* Inner & Legal Pages */
.doc-section {
  border-top: 0;
  background: var(--card);
}

.doc-container {
  max-width: 780px;
}

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

.doc-section h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.doc-lead,
.doc-meta {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--muted);
}

.doc-body h2 {
  margin: 32px 0 12px;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text);
}

.doc-body p,
.doc-body li {
  color: #334155;
  max-width: 70ch;
}

.doc-body ul,
.doc-body ol {
  padding-left: 20px;
}

.doc-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
}

.cta-link:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: 48px 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.footer-col {
  max-width: 40ch;
}

.footer-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 24px;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 20px;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .step-rail {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .split-spec {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .facts-panel {
    padding: 16px;
  }
  .facts-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .container {
    padding-inline: 16px;
  }
  .topbar-inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .nav {
    gap: 16px;
  }
  .hero {
    padding-top: 16px;
    padding-bottom: 32px;
  }
  .hero h1,
  .doc-section h1 {
    font-size: 28px;
  }
  .section {
    padding-block: 48px;
  }
  .section h2 {
    font-size: 22px;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .cta-link {
    width: 100%;
    justify-content: center;
  }
}


/* Layout mode links, inline guide links, inner-page FAQ, and multi-column footer */
.mode-links {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mode-links li {
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mode-links a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.inline-guide-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.doc-faq {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.doc-faq h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text);
}

.doc-faq + .doc-cta {
  border-top: 0;
  padding-top: 0;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}

.footer-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-group a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.footer-group a:hover {
  color: var(--text);
}

/* Compact tool-cluster list before FAQ */
.cluster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cluster-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cluster-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.cluster-desc {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 68ch;
}

.cluster-arrow {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 900px) {
  .mode-links {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cluster-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
  }
  .cluster-desc {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-cols {
    gap: 24px 40px;
  }
}
