:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: #0d1b2b;
  --panel-2: #11243a;
  --ink: #f5f8fb;
  --muted: #96a8ba;
  --line: rgba(196, 217, 236, 0.12);
  --mint: #79f2c0;
  --mint-strong: #3ee59c;
  --blue: #55a8ff;
  --navy: #071827;
  --danger-soft: #f3c97a;
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(74, 122, 155, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 122, 155, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.16;
}

.ambient-one {
  width: 420px;
  height: 420px;
  right: -150px;
  top: 20px;
  background: var(--blue);
}

.ambient-two {
  width: 360px;
  height: 360px;
  left: -170px;
  top: 640px;
  background: var(--mint-strong);
}

.hero {
  padding: 48px 0 54px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #cdd8e3;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(121, 242, 192, 0.4);
  border-radius: 8px;
  background: rgba(121, 242, 192, 0.1);
  color: var(--mint);
  font-size: 15px;
  letter-spacing: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: 60px;
  margin-top: 76px;
}

.eyebrow,
.step-label {
  margin: 0 0 15px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.07;
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--mint);
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-note {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(243, 201, 122, 0.2);
  border-radius: 18px;
  background: rgba(243, 201, 122, 0.06);
}

.hero-note > svg {
  flex: 0 0 auto;
  color: var(--danger-soft);
}

.hero-note strong {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
}

.hero-note p {
  margin: 0;
  color: #c8b994;
  font-size: 13px;
  line-height: 1.55;
}

.calculator-section {
  padding-bottom: 104px;
}

.calculator-card {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  overflow: hidden;
  border: 1px solid rgba(179, 207, 230, 0.14);
  border-radius: 28px;
  background: rgba(13, 27, 43, 0.94);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.32);
}

.input-panel,
.result-panel {
  padding: 42px;
}

.input-panel {
  background: #f5f7f8;
  color: #122231;
}

.result-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 92% 10%, rgba(85, 168, 255, 0.18), transparent 32%),
    linear-gradient(150deg, #10283d 0%, #0a1928 64%);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 36px;
}

.panel-heading .icon-box {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: #d9f9ec;
  color: #087e55;
}

.panel-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.panel-heading .step-label {
  margin-bottom: 4px;
  color: #268163;
  font-size: 10px;
}

.panel-heading.light .icon-box {
  background: rgba(121, 242, 192, 0.12);
  color: var(--mint);
}

.panel-heading.light .step-label {
  color: var(--mint);
}

.basis-badge {
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid rgba(121, 242, 192, 0.25);
  border-radius: 999px;
  background: rgba(121, 242, 192, 0.08);
  color: var(--mint);
  font-size: 11px;
  font-weight: 750;
}

.field-group {
  margin-bottom: 27px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

label,
.tax-title {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
}

.field-label-row label {
  margin-bottom: 0;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #e6eaed;
}

.segmented button {
  min-width: 57px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #71808c;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  background: white;
  color: #0d5d46;
  box-shadow: 0 2px 8px rgba(16, 39, 54, 0.09);
}

.number-input {
  position: relative;
  display: flex;
  align-items: center;
}

.number-input input {
  width: 100%;
  height: 58px;
  padding: 0 72px 0 17px;
  border: 1px solid #cfd8df;
  border-radius: 13px;
  outline: none;
  background: white;
  color: #0b1d2c;
  font-size: 20px;
  font-weight: 780;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.number-input input:focus {
  border-color: #21a774;
  box-shadow: 0 0 0 4px rgba(33, 167, 116, 0.12);
}

.number-input > span {
  position: absolute;
  right: 17px;
  color: #60727f;
  font-size: 13px;
  font-weight: 750;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 9px;
}

.preset-row button {
  padding: 8px 3px;
  border: 1px solid #d7dfe4;
  border-radius: 9px;
  background: #eef2f4;
  color: #53646f;
  font-size: 11px;
  font-weight: 720;
}

.preset-row button:hover {
  border-color: #8ecbb5;
  color: #166b50;
}

.conversion-hint,
.field-help {
  margin: 9px 0 0;
  color: #798994;
  font-size: 11px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-group.compact {
  min-width: 0;
}

.number-input.small input {
  height: 52px;
  padding-right: 61px;
  font-size: 17px;
}

.tax-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px;
  border: 1px solid #dbe3e7;
  border-radius: 14px;
  background: #ebf0f2;
}

.tax-selector .tax-title {
  margin-bottom: 5px;
}

.tax-selector p {
  margin: 0;
  color: #71808b;
  font-size: 11px;
  line-height: 1.45;
}

.segmented.wide button {
  min-width: 52px;
}

.primary-result {
  padding: 11px 0 32px;
  border-bottom: 1px solid rgba(187, 213, 235, 0.12);
}

.primary-result p {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
}

.primary-result strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--mint);
  font-size: clamp(34px, 4.1vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.primary-result > span {
  display: block;
  margin-top: 8px;
  color: #b2c2d0;
  font-size: 17px;
  font-weight: 680;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 25px 0;
}

.result-grid > div {
  min-width: 0;
}

.result-grid p {
  margin-bottom: 8px;
  color: #879cad;
  font-size: 12px;
}

.result-grid strong,
.result-grid span {
  display: block;
}

.result-grid strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.result-grid span {
  margin-top: 5px;
  color: #8297a8;
  font-size: 11px;
}

.tax-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(187, 213, 235, 0.1);
  color: #8397a8;
  font-size: 11px;
}

.tax-line strong {
  color: #bdd0dd;
  font-size: 12px;
}

.formula-box {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(85, 168, 255, 0.16);
  border-radius: 13px;
  background: rgba(85, 168, 255, 0.07);
  color: #98adc0;
}

.formula-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #78b8f5;
}

.formula-box p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.copy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--mint);
  color: #072218;
  font-size: 13px;
  font-weight: 820;
  transition: transform 160ms ease, background 160ms ease;
}

.copy-button:hover {
  transform: translateY(-1px);
  background: #94f7d0;
}

.copy-button svg {
  width: 17px;
  height: 17px;
}

.series-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 15px 16px;
  border: 1px solid rgba(121, 242, 192, 0.24);
  border-radius: 12px;
  background: rgba(121, 242, 192, 0.055);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.series-link:hover {
  transform: translateY(-1px);
  border-color: rgba(121, 242, 192, 0.48);
  background: rgba(121, 242, 192, 0.1);
}

.series-link span,
.series-link small,
.series-link strong {
  display: block;
}

.series-link small {
  margin-bottom: 4px;
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.series-link strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.series-link > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--mint);
}

.guide-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 74px;
  padding-bottom: 110px;
}

.guide-intro h2 {
  margin-bottom: 22px;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.guide-intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.guide-cards article {
  min-height: 230px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 31, 48, 0.78);
}

.guide-cards article > span {
  display: block;
  margin-bottom: 58px;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.guide-cards h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.guide-cards p {
  margin: 0;
  color: #8ea1b2;
  font-size: 12px;
  line-height: 1.65;
}

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(4, 12, 20, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 70px;
  padding-top: 34px;
  padding-bottom: 38px;
}

.footer-inner strong {
  font-size: 13px;
}

.footer-inner > div p,
.disclaimer {
  margin: 8px 0 0;
  color: #728799;
  font-size: 11px;
  line-height: 1.65;
}

.disclaimer {
  margin: 0;
}

@media (max-width: 900px) {
  .hero-grid,
  .calculator-card,
  .guide-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 30px;
    margin-top: 58px;
  }

  .hero-note {
    max-width: 520px;
  }

  .guide-section {
    gap: 40px;
  }

  .calculator-card {
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 650px) {
  .page-shell {
    width: min(100% - 24px, 560px);
  }

  .hero {
    padding-top: 27px;
    padding-bottom: 36px;
  }

  .hero-grid {
    margin-top: 46px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(38px, 12.4vw, 54px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .calculator-section {
    padding-bottom: 76px;
  }

  .calculator-card {
    border-radius: 21px;
  }

  .input-panel,
  .result-panel {
    padding: 27px 21px;
  }

  .panel-heading {
    margin-bottom: 28px;
  }

  .field-row,
  .result-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .number-input.small input {
    padding-left: 12px;
    font-size: 15px;
  }

  .number-input.small > span {
    right: 11px;
  }

  .tax-selector {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented.wide {
    width: 100%;
  }

  .segmented.wide button {
    flex: 1;
  }

  .primary-result strong {
    font-size: clamp(33px, 10vw, 46px);
  }

  .guide-section {
    padding-bottom: 75px;
  }

  .guide-cards {
    grid-template-columns: 1fr;
  }

  .guide-cards article {
    min-height: 0;
  }

  .guide-cards article > span {
    margin-bottom: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 390px) {
  .field-row,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .preset-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .basis-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
