/* ════════════════════════════════════════════════════════════
   Third Rock Wealth · SIP TOOL — "The Accumulation"
   Bespoke, dark, cinematic layout for sip-calculator.html.
   Loaded after tool-dark.css.

   Palette logic: evergreen carries structure; warm gold marks
   growth / the upside (projected value, returns). Cream is the
   primary text. Panels are softly rounded.
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   HERO — compact immersive 3D band
   ════════════════════════════════════════════════════════════ */
.sip-hero {
  position: relative;
  min-height: 420px;
  height: clamp(420px, 56vh, 640px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--hairline);
}
.sip-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.sip-hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 62% 42%, rgba(123,165,135,0.10), transparent 70%),
    linear-gradient(to bottom, rgba(14,20,16,0.55) 0%, transparent 26%,
                    transparent 55%, var(--surface) 99%);
}
.sip-hero-inner {
  position: relative;
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding-bottom: clamp(32px, 5vh, 56px);
}
.sip-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
  margin: 0 0 16px;
}
.sip-eyebrow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-bright);
  font-size: 12px;
}
.sip-hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(31px, 4.5vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--text);
  font-variation-settings: "SOFT" 40, "opsz" 110;
}
.sip-hero-title .l { display: block; }
.sip-hero-title em {
  font-style: italic;
  color: var(--gold-bright);
  font-variation-settings: "SOFT" 90, "opsz" 144;
}
.sip-hero-lede {
  font-family: var(--sans);
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 46ch;
  margin: 0 0 22px;
}
.sip-hero-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-mute);
}
.sip-hero-cue i {
  width: 44px; height: 1px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}
.sip-hero-cue i::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 14px;
  background: var(--accent-bright);
  animation: sip-cue 2.4s var(--ease, ease) infinite;
}
@keyframes sip-cue {
  0% { transform: translateX(-16px); }
  60%, 100% { transform: translateX(46px); }
}

/* ════════════════════════════════════════════════════════════
   THE INSTRUMENT — the page's focus
   readout band, then console + chart as two even panels
   ════════════════════════════════════════════════════════════ */
.sip-instrument {
  background: var(--surface);
  padding: clamp(34px, 4.5vw, 68px) 0 clamp(48px, 7vw, 96px);
}
.sip-instrument > * {
  width: min(1280px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

/* ── result readout band ──────────────────────────────────── */
.sip-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 52px);
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: clamp(22px, 2.8vw, 40px) clamp(24px, 3vw, 46px);
  margin-bottom: clamp(16px, 2vw, 26px);
}
.sip-readout-main { min-width: 0; }
.sip-readout-main .sip-kicker { display: block; margin-bottom: 12px; }
.sip-kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-bright);
}
.sip-figure {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(50px, 8vw, 122px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--text);
  font-variation-settings: "SOFT" 20, "opsz" 144;
  font-feature-settings: "tnum";
  text-shadow: 0 0 64px var(--gold-glow);
}

.sip-subfigures {
  display: flex;
  flex-wrap: wrap;
}
.sip-sub {
  padding: 2px clamp(16px, 2.2vw, 32px);
  border-left: 1px solid var(--hairline);
}
.sip-sub:first-child { border-left: none; padding-left: 0; }
.sip-sub-k {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.sip-sub-v {
  display: block;
  font-family: var(--serif);
  font-size: clamp(23px, 2.7vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: "tnum";
  font-variation-settings: "SOFT" 40, "opsz" 100;
}
.sip-sub-accent .sip-sub-v { color: var(--gold-bright); }
.sip-sub-mult .sip-sub-v { color: var(--accent-bright); }

/* ── console + chart grid (two even panels) ───────────────── */
.sip-instrument-grid {
  display: grid;
  grid-template-columns: 372px 1fr;
  gap: clamp(16px, 2vw, 26px);
  align-items: stretch;
}
@media (max-width: 940px) {
  .sip-instrument-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ── console ──────────────────────────────────────────────── */
.sip-console {
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: clamp(22px, 2.4vw, 30px);
}
@media (max-width: 940px) { .sip-console { order: 3; } }
.sip-console-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}
.sip-console-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}
.sip-console-meta::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(123,165,135,0.16);
}

/* mode toggle */
.sip-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--hairline-bold);
  border-radius: var(--r-ctl);
  overflow: hidden;
  margin-bottom: 26px;
}
.sip-mode-btn {
  background: transparent;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-soft);
  padding: 13px 10px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.sip-mode-btn + .sip-mode-btn { border-left: 1px solid var(--hairline-bold); }
.sip-mode-btn:hover { color: var(--text); }
.sip-mode-btn.is-on { background: var(--accent); color: var(--surface); }

/* field */
.sip-field { margin-bottom: 24px; }
.sip-field-stepup { display: none; }
.sip-instrument.is-stepup .sip-field-stepup { display: block; }
.sip-field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.sip-field-top label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}

/* editable value — slider + number input share each field */
.sip-field-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.sip-unit-pre {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--text-soft);
  font-variation-settings: "SOFT" 40, "opsz" 90;
}
.sip-unit {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}
/* body.tool-page prefix overrides the light-site default input chrome */
body.tool-page .sip-num {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-bold);
  border-radius: 0;
  text-align: right;
  padding: 0 1px 3px;
  margin: 0;
  box-sizing: content-box;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 40, "opsz" 90;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  box-shadow: none;
  transition: border-color 140ms ease;
}
body.tool-page .sip-num::-webkit-outer-spin-button,
body.tool-page .sip-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.tool-page .sip-num:hover { border-bottom-color: var(--accent); }
body.tool-page .sip-num:focus { border-bottom-color: var(--gold-bright); background: transparent; }
.sip-num--amount { width: 132px; }
.sip-num--pct { width: 56px; }
.sip-num--yrs { width: 48px; }

/* slider */
.sip-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent) var(--fill, 0%), var(--hairline-bold) var(--fill, 0%));
  outline: none;
  cursor: pointer;
}
.sip-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-bright);
  border: 4px solid var(--surface-raised);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow);
  cursor: grab;
  transition: transform 120ms ease;
}
.sip-range::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.14); }
.sip-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-bright);
  border: 4px solid var(--surface-raised);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow);
  cursor: grab;
}
.sip-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--hairline-bold); }
.sip-range:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 6px; }
.sip-field-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.sip-console-foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-mute);
}

/* ── chart panel — the graph, given full panel stature ────── */
.sip-chart-panel {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  overflow: hidden;
}
@media (max-width: 940px) { .sip-chart-panel { order: 2; } }
.sip-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px clamp(18px, 2vw, 26px);
  border-bottom: 1px solid var(--hairline);
}
.sip-chart-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 320px;
  background:
    radial-gradient(78% 66% at 72% 16%, rgba(226,166,62,0.06), transparent 72%),
    var(--surface-raised);
}
#sip-chart-canvas { display: block; width: 100%; height: 100%; }
.sip-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}
.sip-chart-legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.sip-chart-legend .lg::before { content: ''; width: 16px; height: 3px; border-radius: 2px; }
.sip-chart-legend .lg-inv::before { background: var(--accent); }
.sip-chart-legend .lg-ret::before { background: var(--gold-bright); box-shadow: 0 0 10px var(--gold-glow); }
.sip-chart-legend .lg-cmp { display: none; }
.sip-chart-legend .lg-cmp::before {
  background: repeating-linear-gradient(to right, var(--text-mute) 0 5px, transparent 5px 9px);
}
.sip-instrument.is-stepup .sip-chart-legend .lg-cmp { display: inline-flex; }

/* ── step-up comparison band ──────────────────────────────── */
.sip-compare {
  display: none;
  margin-top: clamp(16px, 2vw, 26px);
}
.sip-instrument.is-stepup .sip-compare { display: block; }
.sip-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  overflow: hidden;
}
@media (max-width: 720px) { .sip-compare-grid { grid-template-columns: 1fr; } }
.sip-compare-cell {
  padding: clamp(20px, 2.6vw, 34px);
  border-right: 1px solid var(--hairline);
  background: var(--surface-raised);
}
.sip-compare-cell:last-child { border-right: none; }
@media (max-width: 720px) {
  .sip-compare-cell { border-right: none; border-bottom: 1px solid var(--hairline); }
  .sip-compare-cell:last-child { border-bottom: none; }
}
.sip-compare-cell.is-lead { background: var(--gold); }
.sip-compare-k {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.sip-compare-cell.is-lead .sip-compare-k { color: rgba(14,20,16,0.62); }
.sip-compare-v {
  display: block;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  font-feature-settings: "tnum";
  font-variation-settings: "SOFT" 30, "opsz" 110;
}
.sip-compare-cell.is-lead .sip-compare-v { color: var(--surface); }
.sip-compare-note {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--gold-bright);
}
.sip-compare-cell.is-lead .sip-compare-note { color: rgba(14,20,16,0.72); }

/* ════════════════════════════════════════════════════════════
   BANDS — cost-of-delay, insight
   ════════════════════════════════════════════════════════════ */
.sip-band {
  border-top: 1px solid var(--hairline);
  padding: clamp(44px, 7vw, 96px) 0;
}
.sip-band-inner { width: min(1280px, 92vw); margin: 0 auto; }

/* cost-of-delay — dark restyle of behavioural-tools.js output */
body.tool-page .cost-of-delay-wrap {
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: clamp(24px, 3vw, 40px);
}
body.tool-page .cost-of-delay-head .eyebrow { color: var(--accent-bright); }
body.tool-page .cost-of-delay-head .eyebrow::before { background: var(--accent); }
body.tool-page .cost-of-delay-head h3 {
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
}
body.tool-page .cost-of-delay-blurb { color: var(--text-soft); }
body.tool-page .cost-of-delay-grid {
  border: 1px solid var(--hairline);
  border-radius: var(--r-ctl);
  overflow: hidden;
}
body.tool-page .cost-of-delay-card {
  background: var(--surface);
  border-color: var(--hairline);
}
body.tool-page .cost-of-delay-card.baseline { background: var(--accent); }
body.tool-page .cost-of-delay-label { color: var(--text-mute); }
body.tool-page .cost-of-delay-card.baseline .cost-of-delay-label { color: rgba(14,20,16,0.6); }
body.tool-page .cost-of-delay-value { color: var(--text); }
body.tool-page .cost-of-delay-card.baseline .cost-of-delay-value { color: var(--surface); }
body.tool-page .cost-of-delay-sub { color: var(--text-soft); }
body.tool-page .cost-of-delay-card.baseline .cost-of-delay-sub { color: rgba(14,20,16,0.66); }
body.tool-page .cost-of-delay-delta { color: var(--alert); }
body.tool-page .cost-of-delay-headline {
  background: var(--gold-soft);
  border: 1px solid rgba(226,166,62,0.32);
  border-radius: var(--r-ctl);
  color: var(--text);
}
body.tool-page .cost-of-delay-headline strong { color: var(--gold-bright); }

/* insight — an editorial pull-statement */
.sip-insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}
@media (max-width: 680px) { .sip-insight { grid-template-columns: 1fr; } }
.sip-insight-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(70px, 9vw, 130px);
  line-height: 0.7;
  color: var(--gold);
}
.sip-insight-body {
  font-family: var(--serif);
  font-size: clamp(21px, 2.7vw, 36px);
  line-height: 1.34;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
  font-variation-settings: "SOFT" 40, "opsz" 110;
}
.sip-insight-body strong {
  font-weight: 500;
  color: var(--gold-bright);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════
   RELATED TOOLS
   ════════════════════════════════════════════════════════════ */
.sip-related {
  border-top: 1px solid var(--hairline);
  padding: clamp(44px, 6vw, 88px) 0;
}
.sip-related-inner { width: min(1280px, 92vw); margin: 0 auto; }
.sip-related h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-bright);
  margin: 0 0 26px;
}
.sip-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.sip-related-card {
  display: block;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: background 160ms ease;
}
.sip-related-card:hover { background: var(--surface-high); }
.sip-related-card .rc-meta {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  margin: 0 0 10px;
}
.sip-related-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.018em;
  color: var(--text);
  font-variation-settings: "SOFT" 40, "opsz" 90;
}
.sip-related-card p {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}
.sip-related-card .rc-arrow {
  position: absolute;
  right: 22px; bottom: 22px;
  font-family: var(--mono);
  color: var(--gold-bright);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.sip-related-card:hover .rc-arrow { opacity: 1; transform: translateX(0); }

/* ════════════════════════════════════════════════════════════
   DISCLAIMER
   ════════════════════════════════════════════════════════════ */
.sip-disclaimer {
  border-top: 1px solid var(--hairline);
  padding: clamp(34px, 4vw, 56px) 0;
  text-align: center;
}
.sip-disclaimer-inner { width: min(680px, 90vw); margin: 0 auto; }
.sip-disclaimer .sip-kicker { display: block; margin-bottom: 12px; }
.sip-disclaimer p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   COUNT-UP / PULSE
   ════════════════════════════════════════════════════════════ */
@keyframes sip-fig-pulse {
  0% { text-shadow: 0 0 64px var(--gold-glow); }
  40% { text-shadow: 0 0 64px var(--gold-glow), 0 0 26px rgba(242,190,92,0.5); }
  100% { text-shadow: 0 0 64px var(--gold-glow); }
}
.sip-figure.is-pulsing { animation: sip-fig-pulse 520ms var(--ease, ease); }

@media (prefers-reduced-motion: reduce) {
  .sip-hero-cue i::after { animation: none; }
  .sip-figure.is-pulsing { animation: none; }
}
