/* Simple Cash Calc — connected, sharp chrome (no floating pill cards) */
:root {
  --scc-emerald: #059669;
  --scc-emerald-dark: #047857;
  --scc-ink: #0f172a;
  --scc-muted: #64748b;
  --scc-line: #e2e8f0;
  --scc-paper: #f1f5f9;
  --scc-card: #ffffff;
  --scc-radius: 4px;
  --scc-head: 0.6875rem;
}

html { overflow-y: auto; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--scc-ink);
  background: var(--scc-paper);
  font-family: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

.brand-display {
  font-family: Fraunces, Georgia, serif;
  letter-spacing: -0.02em;
}

.page-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px 40px;
  box-sizing: border-box;
}
@media (min-width: 1280px) {
  .page-shell { max-width: 1680px; padding: 0 24px 48px; }
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--scc-line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.site-brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--scc-radius);
  background: var(--scc-emerald);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.site-brand-title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  color: var(--scc-ink);
}
.site-brand-sub {
  font-size: 0.6875rem;
  color: var(--scc-muted);
  margin: 0.1rem 0 0;
  font-weight: 500;
}

.site-nav {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.8125rem;
  color: #475569;
}
.site-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.site-nav a:hover { color: var(--scc-ink); }
.site-nav a[aria-current="page"] {
  color: var(--scc-emerald-dark);
}
@media (min-width: 900px) {
  .site-nav { display: flex; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--scc-radius);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}
.btn-primary {
  background: var(--scc-emerald);
  color: #fff !important;
  border-color: var(--scc-emerald);
}
.btn-primary:hover { background: var(--scc-emerald-dark); border-color: var(--scc-emerald-dark); }
.btn-secondary {
  background: #fff;
  color: var(--scc-ink);
  border-color: #cbd5e1;
}
.btn-secondary:hover { background: #f8fafc; }
.btn-ghost {
  background: transparent;
  color: #475569;
  border-color: transparent;
}
.btn-ghost:hover { background: #f1f5f9; color: var(--scc-ink); }

/* Connected calculator switch — segmented bar, no floating pills */
.tool-switch {
  border-bottom: 1px solid var(--scc-line);
  background: #fff;
}
.tool-switch-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 0.5rem 0 0.65rem;
}
.tool-switch-label {
  display: flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--scc-muted);
  margin-right: 0.65rem;
  padding: 0.35rem 0;
}
.tool-seg {
  display: inline-flex;
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
  overflow: hidden;
  background: #fff;
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-right: 1px solid var(--scc-line);
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0;
}
.tool-chip:last-child { border-right: 0; }
.tool-chip:hover {
  background: #f8fafc;
  color: var(--scc-emerald-dark);
}
.tool-chip[aria-current="page"] {
  background: var(--scc-emerald);
  color: #fff;
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 72px;
  overflow: hidden;
}

/* Connected panels */
.panel {
  background: var(--scc-card);
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
}
.panel-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--scc-line);
  background: #f8fafc;
}
.panel-head h2,
.panel-title {
  margin: 0;
  font-size: var(--scc-head);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--scc-ink);
}
.panel-sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--scc-muted);
}
.panel-body { padding: 1rem; }

.page-title {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.15;
  color: var(--scc-ink);
}
.page-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
  max-width: 40rem;
}

/* Flush two-column calc shell */
.calc-shell {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
  overflow: hidden;
  background: #fff;
}
@media (min-width: 960px) {
  .calc-shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}
.calc-side {
  border-bottom: 1px solid var(--scc-line);
  background: #fff;
}
@media (min-width: 960px) {
  .calc-side {
    border-bottom: 0;
    border-right: 1px solid var(--scc-line);
  }
}
.calc-main { min-width: 0; background: #fff; }

/* KPI strip — shared borders, zero gap */
.kpi-strip {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--scc-line);
}
@media (min-width: 640px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
.kpi-strip.cols-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .kpi-strip.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .kpi-strip.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.kpi-cell {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--scc-line);
  background: #fff;
}
@media (min-width: 640px) {
  .kpi-cell {
    border-bottom: 0;
    border-right: 1px solid var(--scc-line);
  }
  .kpi-cell:last-child { border-right: 0; }
  .kpi-strip.cols-4 .kpi-cell:nth-child(2n) { border-right: 0; }
}
@media (min-width: 1100px) {
  .kpi-strip.cols-4 .kpi-cell { border-right: 1px solid var(--scc-line); }
  .kpi-strip.cols-4 .kpi-cell:last-child { border-right: 0; }
  .kpi-strip.cols-4 .kpi-cell:nth-child(2n) { border-right: 1px solid var(--scc-line); }
}
.kpi-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--scc-muted);
}
.kpi-value {
  margin-top: 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--scc-ink);
  line-height: 1.15;
}
.kpi-sub {
  margin: 0.3rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--scc-muted);
}

.field { margin-bottom: 0.85rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.3rem;
}
.field input,
.field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--scc-radius);
  font: inherit;
  font-size: 0.875rem;
  box-sizing: border-box;
  background: #fff;
  color: var(--scc-ink);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--scc-emerald);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.section-block {
  padding: 1rem;
  border-bottom: 1px solid var(--scc-line);
}
.section-block:last-child { border-bottom: 0; }
.section-block h3 {
  margin: 0 0 0.45rem;
  font-size: var(--scc-head);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--scc-ink);
}

.progress-track {
  height: 0.5rem;
  background: #e2e8f0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--scc-emerald);
  width: 0%;
}

.fit-ok { color: #065f46; font-weight: 700; }
.fit-warn { color: #92400e; font-weight: 700; }
.fit-bad { color: #991b1b; font-weight: 700; }

/* FAQ: full-width connected list */
.faq-frame {
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
  background: #fff;
  overflow: hidden;
}
.faq-frame > header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--scc-line);
  background: #f8fafc;
}
.faq-item {
  border-bottom: 1px solid var(--scc-line);
  padding: 1rem 1.25rem;
}
.faq-item:last-child { border-bottom: 0; }
.faq-item h2 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--scc-ink);
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.faq-item p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
}
.faq-item a {
  color: var(--scc-emerald-dark);
  font-weight: 600;
  text-decoration: none;
}
.faq-item a:hover { text-decoration: underline; }

.content-card {
  background: var(--scc-card);
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
}
.prose-scc h1 {
  margin: 0 0 0.75rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--scc-ink);
  line-height: 1.15;
}
.prose-scc h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.35rem 0 0.4rem;
  color: var(--scc-ink);
  font-family: inherit;
}
.prose-scc p, .prose-scc li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #475569;
}
.prose-scc a { color: var(--scc-emerald-dark); font-weight: 600; }
.prose-scc ul { list-style: disc; padding-left: 1.25rem; }
.prose-scc ol { list-style: decimal; padding-left: 1.25rem; }
.prose-scc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.prose-scc th, .prose-scc td {
  border: 1px solid var(--scc-line);
  padding: 0.65rem 0.75rem;
  text-align: left;
}
.prose-scc th { background: #f8fafc; font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--scc-line);
  background: #fff;
  margin-top: auto;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem 0;
  font-size: 0.75rem;
  color: var(--scc-muted);
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.site-footer a:hover { color: var(--scc-ink); text-decoration: underline; }

.layout-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  border: 1px solid var(--scc-line);
  border-radius: var(--scc-radius);
  overflow: hidden;
  background: #fff;
}
@media (min-width: 1024px) {
  .layout-wide {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }
}
.layout-wide > * {
  border-bottom: 1px solid var(--scc-line);
}
@media (min-width: 1024px) {
  .layout-wide > *:first-child {
    border-bottom: 0;
    border-right: 1px solid var(--scc-line);
  }
  .layout-wide > *:last-child { border-bottom: 0; }
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  background: #0f172a;
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: var(--scc-radius);
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
