:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #626a73;
  --line: #dfe5ea;
  --green: #0f766e;
  --green-soft: #dff5f1;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --orange: #b45309;
  --orange-soft: #fff3e2;
  --shadow: 0 16px 36px rgba(23, 23, 23, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    system-ui,
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 248, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
}

.nav a:hover {
  background: var(--panel);
  color: var(--ink);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.intro,
.quick-panel,
.tool-card,
.info-block,
.ad-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro {
  padding: clamp(22px, 4vw, 34px);
}

.eyebrow,
.tool-kicker,
.panel-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.quick-panel {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.quick-panel strong {
  display: block;
  max-width: 260px;
  font-size: 26px;
  line-height: 1.18;
}

.mini-bars {
  display: grid;
  height: 84px;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mini-bars span {
  display: block;
  min-height: 12px;
  border-radius: 6px 6px 0 0;
  background: var(--green);
}

.mini-bars span:nth-child(2) {
  background: var(--blue);
}

.mini-bars span:nth-child(3) {
  background: var(--orange);
}

.mini-bars span:nth-child(4) {
  background: var(--ink);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.tool-card {
  padding: 20px;
}

.tool-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tool-heading h2,
.info-block h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.tool-heading a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-grid input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.form-grid input[type="number"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.check-row {
  grid-column: 1 / -1;
  display: flex !important;
  min-height: 40px;
  align-items: center;
  gap: 10px !important;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.result-grid div {
  min-height: 88px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
}

.result-grid small,
.result-grid strong {
  display: block;
}

.result-grid small {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-grid strong {
  font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: keep-all;
}

.visual-split {
  display: flex;
  height: 22px;
  overflow: hidden;
  border-radius: 6px;
  background: #e7ecef;
}

.visual-split span {
  display: block;
  min-width: 2px;
  transition: width 180ms ease;
}

.principal {
  background: var(--green);
}

.interest {
  background: var(--blue);
}

.debt {
  background: var(--orange);
}

.content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  margin-top: 18px;
}

.info-block,
.ad-slot {
  padding: 22px;
}

.info-block ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.info-block li + li {
  margin-top: 8px;
}

.ad-slot {
  background: var(--orange-soft);
  box-shadow: none;
}

.ad-slot span {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 850;
}

.ad-slot strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.22;
}

.ad-slot p {
  margin-bottom: 0;
  color: #70420b;
  font-size: 14px;
}

.panel-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 16px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.method-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.method-panel h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.method-panel p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.method-panel > a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--ink);
  font-weight: 750;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.policy-page {
  max-width: 820px;
}

.policy-page h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.policy-section {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.policy-section h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.policy-section p,
.policy-section li {
  color: var(--muted);
}

.hub-page {
  max-width: 1120px;
}

.hub-lede {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
}

.hub-search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.hub-search-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.hub-search-panel input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  outline: none;
}

.hub-search-panel input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.hub-search-panel p {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.hub-nav-grid,
.dataset-grid,
.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.mini-card,
.dataset-card,
.detail-card,
.program-card,
.reference-card,
.update-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mini-card,
.dataset-card,
.detail-card,
.reference-card,
.update-item {
  padding: 18px;
}

.mini-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.mini-card strong,
.dataset-card strong,
.detail-card strong,
.reference-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.mini-card p,
.dataset-card p,
.detail-card p,
.reference-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.hub-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hub-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.hub-toolbar input,
.hub-toolbar select {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  outline: none;
}

.hub-toolbar input:focus,
.hub-toolbar select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.program-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.program-card {
  padding: 20px;
}

.program-card h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.meta-row,
.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.meta-row li,
.source-list li,
.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f2f5f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.status-pill.ready {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.pending {
  background: var(--orange-soft);
  color: var(--orange);
}

.program-card p {
  color: var(--muted);
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.program-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.program-actions a.primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.data-note {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.update-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.update-item time {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.update-item h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.update-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.checker-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.checker-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.checker-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.checker-option strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.checker-option span {
  color: var(--muted);
}

.checker-result {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.checker-result span {
  font-size: 13px;
  font-weight: 850;
}

.checker-result strong {
  font-size: 22px;
}

.checker-result p {
  margin-bottom: 0;
  color: #115e59;
}

@media (max-width: 920px) {
  .workspace,
  .tool-grid,
  .content-row,
  .method-panel {
    grid-template-columns: 1fr;
  }

  .hub-nav-grid,
  .dataset-grid,
  .reference-grid,
  .detail-grid,
  .hub-toolbar {
    grid-template-columns: 1fr;
  }

  .hub-search-panel {
    grid-template-columns: 1fr;
  }

  .hub-search-panel p {
    margin-bottom: 0;
  }

  .quick-panel {
    min-height: 180px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  main {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .tool-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-heading a {
    justify-content: center;
  }

  .form-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-grid strong {
    font-size: 22px;
  }

  .checker-result {
    grid-template-columns: 1fr;
  }
}
