/* EquiWise Tools — calculator UI, built on the brand design system */

.tool-hero { padding: 130px 0 30px; }
.tool-hero h1 { font-family: 'Fraunces', serif; font-weight: 500; font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.01em; line-height: 1.12; color: var(--ivory); max-width: 18ch; text-wrap: balance; overflow-wrap: break-word; }
.tool-hero h1 em { color: var(--gold); font-style: italic; font-weight: 400; }
.tool-hero p { color: var(--ivory-dim); font-size: 18px; max-width: 640px; margin-top: 18px; line-height: 1.6; }
.back-link { display: flex; width: fit-content; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.3px; margin-bottom: 24px; }

/* Tool grid (hub) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 48px 0 80px; }
.tool-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; transition: all .2s; display: flex; flex-direction: column; min-height: 200px;
}
.tool-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); box-shadow: 0 12px 36px rgba(26,31,46,.06); }
.tool-card.soon { opacity: .62; }
.tool-card .ic { font-size: 24px; }
.tool-card h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 21px; margin-top: 14px; color: var(--ivory); }
.tool-card p { color: var(--ivory-dim); font-size: 14px; margin-top: 8px; line-height: 1.55; flex: 1; }
.tool-card .go { color: var(--gold); font-size: 13px; font-weight: 600; margin-top: 18px; letter-spacing: .3px; }
.tool-card .badge { align-self: flex-start; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; color: var(--muted); border: 1px solid var(--line-hi); border-radius: 999px; padding: 4px 10px; margin-top: 18px; }

/* Calculator layout */
.calc { display: grid; grid-template-columns: 380px 1fr; gap: 32px; margin: 36px 0 60px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

.calc-panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.calc-panel h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 20px; color: var(--ivory); margin-bottom: 24px; }

.field { margin-bottom: 26px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--ivory-dim); margin-bottom: 10px; }
.field .val { font-family: 'Inter', system-ui, sans-serif; font-size: 18px; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.valwrap { display: inline-flex; align-items: baseline; gap: 2px; }
.valwrap .unit { font-size: 16px; color: var(--gold); font-weight: 600; }
input.val { font-family: 'Inter', system-ui, sans-serif; font-size: 18px; font-weight: 600; color: var(--gold); background: transparent; border: none; border-bottom: 1px dashed var(--line-hi); min-width: 4.5ch; text-align: right; padding: 1px 2px; font-variant-numeric: tabular-nums; transition: border-color .15s; }
input.val:hover { border-bottom-color: var(--gold-dim); }
input.val:focus { outline: none; border-bottom-color: var(--gold); }
input.val::-webkit-outer-spin-button, input.val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.val[type=number] { -moz-appearance: textfield; appearance: textfield; }
.in-words { font-size: 12px; color: var(--gold); font-weight: 600; text-align: right; margin: 0 0 10px; letter-spacing: 0.2px; }
.field input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 999px; background: var(--ink-3); outline: none; }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); cursor: pointer; border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(26,31,46,.2); }
.field input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); cursor: pointer; border: 3px solid var(--ink); }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 8px; }
.field input[type="number"] { width: 100%; padding: 11px 14px; border: 1px solid var(--line-hi); border-radius: 10px; background: var(--ink); color: var(--ivory); font-size: 15px; font-family: inherit; }

/* Results */
.results { display: flex; flex-direction: column; gap: 20px; }
.result-hero { background: radial-gradient(ellipse at top left, rgba(28,122,82,.1), transparent 70%), var(--ink-2); border: 1px solid var(--gold-dim); border-radius: var(--radius-lg); padding: 32px; }
.result-hero .lab { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.result-hero .big { font-family: 'Inter', system-ui, sans-serif; font-size: clamp(36px, 6vw, 56px); color: var(--ivory); font-weight: 500; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.result-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-split .cell { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.result-split .cell .lab { font-size: 12px; color: var(--ivory-dim); font-weight: 600; }
.result-split .cell .num { font-family: 'Inter', system-ui, sans-serif; font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.result-split .cell .num.invested { color: var(--ivory-dim); }
.result-split .cell .num.gained { color: var(--emerald); }

.chart-wrap { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.chart-wrap .lab { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 16px; }
.chart-wrap svg { width: 100%; height: auto; display: block; }

/* Email capture */
.capture { background: var(--ink-3); border: 1px dashed var(--line-hi); border-radius: var(--radius-lg); padding: 26px; margin-top: 8px; }
.capture h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 19px; color: var(--ivory); }
.capture p { color: var(--ivory-dim); font-size: 13.5px; margin-top: 6px; }
.capture form { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.capture input { flex: 1; min-width: 200px; padding: 12px 16px; border: 1px solid var(--line-hi); border-radius: 999px; background: var(--ink); color: var(--ivory); font-size: 14px; font-family: inherit; }
.capture .ok { color: var(--emerald); font-size: 13px; font-weight: 600; margin-top: 12px; }

.disclaimer { font-size: 12px; color: var(--muted); line-height: 1.6; max-width: 760px; margin: 0 auto 60px; text-align: center; }

/* Gated year-by-year detail table */
#detailUnlocked { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px 8px; background: var(--ink); }
table.detail { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.detail th, table.detail td { padding: 8px 8px; text-align: right; border-bottom: 1px solid var(--line); }
table.detail th { position: sticky; top: 0; background: var(--ink); color: var(--ivory-dim); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
table.detail th:first-child, table.detail td:first-child { text-align: left; color: var(--muted); }
table.detail tr:last-child td { border-bottom: none; }
