/* Layout: inputs left (sticky) + results right; a full-width scenario section below with the table first and the chart under it. */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #121a23;
  --muted: #5a6774;
  --line: #d6dde4;
  --grid: #e6eaef;
  --accent: #1f4fd1;
  --accent-soft: #e4eafb;
  --accent-wash: #f3f6fd;
  --bar: #1f4fd1;
  --good: #17784a;
  --danger: #b42318;

  --font-sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, sans-serif;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1318;
    --surface: #161d24;
    --ink: #e8edf2;
    --muted: #93a1ae;
    --line: #27323c;
    --grid: #212a33;
    --accent: #85a6ff;
    --accent-soft: #1b2748;
    --accent-wash: #18202d;
    --bar: #5f86f2;
    --good: #5fd39a;
    --danger: #ff8a80;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 40px 32px;
  display: grid;
  gap: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.masthead {
  display: grid;
  gap: 6px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 40em;
  color: var(--muted);
}

/* Layout */
.main {
  display: grid;
  gap: 20px;
}

.layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
  }

  .inputs {
    position: sticky;
    top: 24px;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

/* Inputs */
.inputs {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.custom-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.control input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 12px 14px;
  outline: none;
}

.control input::placeholder {
  color: var(--muted);
  opacity: 0.7;
  font-weight: 400;
}

.control-sm input {
  font-size: 1rem;
  padding: 8px 12px;
}

.unit {
  padding-right: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.control-sm .unit {
  padding-right: 12px;
  font-size: 0.875rem;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.field.is-empty .control {
  border-color: var(--danger);
}

.field.is-empty .hint {
  color: var(--danger);
}

.text-button {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Results */
.results {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.hero {
  display: grid;
  gap: 4px;
  padding-block: 28px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-label {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.hero-figure {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.hero-figure #monthly {
  min-width: 0;
}

.won {
  font-size: 0.42em;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0;
}

.hero-approx {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  min-height: 1.6em;
}

.formula {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
}

.stat dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat dd {
  margin: 0;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stat-note {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Goal */
.goal {
  display: grid;
  gap: 10px;
}

.goal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.goal-control {
  flex: 0 1 200px;
  min-width: 150px;
}

.goal-control input {
  text-align: right;
}

.meter {
  height: 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.goal.is-reached .meter > span {
  background: var(--good);
}

.goal-progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.goal-progress strong {
  color: var(--ink);
}

.goal.is-reached .goal-progress strong {
  color: var(--good);
}

.goal-text {
  margin: 0;
  font-size: 0.95rem;
}

.goal-text strong {
  font-weight: 700;
}

/* Scenario section */
.scenario {
  display: grid;
  gap: 20px;
}

.scenario-head {
  display: grid;
  gap: 4px;
}

.section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 48em;
}

.scenario-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 28px;
  padding: 16px;
  border-radius: 12px;
  background: var(--accent-wash);
}

.chips {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.chips legend,
.custom-field label {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.chips legend {
  float: left;
  width: 100%;
}

.chip-row {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  cursor: pointer;
}

/* Visually hidden but still focusable; the label toggles it. */
.chip input,
.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.chip span {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover span {
  border-color: var(--accent);
  color: var(--ink);
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.custom-field {
  display: grid;
  flex: 0 1 240px;
  min-width: 180px;
}

.custom-field label {
  margin-bottom: 8px;
}

.custom-field .control {
  background: var(--surface);
}

/* Comparison table */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.compare th,
.compare td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface);
}

.compare thead th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg);
}

.compare tbody tr:last-child td,
.compare tbody tr:last-child th {
  border-bottom: 0;
}

.compare th:first-child,
.compare td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--line);
}

.compare .num {
  text-align: right;
}

.compare .col-key {
  color: var(--ink);
}

.compare td.key {
  font-weight: 800;
  font-size: 1rem;
}

.compare tr.is-current td {
  background: var(--accent-wash);
}

.compare .muted {
  color: var(--muted);
}

.compare .up {
  color: var(--good);
  font-weight: 600;
}

.compare .down {
  color: var(--danger);
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4em;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-current {
  background: var(--accent);
  color: var(--surface);
}

.tag-custom {
  background: transparent;
  border: 1px solid var(--accent);
}

.tag-goal {
  background: transparent;
  border: 1px dashed var(--ink);
  color: var(--ink);
}

/* Chart */
.chart-block {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.chart-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.chart-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.segmented {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
}

.segmented label {
  cursor: pointer;
}

.segmented span {
  display: block;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chart {
  position: relative;
  min-width: 0;
}

.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.chart .grid-line {
  stroke: var(--grid);
  stroke-width: 1;
}

.chart .baseline {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .axis-text {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart .x-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.chart .x-label.is-current {
  font-weight: 800;
}

.chart .x-sub {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart .bar {
  fill: var(--bar);
  transition: opacity 0.15s;
}

.chart .bar.is-goal {
  fill: var(--accent-soft);
  stroke: var(--bar);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.chart .cap {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart .hover-band {
  fill: var(--accent-wash);
}

.chart .hit {
  fill: transparent;
  cursor: pointer;
}

.chart .goal-line {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.chart .goal-label {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.chart .goal-label-bg {
  fill: var(--surface);
}

.chart .empty-text {
  fill: var(--muted);
  font-size: 13px;
}

.tooltip {
  position: absolute;
  z-index: 2;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.14);
  font-size: 0.82rem;
  pointer-events: none;
}

.tooltip-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.tooltip dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 16px;
}

.tooltip dt {
  color: var(--muted);
  white-space: nowrap;
}

.tooltip dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.tooltip dd.is-metric {
  color: var(--accent);
}

/* Site header */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--bg);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 28px 36px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.disclaimer-text {
  margin: 0;
  max-width: 62em;
}

.disclaimer-text strong {
  color: var(--ink);
  margin-right: 6px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 6px;
}

.footer-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copyright {
  margin: 0;
}

/* Links in running text */
.hint a,
.prose a:not(.button):not(.link-card) {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* Share */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.share-button svg {
  width: 16px;
  height: 16px;
}

.share-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-status {
  color: var(--good);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Ads */
.ad-slot {
  display: grid;
  gap: 4px;
  min-height: 120px;
  margin-block: 8px;
}

.ad-label {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* Show the "광고" label only once AdSense has actually placed an ad */
.ad-slot:has(ins.adsbygoogle[data-ad-status="filled"]) .ad-label {
  display: block;
}

/* Long-form content */
.content-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.prose {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  margin: 1.8em 0 0.6em;
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 700;
}

.prose > h2:first-child,
.prose > h2:first-of-type:is(:first-child),
.content-section > h2:first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1em;
  max-width: 44em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose .answer {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
}

.formula-box {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody th {
  font-weight: 700;
  white-space: nowrap;
}

.data-table .num {
  text-align: right;
  white-space: nowrap;
}

.prose .table-scroll {
  margin-bottom: 1.2em;
  border: 0;
  border-radius: 0;
}

.glossary {
  margin: 0;
  display: grid;
  gap: 12px;
}

.glossary div {
  display: grid;
  gap: 2px;
}

.glossary dt {
  font-weight: 700;
}

.glossary dd {
  margin: 0;
  color: var(--muted);
}

.faq {
  display: grid;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 16px 32px 16px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq details p {
  margin: 0 0 16px;
  color: var(--muted);
}

.related {
  display: grid;
  gap: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.guide-list {
  display: grid;
  gap: 12px;
  margin-block: 8px 24px;
}

.link-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.link-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.link-card-title {
  font-weight: 700;
  line-height: 1.45;
}

.link-card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Article pages */
.wrap-article {
  max-width: 780px;
}

.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.article-head {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.article-head h1 {
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.article-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 4px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.cta {
  display: grid;
  gap: 6px;
  margin-block: 28px;
  padding: 22px;
  border-radius: 12px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
}

.cta p {
  margin: 0;
}

.cta-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.related-inline {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.related-inline h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.related-inline ul {
  margin: 0;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg);
  overflow-wrap: anywhere;
}

.contact-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.not-found .not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 480px) {
  .wrap {
    padding-block: 28px 24px;
  }

  .panel {
    padding: 20px;
  }

  .scenario {
    padding: 20px 16px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .content-section,
  .article {
    padding: 22px 18px;
  }

  .site-nav a {
    padding: 6px 10px;
  }

  .segmented {
    width: 100%;
  }

  .segmented label {
    flex: 1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Hide ad slots AdSense could not fill, so no empty box is left behind */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}
