:root {
  color-scheme: light;
  --ink: #172321;
  --muted: #5f6f6b;
  --line: #d9e2df;
  --soft: #f2f6f4;
  --paper: #ffffff;
  --accent: #176b5b;
  --accent-dark: #0d4f43;
  --accent-soft: #e3f2ed;
  --warn: #9a4c12;
  --warn-soft: #fff3e8;
  --shadow: 0 14px 40px rgba(23, 35, 33, 0.08);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #edf3f0;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #edf3f0;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.site-header {
  border-bottom: 1px solid rgba(217, 226, 223, 0.9);
  background: rgba(255, 255, 255, 0.94);
}

.site-header__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.form-panel,
.result-panel {
  padding: clamp(20px, 4vw, 32px);
}

.result-panel {
  position: sticky;
  top: 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field--wide {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
}

.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 48px 10px 13px;
  border: 1px solid #b9c8c4;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
}

input:focus {
  outline: 3px solid rgba(23, 107, 91, 0.18);
  border-color: var(--accent);
}

.unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.button {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-dark);
}

.button--secondary {
  background: #fff;
  color: var(--accent-dark);
}

.button--secondary:hover {
  background: var(--soft);
}

.error-message {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #efc59f;
  border-radius: 10px;
  background: var(--warn-soft);
  color: #74390d;
  font-weight: 700;
}

.result-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recommendation {
  margin-bottom: 24px;
  color: var(--accent-dark);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.result-panel[data-result="keep"] .recommendation {
  color: var(--warn);
}

.result-list {
  margin: 0;
}

.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.result-row dt {
  color: var(--muted);
  font-size: 14px;
}

.result-row dd {
  margin: 0;
  text-align: right;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.result-caption {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.info-section {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 32px);
}

.info-section ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.tool-card {
  padding: 24px;
}

.tool-card__status {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tool-card h2 {
  margin-bottom: 8px;
}

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

.text-link {
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-footer__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

.is-embedded {
  background: #fff;
}

.is-embedded .site-header,
.is-embedded .site-footer,
.is-embedded .page-shell > .eyebrow,
.is-embedded .page-shell > h1,
.is-embedded .page-shell > .lede,
.is-embedded .info-section {
  display: none;
}

.is-embedded .page-shell {
  width: 100%;
  padding: 8px;
}

.is-embedded .calculator-grid {
  margin: 0;
}

.is-embedded .panel {
  box-shadow: none;
}

@media (max-width: 780px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .page-shell {
    padding-top: 30px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }
}

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

  .field--wide {
    grid-column: auto;
  }

  .button-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .result-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .result-row dd {
    text-align: left;
  }
}

@media (min-width: 600px) {
  .is-embedded .calculator-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 16px;
  }

  .is-embedded .form-panel,
  .is-embedded .result-panel {
    padding: 20px;
  }

  .is-embedded .field-grid {
    gap: 14px;
  }
}
