/* ---------- intro ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.lead {
  max-width: 44rem;
  font-size: clamp(1.02rem, 1.3vw, 1.12rem);
  line-height: 1.85;
  color: var(--ink-2);
}

/* ---------- sections ---------- */
.section {
  margin-top: 46px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-h) + 78px);
}

.section:first-of-type {
  margin-top: 34px;
  padding-top: 0;
  border-top: 0;
}

.section.is-title {
  padding-top: 30px;
}

.section > h2 {
  position: relative;
  margin-bottom: 20px;
  padding-left: 16px;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  bottom: 0.42em;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
}

.prose {
  max-width: 44rem;
  margin-bottom: 18px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--ink-2);
}

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

/* ---------- bars ---------- */
.bars {
  display: grid;
  gap: 22px;
  margin: 26px 0;
  list-style: none;
}

.bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.bar-label {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
}

.bar-value {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a9486, #86bfb3);
  transition: width 0.6s ease;
}

.bar.is-emphasis .bar-fill {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

.bar.is-emphasis .bar-value {
  color: var(--accent-deep);
}

/* ---------- callout ---------- */
.callout {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
}

.callout-lead {
  margin-bottom: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.callout p {
  line-height: 1.8;
  color: var(--ink-2);
}

.callout.is-info {
  border-left-color: var(--warm);
  background: var(--warm-soft);
}

.callout.is-info .callout-lead {
  color: var(--warm);
}

/* ---------- flow ---------- */
.flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 26px 0;
}

.flow-node {
  flex: 1 1 0;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.flow-node h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
  font-weight: 700;
}

.flow-node p {
  font-size: 0.86rem;
  color: var(--muted);
}

.flow-edge {
  flex: 0 0 auto;
  align-self: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.flow-edge::after {
  content: "→";
  margin-left: 5px;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 640px) {
  .flow {
    flex-direction: column;
  }

  .flow-edge {
    align-self: flex-start;
    margin-left: 22px;
  }

  .flow-edge::after {
    content: "↓";
  }
}

/* ---------- steps ---------- */
.steps {
  margin: 24px 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
}

.steps li + li {
  border-top: 1px dashed var(--line);
}

.step-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step-body h3 {
  margin: 2px 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.step-body p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- points ---------- */
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
  list-style: none;
}

.points li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.points h3 {
  margin-bottom: 6px;
  font-size: 0.96rem;
  font-weight: 700;
}

.points p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 640px) {
  .points {
    grid-template-columns: 1fr;
  }
}

/* ---------- props ---------- */
.props {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.prop-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 12px 18px;
}

.prop-row + .prop-row {
  border-top: 1px solid var(--line);
}

.props dt {
  font-size: 0.84rem;
  color: var(--muted);
}

.props dd {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 520px) {
  .prop-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.case-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.case-card > h3 {
  margin-bottom: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
}

.quotes {
  display: grid;
  gap: 10px;
  list-style: none;
}

.quote {
  position: relative;
  margin: 0;
  padding: 11px 14px 11px 26px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.quote q {
  quotes: none;
}

.quote::before {
  content: "“";
  position: absolute;
  left: 8px;
  top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  line-height: 1.4;
  color: var(--accent);
  opacity: 0.45;
}

/* ---------- formulas ---------- */
.formulas {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.formulas-lead {
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.formula-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.formula-list li + li {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.formula-name {
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.formula-text {
  font-size: 0.93rem;
  line-height: 1.8;
  color: var(--ink-2);
}

.slot {
  display: inline-block;
  margin: 0 2px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.88em;
}

/* ---------- table ---------- */
.table-scroll {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

thead th {
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.7;
  color: var(--ink-2);
}

tbody tr:first-child td {
  border-top: 0;
}

tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

.cell-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.05em;
}

@media (max-width: 640px) {
  .table-scroll {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  table {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: block;
  }

  tbody tr {
    display: block;
    margin-bottom: 12px;
    padding: 6px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }

  tbody td {
    display: block;
    padding: 9px 16px;
    border-top: 0;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--muted);
  }

  tbody td:first-child {
    padding-top: 12px;
  }
}

/* ---------- split ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.split-side {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.split-side h3 {
  margin-bottom: 8px;
  font-size: 0.96rem;
  font-weight: 700;
}

.split-side ul {
  display: grid;
  gap: 4px;
  padding-left: 1.1em;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink-2);
}

.split-side.is-good {
  border-color: transparent;
  background: var(--accent-soft);
}

.split-side.is-good h3 {
  color: var(--accent-ink);
}

.split-side.is-flat {
  background: var(--surface-2);
}

.split-side.is-flat h3 {
  color: var(--muted);
}

@media (max-width: 640px) {
  .split {
    grid-template-columns: 1fr;
  }
}