:root {
  --ink: #10212a;
  --muted: #61707a;
  --line: #dfe6e3;
  --paper: #f5f7f4;
  --surface: #fff;
  --green: #04765e;
  --lime: #d7ee90;
  --orange: #ee6d38;
  --field: #fbfcfb;
  --field-border: #cfd9d5;
  --notice-bg: #fff5f0;
  --notice-border: #f2cfbd;
  --notice-ink: #743720;
  --assumption-bg: #f1f7f3;
  --assumption-ink: #486058;
  --interaction: var(--green);
  --action-bg: var(--green);
  --action-hover: #035e4b;
  --action-active: #024d3e;
  --action-ink: #fff;
  --focus-ring: rgba(4, 118, 94, 0.12);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: auto;
  padding: 22px 30px;
}
.header-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}
.header-links a:hover,
.header-links a:focus-visible {
  color: var(--interaction);
}
.brand {
  color: var(--ink);
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand span {
  color: var(--green);
}
.header-link {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 700;
}
.header-link:hover {
  color: var(--interaction);
}
.theme-switcher {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.theme-switcher button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}
.theme-switcher button:hover {
  color: var(--ink);
  background: var(--paper);
}
.theme-switcher button[aria-checked="true"] {
  color: var(--action-ink);
  background: var(--action-bg);
}
.theme-switcher button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--interaction) 38%, transparent);
  outline-offset: 2px;
}
.page-shell {
  max-width: 1120px;
  margin: auto;
  padding: 63px 30px 80px;
}
.intro {
  max-width: 700px;
  margin-bottom: 30px;
}
.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
}
.intro h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.065em;
  margin: 0;
}
.intro > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 22px 0 0;
}
.notice {
  border: 1px solid var(--notice-border);
  border-radius: 14px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  padding: 17px 20px;
  font-size: 0.91rem;
  margin-bottom: 22px;
}
.notice strong {
  display: block;
  margin-bottom: 3px;
}
.notice a {
  color: var(--accent);
  font-weight: 800;
}
.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 17px;
  align-items: start;
}
.tax-form,
.result-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 45px rgba(29, 57, 48, 0.07);
}
.tax-form {
  padding: 28px;
}
.tax-form section + section {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 24px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.section-title span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
}
.section-title h2 {
  font-size: 1.08rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.field-grid .wide {
  grid-column: span 2;
}
label {
  font-size: 0.82rem;
  font-weight: 800;
}
.field-required {
  display: inline-block;
  margin-left: 3px;
  color: #d9534f;
  font-size: 0.78em;
  line-height: 1;
  vertical-align: 0.12em;
  white-space: nowrap;
}
.field-optional {
  display: inline-block;
  margin-left: 5px;
  color: #87928b;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  height: 47px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--field-border);
  border-radius: 9px;
  background: var(--field);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  outline: none;
}
input::placeholder,
select:required:invalid {
  color: #87928b;
  font-weight: 600;
  opacity: 1;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--interaction);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 5px;
}
.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
}
.check-row + .check-row {
  margin-top: 17px;
}
.check-row input {
  accent-color: var(--interaction);
  width: 18px;
  height: 18px;
  margin: 2px 0;
}
.check-row strong {
  display: block;
}
.calculate-button {
  width: 100%;
  margin-top: 28px;
  border: 0;
  border-radius: 10px;
  background: var(--action-bg);
  color: var(--action-ink);
  min-height: 54px;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 0 transparent;
  transition:
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.1s ease;
}
.calculate-button:hover {
  background: var(--action-hover);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--action-bg) 30%, transparent);
  transform: translateY(-2px);
}
.calculate-button:active {
  background: var(--action-active);
  box-shadow:
    inset 0 3px 6px #00000038,
    0 2px 5px #00000020;
  transform: translateY(1px) scale(0.995);
}
.calculate-button.is-submit-confirmed {
  background: var(--action-active);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--action-ink) 30%, transparent),
    0 2px 5px #00000020;
  transform: translateY(1px) scale(0.995);
}
.calculate-button.is-calculating {
  background: var(--action-active);
  cursor: wait;
  opacity: 0.94;
}
.calculate-button:focus-visible,
.header-link:focus-visible,
footer a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--interaction) 45%, transparent);
  outline-offset: 3px;
}
.calculate-button span {
  margin-left: 10px;
  font-size: 1.3rem;
}
.result-panel {
  position: sticky;
  top: 22px;
  padding: 31px;
}
.result-panel h2 {
  font-size: 1.15rem;
  margin: 0;
}
.total-tax {
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 10px 0 0;
}
.result-status {
  min-height: 42px;
  color: var(--interaction);
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0 0 20px;
}
.breakdown {
  margin: 0;
}
.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.breakdown dt {
  color: var(--muted);
}
.breakdown dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}
.breakdown em {
  font-style: normal;
  color: var(--interaction);
  font-size: 0.72rem;
}
.assumption-note {
  margin: 20px 0 0;
  padding: 12px;
  background: var(--assumption-bg);
  color: var(--assumption-ink);
  border-radius: 8px;
  font-size: 0.77rem;
}
.how-it-works {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
  margin-top: 52px;
  padding: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-it-works h2 {
  font-size: 1.65rem;
  letter-spacing: -0.05em;
  margin: 0;
}
.how-it-works ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.how-it-works li {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 10px;
  font-size: 0.88rem;
}
.how-it-works strong {
  color: var(--interaction);
}
.how-it-works span {
  color: var(--muted);
}
footer {
  color: var(--muted);
  font-size: 0.78rem;
  padding-top: 28px;
}
footer a {
  color: var(--interaction);
  font-weight: 800;
}
html[data-theme="dark"] {
  --ink: #edf4f0;
  --muted: #a7b5ad;
  --line: #33463c;
  --paper: #0f1713;
  --surface: #18231d;
  --green: #65d2aa;
  --field: #121d17;
  --field-border: #405349;
  --notice-bg: #302019;
  --notice-border: #714633;
  --notice-ink: #f3c5ae;
  --assumption-bg: #203129;
  --assumption-ink: #bed0c5;
  --interaction: #8da6c2;
  --action-bg: #4f6682;
  --action-hover: #6d89ac;
  --action-active: #344961;
  --action-ink: #f8fafc;
  --focus-ring: rgba(141, 166, 194, 0.32);
}
html[data-theme="dark"] .tax-form,
html[data-theme="dark"] .result-panel {
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] select:required:invalid,
html[data-theme="dark"] .field-optional {
  color: #91a198;
}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}
html[data-theme="dark"] .calculate-button {
  color: var(--action-ink);
}
@media (max-width: 800px) {
  .site-header,
  .page-shell {
    padding-left: 18px;
    padding-right: 18px;
  }
  .page-shell {
    padding-top: 24px;
  }
  .calculator-grid,
  .how-it-works {
    grid-template-columns: 1fr;
  }
  .result-panel {
    position: static;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .field-grid .wide {
    grid-column: auto;
  }
  .how-it-works li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .tax-form,
  .result-panel {
    border-radius: 14px;
    padding: 21px;
  }
  .theme-switcher button {
    min-height: 28px;
    padding: 0 7px;
    font-size: 0.65rem;
  }
  .header-links {
    display: none;
  }
}
