@font-face {
  font-family: "Eco Sans";
  src: url("./fonts/eco-sans-regular.woff?v=6") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Eco Sans";
  src: url("./fonts/eco-sans-bold.woff?v=6") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --type: "Eco Sans", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --paper: #ffffff;
  --ink: #182131;
  --muted: #465264;
  --rule: #cdd6e2;
  --hairline: #e0e6ee;
  --surface: #f4f6f9;
  --selection: #edf3ff;
  --accent: #214d9a;
  --notice: #85431f;
  --series-59: #275bb2;
  --series-84: #a84f27;
  --purple: #604487;
  --ochre: #855512;
  --teal: #246b5c;
  font-family: var(--type);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: calc(59px + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { word-break: keep-all; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
button, select { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 2;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
}
.skip:focus { top: 12px; color: #fff; }
.page { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  padding: 24px 0 17px;
  border-bottom: 1px solid var(--rule);
}
.overline { color: var(--muted); font-size: 13px; font-weight: 700; }
h1 {
  margin-top: 3px;
  font-weight: 700;
  font-size: clamp(29px, 4.2vw, 42px);
  line-height: 1.2;
  letter-spacing: -.043em;
}
.deck { margin-top: 6px; color: var(--muted); font-size: 14px; word-break: keep-all; }
.edition { display: grid; gap: 4px; flex: 0 0 auto; padding-bottom: 2px; font-size: 13px; }
.edition > div { display: flex; justify-content: space-between; gap: 14px; }
.edition dt { color: var(--muted); }
.edition dd { white-space: nowrap; }
main section[id] { scroll-margin-top: 68px; margin-top: 32px; }
main section.view-panel { margin-top: 0; }
.datebar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; padding-block: 8px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.datebar label { font-size: 14px; font-weight: 700; }
.datebar select { min-width: 134px; min-height: 36px; }
.datebar p { color: var(--notice); font-size: 13px; }
.datebar p:empty { display: none; }
.month-controls { display: inline-flex; gap: 4px; align-items: center; }
.month-controls button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--accent); font-size: 22px; line-height: 1; }
.month-controls button:hover:not(:disabled) { background: var(--selection); }
.month-controls button:disabled { color: #8490a1; cursor: default; }
.method-link { margin-left: auto; color: var(--accent); font-size: 13px; white-space: nowrap; }
.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-height: 50px;
  padding-block: 7px;
  border-bottom: 1px solid var(--rule);
}
h2 { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.033em; }
.section-bar > p { color: var(--muted); font-size: 13px; }
.view-controls, .tabs, .period-control { display: flex; align-items: center; gap: 10px; }
.view-controls { flex-wrap: wrap; justify-content: end; gap: 8px 16px; }
.tabs { gap: 10px; }
.tabs button {
  padding: 5px 2px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--accent); }
.tabs button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.period-control { gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
select {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}
.comparison { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 25px; }
.plots { min-width: 0; }
.plot { padding-block: 11px 9px; }
.plot + .plot { border-top: 1px solid var(--hairline); }
.plot-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.plot-heading h3 { font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.025em; }
.plot-heading p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend span::before { content: ""; width: 16px; border-top: 2px solid currentColor; }
.legend .key-84::before, .legend .key-84 span::before, .legend .key-base span::before { border-top-style: dashed; }
.series-controls { gap: 0 12px; }
.series-controls label { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; cursor: pointer; }
.series-controls input { width: 15px; height: 15px; margin: 0; accent-color: var(--series); cursor: pointer; }
.price-controls { flex-basis: 100%; }
.price-controls label:has(input:not(:checked)) span { color: var(--muted); }
.price-controls label:has(input:not(:checked)) span::before { color: var(--series); opacity: .6; }
.key-59 { --series: var(--series-59); }
.key-84 { --series: var(--series-84); }
.key-national { --series: #53657a; }
.key-capital { --series: #246b5c; }
.key-seoul { --series: #604487; }
.key-gangnam { --series: #ad3963; }
.key-bogum { --series: var(--purple); }
.key-didim { --series: var(--ochre); }
.key-newborn { --series: var(--teal); }
.key-base { --series: #334761; }
.key-bond10 { --series: #21639a; }
.key-bogumRef { --series: #8e496e; }
.key-newbornRef { --series: #527345; }
.legend span { color: var(--series); }
.chart { display: block; width: 100%; margin-top: 5px; }
.price-chart { height: 176px; }
.rate-chart { height: 128px; }
.chart-grid { stroke: var(--hairline); stroke-width: 1; }
.chart-base { stroke: #7a8799; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis { fill: var(--muted); font-size: 12px; }
.chart-series { fill: none; stroke: var(--series); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart-series.key-84, .chart-series.key-base { stroke-dasharray: 5 4; }
.chart-selection { stroke: #61738b; stroke-width: 1; }
.chart-provisional { fill: #dce8fd; opacity: .65; }
.chart-dot { fill: var(--paper); stroke: var(--series); stroke-width: 1.6; }
.chart-selected { fill: var(--series); stroke: var(--paper); stroke-width: 1.6; }
.chart-selected.thin { fill: var(--paper); stroke: var(--series); stroke-width: 2; }
.chart-hit { fill: transparent; cursor: crosshair; }
.plot-note { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.6; word-break: keep-all; }
.rate-empty, .chart-empty { display: grid; place-items: center; min-height: 110px; color: var(--muted); font-size: 13px; }
.chart-empty { min-height: 176px; }
.benchmark-note { font-size: 12px; }
.ledger { padding: 13px 0 0 16px; border-left: 1px solid var(--rule); }
.ledger-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ledger-top > span { color: var(--muted); font-size: 13px; }
.ledger-top strong { font-size: 17px; white-space: nowrap; }
.ledger-price { border-bottom: 1px solid var(--hairline); padding: 9px 0 8px; }
.ledger-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ledger-line h3 { font-weight: 700; font-size: 14px; }
.ledger-line strong { font-size: 24px; line-height: 1.2; color: var(--series); }
.ledger-price p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.rate-ledger-title { margin-top: 11px; font-size: 16px; font-weight: 700; }
.benchmark-ledger-title { margin-top: 10px; font-size: 14px; font-weight: 700; }
.benchmark-price { padding-block: 6px; }
.benchmark-price .ledger-line strong { font-size: 20px; }
.rate-ledger { margin-top: 3px; }
.rate-ledger > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding-block: 6px; border-bottom: 1px solid var(--hairline); }
.rate-ledger dt { font-size: 13px; font-weight: 650; }
.rate-ledger dd { text-align: right; }
.rate-ledger dd strong { font-size: 16px; color: var(--series); }
.rate-ledger .rate-source { grid-column: 1 / -1; text-align: left; color: var(--muted); font-size: 12px; }
.history { border-top: 1px solid var(--rule); }
.history summary { width: fit-content; padding-block: 11px; font-size: 13px; font-weight: 680; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table th, table td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); text-align: right; white-space: nowrap; }
table th:first-child { text-align: left; }
table thead th { background: var(--surface); color: var(--muted); font-weight: 700; }
table tbody th { font-weight: 650; }
table tbody tr:hover { background: var(--surface); }
.history table { min-width: 820px; }
.muted { color: var(--muted); font-size: 12px; }
.view-note { margin: 12px 0 9px; color: var(--muted); font-size: 13px; line-height: 1.65; word-break: keep-all; }
.trade-table { min-width: 438px; }
.trade-table th[scope="row"] { font-weight: 400; }
.trade-group th { padding-top: 12px; text-align: left; border-top: 1px solid var(--rule); background: var(--surface); }
.trade-group small { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.trade-action { min-height: 30px; background: none; color: var(--accent); border: 0; padding: 3px 3px; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.trade-action:hover { color: var(--ink); }
.trade-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 0 12px; }
.whatif-action { white-space: nowrap; }
.loan-picker { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px 24px; padding: 15px 0 2px; }
.picker-field { display: flex; flex-direction: column; align-items: start; gap: 4px; max-width: 100%; min-width: 0; }
.picker-field label { font-size: 13px; font-weight: 700; }
.picker-field select { width: min(100%, 580px); text-overflow: ellipsis; }
#loan-price { font-size: clamp(20px, 3vw, 26px); font-weight: 700; line-height: 1.2; }
.loan-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.loan-product { min-width: 0; border-top: 2px solid var(--rule); padding-top: 12px; }
.loan-product h3 { font-size: 17px; font-weight: 700; }
.loan-payment { min-height: 113px; padding: 8px 0 12px; border-bottom: 1px solid var(--hairline); }
.loan-payment dt, .loan-metric dt { color: var(--muted); font-size: 13px; }
.loan-payment dd { display: grid; grid-template-columns: minmax(0, max-content) auto; justify-content: start; align-items: baseline; gap: 2px 9px; }
.loan-payment dd strong { color: var(--accent); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; }
.loan-payment small { color: var(--muted); font-size: 13px; }
.loan-unavailable { grid-column: 1 / -1; color: var(--notice); font-size: 14px; font-weight: 700; padding-top: 4px; }
.loan-metric { display: grid; grid-template-columns: minmax(86px, 1fr) minmax(0, 1.5fr); gap: 9px; padding-block: 9px; border-bottom: 1px solid var(--hairline); }
.loan-metric dd { text-align: right; font-size: 14px; overflow-wrap: anywhere; }
.loan-metric small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.loan-basis { margin-top: 13px; }
.loan-basis summary { width: fit-content; font-size: 13px; font-weight: 690; }
.loan-basis p { color: var(--muted); margin-top: 7px; font-size: 12px; line-height: 1.7; word-break: keep-all; }
.method > div { display: grid; grid-template-columns: 126px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; line-height: 1.75; }
.method dt { font-weight: 720; }
.method dd { color: var(--muted); word-break: keep-all; }
.method a { white-space: normal; }
.site-footer { margin-top: 34px; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-block: 15px; color: var(--muted); font-size: 12px; }
.bottom-nav { position: fixed; inset: auto 0 0; z-index: 1; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--paper); border-top: 1px solid var(--ink); }
.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabbar button { min-height: 50px; border: 0; border-top: 3px solid transparent; background: none; color: var(--muted); font-size: 14px; font-weight: 680; word-break: keep-all; }
.tabbar button + button { border-left: 1px solid var(--rule); }
.tabbar button[aria-selected="true"] { border-top-color: var(--accent); color: var(--accent); background: var(--selection); }
.tabbar button:hover { color: var(--accent); }
.tabbar button:focus-visible { outline-offset: -5px; }
.error { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--notice); color: var(--notice); font-size: 14px; }
.whatif-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; padding-top: 5px; }
.whatif-picker .picker-field select { width: 100%; }
.whatif-status { color: var(--notice); font-size: 13px; margin-block: 10px; line-height: 1.7; word-break: keep-all; }
.whatif-status:empty { display: none; }
.whatif-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-block: 12px 15px; }
.whatif-prices dt { font-size: 13px; color: var(--muted); }
.whatif-prices dd:not(.muted) { margin-top: 3px; font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; overflow-wrap: anywhere; }
.whatif-prices dd.muted { margin-top: 3px; line-height: 1.6; }
.whatif-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--rule); }
.whatif-metrics article { position: relative; min-width: 0; padding: 15px 20px; }
.whatif-metrics article:first-child { padding-left: 0; }
.whatif-metrics article + article { border-left: 1px solid var(--hairline); }
.metric-heading { display: flex; align-items: center; gap: 6px; }
.metric-heading h3 { font-size: 15px; }
.metric-value { margin-top: 6px; color: var(--accent); font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.metric-caption { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.7; word-break: keep-all; }
.metric-help summary { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 50%; color: var(--muted); background: var(--paper); font-size: 13px; font-weight: 700; list-style: none; }
.metric-help summary::-webkit-details-marker { display: none; }
.metric-help[open] summary { color: var(--accent); border-color: var(--accent); background: var(--selection); }
.metric-explanation { position: absolute; z-index: 4; top: 48px; left: 0; width: min(320px, 100%); padding: 14px; border: 1px solid var(--rule); background: var(--paper); box-shadow: 0 5px 18px #18213118; font-size: 13px; line-height: 1.75; word-break: keep-all; }
.metric-explanation p + p { margin-top: 8px; }
.metric-explanation button { display: block; margin: 8px 0 0 auto; min-height: 36px; border: 0; padding: 3px 9px; color: var(--accent); background: var(--selection); font-weight: 700; }
.whatif-plots { margin-top: 6px; }
.whatif-chart { height: 230px; }
.whatif-drop-chart { height: 130px; }
.whatif-chart .chart-series { stroke: var(--accent); stroke-width: 2; }
.whatif-drop-chart .chart-series { stroke: var(--series-84); }
.whatif-chart .scenario-estimated { stroke-dasharray: 4 4; }
.whatif-chart .chart-dot { stroke: var(--accent); fill: var(--accent); }
.whatif-chart .chart-dot.estimated { fill: var(--paper); }
.whatif-drop-chart .chart-dot { stroke: var(--series-84); fill: var(--series-84); }
.whatif-drop-chart .chart-dot.estimated { fill: var(--paper); }
.whatif-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.whatif-table { min-width: 510px; }
.whatif-table td:last-child { text-align: left; }
.whatif-method { margin-bottom: 10px; }
@media (max-width: 1040px) {
  .loan-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .page { width: calc(100% - 40px); }
  .comparison { grid-template-columns: minmax(0, 1fr) 205px; gap: 14px; }
  .ledger { padding-left: 12px; }
}
@media (max-width: 780px) {
  .loan-results { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .loan-payment { min-height: 0; }
}
@media (max-width: 680px) {
  .page { width: calc(100% - 30px); }
  main section[id] { scroll-margin-top: 96px; }
  .masthead { display: block; padding-block: 19px 13px; }
  .edition { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; }
  .edition > div { gap: 5px; }
  .month-controls button { width: 42px; height: 42px; }
  .datebar select { min-height: 42px; }
  .method-link { margin-left: 0; }
  h2 { font-size: 21px; }
  .view-controls { justify-content: start; gap: 8px 12px; }
  .price-controls { gap: 0 14px; }
  .series-controls label { min-height: 36px; }
  .comparison { display: block; }
  .price-chart { height: 176px; }
  .rate-chart { height: 136px; }
  .ledger { padding: 13px 0 12px; border-left: 0; border-top: 1px solid var(--rule); }
  .ledger-price p { font-size: 12px; }
  .tabbar { width: 100%; }
  .tabbar button { font-size: 13px; }
  .tabbar button { padding-inline: 3px; font-size: 12px; }
  .trade-actions { flex-direction: column; align-items: end; gap: 2px; }
  .trade-action { min-height: 32px; }
  .whatif-picker { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .whatif-prices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .whatif-prices > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: baseline; gap: 0 8px; }
  .whatif-prices dd.muted { grid-column: 2; }
  .whatif-metrics { grid-template-columns: minmax(0, 1fr); }
  .whatif-metrics article, .whatif-metrics article:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; padding: 12px 0; }
  .whatif-metrics article + article { border-left: 0; border-top: 1px solid var(--hairline); }
  .metric-value { margin-top: 0; font-size: 28px; }
  .metric-caption { grid-column: 1 / -1; margin-top: 0; }
  .metric-explanation { width: min(320px, 100%); top: 45px; }
  .loan-picker { gap: 12px; }
  .picker-field { width: 100%; }
  .trade-table { min-width: 318px; }
  .trade-table :is(th,td) { padding-inline: 6px; font-size: 12px; }
  .method > div { grid-template-columns: 1fr; gap: 3px; }
}
