/* Calculator page. Same system as site.css: one big white card overlapping the navy hero,
   hairline cards, large numerals, gold accent. Inputs on the left, the live breakdown on the right
   (stacked on a phone). */
.hero-calc { padding-block-end: 0; }
.hero-calc .hero-sub { margin-block-end: 8px; }
.hero-calc .deal-wrap { margin-block-end: 0; padding-block-end: 0; }
.hero-calc .hero-note { margin-block-start: 6px; }
.calc-page .join.calc-join { padding-block-start: 56px; }

.calc { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 18px 16px 22px; box-shadow: var(--shadow-lg); max-width: 1000px; margin-inline: auto; text-align: start; position: relative; top: 0; margin-block-end: -56px; }
.calc-grid { display: grid; gap: 22px; }
.cstep + .cstep { margin-block-start: 26px; }
.ch { display: flex; align-items: center; gap: 10px; margin-block-end: 14px; font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; color: var(--text); text-align: start; max-width: none; }
.cn { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.route, .amounts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.calc .fld small { font-weight: 400; color: var(--muted); font-size: 12px; }

/* search */
.search { position: relative; }
.search input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid #d9dbe2; border-radius: 14px; background: #fff; font: inherit; font-size: 16px; color: var(--text); }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(235, 169, 17, 0.2); }
.results, .results-empty { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 6px); z-index: 20; margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; }
.results[hidden], .results-empty[hidden] { display: none; }
.results-empty { padding: 12px 16px; font-size: 13px; color: var(--muted); }
.results button { display: flex; gap: 12px; align-items: baseline; width: 100%; min-height: 46px; padding: 10px 16px; border: 0; background: transparent; text-align: start; cursor: pointer; font-size: 14px; }
.results li + li button { border-block-start: 1px solid #f0f1f4; }
.results button:hover, .results button.act { background: var(--gold-ice); }
.results code { font-size: 13px; color: var(--gold-deep); font-weight: 600; flex: none; }
.results .rr { margin-inline-start: auto; font-size: 12px; color: var(--muted); flex: none; }
.selected { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 12px; padding: 12px 14px; border: 1px solid rgba(235, 169, 17, 0.45); background: var(--gold-ice); border-radius: 14px; font-size: 14px; }
.selected-ck { color: var(--gold-deep); font-weight: 700; }
.selected-l { color: var(--muted); }
.selected code { font-weight: 700; background: #fff; padding: 2px 8px; border-radius: 8px; border: 1px solid rgba(235, 169, 17, 0.5); }
#c-desc { font-weight: 500; }
.cap { margin-block: 18px 10px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cat { text-align: start; display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); background: #fff; border-radius: 14px; cursor: pointer; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease); }
.cat:hover { transform: translateY(-2px); border-color: var(--gold); }
.cat[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-ice); }
.cat:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cat svg { width: 22px; height: 22px; color: var(--gold-deep); }
.cat b { font-size: 13px; font-weight: 500; line-height: 1.3; }
.cat small { font-size: 11px; color: var(--muted); }

/* live breakdown */
.calc-out { background: var(--navy); color: #fff; border-radius: 18px; padding: 20px 18px 22px; align-self: start; }
.route-stamp { font-size: 13px; color: rgba(255, 255, 255, 0.66); margin-block-end: 12px; }
.badges { display: grid; gap: 8px; margin-block-end: 14px; }
.badge { font-size: 12.5px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.82); }
.badge.pref { background: rgba(15, 122, 79, 0.28); color: #bff0d9; }
.badge.warn { background: rgba(194, 59, 48, 0.28); color: #ffd1cc; }
.bd { display: grid; margin: 0; }
.bd > div { display: flex; justify-content: space-between; gap: 12px; padding-block: 9px; border-block-end: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; }
.bd dt { color: rgba(255, 255, 255, 0.7); }
.bd dt small { color: var(--gold-hi); font-weight: 500; margin-inline-start: 4px; }
.bd dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.bd .sub dd, .bd .sub dt { color: #fff; font-weight: 600; }
.bd .total { border-block-end: 0; padding-block: 16px 0; align-items: baseline; }
.bd .total dt { color: #fff; font-weight: 600; font-size: 15px; }
.bd .total dd { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 7.5vw, 2.5rem); color: var(--gold-hi); letter-spacing: -0.02em; line-height: 1; }
.prompt { color: rgba(255, 255, 255, 0.7); font-size: 14px; padding-block: 6px; }
.est { margin-block-start: 14px; font-size: 12px; line-height: 1.55; color: rgba(255, 255, 255, 0.55); }
.calc-out[data-empty='1'] .bd { display: none; }

@media (min-width: 760px) {
  .calc { padding: 28px 28px 32px; margin-block-end: -72px; }
  .calc-grid { grid-template-columns: 1.15fr 0.85fr; gap: 32px; }
  .route { grid-template-columns: 1fr 1fr; }
  .amounts { grid-template-columns: 1fr 1fr; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .calc-out { position: sticky; inset-block-start: 96px; padding: 24px 22px 26px; }
  .calc-page .join.calc-join { padding-block-start: 120px; }
}
