.tool-main {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 24px 0 64px;
}

.tool-head { text-align: center; padding: 18px 0 8px; }

.tool-head .crumb {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 13.5px;
  text-decoration: none;
}

.tool-head .crumb:hover { color: var(--muted); }

.tool-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5.4vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.tool-head .lede {
  margin: 16px auto 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(15px, 1.9vw, 17px);
  line-height: 1.6;
}

.calc {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.opt {
  border: 1px solid var(--line);
  background: var(--surface-panel);
  border-radius: 18px;
  padding: 20px;
}

.opt-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.opt-sub { color: var(--faint); font-size: 13px; margin-bottom: 14px; }

.field { margin-top: 12px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}

.field .in {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-input);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
}

.field .in:focus-within { border-color: var(--brand); }

.field .unit { color: var(--faint); font-size: 14px; flex: none; }

.field input {
  width: 100%;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
}

.field input::placeholder { color: var(--faint); font-weight: 400; }

.field .hint { margin-top: 5px; color: var(--faint); font-size: 12px; line-height: 1.45; }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; margin-top: 12px; }

.opt-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.opt-note b { color: var(--text); font-weight: 600; }

.opt-per {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.opt-per .k { color: var(--faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.opt-per .v { font-family: var(--display); font-weight: 700; font-size: 21px; }
.opt-per.blank .v { color: var(--faint); }

.horizon {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.horizon label { color: var(--muted); font-size: 14.5px; font-weight: 600; }

.horizon .in {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-input);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
}

.horizon .in:focus-within { border-color: var(--brand); }
.horizon input {
  width: 64px;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.horizon .unit { color: var(--faint); font-size: 14px; }

.result {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface-panel);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
}

.result .pill {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.res-cols {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 6vw, 56px);
}

.res-col .k {
  color: var(--faint);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  margin-bottom: 5px;
}

.res-col .v {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 4.6vw, 34px);
  letter-spacing: -0.02em;
}

.res-col .u { color: var(--faint); font-size: 13px; margin-top: 3px; }

.res-msg {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--muted);
}

.res-sub {
  margin: 14px auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.res-sub b { color: var(--text); font-weight: 700; }

.assume {
  margin: 12px auto 0;
  max-width: 70ch;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.fact-line {
  margin: 14px auto 0;
  max-width: 62ch;
  border: 1px solid var(--line);
  background: var(--surface-panel);
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.fact-line b { color: var(--text); font-weight: 700; }

.bars { margin-top: 18px; }

.bar-row { margin-top: 12px; }
.bar-row .bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.bar-row .bar-name { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.bar-row .bar-tot { font-family: var(--display); font-weight: 700; font-size: 15px; }
.bar-row .track {
  height: 14px;
  border-radius: 7px;
  background: var(--surface-input);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
}
.bar-row .seg { height: 100%; transition: width 0.25s var(--ease-smooth); }
.seg-1 { background: #38bdf8; }
.seg-2 { background: #2a7fa8; }
.seg-3 { background: #1d5570; }
.bar-row.mute { opacity: 0.35; }

.bar-legend {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 12.5px;
}
.bar-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.bar-note { margin-top: 8px; text-align: center; color: var(--faint); font-size: 12.5px; }

.tbl-wrap { margin-top: 26px; overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}

.tbl caption {
  caption-side: top;
  text-align: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 10px;
  color: var(--text);
}

.tbl th, .tbl td { padding: 10px 12px; border-top: 1px solid var(--divider); }
.tbl thead th {
  border-top: none;
  background: var(--surface-panel);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.tbl thead th:first-child { text-align: left; }
.tbl td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td:first-child, .tbl th[scope="row"] {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  white-space: normal;
}
.tbl td.dim { color: var(--faint); }
.tbl tr.total td, .tbl tr.total th { border-top: 1px solid var(--line-strong); font-weight: 700; color: var(--text); }

.caveat {
  margin: 28px auto 0;
  max-width: 74ch;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.65;
}

.caveat b { color: var(--muted); }

.tool-cta {
  margin-top: 44px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--surface-panel);
  border-radius: 20px;
  padding: 32px 22px;
}

.tool-cta h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(21px, 3.6vw, 27px);
  letter-spacing: -0.02em;
}

.tool-cta p {
  margin: 12px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.tool-cta .badges { margin-top: 22px; }

.tool-faq { margin-top: 44px; }

.tool-faq h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.more-tools { margin-top: 40px; }

.more-tools h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tool-card {
  display: block;
  border: 1px solid var(--line);
  background: var(--surface-panel);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.16s ease, transform 0.16s var(--ease-smooth);
}

.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); }

.tool-card .t {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
}

.tool-card .d { margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.tool-card.app { cursor: default; }
.tool-card.app:hover { border-color: var(--line); transform: none; }

.tool-card.soon { opacity: 0.55; pointer-events: none; }
.tool-card.soon .t::after {
  content: "Coming soon";
  margin-left: 8px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: 2px;
}

.chips {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface-input);
  color: var(--muted);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip-btn:hover { border-color: var(--brand); color: var(--text); }
.chip-btn.on { border-color: var(--brand); color: var(--text); background: rgba(56, 189, 248, 0.12); }

.seg {
  display: flex;
  gap: 6px;
  background: var(--surface-input);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 4px;
}

.seg button {
  flex: 1;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg button.on { background: rgba(56, 189, 248, 0.16); color: var(--text); }

.est-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }

.est-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-line);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
}

.est-reset {
  border: none;
  background: none;
  color: var(--link);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.est-reset:hover { text-decoration: underline; }

.year-list { margin-top: 4px; }
.year-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--divider);
  font-size: 14px;
}
.year-row:first-child { border-top: none; }
.year-row .yl { color: var(--muted); font-weight: 500; }
.year-row .yv { text-align: right; }
.year-row .yv .a { font-weight: 600; font-variant-numeric: tabular-nums; }
.year-row .yv .b { display: block; color: var(--faint); font-size: 12.5px; }

.vbars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 150px;
  margin-top: 16px;
}

.vbars .vbar {
  flex: 0 1 34px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.vbars .vseg { width: 100%; transition: height 0.25s var(--ease-smooth); }
.vbars .vseg.top { background: #38bdf8; border-radius: 4px 4px 0 0; }
.vbars .vseg.base { background: #1d5570; border-radius: 0 0 4px 4px; }
.vbars .vbar .vseg.top:last-child { border-radius: 4px; }
.vbars.blank { opacity: 0.3; }

.vbar-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}

.gone { display: none !important; }

a.chip-btn {
  text-decoration: none;
  display: inline-block;
}

.chip-btn.on { cursor: default; }

.more-tools .chips {
  justify-content: flex-start;
  margin-top: 14px;
}
