:root {
  --budget-ink: #18263a;
  --budget-muted: #5e7087;
  --budget-line: rgba(24, 38, 58, 0.12);
  --budget-surface: rgba(255, 255, 255, 0.95);
  --budget-surface-soft: rgba(255, 255, 255, 0.86);
  --budget-brand: #0f6abf;
  --budget-brand-2: #13a39a;
  --budget-brand-deep: #0b345f;
  --budget-accent: #f08a38;
  --budget-good: #157f65;
  --budget-warn: #ba7a0f;
  --budget-bad: #b64747;
  --budget-shadow: 0 24px 54px rgba(16, 33, 58, 0.08);
  --budget-radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(19, 163, 154, 0.16), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(15, 106, 191, 0.14), transparent 38%),
    linear-gradient(180deg, #eef5ff 0%, #f7f9fc 46%, #f9f7f1 100%);
}

.budget-shell,
.budget-shell input,
.budget-shell select,
.budget-shell textarea,
.budget-shell button {
  font: inherit;
}

.budget-shell {
  width: min(1120px, 90vw);
  margin: 24px auto 48px;
  color: var(--budget-ink);
}

.budget-shell a {
  color: inherit;
}

.skip-link,
.sr-only {
  position: absolute;
  left: -999px;
}

.skip-link {
  top: 0;
}

.skip-link:focus,
.sr-only:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
}

.hero-budget {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 22px;
  margin-top: 16px;
  padding: 28px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--budget-brand-deep), var(--budget-brand) 56%, var(--budget-brand-2));
  box-shadow: var(--budget-shadow);
}

.hero-budget > [data-simplekit-header] {
  grid-column: 1 / -1;
}

.hero-budget .site-topbar {
  margin-bottom: 0;
}

.hero-copy,
.hero-side,
.hero-highlight,
.hero-mini-grid,
.planner-card,
.results-stack,
.input-card,
.feature-grid,
.info-grid,
.charts-grid,
.summary-grid,
.insight-list,
.faq-list,
.related-grid,
.row-list,
.expense-sections,
.quickstart-grid,
.jump-links,
.table-card-list {
  display: grid;
  gap: 12px;
}

.eyebrow,
.section-kicker,
.step-kicker,
.mini-kicker,
.trust-label {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.mini-kicker {
  opacity: 0.86;
}

.section-kicker,
.step-kicker,
.trust-label {
  color: var(--budget-brand);
}

.hero-budget h1,
.panel h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
}

.hero-budget h1 {
  font-size: clamp(2.6rem, 4.8vw, 5rem);
  line-height: 1.02;
  max-width: 9ch;
}

.hero-subtitle,
.hero-proof,
.muted,
.small-copy,
.panel-header p,
.results-block-head p,
.group-head p,
.chart-card p,
.budget-row-note {
  margin: 0;
}

.hero-subtitle {
  font-size: 1.08rem;
  font-weight: 700;
  max-width: 58ch;
}

.hero-proof,
.panel-header p,
.results-block-head p,
.info-card p,
.feature-grid p,
.related-card p,
.faq-list p,
.result-card p,
.insight-card p {
  line-height: 1.6;
}

.hero-actions,
.toolbar-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-trust-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-trust-row span,
.hero-mini-grid div,
.hero-highlight {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(7px);
}

.hero-trust-row span,
.hero-mini-grid div {
  padding: 10px 12px;
  font-size: 0.88rem;
}

.hero-highlight {
  padding: 18px;
}

.hero-highlight strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin: 6px 0 10px;
}

.mini-summary-label {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
}

.panel,
.results-shell,
.results-status,
.feature-grid article,
.info-card,
.chart-card,
.insight-card,
.related-card {
  border: 1px solid var(--budget-line);
  border-radius: var(--budget-radius);
  background: var(--budget-surface);
  box-shadow: 0 10px 30px rgba(16, 33, 58, 0.04);
}

.page-flow {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.panel,
.results-status,
.results-shell {
  padding: 22px;
}

.planner-intro-copy {
  margin: 12px 0 0;
  color: var(--budget-muted);
  line-height: 1.6;
}

.panel-mini {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 106, 191, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.recommender-bar strong {
  display: block;
  margin-bottom: 10px;
}

.mobile-summary-bar {
  display: none;
}

.inline-helper,
.result-method-note {
  margin: 0;
  color: var(--budget-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.recommended-start {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 106, 191, 0.04);
  border: 1px solid rgba(15, 106, 191, 0.08);
  color: var(--budget-ink);
}

.starter-recommendation {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(19, 163, 154, 0.05);
  border: 1px solid rgba(19, 163, 154, 0.08);
}

.starter-recommendation strong {
  display: block;
  margin-bottom: 10px;
}

.recommended-start strong {
  display: inline-block;
  margin-right: 6px;
}

.inline-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--budget-brand);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.panel-header,
.results-block-head,
.input-card-head,
.group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.feature-grid,
.info-grid,
.related-grid,
.quickstart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid,
.info-grid,
.related-grid {
  margin-top: 16px;
}

.feature-grid article,
.info-card,
.related-card,
.chart-card,
.insight-card {
  padding: 16px;
}

.feature-grid strong,
.info-card h3,
.related-card strong,
.chart-card h4,
.insight-card strong,
.result-card strong {
  display: block;
  margin-bottom: 8px;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.planner-card {
  align-content: start;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--budget-line);
  background: var(--budget-surface-soft);
  position: sticky;
  top: 16px;
}

.jump-panel {
  padding: 12px 18px;
}

.jump-links {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.jump-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(15, 106, 191, 0.05);
  border: 1px solid rgba(15, 106, 191, 0.08);
}

.quickstart-grid article {
  padding: 16px;
  border: 1px solid var(--budget-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.form-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.input-card {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--budget-line);
}

.starter-mode-card {
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.05), rgba(255, 255, 255, 0.96));
}

.mode-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.suggested-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 106, 191, 0.12);
  background: rgba(15, 106, 191, 0.05);
  color: var(--budget-ink);
  cursor: pointer;
}

.chip-btn:hover {
  background: rgba(15, 106, 191, 0.09);
}

.chip-btn-strong {
  border-color: rgba(15, 106, 191, 0.18);
  background: rgba(15, 106, 191, 0.11);
  font-weight: 700;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.planner-grid-goals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--budget-line);
  border-radius: 14px;
  color: var(--budget-ink);
  background: #fff;
}

.currency-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--budget-line);
  border-radius: 14px;
  background: #fff;
}

.currency-input span {
  font-weight: 700;
  color: var(--budget-muted);
}

.currency-input input {
  border: 0;
  padding-left: 0;
  padding-right: 0;
}

.currency-input input:focus {
  outline: none;
}

.row-list {
  gap: 10px;
}

.budget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 180px) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--budget-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.03), rgba(255, 255, 255, 0.96));
}

body[data-planner-mode="simple"] .budget-row-advanced,
body[data-planner-mode="simple"] .goals-card:not([open]) .planner-grid,
body[data-planner-mode="simple"] .goals-card:not([open]) .assumption-note,
body[data-planner-mode="simple"] .goals-card:not([open]) .input-card-head {
  display: none;
}

body[data-planner-mode="simple"] .goals-card {
  padding-top: 14px;
}

body[data-planner-mode="simple"] .row-list::after {
  content: "Showing the most common categories first. Use Show full planner to reveal everything.";
  display: block;
  margin-top: 4px;
  color: var(--budget-muted);
  font-size: 0.9rem;
}

body[data-planner-mode="simple"] #incomeRows::after,
body[data-planner-mode="simple"] #fixedExpenseRows::after,
body[data-planner-mode="simple"] #variableExpenseRows::after {
  content: "Showing the most common categories first. Use Show full planner for more.";
}

.row-label,
.row-amount-field {
  min-width: 0;
}

.row-remove-btn,
.row-add-btn {
  white-space: nowrap;
}

.expense-group {
  display: grid;
  gap: 12px;
}

.group-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(24, 38, 58, 0.08);
}

.assumption-note {
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--budget-muted);
}

.results-stack {
  align-content: start;
}

.results-status {
  background: linear-gradient(135deg, rgba(15, 106, 191, 0.08), rgba(19, 163, 154, 0.08));
}

.status-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill.good {
  color: var(--budget-good);
  background: rgba(21, 127, 101, 0.12);
}

.status-pill.warn {
  color: var(--budget-warn);
  background: rgba(186, 122, 15, 0.12);
}

.status-pill.bad {
  color: var(--budget-bad);
  background: rgba(182, 71, 71, 0.12);
}

.status-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.summary-grid-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary-summary-details,
.table-details,
.goals-card,
.learn-details,
.faq-details {
  border: 1px solid var(--budget-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.secondary-summary-details summary,
.table-details summary,
.goals-card summary,
.learn-details summary,
.faq-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 14px 16px;
}

.secondary-summary-details summary::-webkit-details-marker,
.table-details summary::-webkit-details-marker,
.goals-card summary::-webkit-details-marker,
.learn-details summary::-webkit-details-marker,
.faq-details summary::-webkit-details-marker {
  display: none;
}

.secondary-summary-details[open] summary,
.table-details[open] summary,
.goals-card[open] summary,
.learn-details[open] summary,
.faq-details[open] summary {
  border-bottom: 1px solid var(--budget-line);
}

.secondary-summary-details[open] .summary-grid-secondary,
.table-details[open] .table-shell,
.table-details[open] .table-card-list,
.goals-card[open] .planner-grid,
.goals-card[open] .assumption-note,
.goals-card[open] .input-card-head,
.learn-details[open] .info-grid,
.faq-details[open] .faq-list {
  padding: 16px;
}

.result-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--budget-line);
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.05), rgba(255, 255, 255, 0.9));
}

.result-card-primary {
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.1), rgba(255, 255, 255, 0.95));
  grid-column: 1 / -1;
  padding: 18px;
}

.result-card-primary .metric {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
}

.next-step-banner {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 106, 191, 0.12);
  background: linear-gradient(180deg, rgba(19, 163, 154, 0.08), rgba(255, 255, 255, 0.92));
}

.next-step-banner strong {
  display: block;
  margin-bottom: 6px;
}

.next-step-banner p {
  margin: 0;
  color: var(--budget-muted);
  line-height: 1.55;
}

.next-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.next-tool-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(15, 106, 191, 0.12);
  background: rgba(15, 106, 191, 0.05);
}

.result-method-note {
  margin-top: 12px;
}

.results-lead-copy {
  margin: 0 0 14px;
  color: var(--budget-muted);
  line-height: 1.6;
}

.empty-state-guide {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 106, 191, 0.22);
  background: rgba(15, 106, 191, 0.04);
}

.empty-state-guide strong {
  display: block;
  margin-bottom: 6px;
}

.empty-state-guide p {
  margin: 0;
  color: var(--budget-muted);
  line-height: 1.55;
}

.primary-result-headline {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--budget-line);
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.08), rgba(255, 255, 255, 0.96));
}

.primary-result-headline strong {
  display: block;
  margin: 6px 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
}

.primary-result-headline p {
  margin: 0;
  color: var(--budget-muted);
  line-height: 1.55;
}

.primary-result-headline[data-tone="good"] {
  border-color: rgba(21, 127, 101, 0.18);
  background: linear-gradient(180deg, rgba(21, 127, 101, 0.1), rgba(255, 255, 255, 0.96));
}

.primary-result-headline[data-tone="warn"] {
  border-color: rgba(186, 122, 15, 0.18);
  background: linear-gradient(180deg, rgba(186, 122, 15, 0.08), rgba(255, 255, 255, 0.96));
}

.primary-result-headline[data-tone="bad"] {
  border-color: rgba(182, 71, 71, 0.18);
  background: linear-gradient(180deg, rgba(182, 71, 71, 0.08), rgba(255, 255, 255, 0.96));
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.budget-health-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--budget-line);
  background: rgba(255, 255, 255, 0.72);
}

.budget-health-banner strong {
  display: block;
  margin-bottom: 6px;
}

.budget-health-banner p {
  margin: 0;
  color: var(--budget-muted);
  line-height: 1.55;
}

.budget-health-banner[data-tone="good"] {
  border-color: rgba(21, 127, 101, 0.18);
  background: rgba(21, 127, 101, 0.07);
}

.budget-health-banner[data-tone="warn"] {
  border-color: rgba(186, 122, 15, 0.18);
  background: rgba(186, 122, 15, 0.07);
}

.budget-health-banner[data-tone="bad"] {
  border-color: rgba(182, 71, 71, 0.18);
  background: rgba(182, 71, 71, 0.07);
}

.result-card .metric {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.15;
  margin-bottom: 8px;
}

.metric.good {
  color: var(--budget-good);
}

.metric.bad {
  color: var(--budget-bad);
}

.metric.warn {
  color: var(--budget-warn);
}

.charts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.chart-card:last-child {
  grid-column: 1 / -1;
}

.chart-card h4 {
  margin-top: 0;
}

.chart-explainer {
  margin-top: 8px;
  color: var(--budget-muted);
  font-size: 0.94rem;
}

.chart-action-copy {
  margin: 8px 0 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--budget-ink);
}

.chart-stack {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  gap: 6px;
}

.chart-row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chart-bar-track,
.mix-track,
.totals-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(24, 38, 58, 0.08);
}

.chart-bar-fill,
.mix-fill,
.totals-bar-fill {
  height: 100%;
  border-radius: inherit;
}

.totals-chart {
  display: grid;
  gap: 14px;
}

.totals-chart-row {
  display: grid;
  gap: 6px;
}

.mix-chart {
  display: grid;
  gap: 14px;
}

.mix-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mix-stat {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 106, 191, 0.05);
  border: 1px solid rgba(15, 106, 191, 0.08);
}

.mix-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
}

.insight-list {
  margin-top: 16px;
}

.insight-card {
  display: grid;
  gap: 8px;
}

.insight-card strong {
  margin-bottom: 0;
}

.table-shell {
  overflow-x: auto;
}

.table-card-list {
  display: none;
  padding: 16px;
}

.table-card {
  padding: 14px;
  border: 1px solid var(--budget-line);
  border-radius: 14px;
  background: rgba(15, 106, 191, 0.04);
}

.table-card p {
  margin: 6px 0 0;
  color: var(--budget-muted);
}

.budget-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.budget-table th,
.budget-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--budget-line);
}

.budget-table th {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--budget-muted);
}

.budget-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-muted {
  color: var(--budget-muted);
}

.faq-list {
  margin-top: 16px;
}

.faq-list details {
  padding: 16px 18px;
  border: 1px solid var(--budget-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin-top: 10px;
}

.related-card {
  text-decoration: none;
}

.related-card:hover {
  transform: translateY(-1px);
}

.related-card-highlight {
  border-color: rgba(15, 106, 191, 0.22);
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.08), rgba(255, 255, 255, 0.96));
}

.action-details {
  margin-top: 10px;
  border: 1px solid var(--budget-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.action-details summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
}

.action-details[open] .secondary-actions {
  padding: 0 14px 14px;
}

.related-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-grid-compact .related-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.04), rgba(255, 255, 255, 0.92));
}

.related-grid-compact .related-card strong {
  margin-bottom: 0;
}

.related-grid-compact .related-card p {
  font-size: 0.94rem;
  line-height: 1.45;
}

.related-tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--budget-brand);
  background: rgba(15, 106, 191, 0.08);
}

.empty-state {
  padding: 14px;
  border-radius: 16px;
  background: rgba(24, 38, 58, 0.04);
  color: var(--budget-muted);
}

.budget-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.budget-shell .btn:hover {
  transform: translateY(-1px);
}

.budget-shell .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--budget-brand), var(--budget-brand-2));
  box-shadow: 0 14px 28px rgba(11, 52, 95, 0.22);
}

.budget-shell .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.budget-shell .btn-secondary-panel,
.budget-shell .btn-tertiary {
  color: var(--budget-ink);
  border-color: var(--budget-line);
  background: #fff;
}

.budget-shell .btn:focus-visible,
.budget-shell input:focus-visible,
.budget-shell select:focus-visible,
.budget-shell textarea:focus-visible,
.faq-list summary:focus-visible,
.related-card:focus-visible {
  outline: 3px solid rgba(240, 138, 56, 0.32);
  outline-offset: 2px;
}

.no-print {
  print-color-adjust: exact;
}

@media (max-width: 960px) {
  .hero-budget,
  .planner-layout,
  .feature-grid,
  .info-grid,
  .related-grid,
  .quickstart-grid,
  .charts-grid,
  .planner-grid,
  .planner-grid-goals,
  .summary-grid,
  .form-toolbar,
  .jump-links {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .results-block-head,
  .input-card-head,
  .group-head {
    flex-direction: column;
  }

  .planner-card {
    position: static;
  }

  .chart-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .budget-row,
  .mix-segments,
  .summary-grid-primary,
  .summary-grid-secondary {
    grid-template-columns: 1fr;
  }

  .budget-row {
    align-items: stretch;
  }

  .row-remove-btn {
    width: 100%;
  }

  .related-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .budget-shell {
    width: min(100vw - 24px, 100%);
    margin: 12px auto 32px;
  }

  .hero-budget,
  .panel,
  .results-status,
  .results-shell {
    padding: 18px;
  }

  .budget-table {
    min-width: 600px;
  }

  .related-grid-compact {
    grid-template-columns: 1fr;
  }

  .mobile-summary-bar {
    position: sticky;
    top: 52px;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 6px;
    padding: 10px;
    border: 1px solid rgba(15, 106, 191, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
  }

  .mobile-summary-bar div {
    min-width: 0;
    text-align: center;
  }

  .mobile-summary-bar span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--budget-muted);
  }

  .mobile-summary-bar strong {
    display: block;
    margin-top: 4px;
    font-size: 0.98rem;
  }

  .next-tool-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .next-tool-link {
    justify-content: center;
  }

  .form-actions {
    gap: 8px;
  }

  .panel-mini {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .primary-result-headline {
    padding: 14px 16px;
    border-radius: 16px;
  }

  .primary-result-headline strong {
    font-size: 1.8rem;
  }

  .results-shell,
  .results-status,
  .input-card,
  .quickstart-grid article {
    border-radius: 16px;
  }

  .budget-row {
    padding: 10px;
    gap: 8px;
  }

  .result-card {
    padding: 14px;
  }

  .planner-card {
    padding: 14px;
  }

  .starter-pack-card,
  .starter-mode-card,
  .quickstart-panel,
  .jump-panel {
    padding: 14px;
  }

  .chart-card,
  .insight-card,
  .related-grid-compact .related-card {
    padding: 12px;
  }

  .table-shell {
    display: none;
  }

  .table-card-list {
    display: grid;
  }

  .jump-panel {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(8px);
  }

  .jump-links a {
    font-size: 0;
    position: relative;
  }

  .jump-links a::after {
    content: attr(data-short-label);
    font-size: 0.92rem;
  }

  .action-details:not([open]) {
    background: rgba(15, 106, 191, 0.03);
  }

  .hero-mini-grid {
    display: none;
  }

  .hero-highlight {
    padding: 14px;
  }

  .panel-header p,
  .results-block-head p,
  .planner-intro-copy {
    font-size: 0.96rem;
  }

  .results-lead-copy,
  .inline-helper,
  .result-method-note,
  .chart-explainer,
  .chart-action-copy {
    font-size: 0.9rem;
  }

  .empty-state-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .faq-list details,
  .secondary-summary-details,
  .action-details,
  .table-details {
    border-radius: 14px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .hero-budget,
  .no-print,
  [data-simplekit-header],
  [data-simplekit-support],
  [data-simplekit-footer] {
    display: none !important;
  }

  .budget-shell {
    width: 100%;
    margin: 0;
  }

  .panel,
  .results-shell,
  .results-status {
    box-shadow: none;
    border-color: #d5dde6;
    background: #fff;
  }
}
