/* ==========================================================================
   돈나무 복리계산기 — 전역 스타일
   팔레트: 딥그린(브랜드) + 라임(성장) + 웜그레이(본문)
   ========================================================================== */

:root {
  --green: #194b3b;
  --green-soft: #497448;
  --lime: #c8e79e;
  --line: #e4e8df;
  --muted: #758079;
  --bg: #f8f9f5;
  --ink: #243b31;

  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; }

button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { color: inherit; transition: background .18s, color .18s, transform .18s; }
button:hover { filter: brightness(.96); }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid #8fae58;
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  border: 0; overflow: hidden; white-space: nowrap; clip: rect(0, 0, 0, 0);
}
.skip { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 15px; background: #fff; }
.skip:focus { top: 10px; }
.mobile-only { display: none; }

/* --------------------------------------------------------------- 헤더 */
header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex; align-items: center; gap: 76px;
  max-width: 1232px; height: 84px; margin: auto; padding: 0 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 800; letter-spacing: -1px; white-space: nowrap;
}
.brand-sub { margin-left: 10px; color: #788279; font-size: 13px; font-weight: 500; letter-spacing: -.4px; }
nav { display: flex; align-items: center; gap: 30px; height: 100%; font-size: 13px; }
nav a { position: relative; display: flex; align-items: center; height: 100%; color: #7a817b; }
.nav-active { color: var(--green); font-weight: 700; }
.nav-active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--green); }
.header-note { margin-left: auto; color: #8a938b; font-size: 12px; }
.header-note span { margin-left: 12px; color: var(--green); }

main { max-width: 1232px; margin: 0 auto; padding: 0 24px; }

/* ----------------------------------------------------------------- 히어로 */
.hero {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 290px; padding: 50px 14px 38px; overflow: hidden;
}
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  color: #647863; font-size: 10px; font-weight: 700; letter-spacing: 2px;
}
.eyebrow > span { width: 6px; height: 6px; border-radius: 100%; background: #7e9c54; }
h1 { margin: 19px 0 15px; font-size: 43px; font-weight: 750; line-height: 1.35; letter-spacing: -2.3px; }
h1 span { color: #578454; }
.hero p { margin: 0; color: #6f7c65; font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; font-size: 12px; font-weight: 700; }
.hero-primary {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 12px 15px; border-radius: 8px; background: var(--green); color: #fff;
}
.hero-primary span { font-size: 15px; }
.hero-secondary { color: #527150; text-decoration: underline; text-underline-offset: 4px; }

/* 히어로 일러스트: 자라나는 막대 + 돈나무 */
.hero-art { position: relative; flex-shrink: 0; width: 385px; height: 228px; margin-right: 60px; }
.bar { position: absolute; bottom: 20px; z-index: 1; width: 54px; border-radius: 10px 10px 0 0; }
.bar1 { left: 54px;  height: 43px;  background: #e3e9d8; }
.bar2 { left: 120px; height: 76px;  background: #d3dfbd; }
.bar3 { left: 186px; height: 116px; background: #b7ce98; }
.bar4 { left: 252px; height: 168px; background: #315d46; }
.bar4 svg {
  position: absolute; top: -44px; left: -9px; width: 70px; height: 80px;
  fill: #b7cf8a; stroke: #d5e8b3; stroke-width: 2px; stroke-linejoin: round;
}
.art-baseline { position: absolute; bottom: 19px; left: 20px; width: 324px; height: 1px; background: #dce3d2; }
.art-orbit {
  position: absolute; bottom: -42px; left: 85px; width: 260px; height: 260px;
  border: 1px dashed #dbe4cf; border-radius: 50%;
}
.orbit-two { bottom: -87px; left: 40px; width: 350px; height: 350px; border-color: #e9ece2; }
.growth-label {
  position: absolute; top: 17px; left: 5px; z-index: 2;
  padding: 11px 15px; border: 1px solid #e6eadd; border-radius: 30px;
  background: #fff; color: #66765d; font-size: 11px; box-shadow: 0 3px 12px #31452105;
}
.growth-label span { margin-left: 12px; color: #4b7441; }

/* ------------------------------------------------------------- 광고 영역 */
.ad-slot {
  max-width: 970px; min-height: 120px; margin: 34px auto 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.ad-label { margin: 0 0 8px; color: #9aa394; text-align: center; font-size: 10px; }
.ad-placeholder {
  display: grid; place-items: center; min-height: 76px; padding: 12px;
  border: 1px dashed #ccd5c5; border-radius: 7px; background: #f7f9f4;
  color: #7a8972; text-align: center; font-size: 11px;
}

/* ------------------------------------------------------ 계산기 상단 / 탭 */
.workspace-top { display: flex; justify-content: space-between; align-items: center; margin: 15px 0 20px; }
.mode-tabs {
  display: flex; gap: 4px; padding: 5px;
  border: 1px solid #e4e7dd; border-radius: 12px; background: #eceedf;
}
.mode-tabs button {
  padding: 12px 23px; border: 0; border-radius: 8px;
  background: none; color: #808675; font-size: 16px; white-space: nowrap;
}
.mode-tabs button span { margin-left: 7px; font-size: 14px; font-weight: 600; }
.mode-tabs button[aria-selected="true"] { background: #fff; color: #23513b; box-shadow: 0 2px 5px #3448220c; }
.text-button { padding: 8px; border: 0; background: none; color: #7a8479; font-size: 12px; }
.text-button span { padding-right: 4px; font-size: 18px; }

.calculator-grid {
  display: grid; grid-template-columns: 345px minmax(0, 1fr);
  align-items: start; gap: 22px;
}

/* --------------------------------------------------------- 입력 카드 */
.input-card, .chart-card, .yearly-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.input-card { padding: 25px; }
.card-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.5px; }

.field { margin-bottom: 24px; }
.field label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 12px; font-weight: 600;
}
.label-note { color: #92998d; font-size: 10px; font-weight: 400; }
.input-wrap {
  display: flex; align-items: center; gap: 6px; min-height: 47px; padding: 0 13px;
  border: 1px solid #dfe4da; border-radius: 8px; background: #fff;
}
.input-wrap:focus-within { border-color: #70935b; box-shadow: 0 0 0 2px #b6d09535; }
.input-wrap input {
  width: 100%; min-width: 0; padding: 10px 0; border: 0; background: none;
  color: #2c4236; font-size: 19px; font-weight: 650; text-align: right;
  font-variant-numeric: tabular-nums; outline: none !important;
}
.input-wrap input::-webkit-inner-spin-button,
.input-wrap input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type="number"] { appearance: textfield; }
.input-wrap span { color: #86907f; font-size: 12px; white-space: nowrap; }
.field small { display: block; margin-top: 7px; color: #809274; font-size: 10px; line-height: 1.6; }

.quick-add, .rate-presets { display: flex; gap: 6px; margin-top: 10px; }
.quick-add button, .rate-presets button {
  flex: 1; padding: 7px 2px; border: 1px solid #e8ece2; border-radius: 5px;
  background: #f8faf5; color: #78856d; font-size: 10px;
}
.rate-presets button.active { border-color: #9bb880; background: #edf3e4; color: #3e6540; }

.field input[type="range"] { width: 100%; height: 4px; margin: 15px 0 0; accent-color: #315f3f; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; margin-top: 9px; color: #91988b; font-size: 9px; }

select {
  width: 100%; padding: 12px; border: 1px solid #dfe4da; border-radius: 7px;
  background: #fff; color: #364c3f; font-size: 12px;
}

.advanced { margin-top: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { display: flex; justify-content: space-between; padding: 17px 0; font-size: 12px; list-style: none; }
.advanced summary span { color: #7f8b75; font-size: 15px; }
.advanced-body { padding-top: 7px; }
.advanced .field:last-child { margin-bottom: 16px; }
details[open] > summary > span { transform: rotate(45deg); }

.save-row { display: flex; align-items: center; gap: 8px; margin-top: 23px; }
.save-row > button:first-child {
  flex: 1; padding: 13px 12px; border: 0; border-radius: 8px;
  background: var(--green); color: #fff; font-size: 12px;
}
.save-row > button:first-child span { margin-left: 15px; }
.local-note { margin: 13px 0 0; color: #92998f; text-align: center; font-size: 10px; }
#form-error { padding: 10px; border-radius: 6px; background: #fff2ec; color: #a33427; font-size: 11px; line-height: 1.7; }

/* ------------------------------------------------------------ 결과 카드 */
.results { display: flex; flex-direction: column; gap: 19px; }
.results.stale { opacity: .55; }
.result-card {
  position: relative; padding: 27px 30px 23px; border-radius: 16px;
  background: var(--green); color: #fff; overflow: hidden;
}
.result-card::after {
  content: ""; position: absolute; top: -100px; right: -100px;
  width: 250px; height: 250px; border: 1px solid #ffffff08; border-radius: 50%; pointer-events: none;
}
.result-top { display: flex; justify-content: space-between; align-items: center; color: #c7d7c7; font-size: 13px; }
.live-badge {
  display: flex; align-items: center; gap: 5px; padding: 6px 8px;
  border: 1px solid #ffffff16; border-radius: 5px; background: #ffffff0d;
  color: #d0deb9; font-size: 9px;
}
.live-badge i { width: 4px; height: 4px; border-radius: 100%; background: #c5e198; }
.result-value {
  min-height: 57px; margin-top: 18px; font-size: 40px; font-weight: 700;
  line-height: 1.3; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.result-value .currency { font-size: 22px; font-weight: 400; letter-spacing: -.5px; }
.result-sub { min-height: 22px; margin: 9px 0 24px; color: #b1c8ad; font-size: 11px; }
.result-sub b { color: #d6ebad; font-weight: 600; }
.result-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding-top: 20px; border-top: 1px solid #ffffff1c;
}
.result-stats > div { display: flex; flex-direction: column; gap: 9px; }
.result-stats span { color: #b6cbb8; font-size: 10px; }
.result-stats span small { margin-left: 4px; font-size: 8px; opacity: .75; }
.result-stats strong { display: block; min-height: 24px; font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.result-stats > div:nth-child(2) strong { color: #d3eaaa; }
.ratio-bar { height: 6px; margin-top: 25px; border-radius: 10px; background: #c8e4a1; overflow: hidden; }
.ratio-bar span { display: block; height: 100%; background: #759284; }
.ratio-labels { display: flex; justify-content: space-between; margin-top: 10px; color: #b8cbb9; font-size: 9px; }
.ratio-labels > span:last-child { color: #d2e7ad; }
.ratio-labels b { margin-left: 5px; font-weight: 400; }

/* 목표 금액 / 은퇴 준비 모드 결과 */
.mode-result { padding: 22px 25px; border: 1px solid #cbd9b9; border-radius: 12px; background: #eff3e5; }
.mode-result h2 { margin-bottom: 14px; font-size: 14px; }
.mode-result strong { color: #356037; font-size: 26px; letter-spacing: -1px; }
.mode-result p { margin: 9px 0 0; color: #6e7e60; font-size: 12px; line-height: 1.8; }
.mode-result button {
  margin-top: 13px; padding: 9px 13px; border: 1px solid #9cb488;
  border-radius: 6px; background: #fff; font-size: 11px;
}

/* --------------------------------------------------------------- 그래프 */
.chart-card { padding: 25px 27px 20px; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chart-heading p, .section-title p { margin: 8px 0 0; color: #6f7c65; font-size: 11px; }
.segmented { display: flex; flex-shrink: 0; padding: 3px; border-radius: 6px; background: #f3f5ef; }
.segmented button { padding: 7px 9px; border: 0; border-radius: 4px; background: none; color: #899181; font-size: 10px; }
.segmented button[aria-pressed="true"] { background: #fff; color: #3f6643; box-shadow: 0 1px 4px #1b3b1210; }
.chart-legend { display: flex; align-items: center; gap: 19px; margin: 25px 0 5px; color: #7d8777; font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; }
.legend-total { background: #3e734b; }
.legend-principal { background: #bfccad; }
.chart-legend .chart-unit { margin-left: auto; color: #a3ab9b; font-size: 9px; }
.chart { width: 100%; min-height: 265px; height: auto; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: #96a08d; font-family: inherit; font-size: 10px; }
.chart-scrub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 16px; color: #7e8a73; font-size: 9px;
}
.chart-scrub label { white-space: nowrap; }
.chart-scrub input { flex: 1; width: 80px; min-width: 50px; height: 3px; accent-color: #386543; }
.chart-scrub output { color: #486444; font-size: 10px; white-space: nowrap; }
.insight { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 8px; background: #f3f7ec; }
.insight-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 25px; height: 25px;
  border-radius: 50%; background: #e5edd7; color: #507441;
}
.insight p { margin: 0; color: #71835d; font-size: 11px; line-height: 1.6; }
.insight b { color: #436836; }

/* ------------------------------------------------------- 수익률 시나리오 */
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title > span { color: #8c9484; font-size: 10px; }
.scenario-section .section-title { padding: 4px 1px 14px; }
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.scenario { padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.scenario.selected { border-color: #b9cda3; background: #eef3e6; }
.scenario-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: #839078; font-size: 10px; }
.scenario.selected .scenario-top { color: #5a7a40; }
.scenario-rate { margin: 12px 0 7px; color: #41533b; font-size: 18px; font-weight: 700; }
.scenario strong { color: #5c6b53; font-size: 14px; letter-spacing: -.3px; }
.fine-print { margin: 10px 0 0; color: #949b8f; font-size: 9px; line-height: 1.7; }

/* --------------------------------------------------------- 연도별 표 */
.yearly-card { margin-top: 24px; padding: 24px 27px; }
.outline-button {
  padding: 10px 13px; border: 1px solid #dfe4d8; border-radius: 7px;
  background: #fff; font-size: 11px; white-space: nowrap;
}
.yearly-card summary {
  display: flex; justify-content: space-between; margin-top: 22px; padding: 17px 0 0;
  border-top: 1px solid var(--line); color: #6f7d63; font-size: 12px; list-style: none;
}
.table-scroll { max-height: 460px; margin-top: 20px; overflow: auto; }
table {
  width: 100%; border-collapse: collapse; font-size: 11px;
  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
caption { padding-bottom: 14px; color: #8b9483; text-align: left; font-size: 10px; }
th { position: sticky; top: 0; background: #f3f6ee; color: #6c7c5f; font-weight: 500; }
td, th { padding: 14px 12px; border-bottom: 1px solid #edf0e7; }
td:first-child, th:first-child { text-align: left; }
tbody tr:last-child { background: #f7faf2; color: #29573d; font-weight: 700; }

/* ------------------------------------------------------- 가이드 안내 블록 */
.learn-section {
  margin: 50px 0 20px; padding: 30px;
  border: 1px solid var(--line); border-radius: 15px; background: #fff;
}
.learn-section h2 { margin: 12px 0; font-size: 25px; }
.learn-section > p { color: #50634f; line-height: 1.8; }
.learn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 23px; }
.learn-grid a { display: block; padding: 22px; border: 1px solid #e2e8d9; border-radius: 10px; background: #f4f7ee; }
.learn-grid h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.5; }
.learn-grid p { margin: 0 0 13px; color: #526448; font-size: 14px; line-height: 1.8; }
.learn-grid span { color: #2d5c3e; font-size: 13px; font-weight: 700; }
.trust-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 22px 0 0; }
.trust-links a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------- 가이드/FAQ */
.guide { padding: 64px 2px 45px; }
.guide > .eyebrow { color: #8b987e; font-size: 9px; letter-spacing: 1.8px; }
.guide > h2 { margin: 13px 0 29px; font-size: 24px; letter-spacing: -1px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; margin-bottom: 40px; }
.guide-number { color: #7e9670; font-size: 9px; letter-spacing: 1px; }
h3 { margin: 15px 0 10px; font-size: 14px; letter-spacing: -.3px; }
.guide-grid p { margin: 0; color: #6f7c65; font-size: 12px; line-height: 1.95; word-break: keep-all; }
.guide-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  color: #456b42; font-size: 11px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px;
}
.guide-link span { font-size: 14px; text-decoration: none; }
.guide .editorial-note { margin-top: 24px; color: #53634d; line-height: 1.9; }
.guide .editorial-note a, .noscript a { text-decoration: underline; }

.faq { border-top: 1px solid #e0e6d8; }
.faq details { border-bottom: 1px solid #e0e6d8; }
.faq summary { display: flex; justify-content: space-between; padding: 18px 0; font-size: 12px; list-style: none; }
.faq summary span { color: #8c9a80; }
.faq p { max-width: 970px; margin: 0 0 18px; color: #748268; font-size: 12px; line-height: 1.95; }
.faq a { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- 푸터 */
footer { display: flex; align-items: center; gap: 24px; padding: 26px 0 34px; border-top: 1px solid #dfe5d7; }
footer .brand { font-size: 17px; }
footer p { color: #8d9884; font-size: 11px; }
footer > span { margin-left: auto; color: #929d89; font-size: 9px; letter-spacing: .7px; }
footer nav { gap: 14px; height: auto; font-size: 10px; }
footer nav a {
  position: static; height: auto; color: #71806d;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ----------------------------------------------------------------- 토스트 */
#toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 50;
  width: max-content; max-width: calc(100% - 32px); padding: 13px 22px;
  border-radius: 9px; background: #243f31; color: #fff; font-size: 12px;
  opacity: 0; pointer-events: none; transform: translate(-50%, 20px);
  transition: opacity .2s, transform .2s; box-shadow: 0 5px 30px #12352030;
}
#toast.visible { opacity: 1; transform: translate(-50%); }
.noscript { padding: 30px; background: #fff1df; text-align: center; }

/* ======================================================== 본문(읽기) 페이지 */
.content-page .header-inner { gap: 40px; }
.content-page header nav { margin-left: auto; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; height: auto; margin: 30px 0; font-size: 13px; line-height: 1.8; }
.breadcrumbs a { color: var(--green); text-decoration: underline; }
.breadcrumbs [aria-current] { color: #55645a; }

.reading { max-width: 850px; margin: 45px auto 65px; }
.reading h1 { font-size: 40px; line-height: 1.4; letter-spacing: -1.6px; word-break: keep-all; overflow-wrap: anywhere; }
.article-lead { color: #3d5546; font-size: 19px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.article-meta { padding-bottom: 24px; border-bottom: 1px solid var(--line); color: #5d6f61; font-size: 13px; }
.article-body { color: #304837; font-size: 16px; line-height: 1.95; }
.article-body h2 { margin: 42px 0 16px; font-size: 25px; line-height: 1.5; letter-spacing: -.6px; word-break: keep-all; }
.article-body h3 { margin-top: 28px; font-size: 19px; }
.article-body p { margin: 16px 0; }
.article-body a, .reading-next li a, .reading > ul a { color: #225c40; text-decoration: underline; text-underline-offset: 4px; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin: 9px 0; }
.article-body code { padding: 2px 5px; border-radius: 4px; background: #eef2e7; font-size: .94em; overflow-wrap: anywhere; }
.article-body pre { padding: 18px; border-radius: 8px; background: #eef2e7; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-body table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { padding: 12px 14px; border: 1px solid #d8e1d1; text-align: left; white-space: normal; }
.article-body th { background: #eef2e7; }
.article-body caption { margin-bottom: 10px; caption-side: top; color: #3d5546; text-align: left; font-weight: 700; }
.article-body .table-scroll { max-height: none; overflow-x: auto; }
.article-body .callout, .article-body blockquote {
  margin: 24px 0; padding: 16px 20px; border-left: 3px solid #749351;
  border-radius: 0 8px 8px 0; background: #edf3e5;
}
.article-body .formula { padding: 18px; border-radius: 8px; background: #edf3e5; font-family: Consolas, monospace; overflow-wrap: anywhere; }
.reading-next { margin-top: 40px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.reading-next h2 { margin-top: 0; font-size: 21px; }
.reading-next ul { padding-left: 20px; line-height: 2.2; }
.reading-next .hero-primary { display: inline-flex; margin-top: 10px; }
.content-page footer { flex-wrap: wrap; gap: 24px; }
.content-page footer nav { flex-wrap: wrap; height: auto; }
.content-page footer nav a { height: auto; }
.content-page footer .brand-sub { display: none; }

/* ============================================================== 반응형 */
@media (width >= 1400px) {
  .hero { min-height: 315px; }
  .header-inner { height: 88px; }
}

@media (width <= 1000px) {
  .header-inner { gap: 35px; }
  .header-note { display: none; }
  .hero h1 { font-size: 38px; }
  .hero-art { margin-right: 0; transform: scale(.85); transform-origin: 100%; }
  .calculator-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
  .input-card { padding: 22px; }
  .result-card { padding: 24px; }
  .result-value { font-size: 32px; }
  .result-stats { gap: 10px; }
  .result-stats strong { font-size: 13px; }
  .result-stats span small { display: block; margin: 4px 0 -4px; }
  .chart-card { padding: 22px; }
  .chart-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .chart { min-height: 150px; }
  .scenario { padding: 14px 12px; }
  .scenario strong { font-size: 12px; }
  .scenario-top { font-size: 9px; }
}

@media (width <= 720px) {
  main { padding: 0 18px; }
  .mobile-only { display: block; }
  .header-inner { justify-content: space-between; gap: 15px; height: 68px; padding: 0 18px; }
  .brand { gap: 8px; font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .brand-sub { margin-left: 7px; font-size: 10px; }
  nav { gap: 16px; font-size: 11px; }
  header nav a:nth-child(2), header nav a:nth-child(3) { display: none; }

  .hero { position: relative; min-height: 235px; padding: 30px 0 28px; }
  .hero > div:first-child { z-index: 2; }
  .hero h1 { margin: 15px 0 11px; font-size: 33px; letter-spacing: -1.8px; }
  .hero p { font-size: 11px; }
  .hero .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
  .hero-actions { gap: 13px; margin-top: 17px; font-size: 10px; }
  .hero-primary { padding: 10px 12px; border-radius: 7px; }
  .hero-primary span { font-size: 12px; }
  .hero-art {
    position: absolute; right: -6px; bottom: 5px;
    opacity: .85; pointer-events: none; transform: scale(.43); transform-origin: 100% 100%;
  }
  .hero-art .orbit-two, .growth-label { display: none; }

  .workspace-top { gap: 8px; margin: 8px 0 15px; }
  .mode-tabs { flex: 1; justify-content: space-between; gap: 2px; padding: 4px; }
  .mode-tabs button { display: flex; justify-content: center; align-items: center; padding: 10px 6px; font-size: 14px; }
  .mode-tabs button span { margin-left: 3px; font-size: 11px; }
  #share { padding: 5px; font-size: 10px; white-space: nowrap; }

  .calculator-grid { grid-template-columns: 1fr; gap: 17px; }
  .input-card { padding: 22px; }
  .card-heading { margin-bottom: 20px; }
  .input-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 17px; }
  .field { margin-bottom: 21px; }
  /* 반쪽 칸에서 라벨이 "수익 / 률"처럼 끊기지 않게: 라벨은 한 줄, 메모만 다음 줄로 */
  .field label { flex-wrap: wrap; gap: 2px 6px; font-size: 11px; white-space: nowrap; }
  .label-note { white-space: normal; }
  .field input, .field select { font-size: 16px; }
  .input-wrap { min-height: 45px; padding: 0 10px; }
  .input-wrap input { font-size: 18px; }
  .label-note, .quick-add button { font-size: 8px; }
  .rate-presets button { padding: 7px 0; }
  .advanced, .save-row, .local-note, #form-error, .mode-field { grid-column: 1 / -1; }
  .mode-field .field { margin-top: 6px; }
  .advanced-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .advanced-body .field:last-child { grid-column: 1 / -1; }
  .save-row { margin-top: 18px; }
  .local-note { margin-top: 12px; }

  .result-card { padding: 24px; }
  .result-value { min-height: 50px; font-size: 35px; }
  .result-stats strong { font-size: 14px; }
  .result-stats span { font-size: 9px; }
  .result-stats span small { display: inline; margin-left: 3px; }

  .chart-card { padding: 22px 18px 17px; }
  .chart-heading { flex-direction: row; align-items: center; gap: 8px; }
  .chart-heading h2 { font-size: 14px; }
  .chart-heading p { font-size: 10px; }
  .segmented button { padding: 7px; font-size: 9px; }
  .chart, #chart { min-height: 220px; }
  .chart-scrub output { font-size: 9px; }

  .section-title h2 { font-size: 15px; }
  .section-title > span, .section-title p { font-size: 9px; }
  .scenarios { gap: 8px; }
  .scenario { padding: 15px 12px; }
  .scenario-rate { font-size: 18px; }
  .yearly-card { margin-top: 19px; padding: 22px 18px; }
  .outline-button { padding: 9px; font-size: 10px; }

  .learn-section { padding: 22px 18px; }
  .learn-grid { grid-template-columns: 1fr; }
  .guide { padding-top: 43px; }
  .guide > h2 { margin-bottom: 25px; font-size: 21px; line-height: 1.5; }
  .guide-grid { grid-template-columns: 1fr; gap: 22px; }
  .guide-grid article { padding-bottom: 20px; border-bottom: 1px solid #e7ebdf; }
  .guide-grid article:last-child { padding-bottom: 0; border: 0; }
  .guide-grid h3 { margin-top: 10px; }
  .faq summary { gap: 15px; font-size: 12px; }

  footer { flex-wrap: wrap; gap: 12px; padding: 23px 0; }
  footer nav { flex-wrap: wrap; order: 3; gap: 8px 14px; width: 100%; }
  footer nav a:nth-child(n) { display: flex; }
  footer p { order: 4; width: 100%; margin: 0; font-size: 10px; }
  footer > span { font-size: 8px; }

  .content-page .header-inner {
    flex-wrap: wrap; gap: 14px; height: auto; min-height: 78px;
    padding-top: 15px; padding-bottom: 15px;
  }
  .content-page header nav { display: flex; gap: 16px; height: auto; font-size: 12px; }
  .content-page header nav a:nth-child(n) { display: flex; }
  .content-page .brand-sub { display: none; }
  .content-page footer nav { gap: 15px; }
  .content-page footer nav a:nth-child(n) { display: flex; }
  .breadcrumbs { margin: 22px 0; }
  .reading { margin-top: 30px; }
  .reading h1 { font-size: 30px; letter-spacing: -1px; }
  .article-lead { font-size: 17px; }
  .article-body { font-size: 15px; line-height: 1.9; }
  .article-body h2 { font-size: 22px; }
  .article-body table { font-size: 12px; }
  .article-body th, .article-body td { padding: 9px 7px; }
  .reading-next { padding: 20px; }
}

@media (width <= 370px) {
  .brand-sub { display: none; }
  .hero h1 { font-size: 30px; }
  .hero-art { opacity: .5; }
  .workspace-top { flex-wrap: wrap; }
  .mode-tabs { flex-basis: 100%; }
  #share { margin-left: auto; }
  .result-value { font-size: 30px; }
  .result-stats strong { font-size: 12px; }
  .chart-heading { flex-direction: column; align-items: flex-start; }
  .scenarios { gap: 5px; }
  .scenario { padding: 12px 9px; }
  .scenario strong { font-size: 11px; }
  .quick-add { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition: none !important; animation: none !important; }
}
