/* calculator.css — scoped to the calculator page only.
   Palette follows the site's style.css brand tokens. */

:root {
  --calc-ink: #14213d;
  --calc-muted: #64748b;
  --calc-line: #e2e8f0;
  --calc-brand: #5c0666;
  --calc-brand-2: #8b1f96;
  --calc-ok: #0f766e;
  --calc-surface: #ffffff;
  --calc-bg: #f6f4f8;
}

.calc-page { background: var(--calc-bg); min-height: 100svh; padding: 28px 0 64px; }

.calc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.calc-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--calc-brand); text-decoration: none; font-size: 1.15rem; }
.calc-brand i { font-size: 1.4rem; }
.calc-back { color: var(--calc-muted); text-decoration: none; font-size: .95rem; }
.calc-back:hover { color: var(--calc-brand); }

.calc-head h1 { font-size: 1.6rem; font-weight: 800; color: var(--calc-ink); margin: 0 0 6px; }
.calc-head p { color: var(--calc-muted); margin: 0 0 24px; font-size: .98rem; }

.calc-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 991px) { .calc-grid { grid-template-columns: 1fr; } }

.card-x { background: var(--calc-surface); border: 1px solid var(--calc-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -16px rgba(16,24,40,.18); }
.card-x + .card-x { margin-top: 16px; }
.card-x-head { padding: 16px 20px; border-bottom: 1px solid var(--calc-line); font-weight: 700; color: var(--calc-ink); display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.card-x-head i { color: var(--calc-brand); }
.card-x-body { padding: 18px 20px 20px; }

.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 575px) { .f-row { grid-template-columns: 1fr; } }
.f { margin-bottom: 14px; }
.f:last-child { margin-bottom: 0; }
.f label { display: block; font-size: .88rem; font-weight: 600; color: var(--calc-ink); margin-bottom: 6px; }
.f .hint { font-weight: 400; color: var(--calc-muted); font-size: .78rem; }
.f input, .f select { width: 100%; padding: 11px 13px; border: 1px solid var(--calc-line); border-radius: 10px; font-size: .98rem; color: var(--calc-ink); background: #fff; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.f input:focus, .f select:focus { outline: none; border-color: var(--calc-brand-2); box-shadow: 0 0 0 3px rgba(139,31,150,.12); }
.f input:disabled { background: #f1f5f9; color: #94a3b8; }
.f.is-off label { opacity: .55; }
.f .with-unit { position: relative; }
.f .with-unit span { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--calc-muted); font-size: .82rem; pointer-events: none; }
.f .with-unit input { padding-inline-start: 52px; }

.switch { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.switch input { width: 18px; height: 18px; accent-color: var(--calc-brand); }
.switch label { margin: 0; font-weight: 500; font-size: .92rem; color: var(--calc-ink); }

.rate-badge { display: inline-block; margin-bottom: 14px; padding: 6px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .8rem; font-weight: 600; }

.result-card { position: sticky; top: 20px; overflow: hidden; }
.result-main { background: linear-gradient(135deg, var(--calc-brand), var(--calc-brand-2)); color: #fff; padding: 22px 20px; text-align: center; }
.result-main .lbl { font-size: .85rem; opacity: .85; margin-bottom: 6px; }
.result-main .val { font-size: 2.1rem; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.result-main .cur { font-size: .95rem; opacity: .85; margin-inline-start: 4px; }
.result-main .sub { font-size: .8rem; opacity: .8; margin-top: 6px; }

.result-list { padding: 6px 20px 14px; }
.result-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--calc-line); font-size: .92rem; }
.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--calc-muted); }
.result-row .v { font-weight: 700; color: var(--calc-ink); font-variant-numeric: tabular-nums; }
.result-row.hi .v { color: var(--calc-ok); }

.calc-cta { display: block; text-align: center; margin: 4px 20px 20px; padding: 12px; border-radius: 10px; background: var(--calc-ok); color: #fff; text-decoration: none; font-weight: 700; transition: filter .15s; }
.calc-cta:hover { filter: brightness(1.07); color: #fff; }

.band-hint { font-size: .75rem; color: var(--calc-muted); margin-top: 6px; }

.calc-note { font-size: .8rem; color: var(--calc-muted); line-height: 1.7; margin-top: 18px; }
.calc-note strong { color: var(--calc-ink); }
