/* ============================================================
   ssy-calculator.css — SmartFinance design system v1
   Tokens mirror fd/sip/ppf-calculator.css for visual consistency.
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --brand:       #1d9e75;
  --brand-dark:  #0f7558;
  --brand-tint:  #f0fdf9;
  --brand-line:  #a7f3d0;
  --ink:         #0f172a;
  --ink-mute:    #475569;
  --ink-faint:   #94a3b8;
  --line:        #e2e8f0;
  --surface:     #ffffff;
  --radius:      12px;
  --nav-bar:     52px;
  --shadow-sm:   0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:   0 4px 16px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  --shadow-glow: 0 0 0 4px rgba(29,158,117,.12);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(ellipse 140% 80% at 50% -20%, rgba(29,158,117,.07) 0%, transparent 55%),
              radial-gradient(ellipse 90% 60% at 85% 100%, rgba(29,158,117,.05) 0%, transparent 50%),
              #f8fafc;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Nav ─────────────────────────────────────────────────── */
.topnav {
  height: var(--nav-bar);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 6px;
}

.breadcrumb-item {
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.breadcrumb-item:hover { color: var(--brand-dark); }

.breadcrumb-sep {
  font-size: 13px;
  color: var(--ink-faint);
}

.breadcrumb-current {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

/* ── Page wrapper ────────────────────────────────────────── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf8 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-top: 24px;
  text-align: left;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 280px at 100% -40%, rgba(29,158,117,.10) 0%, transparent 60%);
  pointer-events: none;
}

header.hero { text-align: left; margin: 0; }

.hero-copy { position: relative; z-index: 1; }

.hero-kicker { margin: 0 0 14px; }

.hero-kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--brand-line);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,158,117,.18);
}

.hero-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0;
  max-width: 22ch;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 46ch;
}

.hero-subtitle a {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-subtitle a:hover {
  color: var(--brand);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  box-shadow: var(--shadow-sm);
}

.hero-cta-row {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta-btn, .cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s, background .15s, color .15s;
}

.cta-btn {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: 1px solid var(--brand-dark);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(29,158,117,.28), inset 0 1px 0 rgba(255,255,255,.18);
  color: #fff;
}

.cta-secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--brand-line);
  box-shadow: var(--shadow-sm);
}
.cta-secondary:hover {
  background: var(--brand-tint);
  box-shadow: var(--shadow-md);
  color: var(--brand-dark);
}

.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg {
  width: 100%;
  height: auto;
  max-width: 360px;
  filter: drop-shadow(0 12px 24px rgba(15,23,42,.10));
  border-radius: 16px;
}

/* ── Layout ──────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.col-left, .col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-icon {
  color: var(--brand);
  flex-shrink: 0;
}

/* ── Input group ─────────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
}
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.field input[type="number"]:hover { border-color: var(--brand-line); }
.field input[type="number"]:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-glow);
}

.hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ── Slider ──────────────────────────────────────────────── */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-min, .slider-max {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  min-width: 32px;
}
.slider-max { text-align: right; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) calc(var(--p, 50%) * 1%), var(--line) calc(var(--p, 50%) * 1%));
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 1px 4px rgba(15,23,42,.16);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(29,158,117,.18);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
}

/* ── Results grid ────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Result item ─────────────────────────────────────────── */
.result-item {
  position: relative;
  background: linear-gradient(135deg, #fff 0%, var(--brand-tint) 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow .18s, transform .18s;
  min-width: 0;
}
.result-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.result-item.hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: var(--brand-line);
  padding: 20px 16px 16px;
}

.hero-badge {
  position: absolute;
  top: -1px;
  left: 16px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
}

.r-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.r-icon { color: var(--brand); flex-shrink: 0; }

.r-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  line-height: 1.15;
}

.r-value.value-positive { color: var(--brand-dark); }
.r-value.value-negative { color: #b91c1c; }

.result-item.hero .r-value { font-size: 26px; color: var(--brand-dark); }

.r-delta {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ── Inline inflation token ──────────────────────────────── */
.r-assume {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.6;
}

.r-assume strong {
  color: var(--brand-dark);
  font-weight: 700;
}

.r-assume-token {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 1px 6px 1px 5px;
  background: rgba(29,158,117,.08);
  border: 1px dashed var(--brand-line);
  border-radius: 6px;
  cursor: text;
  transition: background .15s, border-color .15s, transform .12s;
  vertical-align: baseline;
}
.r-assume-token:hover { background: rgba(29,158,117,.14); border-color: var(--brand); }
.r-assume-token:focus-within { background: rgba(29,158,117,.14); border-color: var(--brand); transform: scale(1.05); }

.r-assume-input {
  width: 30px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.r-assume-input::-webkit-inner-spin-button,
.r-assume-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.r-assume-unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
}

/* ── Insight lines ───────────────────────────────────────── */
.insight-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.55;
  border-left: 3px solid var(--line);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  background: #fafafa;
  margin-bottom: 8px;
}

.insight-line:last-child { margin-bottom: 0; }

.insight-line.insight-good {
  border-left-color: var(--brand);
  background: var(--brand-tint);
  color: var(--ink);
}
.insight-line.insight-warn {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: var(--ink);
}
.insight-line.insight-risk {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: var(--ink);
}

.insight-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(29,158,117,.12);
  color: var(--brand-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.insight-good .insight-tag { background: rgba(29,158,117,.15); color: var(--brand-dark); }
.insight-warn .insight-tag { background: rgba(245,158,11,.15); color: #92400e; }
.insight-risk .insight-tag { background: rgba(239,68,68,.12); color: #991b1b; }

/* ── Chart ───────────────────────────────────────────────── */
.chart-wrap {
  height: 200px;
  position: relative;
}

/* ── Content grid ────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.info-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon { color: var(--brand); flex-shrink: 0; }

.info-section p, .info-section li {
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.65;
}

.info-section p + p { margin-top: 8px; }

.info-section ul, .info-section ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-section ol li strong, .info-section ul li strong { color: var(--ink); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-section {
  margin-top: 40px;
}

.section-head {
  margin-bottom: 20px;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.faq-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: none; }

.faq-item details summary {
  list-style: none;
  padding: 16px 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .15s;
}
.faq-item details summary::-webkit-details-marker { display: none; }

.faq-item details summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--brand);
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item details[open] summary::after {
  content: "−";
}

.faq-item details summary:hover { background: var(--brand-tint); }

.faq-item dd p {
  padding: 0 20px 16px;
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.65;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
  .hero-art { max-width: 360px; margin: 0 auto; order: -1; }
  .hero-title { font-size: 30px; max-width: 100%; }
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page { padding: 0 16px 48px; }
  .hero { padding: 22px 18px; border-radius: 16px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; }
  .results-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .cta-btn, .cta-secondary { width: 100%; justify-content: center; }
  .hero-cta-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
