/*
 * WattleFolio visual system.
 *
 * Keep reusable colours, spacing, shadows and radii in :root. Route-specific
 * rules should remain grouped under a labelled section rather than mixed into
 * the shared component rules. Edit this root file and run `npm run sync:public`.
 */
:root {
  color-scheme: light;

  /* Core neutrals */
  --ink: #2d4039;
  --muted: #66756f;
  --muted-2: #8d9a94;
  --canvas: #f4f7f2;
  --surface: #ffffff;
  --surface-soft: #f7faf6;
  --line: #dfe8e1;
  --line-strong: #cbd8d0;

  /* Brand palette — navy + professional blue */
  --forest-950: #284b43;
  --forest-900: #35645a;
  --forest-800: #42796d;
  --forest-700: #558f81;
  --forest-300: #a8ccc2;
  --forest-100: #e3f0eb;
  --forest-50: #f0f7f4;
  --lime: #f4ddae;
  --lime-dark: #dfbd78;
  --blue: #4f8176;
  --blue-bg: #edf5f2;

  /* Status colours */
  --amber: #c98216;
  --amber-bg: #fff7e6;
  --red: #c2413a;
  --red-bg: #fff1f0;
  --success: #15805d;
  --success-bg: #ecfdf5;

  /* UI system */
  --shadow: 0 1px 2px rgba(38, 70, 61, 0.03), 0 12px 30px rgba(56, 87, 77, 0.055);
  --shadow-hover: 0 3px 8px rgba(38, 70, 61, 0.05), 0 18px 38px rgba(73, 117, 104, 0.1);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 11px;
  --sidebar: 244px;
  --sidebar-collapsed: 76px;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(420px, 1.14fr);
  background: var(--surface);
}
.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 42px clamp(36px, 6vw, 88px) 28px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-brand strong,
.auth-brand small {
  display: block;
}
.auth-brand strong {
  font-size: 15px;
}
.auth-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.auth-content {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  padding: 56px 0;
}
.auth-content h2 {
  margin-top: 7px;
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.08;
}
.auth-kicker {
  margin: 0;
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-intro {
  margin: 13px 0 22px;
  color: var(--muted);
  font-size: 13px;
}
.auth-form {
  display: grid;
  gap: 9px;
}
.auth-form label {
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.auth-form small {
  margin: -3px 0 2px;
  color: var(--muted);
  font-size: 10px;
}
.auth-form .form-control {
  min-height: 46px;
}
.auth-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.auth-links button,
.auth-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest-700);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.auth-notice {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}
.auth-notice-info {
  background: var(--blue-bg);
  color: #243b8f;
}
.auth-notice-success {
  background: var(--success-bg);
  color: var(--success);
}
.auth-notice-error {
  background: var(--red-bg);
  color: #9f382e;
}
.auth-footnote {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}
.auth-footnote a,
.footer-note a,
.statement-privacy-note a {
  color: inherit;
  font-weight: 800;
  text-underline-offset: 2px;
}
.auth-consent {
  display: grid !important;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 10px !important;
  font-weight: 650 !important;
  line-height: 1.5;
}
.auth-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--forest-700);
}
.auth-consent a {
  color: var(--forest-800);
}
.trusted-device-choice {
  margin-top: 10px !important;
}
.trusted-device-choice strong,
.trusted-device-choice small {
  display: block;
}
.trusted-device-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}
.mfa-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: center;
}
.mfa-qr img {
  width: min(220px, 100%);
  height: auto;
}
.mfa-qr p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.mfa-qr code {
  max-width: 100%;
  padding: 6px 8px;
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 10px;
  user-select: all;
}
.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(52px, 8vw, 112px);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 240, 201, 0.2), transparent 26%),
    radial-gradient(circle at 20% 90%, rgba(255, 240, 201, 0.09), transparent 28%), var(--forest-950);
  color: #fff;
}
.auth-aside h1 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.03;
}
.auth-aside > div > p:last-child {
  max-width: 570px;
  margin: 24px 0 0;
  color: #f4ead2;
  font-size: 15px;
}
.auth-aside .eyebrow {
  color: var(--lime);
}
.security-list,
.setup-list {
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}
.security-list {
  display: grid;
  max-width: 610px;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.security-list li {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}
.security-list li > span {
  display: block;
  margin-bottom: 22px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
}
.security-list strong,
.security-list small {
  display: block;
}
.security-list strong {
  font-size: 12px;
}
.security-list small {
  margin-top: 5px;
  color: #ded4bc;
  font-size: 10px;
  line-height: 1.5;
}
.setup-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.setup-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.setup-list li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--forest-100);
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
}
.setup-list strong,
.setup-list small {
  display: block;
}
.setup-list strong {
  font-size: 12px;
}
.setup-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.setup-list code {
  font-size: 10px;
}
.auth-support {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.auth-loading {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 80px 0;
  color: var(--muted);
  text-align: center;
}
.auth-loading p {
  margin: 0;
  font-size: 12px;
}
.auth-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--forest-100);
  border-top-color: var(--forest-700);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: radial-gradient(circle at 15% 95%, rgba(255, 240, 201, 0.1), transparent 30%), var(--forest-950);
  color: #fffaf0;
  transition:
    width 0.22s ease,
    padding 0.22s ease,
    transform 0.2s ease;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 8px 34px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--lime);
  color: var(--forest-950);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.06em;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
}
.brand small {
  margin-top: 2px;
  color: #ded4bc;
  font-size: 11px;
}
.nav-list {
  display: grid;
  gap: 6px;
}
.nav-group-label {
  margin: 2px 13px 3px;
  color: #71829a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-group-spaced {
  margin-top: 14px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  color: #f4ead2;
  text-decoration: none;
  font-weight: 600;
  transition: 0.18s ease;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}
.nav-link.is-active {
  background: rgba(255, 240, 201, 0.16);
  color: var(--lime);
}
.nav-icon {
  width: 21px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 16px;
}
.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  color: #fff7e2;
}
.privacy-note strong,
.privacy-note small {
  display: block;
}
.privacy-note strong {
  font-size: 12px;
}
.privacy-note small {
  color: #d8ceb7;
  font-size: 10px;
  margin-top: 2px;
}
.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(255, 240, 201, 0.14);
}
.sidebar-action {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #fff7e2 !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.sidebar-action-icon {
  display: none;
  font-size: 18px;
  line-height: 1;
}
.sidebar-toggle {
  position: absolute;
  top: 76px;
  right: -14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: var(--forest-800);
  color: #fff;
  box-shadow: 0 5px 16px rgba(3, 17, 38, 0.32);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
  transition:
    background 0.16s ease,
    transform 0.22s ease;
}
.sidebar-toggle:hover {
  background: var(--forest-700);
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
  transition: margin-left 0.22s ease;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 112px;
  padding: 28px clamp(24px, 4vw, 56px) 22px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1,
h2,
h3,
h4 {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.035em;
}
h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}
h2 {
  margin: 0;
  font-size: 20px;
}
h3 {
  margin: 0;
  font-size: 15px;
}
p {
  line-height: 1.55;
}
.page-summary {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.saved-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.saved-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.saved-status.is-saving span {
  background: var(--amber);
}
.saved-status.is-error {
  color: var(--red);
  cursor: pointer;
}
.saved-status.is-error span {
  background: var(--red);
}
.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 25px;
}
.button {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.button:hover {
  border-color: var(--forest-700);
}
.button:active {
  transform: translateY(1px);
}
.button-primary {
  border-color: var(--forest-900);
  background: var(--forest-900);
  color: #fff;
}
.button-primary:hover {
  background: var(--forest-800);
}
.button-accent {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--forest-950);
}
.button-quiet {
  background: transparent;
}
.button-danger {
  color: var(--red);
  border-color: #efcbc6;
  background: #fff8f7;
}
.button-small {
  padding: 7px 10px;
  font-size: 12px;
}
.button-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
}

.page {
  padding: 4px clamp(24px, 4vw, 56px) 42px;
}
.footer-note {
  padding: 0 clamp(24px, 4vw, 56px) 26px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}
.section {
  margin-top: 24px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest-700);
  font-weight: 700;
  cursor: pointer;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-main {
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.8fr);
}
.grid-aside {
  grid-template-columns: minmax(0, 1fr) 330px;
}
.card {
  background: var(--surface);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 20px;
}
.kpi-card {
  min-height: 138px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  right: -34px;
  top: -34px;
  background: var(--forest-50);
}
.kpi-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.kpi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest-700);
}
.kpi-value {
  margin-top: 16px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.045em;
}
.kpi-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.kpi-meta strong {
  color: var(--forest-700);
}
.negative {
  color: var(--red) !important;
}
.positive {
  color: var(--success) !important;
}
.neutral {
  color: var(--blue) !important;
}
.chart-card {
  min-height: 340px;
  padding: 20px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}
.chart-wrap {
  width: 100%;
  min-height: 255px;
}
.chart-wrap svg {
  width: 100%;
  height: auto;
  min-height: 250px;
  display: block;
  overflow: visible;
}
.chart-gridline {
  stroke: #e6edf5;
  stroke-width: 1;
}
.chart-axis {
  fill: #7c8799;
  font:
    10px "Segoe UI",
    system-ui,
    sans-serif;
}
.chart-area {
  fill: url(#areaFill);
}
.chart-line {
  fill: none;
  stroke: var(--forest-700);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line-secondary {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-point {
  fill: var(--surface);
  stroke: var(--forest-700);
  stroke-width: 2;
}
.chart-focus {
  fill: var(--forest-900);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}
.pill-good {
  color: #126247;
  background: var(--success-bg);
}
.pill-warn {
  color: #8b5b12;
  background: var(--amber-bg);
}
.pill-bad {
  color: #9f382e;
  background: var(--red-bg);
}
.pill-info {
  color: #243b8f;
  background: var(--blue-bg);
}
.action-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.action-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.action-item:first-child {
  border-top: 0;
}
.action-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-weight: 800;
  font-size: 12px;
}
.action-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.progress-block {
  margin-top: 18px;
}
.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}
.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f7;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-700), var(--lime-dark));
}
.milestone-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}
.compact-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 18px -20px -20px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.compact-stat {
  padding: 14px 20px;
  background: var(--surface);
}
.compact-stat small {
  display: block;
  color: var(--muted);
}
.compact-stat strong {
  display: block;
  margin-top: 4px;
}

.table-card {
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.table-toolbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  padding: 11px 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
td.number,
th.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tbody tr:hover td {
  background: #f9fbfd;
}
.table-total td {
  background: var(--forest-50);
  font-weight: 800;
}
.muted {
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-good {
  background: var(--success);
}
.status-warn {
  background: var(--amber);
}
.status-bad {
  background: var(--red);
}
.money-input {
  width: 120px;
  text-align: right;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(36, 59, 143, 0.14);
}
.form-control.needs-review {
  background: #fffbed;
  border-color: #e6cf87;
}
.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(140px, 0.7fr);
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.field-row > * {
  min-width: 0;
}
.field-row:first-child {
  border-top: 0;
}
.field-copy strong {
  display: block;
  font-size: 13px;
}
.field-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.input-with-unit {
  position: relative;
}
.input-with-unit .form-control {
  padding-right: 54px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.input-with-unit .form-control[type="text"] {
  padding-right: 11px;
  text-align: left;
}
.input-unit {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
}
.recurring-input-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.recurring-input-control > * {
  width: 100%;
  min-width: 0;
}
.budget-frequency-select {
  min-width: 132px;
}
.salary-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.salary-input-grid .field-row {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.salary-input-grid .field-row:first-child {
  border-top: 1px solid var(--line);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dialog-form {
  display: grid;
  gap: 12px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-input {
  max-width: 300px;
}
.input-section {
  overflow: hidden;
  margin-bottom: 14px;
}
.input-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  cursor: pointer;
}
.input-section-head:hover {
  background: var(--surface-soft);
}
.input-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.input-section-body {
  padding: 0 18px 10px;
}
.input-section.is-collapsed .input-section-body {
  display: none;
}
.chevron {
  color: var(--muted);
  transition: transform 0.15s;
}
.input-section.is-collapsed .chevron {
  transform: rotate(-90deg);
}
.settings-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 18px;
}
.settings-strip p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sale-choice {
  align-items: end;
}
.sale-choice label {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sale-choice .form-select {
  width: auto;
  min-width: 220px;
}
.input-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-card {
  padding: 20px;
}
.portfolio-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.property-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.property-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.property-title-edit {
  flex: 1;
  min-width: 0;
}
.property-name-input {
  min-height: 36px;
  padding: 7px 9px;
  font-weight: 750;
}
.property-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}
.property-value {
  margin: 18px 0 4px;
  font:
    700 28px Inter,
    "Segoe UI",
    system-ui,
    sans-serif;
  letter-spacing: -0.04em;
}
.metric-list {
  display: grid;
  gap: 0;
  margin-top: 17px;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.metric-row span {
  color: var(--muted);
  font-size: 12px;
}
.metric-row strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.asset-bar {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f7;
  margin-top: 16px;
}
.asset-bar span:first-child {
  background: var(--forest-700);
}
.asset-bar span:last-child {
  background: var(--lime-dark);
}

.scenario-control {
  display: grid;
  gap: 6px;
}
.range-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--forest-700);
}
.hero-plan {
  padding: 22px;
  background: var(--forest-900);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}
.hero-plan .eyebrow {
  color: var(--lime);
}
.hero-plan h2 {
  font-size: clamp(25px, 3vw, 38px);
}
.hero-plan p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #bac8dc;
  font-size: 13px;
}
.plan-numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.plan-number {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}
.plan-number small {
  display: block;
  color: #a7b7cc;
}
.plan-number strong {
  display: block;
  margin-top: 6px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 19px;
}
.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 12px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 16px;
  width: 1px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
}
.timeline-marker {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--forest-50);
  color: var(--forest-700);
  border: 4px solid var(--surface);
  font-size: 10px;
  font-weight: 800;
}
.timeline-item h3 {
  margin-top: 4px;
}
.timeline-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.timeline-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.notice {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--amber-bg);
  color: #6e4b19;
  font-size: 12px;
  line-height: 1.5;
}
.notice strong {
  display: block;
  margin-bottom: 2px;
}
.toolkit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.65fr);
  gap: 28px;
  padding: 28px;
  overflow: hidden;
  background: var(--forest-900);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}
.toolkit-hero-copy {
  align-self: center;
}
.toolkit-hero .eyebrow {
  color: var(--lime);
}
.toolkit-hero h2 {
  max-width: 760px;
  font-size: clamp(27px, 3.3vw, 42px);
  line-height: 1.1;
}
.toolkit-hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 13px 0 0;
  color: #b9c8dc;
  font-size: 13px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.toolkit-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.toolkit-secondary:hover {
  border-color: rgba(255, 255, 255, 0.45);
}
.readiness-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}
.readiness-panel > span {
  color: #a9b9cf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.readiness-panel > strong {
  display: block;
  margin: 8px 0 14px;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.06em;
}
.readiness-panel > strong small {
  margin-left: 3px;
  color: #91a4be;
  font-size: 15px;
  letter-spacing: normal;
}
.readiness-panel .progress-track {
  background: rgba(255, 255, 255, 0.13);
}
.readiness-panel p {
  margin: 11px 0 0;
  color: #b9c8dc;
  font-size: 11px;
}
.review-rhythm .advice-card {
  min-height: 188px;
}
.advice-card {
  padding: 20px;
}
.advice-card h3 {
  margin-top: 8px;
  font-size: 17px;
}
.advice-card p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.advice-kicker {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.calculator-card {
  padding: 20px;
}
.calculator-card-wide {
  grid-column: 1 / -1;
}
.calculator-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
}
.calculator-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.calculator-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
}
.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}
.calculator-fields-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.calculator-field {
  display: grid;
  align-content: start;
  gap: 5px;
}
.calculator-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.calculator-field > small {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.35;
}
.calculator-field .form-control {
  min-height: 39px;
  padding-right: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.calculator-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 20px -20px -20px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.calculator-results-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.calculator-result {
  min-height: 90px;
  padding: 14px 20px;
  background: var(--surface-soft);
}
.calculator-result > span,
.calculator-result > small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.calculator-result > strong {
  display: block;
  margin-top: 6px;
  color: var(--forest-800);
  font-size: 18px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.calculator-result > small {
  margin-top: 4px;
  line-height: 1.35;
}
.property-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.property-metric-strip > div {
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--forest-50), #fffaf0);
  border: 1px solid #e7ddc2;
}
.property-metric-strip span,
.property-metric-strip small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.property-metric-strip strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--forest-800);
  font-size: 22px;
  letter-spacing: -0.035em;
}
.property-metric-strip b {
  color: var(--ink);
  font-weight: 700;
}
.help-list {
  display: grid;
}
.help-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.help-item:first-child {
  border-top: 0;
}
.help-item > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 900;
}
.help-item strong {
  display: block;
  font-size: 12px;
}
.help-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.disclosure {
  border-top: 1px solid var(--line);
}
.disclosure:first-of-type {
  border-top: 0;
}
.disclosure summary {
  padding: 13px 0;
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.disclosure p {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 11px;
}
.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: 320px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 15px;
  border-radius: 11px;
  background: var(--forest-950);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  transition: 0.2s ease;
}
.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Workspace architecture */
.income-section {
  overflow: hidden;
}
.income-summary-strip,
.share-value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px -20px -20px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.income-summary-strip > div,
.share-value-strip > div {
  padding: 15px 20px;
  background: var(--surface-soft);
}
.income-summary-strip small,
.share-value-strip small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.income-summary-strip strong,
.share-value-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--forest-800);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.budget-category-stack,
.property-editor-stack,
.share-holding-stack {
  display: grid;
  gap: 16px;
}
.budget-category-card .table-toolbar > strong {
  color: var(--forest-800);
  font-size: 18px;
  white-space: nowrap;
}
.budget-category-card .table-toolbar > strong small {
  color: var(--muted);
  font-size: 10px;
}
.table-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}
.empty-cell {
  padding: 24px !important;
  color: var(--muted);
  text-align: center;
}
.add-expense-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.add-expense-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.add-expense-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.8fr) auto;
  gap: 9px;
  width: min(720px, 68%);
}

.property-editor-card {
  overflow: hidden;
}
.property-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.property-editor-header h2 {
  margin-top: 3px;
  font-size: 20px;
}
.property-editor-header p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.property-editor-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.property-editor-actions .chevron {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.2s ease;
}
.property-editor-card.is-collapsed .property-editor-body {
  display: none;
}
.property-editor-card.is-collapsed .chevron {
  transform: rotate(-90deg);
}
.property-editor-body {
  display: grid;
  gap: 0;
}
.property-input-group {
  padding: 22px;
  border-top: 1px solid var(--line);
}
.property-input-group:first-child {
  border-top: 0;
}
.input-group-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
}
.input-group-title > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 900;
}
.input-group-title h3 {
  margin-top: 1px;
}
.input-group-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.property-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
}
.property-model-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.property-model-total strong {
  color: var(--forest-800);
  font-size: 14px;
}
.loan-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.loan-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
.loan-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.loan-editor-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.loan-label {
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.loan-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.share-toolbar {
  align-items: center;
}
.share-holding-card {
  overflow: hidden;
}
.share-holding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}
.share-holding-head h2 {
  margin-top: 3px;
  font-size: 21px;
}
.share-holding-head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.share-value-strip {
  margin: 0;
}
.share-input-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.share-input-groups > section {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}
.share-input-groups > section:last-child {
  border-right: 0;
}
.share-input-groups h3 {
  margin-bottom: 8px;
  color: var(--forest-800);
  font-size: 12px;
}
.share-input-groups .field-row {
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px 0;
}
.share-input-groups .recurring-input-control {
  grid-template-columns: 1fr;
}
.share-forecast-row {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}
.share-forecast-row strong {
  margin-left: 4px;
  color: var(--forest-800);
}
.empty-state-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 20px;
}
.empty-state h2 {
  color: var(--ink);
}
.empty-state p {
  max-width: 520px;
  margin: 7px auto 16px;
  font-size: 12px;
}

.allocation-chart-card {
  min-height: 360px;
}
.allocation-chart-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(190px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 250px;
}
.donut-svg {
  width: min(100%, 230px);
  margin: auto;
  overflow: visible;
}
.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 24;
}
.donut-track {
  stroke: #edf2f7;
}
.donut-segment {
  transform: rotate(-90deg);
  transform-origin: 80px 80px;
  transition: opacity 0.15s;
}
.donut-segment:hover {
  opacity: 0.78;
}
.donut-center-label {
  fill: var(--muted);
  font:
    700 9px "Segoe UI",
    system-ui,
    sans-serif;
  text-transform: uppercase;
}
.donut-center-value {
  fill: var(--forest-900);
  font:
    800 15px Inter,
    "Segoe UI",
    system-ui,
    sans-serif;
}
.allocation-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.allocation-list li {
  display: grid;
  grid-template-columns: 10px minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.allocation-list li:first-child {
  border-top: 0;
}
.allocation-list li.is-highlighted {
  margin: 3px -8px;
  padding: 9px 8px;
  border: 1px solid #efc777;
  border-radius: 9px;
  background: #fff8e8;
}
.donut-segment.is-highlighted {
  stroke-width: 29;
}
.allocation-list strong {
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.allocation-list small {
  min-width: 42px;
  color: var(--muted);
  text-align: right;
}
.allocation-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.allocation-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-chart {
  display: grid;
  place-content: center;
  min-height: 210px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}
.empty-chart strong {
  color: var(--ink);
}
.empty-chart span {
  margin-top: 4px;
  font-size: 10px;
}
.comparison-bars {
  display: grid;
  gap: 17px;
  margin-top: 24px;
}
.comparison-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.comparison-bar-head strong {
  color: var(--forest-800);
}
.comparison-track {
  height: 10px;
  overflow: hidden;
  margin: 7px 0 5px;
  border-radius: 99px;
  background: #edf2f7;
}
.comparison-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.comparison-bar small {
  color: var(--muted);
  font-size: 9px;
}
.analysis-selector {
  align-items: center;
}
.analysis-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 10px;
  width: min(560px, 60%);
}
.analysis-select-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.debt-summary-strip,
.forecast-composition {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 8px -20px -20px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.debt-summary-strip span,
.forecast-composition span {
  padding: 13px 18px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}
.debt-summary-strip strong,
.forecast-composition strong {
  display: block;
  margin-top: 4px;
  color: var(--forest-800);
  font-size: 13px;
}
.share-chart-area {
  fill: url(#shareAreaFill);
}
.share-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.offset-chart-area {
  fill: url(#offsetAreaFill);
}
.offset-chart-line {
  fill: none;
  stroke: var(--forest-700);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.offset-target-line {
  stroke: #c07a12;
  stroke-width: 2;
  stroke-dasharray: 7 5;
}
.offset-target-label {
  fill: #89550a;
  font:
    800 9px "Segoe UI",
    system-ui,
    sans-serif;
}
.forecast-composition {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.investment-pause-card {
  overflow: hidden;
  border-color: #e8dfc8;
  background: linear-gradient(145deg, var(--surface), #fffaf0);
}
.investment-pause-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.investment-pause-grid .field-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 13px 0;
}
.offset-redirect-choice {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 5px;
  padding: 13px 14px;
  border: 1px solid #e9dfc2;
  border-radius: 12px;
  background: #fff8e8;
  cursor: pointer;
}
.offset-redirect-choice input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--forest-700);
}
.offset-redirect-choice span,
.offset-redirect-choice strong,
.offset-redirect-choice small {
  display: block;
}
.offset-redirect-choice strong {
  color: var(--forest-900);
  font-size: 11px;
}
.offset-redirect-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.offset-strategy-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.offset-strategy-card {
  overflow: hidden;
}
.offset-kpis {
  margin-top: 18px;
}
.offset-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.offset-settings-panel {
  min-width: 0;
  container-type: inline-size;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.offset-settings-panel h3 {
  color: var(--forest-800);
  font-size: 14px;
}
.offset-settings-panel > p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.offset-settings-panel .input-section-body {
  padding: 4px 0 0;
}
.offset-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.offset-link-grid label {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.offset-form-note {
  margin-bottom: 0 !important;
}
.offset-form-note strong {
  color: var(--forest-800);
}
.offset-goal-details {
  margin: 8px 0 14px;
}
.offset-settings-panel > .button {
  margin-top: 2px;
}

/* [UI-01] Keep amount/frequency controls inside each offset panel.
   This reacts to the panel width itself, including browser zoom and sidebar changes. */
@container (max-width: 600px) {
  .offset-settings-panel .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}
@container (max-width: 360px) {
  .offset-settings-panel .recurring-input-control {
    grid-template-columns: minmax(0, 1fr);
  }
}
.offset-chart-grid {
  align-items: stretch;
}
.offset-chart-grid .chart-card {
  min-height: 330px;
}
.offset-repayment-note {
  margin-bottom: 0;
}
.table-explainer {
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #fff8e8;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.table-total-secondary td {
  background: #f2f6fb;
  color: var(--forest-800);
}

.budget-allocation-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.budget-allocation-card {
  min-height: 0;
}
.budget-allocation-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.budget-allocation-callout > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--forest-100);
  color: var(--forest-800);
  font-weight: 900;
}
.budget-allocation-callout strong,
.budget-allocation-callout small {
  display: block;
}
.budget-allocation-callout strong {
  color: var(--ink);
  font-size: 12px;
}
.budget-allocation-callout small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.budget-allocation-callout.is-unassigned {
  background: #fff8e8;
}
.budget-allocation-callout.is-unassigned > span {
  background: #fbe2ad;
  color: #7a4d00;
}
.budget-allocation-callout.is-over {
  background: #fff0ed;
}
.budget-allocation-callout.is-over > span {
  background: #f7cbc3;
  color: #8b2e1e;
}

.property-subtabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
.property-subtab {
  min-height: 38px;
  padding: 8px 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}
.property-subtab:hover {
  color: var(--forest-800);
}
.property-subtab.is-active {
  background: var(--surface);
  color: var(--forest-800);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1);
}
.property-tax-toolbar {
  align-items: center;
}
.property-tax-summary-grid {
  align-items: stretch;
}
.accountant-check-card .button {
  margin-top: 18px;
}
.property-record-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.property-record-form label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.property-record-wide {
  grid-column: span 2;
}
.receipt-checkbox {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink) !important;
  cursor: pointer;
}
.receipt-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--forest-700);
}
.property-record-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}
.property-record-table {
  min-width: 1120px;
}
.property-record-table td {
  vertical-align: top;
}
.property-register-toolbar > div:first-child {
  margin-right: auto;
}
.property-register-toolbar > strong {
  color: var(--forest-800);
  font-size: 18px;
  white-space: nowrap;
}
.property-register-controls {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}
.property-register-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.property-register-controls .form-select {
  min-width: 145px;
}
.statement-inbox {
  overflow: hidden;
}
.statement-inbox-head {
  align-items: center;
}
.statement-count {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--forest-50);
  color: var(--forest-800);
  font-size: 17px;
  font-weight: 900;
}
.statement-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}
.statement-import-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.outlook-service-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.outlook-service-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a0a7b2;
  box-shadow: 0 0 0 3px rgba(160, 167, 178, 0.14);
}
.outlook-service-status.is-connected {
  color: var(--forest-800);
}
.outlook-service-status.is-connected i {
  background: #2f855a;
  box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.14);
}
.statement-upload-button {
  cursor: pointer;
}
.statement-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.statement-privacy-note {
  margin-top: 13px;
  padding: 12px 14px;
  border: 1px solid #e9dfc2;
  border-radius: 12px;
  background: #fff8e8;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.statement-privacy-note strong {
  color: var(--forest-800);
}
.pending-statement-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.pending-statement-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.pending-statement-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.pending-statement-head h3 {
  margin: 2px 0 3px;
  font-size: 17px;
}
.pending-statement-head p:last-child {
  color: var(--muted);
  font-size: 10px;
}
.statement-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 15px 18px;
}
.statement-summary-grid > div,
.statement-summary-grid > label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.statement-summary-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.statement-summary-grid strong {
  color: var(--ink);
  font-size: 14px;
}
.statement-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 18px 15px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--forest-50);
  font-size: 10px;
}
.statement-contact strong {
  color: var(--forest-900);
}
.statement-contact a {
  color: var(--forest-700);
  font-weight: 750;
  text-decoration: none;
}
.statement-contact span {
  color: var(--muted);
}
.statement-preview-table {
  margin: 0 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.statement-preview-table table {
  min-width: 720px;
}
.statement-preview-table th,
.statement-preview-table td {
  padding: 9px 10px;
}
.statement-category-select {
  min-width: 210px;
}
.pending-statement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 18px 18px;
}
.pending-statement-actions .button[disabled],
#check-outlook-statements[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.statement-review-history {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.statement-review-history summary {
  color: var(--forest-800);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.statement-review-history > div {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}
.statement-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.statement-review-row div {
  display: grid;
  gap: 2px;
}
.statement-review-row strong {
  font-size: 11px;
}
.statement-review-row span:not(.pill) {
  color: var(--muted);
  font-size: 9px;
}

.settings-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.settings-panel {
  overflow: hidden;
  padding: 20px;
}
.settings-panel-featured {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, var(--surface), #fffaf0);
}
.settings-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.settings-panel-head h2 {
  margin-top: 1px;
}
.settings-panel-head p {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.settings-panel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-weight: 900;
}
.period-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.period-choice {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.period-choice:hover {
  border-color: var(--forest-300);
}
.period-choice.is-selected {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.period-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.period-choice span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.period-choice small {
  color: var(--muted);
  font-size: 9px;
}
.settings-preview {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.settings-preview strong {
  color: var(--forest-800);
  font-size: 15px;
}
.settings-panel .input-section-body {
  padding: 0;
}
.review-status {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 14px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.review-status span {
  color: var(--muted);
  font-size: 10px;
}
.review-status strong {
  font-size: 12px;
}
.review-status .button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 6px;
}
.data-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.settings-footnote {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.family-plan-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.family-plan-input-grid h3 {
  margin-bottom: 8px;
  color: var(--forest-800);
}

.export-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(11, 31, 58, 0.3);
}
.export-dialog::backdrop {
  background: rgba(5, 18, 38, 0.64);
  backdrop-filter: blur(3px);
}
.export-modal {
  padding: 24px;
}
.export-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.export-modal-head h2 {
  margin-top: 4px;
  font-size: 23px;
}
.export-modal-head p:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.export-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.export-modal-close:hover {
  border-color: var(--forest-300);
  color: var(--forest-800);
}
.export-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.export-choice {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.export-choice:hover {
  transform: translateY(-1px);
  border-color: var(--forest-300);
}
.export-choice:has(input:checked) {
  border-color: var(--forest-700);
  background: var(--forest-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.export-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.export-choice-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--forest-800);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.export-choice strong,
.export-choice small {
  display: block;
}
.export-choice strong {
  font-size: 13px;
}
.export-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.export-modal-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e7ddc2;
  border-radius: 12px;
  background: #fffaf0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.export-modal-note strong {
  color: var(--forest-800);
}
.export-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.export-modal-actions .button[disabled] {
  opacity: 0.58;
  cursor: wait;
}
.danger-eyebrow {
  color: var(--red);
}
.danger-summary {
  margin-top: 20px;
  padding: 15px 16px;
  border: 1px solid #efcbc6;
  border-radius: 13px;
  background: #fff8f7;
}
.danger-summary strong {
  color: #8f3027;
  font-size: 12px;
}
.danger-summary ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.danger-fields {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.danger-fields label {
  margin-top: 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.danger-fields .form-control {
  min-height: 44px;
}
.danger-status {
  min-height: 18px;
  margin: 2px 0 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.5;
}
.settings-danger-zone {
  border-color: #efcbc6;
  background: linear-gradient(145deg, #fff, #fff8f7);
}
.settings-danger-zone .section-head {
  align-items: flex-start;
}
.settings-danger-zone .section-head p {
  max-width: 680px;
}
.trusted-device-status {
  display: grid;
  max-width: 680px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.trusted-device-status strong,
.trusted-device-status span {
  grid-column: 1;
}
.trusted-device-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.trusted-device-status .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}
@media (max-width: 640px) {
  .trusted-device-status {
    grid-template-columns: 1fr;
  }
  .trusted-device-status .button {
    grid-column: 1;
    grid-row: auto;
    margin-top: 6px;
  }
}

/* =========================================================
   Professional blue UI refresh
   Keeps the existing HTML/JS class structure unchanged.
   ========================================================= */

::selection {
  background: var(--forest-100);
  color: var(--forest-950);
}

body {
  background: radial-gradient(circle at 88% -10%, rgba(36, 59, 143, 0.05), transparent 30%), var(--canvas);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(36, 59, 143, 0.22);
  outline-offset: 2px;
}

/* Authentication */
.auth-shell {
  background: var(--surface);
}
.auth-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}
.auth-aside {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 240, 201, 0.18), transparent 27%),
    radial-gradient(circle at 12% 92%, rgba(255, 240, 201, 0.08), transparent 31%),
    linear-gradient(145deg, #17245c 0%, #1d3075 58%, #243b8f 100%);
}
.auth-content h2 {
  color: var(--forest-950);
}
.auth-form label {
  color: #1e293b;
}

/* Sidebar */
.sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  background:
    radial-gradient(circle at 10% 92%, rgba(255, 240, 201, 0.1), transparent 31%),
    linear-gradient(180deg, #17245c 0%, #192864 54%, #1d3075 100%);
  box-shadow: 8px 0 28px rgba(7, 26, 51, 0.06);
}
.brand {
  margin-bottom: 30px;
}
.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, #fff0c9, #243b8f);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(36, 59, 143, 0.22);
}
.brand small {
  color: #ded4bc;
}
.nav-group-label {
  color: #c9bea4;
}
.nav-link {
  position: relative;
  border: 1px solid transparent;
  color: #e9dfc7;
  font-weight: 650;
}
.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}
.nav-link.is-active {
  border-color: rgba(255, 240, 201, 0.16);
  background: linear-gradient(90deg, rgba(255, 240, 201, 0.16), rgba(255, 240, 201, 0.08));
  color: #ffffff;
  box-shadow: inset 3px 0 0 #fff0c9;
}
.nav-link.is-active .nav-icon {
  color: #fff0c9;
}
.sidebar-action:hover {
  border-color: rgba(255, 240, 201, 0.3) !important;
  background: rgba(255, 240, 201, 0.08) !important;
}
.sidebar-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  background: #243b8f;
  box-shadow: 0 6px 18px rgba(7, 26, 51, 0.34);
}
.sidebar-toggle:hover {
  background: #1d3075;
}

/* Page header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 104px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.84);
  background: rgba(245, 247, 251, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.eyebrow {
  color: var(--forest-800);
}
h1,
h2,
h3,
h4 {
  color: #1b2750;
}
h1 {
  letter-spacing: -0.042em;
}
.page-summary {
  color: #64748b;
}
.saved-status {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

/* Buttons */
.button {
  min-height: 40px;
  border-color: #d5dde7;
  border-radius: 10px;
  background: #ffffff;
  color: #17213b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
  transition:
    transform 0.12s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease;
}
.button:hover {
  border-color: #a8b2d8;
  background: #fdfefe;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.055);
}
.button-primary {
  border-color: #243b8f;
  background: #243b8f;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(36, 59, 143, 0.18);
}
.button-primary:hover {
  border-color: #1d3075;
  background: #1d3075;
  box-shadow: 0 8px 20px rgba(36, 59, 143, 0.22);
}
.button-accent {
  border-color: #ecdba8;
  background: #fff8e8;
  color: #243b8f;
}
.button-accent:hover {
  border-color: #e4c878;
  background: #fff0c9;
}
.button-quiet:hover {
  background: #fbfaf6;
}

/* Layout, sections and cards */
.page {
  padding-top: 18px;
}
.section {
  margin-top: 28px;
}
.section-head {
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 19px;
}
.section-head p {
  color: #6b778a;
}
.grid {
  gap: 18px;
}
.card {
  border-color: #e7e2d8;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: #ded8ca;
}
.card-pad {
  padding: 22px;
}

/* KPI cards */
.kpi-card {
  min-height: 142px;
  border-top: 3px solid #fff0c9;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}
.kpi-card::after {
  width: 96px;
  height: 96px;
  right: -42px;
  top: -44px;
  background: rgba(219, 234, 254, 0.7);
}
.kpi-label {
  color: #64748b;
  font-weight: 750;
}
.kpi-value {
  color: #243b8f;
  font-weight: 750;
}
.kpi-meta strong {
  color: #1d3075;
}
.kpi-dot {
  box-shadow: 0 0 0 4px rgba(36, 59, 143, 0.09);
}

/* Forms */
.form-control,
.form-select {
  min-height: 42px;
  border-color: #ddd8cc;
  border-radius: 10px;
  background: #ffffff;
  color: #17213b;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.018);
}
.form-control:hover,
.form-select:hover {
  border-color: #c9c2b4;
}
.form-control:focus,
.form-select:focus {
  border-color: #243b8f;
  box-shadow: 0 0 0 3px rgba(36, 59, 143, 0.12);
}
.field-label,
.calculator-field > span,
.analysis-select-grid label {
  color: #667085;
}
.salary-input-grid .field-row,
.loan-editor,
.offset-settings-panel {
  border-color: #e7e2d8;
  background: #fffdf8;
}
.input-section-head:hover {
  background: #fbfaf6;
}

/* Tables */
.table-card {
  border-radius: var(--radius-md);
}
.table-toolbar {
  padding: 18px 20px;
  background: #ffffff;
}
th {
  padding: 12px 14px;
  border-bottom: 1px solid #e4dfd5;
  background: #f7f5ef;
  color: #6f7380;
  font-weight: 800;
  letter-spacing: 0.055em;
}
td {
  border-top-color: #ece7dd;
}
tbody tr:hover td {
  background: #fffaf0;
}
.table-total td {
  border-top-color: #d8ddf1;
  background: #f3f5fb;
  color: #243b8f;
}
.table-total-secondary td {
  background: #f8f7f2;
}

/* Charts and data visualisation */
.chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}
.chart-gridline {
  stroke: #ebe6dc;
}
.chart-axis {
  fill: #7a7f89;
}
.chart-line {
  stroke: #243b8f;
}
.chart-line-secondary {
  stroke: #b58b32;
}
.chart-focus {
  fill: #243b8f;
}
.progress-track,
.asset-bar,
.comparison-track {
  background: #eeebe4;
}
.progress-bar {
  background: linear-gradient(90deg, #243b8f, #fff0c9);
}

/* Pills and status elements */
.pill {
  border: 1px solid transparent;
}
.pill-good {
  border-color: #cceede;
}
.pill-warn {
  border-color: #f3dfb4;
}
.pill-bad {
  border-color: #f1d0cc;
}
.pill-info {
  border-color: #d8ddf1;
}

/* Feature / hero panels */
.hero-plan,
.toolkit-hero {
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 240, 201, 0.16), transparent 28%),
    linear-gradient(135deg, #1d3075 0%, #243b8f 100%);
  box-shadow: 0 14px 32px rgba(7, 26, 51, 0.12);
}
.hero-plan .eyebrow,
.toolkit-hero .eyebrow {
  color: #fff0c9;
}
.plan-number,
.readiness-panel {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}

/* Property, investment and workspace cards */
.property-card,
.property-editor-card,
.share-holding-card,
.offset-strategy-card,
.statement-inbox {
  background: #ffffff;
}
.property-value {
  color: #243b8f;
}
.property-metric-strip > div {
  border-color: #e9dfc2;
  background: linear-gradient(145deg, #fff8e8, #fffdf8);
}
.advice-kicker,
.calculator-icon,
.input-group-title > span,
.help-item > span,
.empty-state-icon,
.statement-count {
  background: #fff0c9;
  color: #243b8f;
}
.income-summary-strip strong,
.share-value-strip strong,
.calculator-result > strong,
.property-metric-strip strong,
.debt-summary-strip strong,
.forecast-composition strong {
  color: #243b8f;
}

/* Tabs */
.property-subtabs {
  border-color: #e2ddd2;
  background: #f8f7f2;
}
.property-subtab.is-active {
  color: #243b8f;
  box-shadow: 0 3px 12px rgba(36, 59, 143, 0.09);
}

/* Modal */
.export-dialog {
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 28px 80px rgba(7, 26, 51, 0.26);
}
.export-dialog::backdrop {
  background: rgba(7, 26, 51, 0.62);
}
.export-choice {
  background: #fffdf8;
}
.export-choice:has(input:checked) {
  border-color: #243b8f;
  background: #fff8e8;
  box-shadow: 0 0 0 3px rgba(36, 59, 143, 0.1);
}
.export-choice-icon {
  background: #243b8f;
}

/* Motion polish */
@media (hover: hover) and (pointer: fine) {
  .card,
  .property-card,
  .advice-card,
  .calculator-card,
  .share-holding-card {
    transition:
      transform 0.16s ease,
      border-color 0.16s ease,
      box-shadow 0.16s ease;
  }
  .property-card:hover,
  .advice-card:hover,
  .calculator-card:hover,
  .share-holding-card:hover {
    transform: translateY(-1px);
    border-color: #ddd6c9;
    box-shadow: var(--shadow-hover);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 781px) {
  .app-shell.is-sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
    padding-right: 12px;
    padding-left: 12px;
  }
  .app-shell.is-sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
  }
  .app-shell.is-sidebar-collapsed .brand {
    justify-content: center;
    margin-right: 0;
    margin-left: 0;
  }
  .app-shell.is-sidebar-collapsed .brand-copy,
  .app-shell.is-sidebar-collapsed .nav-group-label,
  .app-shell.is-sidebar-collapsed .nav-text,
  .app-shell.is-sidebar-collapsed .sidebar-foot-copy,
  .app-shell.is-sidebar-collapsed .sidebar-action-label {
    display: none;
  }
  .app-shell.is-sidebar-collapsed .nav-link {
    justify-content: center;
    gap: 0;
    padding-right: 10px;
    padding-left: 10px;
  }
  .app-shell.is-sidebar-collapsed .nav-icon {
    width: 24px;
  }
  .app-shell.is-sidebar-collapsed .privacy-note {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }
  .app-shell.is-sidebar-collapsed .sidebar-action {
    width: 44px;
    min-height: 42px;
    justify-self: center;
    padding: 0;
  }
  .app-shell.is-sidebar-collapsed .sidebar-action-icon {
    display: inline;
  }
  .app-shell.is-sidebar-collapsed .sidebar-toggle {
    transform: rotate(180deg);
  }
}

@media (max-width: 1120px) {
  .grid-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-main,
  .grid-aside {
    grid-template-columns: 1fr;
  }
  .plan-numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calculator-fields-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .salary-input-grid {
    grid-template-columns: 1fr 1fr;
  }
  .share-input-groups {
    grid-template-columns: 1fr;
  }
  .share-input-groups > section {
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .share-input-groups > section:first-child {
    border-top: 0;
  }
  .allocation-chart-layout {
    grid-template-columns: 1fr;
  }
  .offset-strategy-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 780px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-panel {
    min-height: 100vh;
    padding: 28px clamp(22px, 7vw, 54px) 22px;
  }
  .auth-content {
    margin: auto;
    padding: 40px 0;
  }
  .auth-aside {
    display: none;
  }
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 244px;
    transition: transform 0.2s ease;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.24);
  }
  .sidebar-toggle {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    min-height: 96px;
    padding-top: 20px;
  }
  .topbar-actions .saved-status {
    display: none;
  }
  .page {
    padding-top: 0;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .toolkit-hero,
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .calculator-card-wide {
    grid-column: auto;
  }
  .calculator-results-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    align-items: flex-start;
  }
  .family-plan-input-grid,
  .property-input-grid,
  .loan-field-grid {
    grid-template-columns: 1fr;
  }
  .add-expense-card {
    align-items: stretch;
    flex-direction: column;
  }
  .add-expense-controls {
    width: 100%;
  }
  .settings-page-grid {
    grid-template-columns: 1fr;
  }
  .settings-panel-featured {
    grid-column: auto;
  }
  .period-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analysis-select-grid {
    width: 100%;
  }
  .property-record-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .statement-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .investment-pause-grid,
  .offset-link-grid {
    grid-template-columns: 1fr;
  }
  .offset-redirect-choice {
    grid-column: auto;
  }
}
@media (max-width: 560px) {
  .topbar {
    gap: 11px;
  }
  .topbar-actions .button {
    display: none;
  }
  .topbar-actions #sign-out {
    display: inline-flex;
    padding: 8px 10px;
    font-size: 11px;
  }
  .grid-kpis {
    grid-template-columns: 1fr;
  }
  .kpi-card {
    min-height: 122px;
  }
  .plan-numbers {
    grid-template-columns: 1fr 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .recurring-input-control {
    grid-template-columns: 1fr;
  }
  .salary-input-grid {
    grid-template-columns: 1fr;
  }
  .settings-strip,
  .table-toolbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .settings-actions,
  .sale-choice,
  .sale-choice .form-select {
    width: 100%;
  }
  .sale-choice {
    align-items: stretch;
  }
  .property-head {
    flex-direction: column;
  }
  .filter-row {
    width: 100%;
  }
  .search-input {
    max-width: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .calculator-fields,
  .calculator-fields-4,
  .property-metric-strip {
    grid-template-columns: 1fr;
  }
  .calculator-results,
  .calculator-results-4 {
    grid-template-columns: 1fr 1fr;
  }
  .income-summary-strip,
  .share-value-strip {
    grid-template-columns: 1fr;
  }
  .add-expense-controls {
    grid-template-columns: 1fr;
  }
  .property-editor-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .property-editor-actions {
    width: 100%;
    justify-content: space-between;
  }
  .share-forecast-row {
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
  }
  .analysis-select-grid,
  .debt-summary-strip,
  .forecast-composition {
    grid-template-columns: 1fr;
  }
  .export-choice-grid {
    grid-template-columns: 1fr;
  }
  .export-modal {
    padding: 20px;
  }
  .export-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .export-modal-actions .button {
    justify-content: center;
    width: 100%;
  }
  .allocation-list li {
    grid-template-columns: 10px minmax(80px, 1fr) auto;
  }
  .allocation-list li strong {
    display: none;
  }
  .property-subtabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .property-record-form {
    grid-template-columns: 1fr;
  }
  .property-record-wide {
    grid-column: auto;
  }
  .property-record-actions {
    justify-content: stretch;
  }
  .property-record-actions .button {
    width: 100%;
    justify-content: center;
  }
  .statement-import-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .statement-import-actions .button {
    justify-content: center;
    width: 100%;
  }
  .statement-import-meta {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 0;
  }
  .property-register-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .property-register-controls .form-select {
    width: 100%;
  }
  .statement-summary-grid {
    grid-template-columns: 1fr;
  }
  .offset-strategy-actions,
  .offset-strategy-actions .button {
    width: 100%;
  }
  .offset-strategy-actions .button {
    justify-content: center;
  }
  .pending-statement-head,
  .pending-statement-actions,
  .statement-review-row {
    align-items: stretch;
    flex-direction: column;
  }
  .pending-statement-actions .button {
    justify-content: center;
    width: 100%;
  }
  .timeline-item {
    grid-template-columns: 34px 1fr;
  }
  .timeline-date {
    grid-column: 2;
    margin-top: -7px;
  }
}
@media print {
  .sidebar,
  .topbar-actions,
  .mobile-menu,
  .button,
  .footer-note {
    display: none !important;
  }
  .main-content {
    margin-left: 0;
  }
  body {
    background: #fff;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* =========================================================
   WattleFolio Amber & Ink theme (final visual layer)

   Reference direction: deep ink, warm amber, white and neutral paper. This
   layer keeps WattleFolio's own layout and branding while making future palette edits
   easy to locate. Calculations and component markup are deliberately untouched.
   ========================================================= */
:root {
  --ink: #1e2030;
  --muted: #62636d;
  --muted-2: #74757d;
  --canvas: #efefef;
  --surface-soft: #f7f7f7;
  --line: #dedee2;
  --line-strong: #c9c9cf;
  --forest-950: #171925;
  --forest-900: #1e2030;
  --forest-800: #292c40;
  --forest-700: #34374b;
  --forest-300: #ffcf70;
  --forest-100: #fff0c4;
  --forest-50: #fff8e8;
  --lime: #ffae00;
  --lime-dark: #d99100;
  --blue: #ffae00;
  --blue-bg: #fff3d4;
  --shadow: 0 1px 2px rgba(30, 32, 48, 0.035), 0 12px 30px rgba(30, 32, 48, 0.06);
  --shadow-hover: 0 3px 8px rgba(30, 32, 48, 0.055), 0 18px 38px rgba(30, 32, 48, 0.11);
  --brand-navy: #1e2030;
  --brand-navy-soft: #34374b;
  --brand-gold: #ffae00;
  --brand-gold-deep: #dc9600;
  --brand-gold-soft: #fff3d4;
  /* Compatibility aliases for existing component names. */
  --brand-sage-50: #fffaf0;
  --brand-sage-100: #fff0c4;
  --brand-sage-200: #ffe09a;
  --brand-sage-500: var(--brand-gold);
  --brand-sage-600: var(--brand-navy);
  --brand-sage-700: var(--brand-navy);
  --brand-ink: var(--brand-navy);
  --brand-apricot: var(--brand-gold);
  --brand-apricot-soft: var(--brand-gold-soft);
}

::selection {
  background: #ffe09a;
  color: var(--brand-ink);
}

body {
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(30, 32, 48, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 32, 48, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 94% -8%, rgba(255, 174, 0, 0.13), transparent 27%);
  background-size:
    32px 32px,
    32px 32px,
    auto;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline-color: rgba(255, 174, 0, 0.48);
}

/* Light authentication composition */
.auth-shell {
  background: #ffffff;
}
.auth-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}
.auth-aside {
  border-left: 1px solid #dddddf;
  background:
    radial-gradient(circle at 82% 13%, rgba(255, 174, 0, 0.28), transparent 25%),
    radial-gradient(circle at 14% 88%, rgba(30, 32, 48, 0.06), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f3f3f3 56%, #fff5da 100%);
  color: var(--brand-ink);
}
.auth-aside h1,
.auth-content h2 {
  color: var(--brand-ink);
}
.auth-aside > div > p:last-child,
.security-list small {
  color: #696a73;
}
.auth-aside .eyebrow,
.security-list li > span {
  color: var(--brand-sage-700);
}
.security-list li {
  border-color: rgba(30, 32, 48, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 28px rgba(30, 32, 48, 0.05);
}
.security-list strong {
  color: var(--brand-ink);
}

/* Pale neutral navigation with an amber active marker. */
.sidebar {
  border-right: 1px solid #dedee2;
  background:
    radial-gradient(circle at 8% 92%, rgba(255, 174, 0, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f5 56%, #efefef 100%);
  color: var(--brand-ink);
  box-shadow: 10px 0 34px rgba(30, 32, 48, 0.055);
}
.brand-mark {
  border-color: #e3d3a3;
  overflow: hidden;
  background: #fffaf0;
  color: var(--brand-sage-700);
  box-shadow: 0 8px 20px rgba(30, 32, 48, 0.1);
}
.brand-mark img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}
.brand-logo-auth {
  width: min(100%, 330px);
}
.brand-logo-sidebar {
  width: 188px;
  max-width: 100%;
}
.brand .brand-mark-compact {
  display: none;
}
@media (min-width: 781px) {
  .app-shell.is-sidebar-collapsed .brand-logo-sidebar {
    display: none;
  }
  .app-shell.is-sidebar-collapsed .brand .brand-mark-compact {
    display: grid;
  }
}
.brand strong,
.privacy-note strong {
  color: var(--brand-ink);
}
.brand small,
.privacy-note small {
  color: #74757d;
}
.nav-group-label {
  color: #898a92;
}
.nav-link {
  border-color: transparent;
  color: #565863;
}
.nav-link:hover {
  border-color: rgba(255, 174, 0, 0.24);
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-ink);
}
.nav-link.is-active {
  border-color: #e5d49e;
  background: #ffffff;
  color: var(--brand-sage-700);
  box-shadow:
    inset 3px 0 0 var(--brand-apricot),
    0 7px 18px rgba(30, 32, 48, 0.07);
}
.nav-link.is-active .nav-icon {
  color: var(--brand-sage-600);
}
.privacy-note {
  color: var(--brand-ink);
}
.privacy-dot {
  background: var(--brand-gold);
  box-shadow: 0 0 0 5px rgba(255, 174, 0, 0.14);
}
.sidebar-action {
  border-color: #d8d8dc !important;
  background: rgba(255, 255, 255, 0.68) !important;
  color: var(--brand-sage-700) !important;
}
.sidebar-action:hover {
  border-color: #e8bd58 !important;
  background: #ffffff !important;
}
.sidebar-toggle {
  border-color: #d8d8dc;
  background: #ffffff;
  color: var(--brand-sage-700);
  box-shadow: 0 6px 18px rgba(30, 32, 48, 0.14);
}
.sidebar-toggle:hover {
  background: var(--brand-sage-100);
}

/* Editorial header hierarchy */
.topbar {
  border-bottom-color: rgba(218, 218, 222, 0.9);
  background: rgba(255, 255, 255, 0.92);
}
h1,
h2,
h3,
h4 {
  color: var(--brand-ink);
}
h1,
.auth-aside h1,
.hero-plan h2,
.toolkit-hero h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.eyebrow,
.link-button {
  color: var(--brand-sage-700);
}
.page-summary,
.section-head p {
  color: #686a73;
}
.saved-status {
  border-color: #dddddf;
  background: rgba(255, 255, 255, 0.76);
}

/* Controls */
.button {
  border-color: #d4d4d8;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-ink);
  box-shadow: 0 2px 8px rgba(30, 32, 48, 0.04);
}
.button:hover {
  border-color: #e7b94d;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(30, 32, 48, 0.09);
}
.button-primary {
  border-color: var(--brand-gold);
  background: var(--brand-gold);
  color: var(--brand-navy);
  box-shadow: 0 7px 17px rgba(255, 174, 0, 0.2);
}
.button-primary:hover {
  border-color: var(--brand-gold-deep);
  background: var(--brand-gold-deep);
  color: var(--brand-navy);
  box-shadow: 0 9px 22px rgba(220, 150, 0, 0.24);
}
.button-accent {
  border-color: #e9ba4b;
  background: var(--brand-apricot-soft);
  color: var(--brand-navy);
}
.button-accent:hover {
  border-color: var(--brand-apricot);
  background: #ffe9ad;
}
.button-quiet:hover {
  background: var(--brand-sage-50);
}

/* Cards use soft depth and a restrained ledger edge. */
.card {
  border-color: #e0e0e3;
  background: rgba(255, 255, 255, 0.96);
}
.card:hover {
  border-color: #d5d5da;
}
.grid-kpis .kpi-card {
  --kpi-accent: var(--brand-navy);
  --kpi-tint: rgba(30, 32, 48, 0.09);
  border-top: 0;
  border-left: 4px solid var(--kpi-accent);
  background: linear-gradient(155deg, #ffffff 0%, #f8f8f8 100%);
}
.grid-kpis .kpi-card:nth-child(4n + 2) {
  --kpi-accent: var(--brand-apricot);
  --kpi-tint: rgba(255, 174, 0, 0.2);
}
.grid-kpis .kpi-card:nth-child(4n + 3) {
  --kpi-accent: #6f7180;
  --kpi-tint: rgba(111, 113, 128, 0.14);
}
.grid-kpis .kpi-card:nth-child(4n + 4) {
  --kpi-accent: var(--brand-gold-deep);
  --kpi-tint: rgba(220, 150, 0, 0.16);
}
.kpi-card::after {
  background: var(--kpi-tint, rgba(30, 32, 48, 0.09));
}
.kpi-value,
.kpi-meta strong,
.property-value,
.income-summary-strip strong,
.share-value-strip strong,
.calculator-result > strong,
.property-metric-strip strong,
.debt-summary-strip strong,
.forecast-composition strong {
  color: var(--brand-sage-700);
}
.kpi-dot {
  background: var(--kpi-accent, var(--brand-sage-500));
  box-shadow: 0 0 0 4px rgba(30, 32, 48, 0.08);
}

/* Data entry surfaces */
.form-control,
.form-select {
  border-color: #d4d4d8;
  background: #ffffff;
  color: var(--ink);
}
.form-control:hover,
.form-select:hover {
  border-color: #e1b346;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-gold-deep);
  box-shadow: 0 0 0 3px rgba(255, 174, 0, 0.18);
}
.salary-input-grid .field-row,
.loan-editor,
.offset-settings-panel {
  border-color: #e1e1e4;
  background: #fafafa;
}

/* Tables resemble a clean paper ledger. */
.table-toolbar {
  background: rgba(255, 255, 255, 0.82);
}
th {
  border-bottom-color: #dddddf;
  background: #f3f3f3;
  color: #696a73;
}
td {
  border-top-color: #e7e7e9;
}
tbody tr:hover td {
  background: #fffaf0;
}
.table-total td,
.table-total-secondary td {
  border-top-color: #ead08d;
  background: var(--brand-gold-soft);
  color: var(--brand-sage-700);
}

/* Charts and progress */
.chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
}
.chart-gridline {
  stroke: #e4e4e7;
}
.chart-line,
.share-chart-line,
.offset-chart-line {
  stroke: var(--brand-sage-600);
}
.chart-line-secondary {
  stroke: var(--brand-apricot);
}
.wealth-trajectory-card {
  /* One colour source keeps each plotted line and its legend swatch in sync. */
  --wealth-net-worth-color: var(--brand-sage-600);
  --wealth-total-assets-color: var(--brand-apricot);
}
.wealth-trajectory-card .chart-line {
  stroke: var(--wealth-net-worth-color);
}
.wealth-trajectory-card .chart-line-secondary {
  stroke: var(--wealth-total-assets-color);
}
.wealth-trajectory-card .legend-swatch-net-worth {
  background: var(--wealth-net-worth-color);
}
.wealth-trajectory-card .legend-swatch-total-assets {
  background: var(--wealth-total-assets-color);
}
.chart-focus {
  fill: var(--brand-sage-700);
}
.progress-track,
.asset-bar,
.comparison-track {
  background: #e7e7e9;
}
.progress-bar {
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-gold));
}

/* Former dark feature panels become bright editorial callouts. */
.hero-plan,
.toolkit-hero {
  border-color: #dedee2;
  background:
    radial-gradient(circle at 90% 7%, rgba(255, 174, 0, 0.24), transparent 27%),
    linear-gradient(135deg, #ffffff 0%, #f1f1f1 58%, #fff4d6 100%);
  color: var(--brand-ink);
  box-shadow: 0 16px 36px rgba(30, 32, 48, 0.08);
}
.hero-plan .eyebrow,
.toolkit-hero .eyebrow {
  color: var(--brand-sage-700);
}
.hero-plan h2,
.toolkit-hero h2 {
  color: var(--brand-ink);
}
.hero-plan p,
.toolkit-hero-copy > p:not(.eyebrow),
.readiness-panel p {
  color: #666872;
}
.plan-number,
.readiness-panel {
  border-color: rgba(30, 32, 48, 0.13);
  background: rgba(255, 255, 255, 0.64);
}
.plan-number small,
.readiness-panel > span,
.readiness-panel > strong small {
  color: #6d6e77;
}
.readiness-panel .progress-track {
  background: rgba(30, 32, 48, 0.12);
}
.toolkit-secondary {
  border-color: #d2d2d7;
  background: rgba(255, 255, 255, 0.66);
  color: var(--brand-sage-700);
}
.toolkit-secondary:hover {
  border-color: var(--brand-gold);
}

/* Workspace accents */
.property-metric-strip > div,
.investment-pause-card,
.statement-privacy-note,
.export-modal-note {
  border-color: #edd18b;
  background: linear-gradient(145deg, #fff3d4, #fffaf0);
}
.advice-kicker,
.calculator-icon,
.input-group-title > span,
.help-item > span,
.empty-state-icon,
.statement-count,
.settings-panel-icon {
  background: var(--brand-sage-100);
  color: var(--brand-sage-700);
}
.property-subtabs {
  border-color: #dedee2;
  background: #f1f1f1;
}
.property-subtab:hover,
.property-subtab.is-active {
  color: var(--brand-sage-700);
}
.property-subtab.is-active {
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(30, 32, 48, 0.08);
}
.export-choice:has(input:checked),
.period-choice.is-selected {
  border-color: var(--brand-gold-deep);
  background: var(--brand-sage-50);
  box-shadow: 0 0 0 3px rgba(255, 174, 0, 0.13);
}
.export-choice-icon {
  background: var(--brand-gold);
  color: var(--brand-navy);
}
.statement-contact {
  background: var(--brand-sage-50);
}
.statement-contact strong,
.statement-review-history summary,
.settings-preview strong,
.family-plan-input-grid h3 {
  color: var(--brand-sage-700);
}

/* Dark surfaces remain reserved for transient, high-attention feedback only. */
.toast {
  background: var(--brand-navy);
}
.export-dialog::backdrop {
  background: rgba(30, 32, 48, 0.5);
}

/* Public demo and paid-access prompts */
.auth-links a {
  color: var(--brand-sage-700);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.auth-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-demo-card {
  display: grid;
  gap: 7px;
  margin-top: 24px;
  padding: 17px;
  border: 1px solid #dfdfe2;
  border-radius: 16px;
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 174, 0, 0.24), transparent 32%),
    linear-gradient(145deg, #ffffff, #fff8e8);
  box-shadow: 0 12px 28px rgba(30, 32, 48, 0.06);
}
.auth-demo-card > span {
  color: var(--brand-sage-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.auth-demo-card > strong {
  color: var(--brand-ink);
  font-size: 14px;
}
.auth-demo-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.auth-demo-card .button {
  justify-content: center;
  width: 100%;
}
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 14px clamp(24px, 4vw, 56px) 4px;
  padding: 14px 16px;
  border: 1px solid #e5bd56;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 174, 0, 0.22), transparent 31%),
    linear-gradient(135deg, #fff5d9, #ffffff);
  box-shadow: 0 10px 25px rgba(30, 32, 48, 0.06);
}
.demo-banner > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 10px;
}
.demo-banner-badge {
  grid-row: span 2;
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  border-radius: 11px;
  background: var(--brand-sage-100);
  color: var(--brand-sage-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-banner strong {
  color: var(--brand-ink);
  font-size: 12px;
}
.demo-banner small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.demo-banner .button {
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
}
.app-shell.is-demo .saved-status span {
  background: var(--brand-apricot);
  box-shadow: 0 0 0 4px rgba(255, 174, 0, 0.15);
}
.demo-locked-control {
  border-style: dashed !important;
  opacity: 0.58;
  cursor: not-allowed !important;
}
.demo-locked-control:hover {
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 780px) {
  .sidebar.is-open {
    box-shadow: 16px 0 42px rgba(30, 32, 48, 0.2);
  }
  .demo-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .demo-banner .button {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .demo-banner > div {
    grid-template-columns: 1fr;
  }
  .demo-banner-badge {
    grid-row: auto;
    justify-self: start;
  }
}

@media print {
  body {
    background-image: none;
  }
}

/* =========================================================
   Pre-launch audit accessibility and import-review hardening
   ========================================================= */
.statement-duplicate-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 18px 12px;
  padding: 12px 14px;
  border: 1px solid #e6a23c;
  border-radius: 12px;
  background: #fff4df;
  color: #6f4300;
  font-size: 13px;
  line-height: 1.45;
}
.statement-duplicate-banner strong,
.statement-duplicate-banner span {
  display: block;
}
.statement-duplicate-banner strong {
  flex: 0 0 auto;
  color: #7a4700;
}
.statement-possible-duplicate td {
  background: #fff7e8 !important;
}
.statement-possible-duplicate td:first-child {
  box-shadow: inset 4px 0 0 #e28a00;
}
.statement-duplicate-note {
  display: block;
  margin-top: 6px;
  color: #7a4d00;
  font-size: 12px;
  line-height: 1.4;
}
.statement-duplicate-note strong {
  color: #6a3f00;
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }
  .button,
  .form-control,
  .form-select,
  .mobile-menu,
  .sidebar-toggle,
  .export-modal-close {
    min-height: 44px;
  }
  .mobile-menu,
  .sidebar-toggle,
  .button-icon,
  .export-modal-close {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
  .form-control,
  .form-select {
    font-size: 16px;
  }
  small,
  .page-summary,
  .section-head p,
  .kpi-label,
  .kpi-meta,
  .chart-head p,
  .chart-legend,
  .field-label,
  .field-copy small,
  .input-unit,
  .table-note,
  .property-head p,
  .statement-import-meta,
  .footer-note {
    font-size: 13px;
    line-height: 1.45;
  }
  .eyebrow,
  th,
  .nav-group-label {
    font-size: 12px;
  }
  .button-small {
    min-height: 44px;
    padding: 10px 12px;
  }
  .statement-duplicate-banner {
    flex-direction: column;
    margin-inline: 0;
    font-size: 13px;
  }
}

/* V41 public home, product preview, pricing and onboarding */
.marketing-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 5%, rgba(244, 221, 174, .32), transparent 24%),
    linear-gradient(180deg, #fbfdfb 0, var(--canvas) 100%);
  color: var(--ink);
}
.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(203, 216, 208, .72);
  background: rgba(251, 253, 251, .92);
  backdrop-filter: blur(18px);
}
.marketing-brand img { display: block; width: min(190px, 42vw); height: auto; }
.marketing-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.marketing-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 750; }
.marketing-links a:hover { color: var(--forest-900); }
.marketing-nav-actions { display: flex; gap: 8px; }
.button-large { min-height: 48px; padding: 13px 18px; font-size: 14px; }
.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .72fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 118px) clamp(22px, 5vw, 72px) 70px;
}
.marketing-hero-copy { max-width: 790px; }
.marketing-kicker { margin: 0 0 12px; color: var(--forest-700); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.marketing-hero h1 { max-width: 820px; font-size: clamp(42px, 6vw, 78px); line-height: .99; letter-spacing: -.055em; }
.marketing-lead { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; }
.marketing-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.marketing-trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 25px; color: var(--forest-900); font-size: 12px; font-weight: 750; }
.marketing-scope { margin: 18px 0 0; color: var(--muted-2); font-size: 11px; }

.marketing-product-preview {
  position: relative;
  max-width: 760px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid rgba(203, 216, 208, .95);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(40, 75, 67, .14);
}
.marketing-product-preview::after {
  content: "";
  position: absolute;
  inset: auto -60px -100px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(244, 221, 174, .24);
  pointer-events: none;
}
.product-preview-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfb;
}
.product-preview-bar > div { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; }
.product-preview-bar strong { color: var(--ink); font-size: 11px; }
.product-preview-bar small { grid-column: 2; color: var(--muted); font-size: 8px; }
.product-preview-live { grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(21,128,93,.10); }
.product-preview-status { padding: 5px 8px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: 8px; font-weight: 900; }
.product-preview-frame { position: relative; z-index: 1; display: grid; grid-template-columns: 48px minmax(0,1fr); min-height: 305px; background: var(--canvas); }
.product-preview-rail { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 13px 8px; background: var(--forest-950); }
.product-preview-mark { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 5px; border-radius: 9px; background: var(--lime); color: var(--forest-950); font-size: 11px; font-weight: 900; }
.product-preview-rail i { width: 18px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.22); }
.product-preview-rail i.is-active { width: 24px; background: var(--lime); }
.product-preview-main { min-width: 0; padding: 17px; }
.product-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-preview-heading > div { display: grid; gap: 2px; }
.product-preview-heading small { color: var(--forest-700); font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.product-preview-heading strong { color: var(--ink); font-size: 14px; letter-spacing: -.02em; }
.product-preview-heading > span { padding: 5px 7px; border-radius: 7px; background: var(--forest-50); color: var(--forest-800); font-size: 7px; font-weight: 800; }
.product-preview-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.product-preview-kpis article { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(40,75,67,.04); }
.product-preview-kpis small, .product-preview-kpis span { display: block; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.product-preview-kpis strong { display: block; margin: 6px 0 3px; color: var(--forest-950); font-size: clamp(12px,1.4vw,18px); letter-spacing: -.04em; }
.product-preview-kpis span { color: var(--forest-700); font-weight: 750; }
.product-preview-lower { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(145px,.7fr); gap: 8px; margin-top: 8px; }
.product-preview-chart, .product-preview-goal { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.product-preview-chart > div { display: grid; gap: 2px; }
.product-preview-chart strong { color: var(--ink); font-size: 9px; }
.product-preview-chart small { color: var(--muted); font-size: 7px; }
.product-preview-chart svg { display: block; width: 100%; height: 88px; margin-top: 4px; overflow: visible; }
.preview-grid-line { fill: none; stroke: #e7eee9; stroke-width: 1; }
.preview-area { fill: url(#previewArea); }
.preview-line { fill: none; stroke: var(--forest-700); stroke-width: 3; stroke-linecap: round; }
.product-preview-goal { display: flex; flex-direction: column; justify-content: center; }
.product-preview-goal > small { color: var(--forest-700); font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.product-preview-goal > strong { margin-top: 6px; color: var(--forest-950); font-size: 23px; letter-spacing: -.05em; }
.product-preview-goal > span { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.45; }
.product-preview-progress { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: var(--forest-100); }
.product-preview-progress i { display: block; width: 61%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--forest-700),var(--lime-dark)); }
.product-preview-progress-meta { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: 7px; }
.product-preview-progress-meta b { color: var(--forest-900); }
.marketing-product-preview > p { position: relative; z-index: 1; margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); background: #fbfdfb; color: var(--muted); font-size: 8px; }
.marketing-auth-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 70px rgba(40, 75, 67, .13);
}
.marketing-auth-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.marketing-auth-heading strong, .marketing-auth-heading small { display: block; }
.marketing-auth-heading small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.marketing-auth-icon { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 12px; background: var(--forest-50); }
.marketing-auth-icon img { width: 32px; height: 32px; object-fit: contain; }
.marketing-auth-card .auth-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.marketing-auth-card .auth-content h2 { font-size: 27px; }
.marketing-auth-card .auth-footnote { margin-top: 18px; text-align: center; }
.marketing-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1340px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.marketing-proof > div { padding: 21px 24px; border-left: 1px solid var(--line); }
.marketing-proof > div:first-child { border-left: 0; }
.marketing-proof strong, .marketing-proof span { display: block; }
.marketing-proof strong { font-size: 13px; }
.marketing-proof span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.marketing-section { max-width: 1340px; margin: 0 auto; padding: clamp(76px, 9vw, 124px) clamp(22px, 5vw, 72px); }
.marketing-section-head { max-width: 760px; margin-bottom: 36px; }
.marketing-section-head h2, .marketing-security-copy h2, .marketing-final-cta h2 { font-size: clamp(31px, 4vw, 52px); line-height: 1.05; letter-spacing: -.045em; }
.marketing-section-head > p:last-child, .marketing-security-copy > p, .marketing-final-cta p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.marketing-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.marketing-feature-grid article { min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.marketing-feature-grid article > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--forest-50); color: var(--forest-700); font-size: 10px; font-weight: 900; }
.marketing-feature-grid h3 { margin-top: 28px; font-size: 18px; }
.marketing-feature-grid p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.marketing-how { max-width: none; padding-left: max(clamp(22px, 5vw, 72px), calc((100vw - 1340px)/2 + 72px)); padding-right: max(clamp(22px, 5vw, 72px), calc((100vw - 1340px)/2 + 72px)); background: var(--forest-950); color: #fff; }
.marketing-how .marketing-kicker { color: #fff0c9; }
.marketing-how h2, .marketing-how h3 { color: #ffffff; }
.marketing-how .marketing-section-head > p:last-child { color: #c9d8d2; }
.marketing-step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.marketing-step-grid article { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.05); }
.marketing-step-grid article > strong { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--forest-950); }
.marketing-step-grid h3 { margin-top: 5px; color: #ffffff; }
.marketing-step-grid p { margin: 7px 0 0; color: #e2ece8; font-size: 12px; line-height: 1.6; }
.marketing-pricing-section { padding-top: 105px; }
.pricing-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .65fr); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 24px 70px rgba(40, 75, 67, .1); }
.pricing-card-copy { padding: clamp(28px, 5vw, 56px); }
.pricing-badge { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: var(--forest-50); color: var(--forest-800); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pricing-card-copy h3 { margin-top: 22px; color: var(--forest-950); font-size: clamp(48px, 6vw, 72px); letter-spacing: -.06em; }
.pricing-card-copy h3 small { font-size: 16px; letter-spacing: normal; color: var(--muted); }
.pricing-card-copy > p { max-width: 600px; color: var(--muted); }
.pricing-card-copy ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 26px; margin: 26px 0 0; padding: 0; list-style: none; }
.pricing-card-copy li { position: relative; padding-left: 22px; font-size: 12px; }
.pricing-card-copy li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.pricing-card-action { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 34px; background: var(--forest-950); color: #fff; }
.pricing-card-action > strong { font-size: 28px; }
.pricing-card-action > span { color: #c3d3cd; font-size: 11px; }
.pricing-card-action .link-button { color: var(--lime); align-self: flex-start; }
.pricing-card-action small { color: #aebfba; font-size: 10px; line-height: 1.55; }
.pricing-card-action small a { color: #fff; }
.onboarding-preview { display: flex; align-items: center; gap: 9px; overflow-x: auto; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.onboarding-preview span { flex: 0 0 auto; padding: 10px 13px; border-radius: 10px; background: var(--forest-50); color: var(--forest-800); font-size: 11px; font-weight: 800; }
.onboarding-preview i { flex: 1 0 20px; min-width: 20px; height: 1px; background: var(--line-strong); }
.marketing-security-section { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 56px; align-items: center; }
.marketing-security-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.marketing-security-list { margin: 0; max-width: none; grid-template-columns: 1fr; }
.marketing-security-list li { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.marketing-security-list li > span { color: var(--forest-700); }
.marketing-security-list strong { color: var(--ink); }
.marketing-security-list small { color: var(--muted); }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.faq-grid details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.faq-grid summary { padding: 18px 20px; cursor: pointer; font-size: 13px; font-weight: 800; }
.faq-grid p { margin: 0; padding: 0 20px 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.marketing-final-cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; max-width: 1240px; margin: 30px auto 100px; padding: clamp(30px, 5vw, 56px); border-radius: 24px; background: linear-gradient(135deg, var(--forest-950), var(--forest-900)); color: #fff; }
.marketing-final-cta .marketing-kicker { color: #fff0c9; }
.marketing-final-cta h2 { color: #ffffff; }
.marketing-final-cta p { max-width: 680px; color: #e2ece8; }
.marketing-final-cta > div:last-child { display: flex; flex-wrap: wrap; gap: 9px; flex: 0 0 auto; }
.marketing-footer { display: grid; grid-template-columns: 1fr auto; gap: 18px 48px; padding: 35px clamp(22px, 5vw, 72px); border-top: 1px solid var(--line); background: #eef4f0; }
.marketing-footer img { width: 155px; }
.marketing-footer div p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.marketing-footer nav { display: flex; gap: 18px; font-size: 11px; font-weight: 800; }
.marketing-footer > p { grid-column: 1 / -1; max-width: 1000px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

/* V40 onboarding dialog */
.onboarding-dialog { width: min(680px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 90px rgba(23, 46, 39, .26); }
.onboarding-dialog::backdrop { background: rgba(20, 37, 32, .62); backdrop-filter: blur(4px); }
.onboarding-modal { padding: 28px; }
.onboarding-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.onboarding-progress { margin: 22px 0 25px; }
.onboarding-progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.onboarding-form { display: grid; gap: 14px; }
.onboarding-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.onboarding-copy { color: var(--muted); font-size: 12px; line-height: 1.65; }
.onboarding-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.onboarding-actions > div { display: flex; gap: 8px; }
.onboarding-choice { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.onboarding-choice strong, .onboarding-choice small { display: block; }
.onboarding-choice small { margin-top: 4px; color: var(--muted); }
.subscription-status-card { border-color: #cfe1d9; background: linear-gradient(145deg, #fff, #f4faf7); }
.household-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 15px; }
.household-access-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.household-access-grid span, .household-access-grid small { display: block; color: var(--muted); font-size: 10px; }
.household-access-grid strong { display: block; margin-top: 4px; font-size: 13px; }
.partner-invite-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }

@media (max-width: 1040px) {
  .marketing-links { display: none; }
  .marketing-hero { grid-template-columns: 1fr; }
  .marketing-auth-card { max-width: 560px; }
  .marketing-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .marketing-step-grid { grid-template-columns: repeat(2, 1fr); }
  .marketing-security-section { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .marketing-nav { min-height: 66px; padding: 10px 16px; }
  .marketing-brand img { width: 145px; }
  .marketing-nav-actions .button-quiet { display: none; }
  .marketing-nav-actions .button { min-height: 44px; }
  .marketing-hero { padding: 48px 18px 46px; gap: 34px; }
  .marketing-hero h1 { font-size: clamp(38px, 12vw, 55px); }
  .marketing-product-preview { margin-top: 28px; border-radius: 18px; }
  .product-preview-frame { grid-template-columns: 38px minmax(0,1fr); min-height: 0; }
  .product-preview-rail { gap: 11px; padding-inline: 5px; }
  .product-preview-mark { width: 26px; height: 26px; }
  .product-preview-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-preview-kpis strong { font-size: 15px; }
  .product-preview-lower { grid-template-columns: 1fr; }
  .product-preview-goal { min-height: 118px; }
  .marketing-auth-card { padding: 20px; }
  .marketing-proof { grid-template-columns: repeat(2, 1fr); margin: 0 18px; }
  .marketing-proof > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .marketing-proof > div:nth-child(4) { border-top: 1px solid var(--line); }
  .marketing-section { padding: 72px 18px; }
  .marketing-feature-grid, .marketing-step-grid, .faq-grid { grid-template-columns: 1fr; }
  .pricing-card { grid-template-columns: 1fr; }
  .pricing-card-copy ul { grid-template-columns: 1fr; }
  .marketing-final-cta { flex-direction: column; align-items: flex-start; margin: 20px 18px 70px; }
  .marketing-footer { grid-template-columns: 1fr; }
  .marketing-footer nav { flex-wrap: wrap; }
  .onboarding-form-grid, .household-access-grid { grid-template-columns: 1fr; }
  .partner-invite-form { grid-template-columns: 1fr; }
}
