:root {
  --ink: #0e1b19;
  --ink-2: #3d4f4c;
  --muted: #6b7c79;
  --line: #e2e9e7;
  --bg: #f5f8f7;
  --card: #ffffff;
  --brand: #0c7c6c;
  --brand-dark: #075c50;
  --brand-soft: #e6f4f1;
  --orange: #ee4d2d;
  --amber: #b45309;
  --amber-soft: #fff5e6;
  --red: #b42318;
  --red-soft: #fdecea;
  --good: #0a7b5a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(14, 27, 25, .04), 0 12px 32px -18px rgba(14, 27, 25, .28);
  --font: "Liberation Sans", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.85rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.95rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 750; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.small { font-size: .875rem; color: var(--muted); }
.tiny { font-size: .78rem; color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand) 0%, #17a58c 100%);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.brand span small { display: block; font-size: .66rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; line-height: 1.1; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 11px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, #083f37 0%, #0c6f61 55%, #149c86 100%); color: #fff; padding: 44px 0 58px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -80px -140px auto; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%); border-radius: 50%;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; color: #fff; }
.hero p.lede { font-size: 1.06rem; color: rgba(255, 255, 255, .86); max-width: 62ch; margin-bottom: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
  font-size: .8rem; font-weight: 600; color: #fff;
}
.chip b { font-weight: 800; }

/* ---------- calculator ---------- */
.calc-shell { margin-top: -34px; position: relative; z-index: 2; padding-bottom: 8px; }
.calc {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden;
}
.calc-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.calc-body { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
.form { padding: 18px 22px 24px; border-right: 1px solid var(--line); min-width: 0; }
.results { padding: 18px 22px 24px; background: linear-gradient(180deg, #fbfdfc, #f6faf9); min-width: 0; }

.seg { display: inline-flex; background: #eef4f2; padding: 4px; border-radius: 12px; gap: 3px; }
.seg button {
  border: 0; background: transparent; padding: 9px 15px; border-radius: 9px; font: inherit;
  font-size: .86rem; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.seg button.is-on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.field { margin-bottom: 14px; min-width: 0; }
.field > label, .field > .label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; letter-spacing: .01em; }
.field .help { display: block; font-size: .73rem; color: var(--muted); margin-top: 4px; }
.input, select.input {
  width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cfdad7; border-radius: 11px;
  background: #fff; font: inherit; font-size: .95rem; color: var(--ink); appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7c79' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(12, 124, 108, .14); }
.money { position: relative; }
.money .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .82rem; font-weight: 700; color: var(--muted); pointer-events: none; }
.money .input { padding-left: 38px; font-variant-numeric: tabular-nums; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px 4px; margin: 0 0 14px; }
.fieldset legend { padding: 0 6px; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: .86rem; margin: 0 0 10px; cursor: pointer; line-height: 1.4; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.check span b { font-weight: 700; }
.check .rate { color: var(--muted); font-weight: 600; }
details.advanced { margin: 2px 0 14px; }
details.advanced summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--brand-dark); padding: 4px 0; }
details.advanced .box { padding: 12px; background: #f7faf9; border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; }
details.advanced .field:last-child { margin-bottom: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; background: var(--brand); color: #fff; border: 0;
  font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid #c9d8d4; }
.btn.ghost:hover { background: var(--brand-soft); }

/* result card */
.result-card {
  background: linear-gradient(150deg, #0b3f37 0%, #0b5c4f 60%, #0e7565 100%);
  color: #fff; border-radius: 18px; padding: 20px 20px 18px; position: relative; overflow: hidden;
}
.result-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 65%); top: -90px; right: -60px; }
.result-card.is-loss { background: linear-gradient(150deg, #4a1512, #7c231d 70%); }
.result-card.is-thin { background: linear-gradient(150deg, #3d2d0c, #6b4a10 70%); }
.result-card .k { font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .74); letter-spacing: .02em; text-transform: uppercase; }
.result-card .big { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.1; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.result-card .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; color: rgba(255, 255, 255, .9); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.badge.good { background: #b9f3df; color: #04553c; }
.badge.warn { background: #ffe2a8; color: #5b3a00; }
.badge.bad { background: #ffd0cb; color: #6d150e; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.result-stats div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.result-stats span { display: block; font-size: .72rem; color: rgba(255, 255, 255, .74); font-weight: 600; }
.result-stats b { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-note { margin: 12px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .85); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.result-actions a, .result-actions button { font-size: .8rem; padding: 8px 12px; border-radius: 9px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); color: #fff; text-decoration: none; cursor: pointer; font-weight: 600; }
.result-actions a:hover, .result-actions button:hover { background: rgba(255, 255, 255, .24); color: #fff; }

.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; min-width: 0; }
.price-card .k { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.price-card .v { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-card .note { font-size: .74rem; color: var(--muted); line-height: 1.35; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; overflow: hidden; }
.panel > summary { cursor: pointer; padding: 12px 15px; font-weight: 700; font-size: .88rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after { content: "+"; font-size: 1.1rem; color: var(--muted); }
.panel[open] > summary::after { content: "−"; }
.panel .panel-in { padding: 0 15px 13px; }
.panel .k { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.panel .v { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }

table.fees { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.fees th, table.fees td { padding: 7px 4px; border-bottom: 1px solid #eef3f1; text-align: left; vertical-align: top; }
table.fees th { font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 700; }
table.fees td.r, table.fees th.r { text-align: right; white-space: nowrap; }
table.fees td.num { font-variant-numeric: tabular-nums; }
table.fees tr.total td { font-weight: 800; border-top: 1px solid #d7e3df; border-bottom: 0; }
table.fees tr.tax td { color: var(--amber); }
table.fees .cap { font-size: .66rem; color: var(--amber); background: var(--amber-soft); padding: 1px 5px; border-radius: 5px; white-space: nowrap; }

.compare { margin-top: 16px; }
.compare h3 { font-size: .95rem; margin-bottom: 8px; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp { border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; background: #fff; min-width: 0; }
.cmp.win { border-color: #9ed9c8; box-shadow: 0 0 0 2px rgba(12, 124, 108, .12); }
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.cmp-head b { font-size: .9rem; }
.cmp-badge { font-size: .66rem; font-weight: 800; color: var(--muted); background: #f1f5f4; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.cmp-badge.win { background: var(--brand-soft); color: var(--brand-dark); }
.cmp .big { font-size: 1.22rem; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cmp .meta { font-size: .74rem; color: var(--muted); }
.cmp details { margin-top: 6px; }
.cmp summary { font-size: .74rem; color: var(--brand-dark); cursor: pointer; font-weight: 600; }
.cmp-diff { margin-top: 9px; font-size: .84rem; font-weight: 700; color: var(--brand-dark); }

.callout { border-radius: 14px; padding: 13px 15px; font-size: .86rem; margin: 14px 0; }
.callout.info { background: var(--brand-soft); border: 1px solid #c8e8e0; }
.callout.warn { background: var(--amber-soft); border: 1px solid #f3dfbb; }
.callout b { font-weight: 800; }

/* ---------- content ---------- */
section.block { padding: 46px 0; }
section.block.tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 > *, .grid3 > *, .link-cards > *, .calc-body > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; font-size: .95rem; }
.link-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.link-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: #a9d6ca; transform: translateY(-2px); color: var(--ink); }
.link-card b { display: block; margin-bottom: 4px; }
.link-card span { font-size: .82rem; color: var(--muted); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: #fff; max-width: 100%; min-width: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 620px; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid #edf2f0; text-align: left; white-space: nowrap; }
table.data th { background: #f7faf9; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); position: sticky; top: 0; }
table.data td:first-child, table.data th:first-child { white-space: normal; min-width: 190px; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

details.faq { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 0 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq .a { padding: 0 0 14px; font-size: .9rem; color: var(--ink-2); }
details.faq .a p:last-child { margin-bottom: 0; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { position: relative; padding-left: 38px; margin-bottom: 14px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; font-weight: 800; display: grid; place-items: center; }

.cta-band { background: linear-gradient(135deg, #0a4a40, #0d7c6b); color: #fff; border-radius: 20px; padding: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta-band h2, .cta-band p { color: #fff; margin-bottom: .3em; }
.cta-band .btn { background: #fff; color: var(--brand-dark); }

.site-foot { padding: 34px 0 44px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .84rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot-grid b { color: var(--ink); display: block; margin-bottom: 6px; font-size: .85rem; }
.foot-grid a { display: block; color: var(--muted); text-decoration: none; padding: 2px 0; }
.foot-grid a:hover { color: var(--brand); }
.foot-bottom { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .78rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .calc-body { grid-template-columns: 1fr; }
  .form { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid3, .link-cards { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 15px; }
  .head-in { height: 56px; }
  .brand span small { display: none; }
  .nav a { padding: 7px 9px; font-size: .8rem; }
  .hero { padding: 30px 0 46px; }
  .hero p.lede { font-size: .97rem; }
  .calc-head { padding: 14px 15px; }
  .form, .results { padding: 15px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 9px 6px; font-size: .8rem; }
  .row2, .row3, .grid2, .grid3, .link-cards, .price-cards, .cmp-grid, .foot-grid { grid-template-columns: 1fr; }
  .row2.keep, .row3.keep { grid-template-columns: 1fr 1fr; }
  .result-stats { grid-template-columns: 1fr 1fr; }
  .result-card { padding: 17px 15px 15px; }
  section.block { padding: 34px 0; }
  .cta-band { padding: 20px; }
  table.data { font-size: .8rem; }
}
@media (max-width: 380px) {
  .result-stats { grid-template-columns: 1fr; }
}
@media print {
  .site-head, .hero, .site-foot, .result-actions, .seg { display: none; }
  .calc { box-shadow: none; }
}
