/* ============================================================
   PAGES.CSS — Shared styles for Stocks, Pension, Mortgage, Budget
   ============================================================ */

/* PAGE HERO */
.page-hero {
  padding: 48px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--sand-darker);
}
.page-hero__inner { max-width: 640px; margin: 0 auto; }
.page-hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 12px;
}
.page-hero__sub {
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* SELECT INPUT */
.input-wrap--select {
  padding: 0;
  overflow: hidden;
}
.input-field--select {
  width: 100%;
  border: none;
  background: transparent;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9488' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* SPLIT HERO (Stocks + Mortgage) */
.result-hero--split {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: none;
  color: inherit;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.result-hero__col {
  flex: 1;
  text-align: center;
  padding: 24px 16px;
  background: var(--green);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.result-hero__col--muted {
  background: var(--sand-dark);
  color: var(--ink);
}
.result-hero__divider {
  width: 2px;
  background: var(--green-dark);
  flex-shrink: 0;
}
.result-hero--split .result-hero__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 6px;
}
.result-hero__col--muted .result-hero__label { opacity: 0.7; }
.result-hero--split .result-hero__amount {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
  font-weight: 700;
}
.result-hero__amount--tax { color: var(--warn); }
.result-hero__col--muted .result-hero__amount--tax { color: var(--warn); }

/* TAX BAND BADGE */
.tax-band-badge { margin-bottom: 16px; }

/* BREAKDOWN TABLE */
.breakdown-table {
  margin-bottom: 20px;
  border: 1.5px solid var(--sand-darker);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.breakdown-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.6fr 1fr;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sand-dark);
  font-size: 0.82rem;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row--header {
  background: var(--sand-dark);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.breakdown-row--total {
  background: var(--green-tint);
  font-weight: 700;
  color: var(--green-dark);
}

/* ISA NUDGE */
.isa-nudge {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--green-tint);
  border: 1.5px solid var(--green-tint2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.isa-nudge__icon { font-size: 1.1rem; flex-shrink: 0; }
.isa-nudge a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }

/* GAP WARNING */
.gap-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--warn-tint);
  border: 1.5px solid #f5c6c2;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.gap-warning__icon { font-size: 1.1rem; flex-shrink: 0; }
.gap-warning__title { font-weight: 700; font-size: 0.85rem; color: var(--warn); margin-bottom: 4px; }
.gap-warning__text  { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.55; }

/* OVERPAY BANNER */
.overpay-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--green-tint);
  border: 1.5px solid var(--green-tint2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.overpay-banner__icon { font-size: 1.1rem; flex-shrink: 0; }
.overpay-banner strong { color: var(--green-dark); }

/* PENSION LAYOUT */
.calc-layout--pension { align-items: start; }

/* BUDGET GRID */
.budget-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.budget-item {
  background: var(--white);
  border: 1.5px solid var(--sand-darker);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.budget-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.budget-item__icon   { font-size: 1rem; flex-shrink: 0; }
.budget-item__name   { flex: 1; font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.budget-item__amount { font-family: var(--font-display); font-size: 1rem; color: var(--ink); font-weight: 700; }
.budget-item__bar {
  height: 6px;
  background: var(--sand-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.budget-item__bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.budget-item__pct { font-size: 0.7rem; color: var(--ink-faint); }

/* SURPLUS BANNER */
.budget-surplus {
  margin-bottom: 20px;
  background: var(--green-tint);
  border: 1.5px solid var(--green-tint2);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.budget-surplus__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.5rem;
}
.budget-surplus__label  { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 2px; }
.budget-surplus__amount { font-family: var(--font-display); font-size: 1.4rem; color: var(--green-dark); line-height: 1; }
.budget-surplus__sub    { font-size: 0.76rem; color: var(--ink-faint); margin-top: 4px; }

/* Responsive */
@media (max-width: 560px) {
  .breakdown-row { grid-template-columns: 1.5fr 1fr 0.5fr 0.8fr; font-size: 0.75rem; padding: 8px 10px; }
  .result-hero--split .result-hero__amount { font-size: 1.4rem; }
}

/* Clickable coming card */
.coming-card--link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.coming-card--link:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.coming-card--link h3 { color: var(--green-dark); }
