:root {
  --bg: #ffffff;
  --cream: #faf6ec;
  --cream-2: #f4eedd;
  --ink: #16181d;
  --ink-2: #4f545e;
  --ink-3: #8b909b;
  --line: #eae7dc;
  --line-2: #dcd8ca;
  --yellow: #ffd94f;
  --yellow-soft: #fff3c4;
  --yellow-deep: #e9c227;
  --green: #2e8f5b;
  --green-soft: #e4f3ea;
  --amber: #e3a23c;
  --r-lg: 28px;
  --r-md: 18px;
  --shadow-card: 0 1px 2px rgba(22, 24, 29, .05), 0 12px 32px rgba(22, 24, 29, .07);
  --shadow-pop: 0 2px 6px rgba(22, 24, 29, .08), 0 24px 48px rgba(22, 24, 29, .13);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }
h1, h2, h3 {
  font-family: 'Anton', 'Inter', sans-serif; font-weight: 400;
  letter-spacing: .002em; line-height: 1.06;
}

/* nav */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: 1000px; margin: 0 auto; padding: 0 28px; }
.logo {
  display: inline-block; position: relative;
  font-family: 'Anton', 'Inter', sans-serif; font-weight: 400;
  font-size: 26px; letter-spacing: .01em; text-transform: uppercase; line-height: 1;
  transition: opacity .15s ease;
}
.logo:hover { opacity: .78; }
.nav-links { display: flex; gap: 24px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.nav-links a { position: relative; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-login { font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: color .15s ease; }
.nav-login:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 30px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -.01em;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22, 24, 29, .22); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(233, 194, 39, .4); }
.btn-sm { padding: 11px 22px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  background: var(--yellow-soft); color: var(--ink);
  padding: 8px 16px; border-radius: 999px;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow-deep); }

/* breadcrumb */
.crumb { font-size: 13px; color: var(--ink-3); padding: 26px 0 0; }
.crumb a:hover { color: var(--ink); }
.crumb span { color: var(--ink-2); }

/* page header */
.page-head { padding: 22px 0 8px; max-width: 720px; }
.page-head .chip { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 50px); margin-bottom: 18px; }
.page-head p.lead { font-size: 18px; color: var(--ink-2); }

/* tool layout */
.tool { padding: 40px 0 20px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }

.panel {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 30px 34px;
  box-shadow: var(--shadow-card);
}
.panel h2 { font-size: 22px; margin-bottom: 4px; }
.panel .panel-sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 22px; }

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 5px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input {
  width: 100%; font: inherit; font-size: 16px; font-weight: 600;
  padding: 13px 44px 13px 15px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: #fdfcf9; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  -moz-appearance: textfield;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input:focus { outline: none; border-color: var(--yellow-deep); box-shadow: 0 0 0 3px var(--yellow-soft); }
.input-wrap .unit { position: absolute; right: 15px; font-size: 14px; font-weight: 600; color: var(--ink-3); pointer-events: none; }

select.select {
  width: 100%; font: inherit; font-size: 15px; font-weight: 600;
  padding: 13px 15px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fdfcf9; color: var(--ink); cursor: pointer;
}
select.select:focus { outline: none; border-color: var(--yellow-deep); box-shadow: 0 0 0 3px var(--yellow-soft); }

.check {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 15px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fdfcf9; cursor: pointer;
}
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--green); flex-shrink: 0; cursor: pointer; }
.check .ct { font-size: 14px; font-weight: 600; }
.check .cd { font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.check.disabled { opacity: .5; cursor: not-allowed; }
.check.disabled input { cursor: not-allowed; }

/* result panel */
.result { background: var(--ink); color: #fff; border-color: var(--ink); }
.result h2 { color: #fff; }
.result .panel-sub { color: rgba(255, 255, 255, .55); }
.headline {
  text-align: center; padding: 18px 0 22px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 22px;
}
.headline .big {
  font-family: 'Anton', 'Inter', sans-serif; font-weight: 400;
  font-size: clamp(48px, 8vw, 66px); line-height: 1; letter-spacing: .002em;
}
.headline .big small { font-size: 20px; color: rgba(255, 255, 255, .6); font-weight: 500; margin-left: 4px; font-family: 'Inter', sans-serif; }
.headline .cap { font-size: 13.5px; color: rgba(255, 255, 255, .65); margin-top: 10px; }

.breakdown { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.breakdown li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0; font-size: 14.5px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.breakdown li:last-child { border-bottom: none; }
.breakdown li .k { color: rgba(255, 255, 255, .78); }
.breakdown li .k small { display: block; color: rgba(255, 255, 255, .45); font-size: 12px; }
.breakdown li .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown li.sub { padding-left: 16px; }
.breakdown li.sub .k { color: rgba(255, 255, 255, .6); font-size: 13.5px; }
.breakdown li.total {
  margin-top: 8px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .22); border-bottom: none;
  font-size: 16px;
}
.breakdown li.total .k { color: #fff; font-weight: 700; }
.breakdown li.total .v { color: var(--yellow); font-size: 19px; }
.breakdown li.neg .v { color: #ffb3a7; }
.breakdown li.pos .v { color: #8fe0ad; }

.rate-note {
  margin-top: 20px; font-size: 12.5px; color: rgba(255, 255, 255, .6); line-height: 1.55;
}

/* prose sections */
.prose { padding: 56px 0; }
.prose-inner { max-width: 720px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 18px; }
.prose h3 { font-size: 20px; margin: 34px 0 10px; }
.prose p { color: var(--ink-2); font-size: 16px; margin-bottom: 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); font-size: 16px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }

.formula {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 26px; margin: 8px 0 22px;
  font-size: 16px; color: var(--ink);
}
.formula code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 7px; padding: 2px 7px;
}
.formula .step { margin-bottom: 10px; }
.formula .step:last-child { margin-bottom: 0; }

.callout {
  border-left: 3px solid var(--amber); background: #fdf6ea;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 18px 22px; margin: 24px 0; font-size: 15px; color: var(--ink-2);
}
.callout strong { color: var(--ink); }

table.rates {
  width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15px;
}
table.rates th, table.rates td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
table.rates th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
table.rates td:last-child, table.rates th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rates tbody tr:last-child td { border-bottom: none; }

/* faq */
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; background: #fff;
  overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--ink-3); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { padding-bottom: 6px; }
.faq .a { padding: 0 22px 20px; color: var(--ink-2); font-size: 15.5px; }
.faq .a a { color: var(--green); font-weight: 600; text-decoration: underline; }

/* cta */
.tool-cta {
  background: var(--yellow); border-radius: var(--r-lg);
  padding: 56px 40px; text-align: center; margin: 20px 0 0;
}
.tool-cta h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.tool-cta p { color: rgba(22, 24, 29, .74); font-size: 17px; max-width: 520px; margin: 0 auto 28px; }
.tool-cta .note { margin-top: 18px; font-size: 13.5px; color: rgba(22, 24, 29, .58); font-weight: 500; }

/* related */
.related { padding: 8px 0 0; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.related-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 24px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--line-2); }
.related-card .rk { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 8px; }
.related-card h3 { font-size: 18px; margin-bottom: 6px; }
.related-card p { font-size: 14px; color: var(--ink-2); }

footer { border-top: 1px solid var(--line); padding: 30px 0 42px; margin-top: 64px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-legal a { transition: color .15s ease; }
.foot-legal a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
  .result { position: static; }
  .nav-links { display: none; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .prose { padding: 44px 0; }
  .tool-cta { padding: 44px 26px; }
  .panel { padding: 24px 22px 28px; }
}
