:root {
  --radius: 8px;
  --button-radius: 4px;
  --subpage-max-width: 860px;
  --subpage-padding: 1.5rem;
}

/* ── Base layout for subpages ── */
.subpage-wrapper {
  min-height: 100dvh;
  width: 100%;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-main, ui-sans-serif, system-ui, sans-serif);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  overflow-x: hidden;
}

.subpage-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 76px;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.subpage-header-inner {
  width: 100%;
  max-width: var(--subpage-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.subpage-logo-link {
  text-decoration: none;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s;
}

.subpage-logo-link:hover {
  opacity: 0.8;
}

.subpage-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.subpage-nav a {
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding: 0 0.75rem;
  height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.15s, color 0.15s;
}

.subpage-nav a:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.subpage-nav a.active {
  background-color: var(--muted);
  color: var(--foreground);
}

/* ── Main content container ── */
.subpage-main {
  width: 100%;
  max-width: var(--subpage-max-width);
  margin: 0 auto;
  padding: 2.5rem var(--subpage-padding) 4rem;
}

/* ── Page title (h1) ── */
.subpage-h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 48px;
  letter-spacing: -0.2px;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  max-width: 640px;
}

.subpage-subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--muted-foreground);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

/* ── Section headings ── */
.subpage-h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.2px;
  color: var(--foreground);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.subpage-h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

/* ── Body text ── */
.subpage-body p {
  font-size: 14px;
  line-height: 20px;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.subpage-body p + p {
  margin-top: 0.25rem;
}

.subpage-body a {
  color: var(--accent-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-style: dashed;
  transition: color 0.15s;
}

.subpage-body a:hover {
  color: var(--primary);
  text-decoration-style: solid;
}

/* ── Divider ── */
.subpage-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

/* ── Q&A list ── */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qa-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.qa-item:first-child {
  border-top: 1px solid var(--border);
}

.qa-question {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05px;
}

.qa-answer {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted-foreground);
  margin: 0;
}

.qa-answer a {
  color: var(--accent-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}

.qa-answer a:hover {
  color: var(--primary);
}

/* ── Info page sections ── */
.info-section {
  margin-bottom: 2.5rem;
}

.info-section:last-of-type {
  margin-bottom: 0;
}

.info-section p {
  font-size: 14px;
  line-height: 20px;
  color: var(--foreground);
  margin-bottom: 0.875rem;
}

.info-section a {
  color: var(--accent-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-style: dashed;
  transition: color 0.15s;
}

.info-section a:hover {
  color: var(--primary);
  text-decoration-style: solid;
}

/* ── Feature / highlight cards ── */
.info-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 48rem) {
  .info-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  transition: background-color 0.15s;
}

.info-card:hover {
  background-color: var(--accent);
}

.info-card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

.info-card-text {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--muted-foreground);
  margin: 0;
}

/* ── Strategy badge ── */
.subpage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.05px;
  padding: 2px 8px;
  border-radius: calc(var(--radius) - 2px);
  white-space: nowrap;
  border: 1px solid transparent;
}

.subpage-badge--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.subpage-badge--muted {
  background-color: var(--muted);
  color: var(--muted-foreground);
}

.subpage-badge--accent {
  background-color: rgba(8, 101, 82, 0.1);
  color: var(--accent-foreground);
}

/* ── Back / Home button ── */
.subpage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 36px;
  padding: 0 0.625rem;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border-radius: var(--button-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s, opacity 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  outline: none;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
}

.subpage-btn:active {
  transform: scale(0.98);
}

.subpage-btn--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.subpage-btn--primary:hover {
  background-color: color-mix(in oklab, var(--primary) 90%, transparent);
}

.subpage-btn--secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.subpage-btn--secondary:hover {
  background-color: color-mix(in oklab, var(--secondary) 90%, transparent);
}

/* ── Breadcrumb / inline nav bar ── */
.subpage-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.subpage-breadcrumb a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}

.subpage-breadcrumb a:hover {
  color: var(--foreground);
}

.subpage-breadcrumb-sep {
  color: var(--border);
  font-size: 12px;
}

/* ── Footer ── */
.subpage-footer {
  width: 100%;
  padding: 1.5rem var(--subpage-padding);
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 20px;
}

.subpage-footer-inner {
  max-width: var(--subpage-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .subpage-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.subpage-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  min-height: 36px;
  align-items: center;
}

.subpage-footer-nav a {
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 20px;
  transition: color 0.15s;
}

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

.subpage-footer-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Numbers / stats strip ── */
.subpage-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  margin: 1.5rem 0;
}

@media (min-width: 48rem) {
  .subpage-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.subpage-stat {
  background-color: var(--card);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.subpage-stat-value {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.2px;
  color: var(--foreground);
}

.subpage-stat-label {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--muted-foreground);
  letter-spacing: 0.05px;
}

/* ── Utility: muted text ── */
.subpage-muted {
  color: var(--muted-foreground);
}

/* ── Utility: sr-only ── */
.subpage-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive padding ── */
@media (min-width: 48rem) {
  :root {
    --subpage-padding: 2rem;
  }

  .subpage-main {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }

  .subpage-h1 {
    font-size: 36px;
  }
}

@media (max-width: 47.9rem) {
  .subpage-nav {
    display: none;
  }

  .subpage-h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .subpage-h2 {
    font-size: 20px;
    line-height: 28px;
  }
}