:root {
  --bg-0: #070c10;
  --bg-1: #11171c;
  --text: #f7f4ee;
  --muted: #a9b5bd;
  --electric-blue: #6aa7c8;
  --electric-blue-soft: rgba(106, 167, 200, 0.32);
  --accent-green: #66b89e;
  --accent-amber: #d4a64f;
  --accent-red: #c96f62;
  --panel: rgba(17, 24, 29, 0.68);
  --panel-strong: rgba(10, 16, 20, 0.88);
  --surface-line: rgba(190, 202, 207, 0.18);
  --education-svg-bg: rgba(11, 17, 21, 0.96);
  --education-svg-surface: rgba(31, 43, 49, 0.94);
  --education-svg-surface-border: rgba(160, 178, 186, 0.48);
  --education-svg-text: #f4f1ea;
  --education-svg-muted: #becad0;
  --education-svg-edge: rgba(173, 197, 206, 0.88);
  --education-svg-accent: #d4a64f;
  --radius-card: 12px;
  --radius-ui: 8px;
  --shadow-glow: 0 0 0 1px rgba(148, 171, 181, 0.34), 0 18px 52px rgba(0, 0, 0, 0.62);
  --topbar-height: 62px;
  --mobile-action-bar-height: 0px;
  --mobile-action-bar-safe: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0) 160px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 88px),
    linear-gradient(135deg, var(--bg-0) 0%, #0d1418 48%, var(--bg-1) 100%);
}

body.access-manager-page.is-auth-locked #accessManagerApp {
  visibility: hidden;
  pointer-events: none;
}

body.lead-manager-page.is-auth-locked #leadManagerApp {
  visibility: hidden;
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

.topbar {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto 0;
  height: auto;
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  flex-wrap: wrap;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(7, 13, 25, 0.85), rgba(7, 13, 25, 0.45));
  border-bottom: 1px solid rgba(138, 175, 220, 0.14);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.app-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 55px;
  width: auto;
  min-width: 172px;
  padding: 5px 10px;
  border-radius: 12px;
  border: 1px solid rgba(127, 160, 200, 0.22);
  background: rgba(8, 16, 30, 0.6);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.app-home-link-image {
  display: block;
  width: 150px;
  min-width: 150px;
  height: auto;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.app-home-link:hover,
.app-home-link:focus-visible {
  border-color: rgba(143, 208, 255, 0.46);
  background: rgba(11, 25, 46, 0.86);
  box-shadow: 0 0 0 1px rgba(143, 208, 255, 0.18);
  outline: none;
}

.mobile-topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-header-more-btn,
.mobile-action-bar,
.mobile-focus-nav,
.mobile-overflow-sheet,
.mobile-module-sheet {
  display: none;
}

.session-status {
  font-size: 0.76rem;
  color: #8fb0d5;
  white-space: nowrap;
}

.session-status.is-dirty {
  color: #ffd48a;
}

.file-input-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.topbar-input {
  flex: 1 1 auto;
  width: min(240px, 40vw);
  min-width: 0;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(8, 16, 30, 0.66);
  color: var(--text);
  padding: 0 11px;
}

.topbar-input:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.55);
  outline-offset: 1px;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.35);
  background: rgba(8, 18, 36, 0.68);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ui-button:hover:not(:disabled) {
  border-color: rgba(46, 163, 255, 0.8);
  background: rgba(10, 26, 53, 0.9);
}

.ui-button:active:not(:disabled) {
  transform: translateY(1px);
}

.ui-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.main-viewport {
  position: absolute;
  inset: var(--topbar-height) 0 0 0;
}

.layer {
  position: absolute;
  inset: 0;
}

.is-hidden {
  display: none !important;
}

body.advisor-gate-pending #app,
body.advisor-gate-pending #publishModal,
body.advisor-gate-pending #publishSuccessOverlay,
body.advisor-gate-pending #publishedRecoveryLayer {
  display: none !important;
}

#greetingLayer {
  z-index: 4;
}

#overviewLayer {
  z-index: 10;
  opacity: 1;
  filter: blur(0);
  transition: opacity 260ms ease, filter 260ms ease;
}

#focusLayer {
  z-index: 5;
  opacity: 1;
  transition: opacity 220ms ease;
}

#overviewLayer.is-transitioning-out {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

#overviewLayer.is-transitioning-in {
  opacity: 1;
  filter: blur(0);
}

#focusLayer.is-transitioning-out {
  opacity: 0;
  pointer-events: none;
}

#focusLayer.is-transitioning-in {
  opacity: 1;
}

.anim-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.layer-active {
  z-index: 10 !important;
}

.greeting-view {
  display: grid;
  place-items: center;
  padding: 28px 24px 34px;
}

.greeting-hero {
  width: min(980px, 92vw);
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.8vh, 28px);
  text-align: center;
}

.greeting-headline {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.focused-view {
  display: grid;
  place-items: center;
  padding: 8px 0 12px;
  overflow: hidden;
}

body.focus-mode:not(.compare-mode) #focusLayer {
  overflow: hidden;
}

.swipe-stage {
  position: relative;
  width: min(1600px, 96vw);
  max-width: calc(100vw - 8px);
  height: calc(100vh - var(--topbar-height) - 24px);
  max-height: calc(100vh - var(--topbar-height) - 24px);
  overflow: hidden;
  border-radius: 28px;
}

.swipe-stage.is-compare {
  width: min(1420px, calc(100vw - 52px));
  height: min(760px, calc(100vh - var(--topbar-height) - 36px));
}

.swipe-pane {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  will-change: transform, opacity;
}

.swipe-pane-content {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: stretch;
  padding: 12px;
}

.module-card {
  border-radius: var(--radius-card);
  border: 1px solid rgba(106, 167, 200, 0.78);
  box-shadow: 0 0 0 1px rgba(148, 171, 181, 0.2), 0 18px 44px rgba(0, 0, 0, 0.48);
  background: linear-gradient(180deg, rgba(13, 27, 48, 0.76), rgba(7, 17, 31, 0.86));
  backdrop-filter: blur(10px);
}

.focused-module-card {
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.module-header-band {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-media-add-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  border-radius: 999px;
  background: rgba(7, 16, 31, 0.64);
  color: #cfe4ff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.module-media-add-btn:hover,
.module-media-add-btn:focus-visible {
  border-color: rgba(143, 208, 255, 0.58);
  background: rgba(11, 25, 46, 0.86);
  outline: none;
}

.module-restore-cards-btn {
  color: #bfe8cf;
}

.module-video-scene-btn {
  color: #f5dfad;
  border-color: rgba(212, 166, 79, 0.46);
}

.module-video-scene-btn:hover,
.module-video-scene-btn:focus-visible {
  border-color: rgba(237, 195, 111, 0.78);
  background: rgba(62, 46, 18, 0.68);
}

.module-meta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(128, 172, 223, 0.26);
  background: rgba(8, 18, 35, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: #cfe4ff;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.module-title-input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 720;
  padding: 12px 14px;
  line-height: 1.14;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.module-title-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.module-title-shell .module-title-input {
  background: transparent;
}

.module-title-edit-btn {
  align-self: start;
  min-width: 44px;
  height: 32px;
  margin: 8px 8px 0 0;
  border-radius: 999px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.64);
  color: #cfe4ff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.module-title-edit-btn:hover,
.module-title-edit-btn:focus-visible {
  border-color: rgba(143, 208, 255, 0.58);
  background: rgba(11, 25, 46, 0.86);
  outline: none;
}

.module-title-input:focus-visible,
.module-notes-input:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.7);
  outline-offset: 1px;
}

.module-notes-input {
  width: 100%;
  min-height: 72px;
  height: 84px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 14px;
  resize: none;
  line-height: 1.45;
}

.module-notes-panel {
  border-radius: 12px;
  border: 1px solid rgba(127, 160, 200, 0.18);
  background: rgba(7, 16, 31, 0.22);
  overflow: hidden;
}

.module-notes-summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  color: #bcd4f1;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.module-notes-summary::-webkit-details-marker {
  display: none;
}

.module-notes-summary::after {
  content: '+';
  float: right;
  color: #8fb0d5;
}

.module-notes-panel[open] .module-notes-summary::after {
  content: '-';
}

.module-notes-panel .module-notes-input {
  border-top: 1px solid rgba(127, 160, 200, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.026);
}

.generated-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.generated-section-title {
  margin: 2px 2px 0;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #c3ddff;
  text-transform: uppercase;
}

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

.generated-card {
  border-radius: 10px;
  border: 1px solid rgba(190, 202, 207, 0.14);
  background:
    linear-gradient(180deg, rgba(24, 34, 40, 0.72), rgba(11, 18, 23, 0.7)),
    rgba(13, 20, 24, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.026);
  padding: 13px;
  min-height: 116px;
}

[data-module-card-id] {
  position: relative;
}

.generated-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.generated-card-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 24px;
}

.generated-card-remove-btn,
.generated-card-drag-handle,
.module-media-remove-btn {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 163, 177, 0.3);
  border-radius: 999px;
  background: rgba(27, 10, 18, 0.7);
  color: #ffb7c4;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

[data-module-card-id]:hover .generated-card-remove-btn,
[data-module-card-id]:focus-within .generated-card-remove-btn,
[data-module-card-id]:hover .generated-card-drag-handle,
[data-module-card-id]:focus-within .generated-card-drag-handle,
.module-media-item:hover .module-media-remove-btn,
.module-media-item:focus-within .module-media-remove-btn {
  opacity: 1;
  transform: scale(1);
}

.generated-card-remove-btn:hover,
.generated-card-remove-btn:focus-visible,
.generated-card-drag-handle:hover,
.generated-card-drag-handle:focus-visible,
.module-media-remove-btn:hover,
.module-media-remove-btn:focus-visible {
  border-color: rgba(255, 180, 193, 0.78);
  background: rgba(82, 22, 41, 0.88);
  outline: none;
}

.generated-card-drag-handle {
  border-color: rgba(143, 212, 255, 0.24);
  background: rgba(6, 18, 31, 0.66);
  color: #a8d9ff;
  cursor: grab;
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
}

.generated-card-drag-handle:hover,
.generated-card-drag-handle:focus-visible {
  border-color: rgba(143, 212, 255, 0.62);
  background: rgba(16, 44, 68, 0.88);
}

.generated-card-drag-handle:active,
.generated-card-dragging .generated-card-drag-handle {
  cursor: grabbing;
}

.generated-card-drag-ghost {
  opacity: 0.42;
}

.generated-card-drag-chosen {
  box-shadow: 0 18px 44px rgba(3, 10, 18, 0.34);
}

.generated-card-dragging {
  transform: scale(0.995);
}

.generated-inline-editable {
  border-radius: 5px;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: background 160ms ease, outline-color 160ms ease, box-shadow 160ms ease;
}

.generated-inline-editable:hover {
  background: rgba(143, 212, 255, 0.06);
  outline-color: rgba(143, 212, 255, 0.22);
}

.generated-inline-editable:focus {
  background: rgba(8, 24, 38, 0.68);
  box-shadow: 0 0 0 3px rgba(143, 212, 255, 0.12);
  outline-color: rgba(143, 212, 255, 0.62);
}

.generated-inline-editable[contenteditable="true"]:empty::before {
  content: attr(aria-label);
  color: rgba(184, 205, 225, 0.5);
}

.video-summary-generated-grid {
  grid-template-columns: minmax(0, 1fr);
}

.video-summary-card {
  grid-column: 1 / -1;
}

.video-summary-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-summary-embed-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(126, 177, 230, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 111, 143, 0.14), transparent 54%),
    rgba(5, 12, 23, 0.78);
  aspect-ratio: 16 / 9;
}

.video-summary-embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-summary-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(213, 230, 247, 0.78);
}

.video-summary-description {
  margin: 0;
  max-width: 72ch;
  color: #b7c8dd;
  font-size: 0.95rem;
  line-height: 1.5;
}

.video-summary-link {
  width: fit-content;
  color: #8fd4ff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.video-summary-link:hover,
.video-summary-link:focus-visible {
  color: #f3f9ff;
  text-decoration: underline;
}

.module-media-card {
  grid-column: 1 / -1;
}

.module-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.module-media-single-grid {
  grid-template-columns: minmax(0, 1fr);
}

.module-media-item {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(144, 183, 224, 0.18);
  border-radius: 10px;
  background: rgba(5, 12, 22, 0.45);
}

.module-media-image {
  display: block;
  width: 100%;
  max-height: min(56vh, 520px);
  object-fit: contain;
  background: rgba(6, 15, 27, 0.68);
}

.module-media-image.is-loading {
  min-height: 140px;
  opacity: 0.28;
}

.module-media-image.is-error {
  min-height: 100px;
  opacity: 0.2;
}

.module-media-status {
  display: block;
  padding: 9px 10px;
  color: #a9c2df;
  font-size: 0.75rem;
}

.module-media-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

@media (hover: none) {
  .generated-card-remove-btn,
  .module-media-remove-btn {
    opacity: 0.72;
    transform: scale(1);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.generated-card-header .generated-card-title {
  margin: 0;
}

.assumptions-inline-status {
  min-height: 1.2em;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  color: #a8bfdc;
}

.assumptions-inline-status.is-updating {
  color: #9ed1ff;
}

.assumptions-inline-status.is-updated {
  color: #9ff2c8;
}

.assumptions-inline-edit-btn {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  border: 1px solid rgba(132, 173, 220, 0.42);
  background: rgba(7, 16, 31, 0.78);
  color: #d7e9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.assumptions-inline-edit-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.assumptions-inline-edit-btn:hover {
  border-color: rgba(144, 194, 247, 0.7);
  background: rgba(11, 26, 48, 0.9);
}

.assumptions-inline-edit-btn:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.72);
  outline-offset: 1px;
}

.assumptions-inline-edit-btn[aria-pressed="true"] {
  border-color: rgba(46, 163, 255, 0.9);
  color: #dff1ff;
}

.assumptions-inline-cell.is-editable {
  vertical-align: top;
  padding: 4px 6px;
  background: rgba(14, 33, 58, 0.18);
}

.assumptions-inline-editor {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(132, 173, 220, 0.5);
  border-radius: 8px;
  padding: 5px 7px 6px;
  background: rgba(7, 16, 31, 0.72);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.assumptions-inline-editor:hover {
  border-color: rgba(156, 196, 243, 0.72);
  background: rgba(10, 22, 40, 0.82);
}

.assumptions-inline-editor:focus-within {
  border-color: rgba(46, 163, 255, 0.88);
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.18);
}

.assumptions-inline-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgba(121, 164, 212, 0.36);
  border-radius: 7px;
  background: rgba(8, 17, 31, 0.88);
  color: #eff7ff;
  padding: 5px 7px;
  font-size: 0.79rem;
}

.assumptions-inline-input:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.72);
  outline-offset: 1px;
}

.assumptions-inline-input.is-invalid {
  border-color: rgba(255, 126, 145, 0.9);
}

.assumptions-inline-field-helper {
  display: none;
  font-size: 0.68rem;
  color: #b7cff0;
}

.assumptions-inline-editor:focus-within .assumptions-inline-field-helper {
  display: block;
}

.assumptions-inline-error {
  min-height: 1.1em;
  font-size: 0.7rem;
  color: #ff9fb0;
}

.assumptions-inline-mode-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assumptions-inline-mode-toggle {
  display: inline-flex;
  gap: 6px;
  border: 1px solid rgba(132, 173, 220, 0.36);
  border-radius: 8px;
  padding: 4px;
  background: rgba(7, 16, 31, 0.64);
}

.assumptions-inline-mode-toggle.is-invalid {
  border-color: rgba(255, 126, 145, 0.9);
}

.assumptions-inline-mode-btn {
  border: 1px solid rgba(132, 173, 220, 0.45);
  background: rgba(10, 25, 46, 0.7);
  color: #d7e9ff;
  border-radius: 6px;
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.74rem;
  cursor: pointer;
}

.assumptions-inline-mode-btn.is-active {
  border-color: rgba(46, 163, 255, 0.9);
  background: rgba(35, 88, 139, 0.36);
  color: #edf7ff;
}

.assumptions-inline-mode-btn:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.72);
  outline-offset: 1px;
}

.assumptions-inline-mode-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.assumptions-editor-card {
  grid-column: 1 / -1;
  border-color: rgba(120, 182, 235, 0.45);
  background: linear-gradient(180deg, rgba(16, 31, 56, 0.84), rgba(10, 21, 40, 0.84));
}

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

.assumptions-editor-status {
  min-height: 1.2em;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  color: #a8bfdc;
}

.assumptions-editor-status.is-updating {
  color: #9ed1ff;
}

.assumptions-editor-status.is-updated {
  color: #9ff2c8;
}

.assumptions-editor-helper {
  margin: 4px 0 10px;
  color: #b8cde8;
  font-size: 0.79rem;
}

.assumptions-editor-group + .assumptions-editor-group {
  margin-top: 10px;
}

.assumptions-editor-subheading {
  margin: 0 0 7px;
  font-size: 0.8rem;
  color: #d5e8ff;
  letter-spacing: 0.02em;
}

.assumptions-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.assumptions-editor-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.assumptions-editor-label {
  color: #cfe2f9;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.assumptions-editor-input {
  width: 100%;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(132, 173, 220, 0.42);
  background: rgba(7, 16, 31, 0.78);
  color: #f0f7ff;
  padding: 0 10px;
  font-size: 0.84rem;
  cursor: text;
}

.assumptions-editor-input:focus-visible {
  outline: 2px solid rgba(46, 163, 255, 0.72);
  outline-offset: 1px;
  border-color: rgba(46, 163, 255, 0.88);
}

.assumptions-editor-input.is-invalid,
.assumptions-editor-field.is-invalid .assumptions-editor-input,
.assumptions-editor-radio-row.is-invalid {
  border-color: rgba(255, 126, 145, 0.9);
}

.assumptions-editor-input.is-disabled {
  opacity: 0.65;
}

.assumptions-editor-error {
  min-height: 1.1em;
  font-size: 0.72rem;
  color: #ff9fb0;
}

.assumptions-editor-payment-mode {
  grid-column: 1 / -1;
}

.assumptions-editor-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(132, 173, 220, 0.3);
  background: rgba(7, 16, 31, 0.55);
}

.assumptions-editor-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d7e9ff;
  font-size: 0.78rem;
}

.assumptions-editor-fixed-payment.is-disabled {
  opacity: 0.68;
}

.generated-card-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #f1eee8;
  letter-spacing: 0.01em;
}

.generated-summary-content {
  color: #ebe7df;
  font-size: 0.89rem;
  line-height: 1.48;
}

.generated-summary-content p,
.generated-summary-content ul,
.generated-summary-content ol {
  margin: 0 0 7px;
}

.generated-summary-content p:last-child,
.generated-summary-content ul:last-child,
.generated-summary-content ol:last-child {
  margin-bottom: 0;
}

.retirement-generated-grid {
  grid-template-columns: minmax(0, 0.96fr) minmax(340px, 1.04fr);
  align-items: start;
}

.retirement-generated-grid .generated-summary-card,
.retirement-explainer-card {
  min-height: 0;
}

.retirement-explainer-card {
  border-color: rgba(190, 202, 207, 0.16);
  background:
    linear-gradient(180deg, rgba(20, 30, 34, 0.74), rgba(10, 17, 20, 0.68)),
    rgba(10, 17, 20, 0.68);
}

.retirement-explainer-content {
  display: grid;
  gap: 8px;
}

.retirement-decision-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border-color: rgba(116, 214, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(18, 31, 41, 0.86), rgba(8, 17, 24, 0.78)),
    rgba(8, 17, 24, 0.78);
}

.retirement-required-pot-card {
  min-width: 0;
  padding: 2px 8px 2px 0;
  border-right: 1px solid rgba(190, 202, 207, 0.12);
}

.retirement-required-eyebrow,
.retirement-scenario-label {
  margin: 0;
  color: rgba(211, 232, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.retirement-required-value {
  margin: 7px 0 8px;
  color: #f8fbff;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 0.98;
  overflow-wrap: anywhere;
  animation: retirement-value-change 360ms ease;
}

.retirement-required-detail {
  max-width: 560px;
  margin: 0;
  color: #c9d9e7;
  font-size: 0.86rem;
  line-height: 1.45;
}

.retirement-position-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.retirement-position-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(140, 175, 220, 0.22);
  border-radius: 999px;
  background: rgba(6, 18, 34, 0.44);
  color: #ddebf7;
  padding: 5px 9px;
  font-size: 0.72rem;
}

.retirement-position-chip[data-tone="positive"] {
  border-color: rgba(102, 184, 158, 0.42);
  background: rgba(102, 184, 158, 0.1);
}

.retirement-position-chip[data-tone="risk"] {
  border-color: rgba(201, 111, 98, 0.46);
  background: rgba(201, 111, 98, 0.1);
}

.retirement-position-chip-label {
  color: rgba(213, 229, 247, 0.74);
}

.retirement-position-chip-value {
  color: #f7fbff;
  font-weight: 780;
}

.retirement-scenario-area {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

.retirement-scenario-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  min-width: 0;
}

.retirement-scenario-card {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 86px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(140, 175, 220, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 33, 45, 0.78), rgba(8, 18, 28, 0.72)),
    rgba(8, 18, 28, 0.72);
  color: #eaf4ff;
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.retirement-scenario-card:hover,
.retirement-scenario-card:focus-visible {
  border-color: rgba(116, 214, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(28, 51, 70, 0.88), rgba(10, 23, 36, 0.82)),
    rgba(10, 23, 36, 0.82);
  outline: none;
}

.retirement-scenario-card:focus-visible {
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.24);
}

.retirement-scenario-card.is-active {
  border-color: rgba(56, 189, 248, 0.74);
  background:
    linear-gradient(180deg, rgba(45, 94, 124, 0.48), rgba(12, 35, 54, 0.84)),
    rgba(12, 35, 54, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(56, 189, 248, 0.16);
}

.retirement-scenario-title {
  color: #f8fbff;
  font-size: 0.91rem;
  font-weight: 800;
  line-height: 1.2;
}

.retirement-scenario-detail {
  color: #bdd0df;
  font-size: 0.76rem;
  font-weight: 620;
  line-height: 1.35;
}

@keyframes retirement-value-change {
  0% {
    opacity: 0.68;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.generated-empty {
  margin: 0;
  color: #91a8c7;
  font-size: 0.84rem;
}

.generated-table-wrap {
  overflow: auto;
}

.generated-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.generated-table th,
.generated-table td {
  border: 1px solid rgba(125, 160, 207, 0.2);
  padding: 7px 8px;
  text-align: left;
}

.generated-table th {
  color: #f0ece5;
  background: rgba(172, 186, 190, 0.1);
  font-weight: 600;
}

.generated-table td {
  color: #dce3e4;
}

.generated-table td.generated-money-cell:not(:first-child) {
  color: #f2f8ff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.generated-table td.generated-money-cell:first-child {
  color: #e7eef3;
}

.generated-table td.cc-cell-hoverable {
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease, font-weight 150ms ease;
}

.generated-table td.cc-cell-hoverable:hover {
  background: rgba(46, 163, 255, 0.09);
}

.generated-table td.cc-cell-selected {
  background: rgba(46, 163, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(126, 196, 255, 0.56), inset 0 -1px 0 rgba(147, 206, 255, 0.2);
  font-weight: 600;
}

.generated-outputs-bucketed-card {
  grid-column: 1 / -1;
}

.pbs-main-event-card {
  position: relative;
  padding: 15px;
  border-color: rgba(125, 185, 239, 0.34);
  background:
    linear-gradient(180deg, rgba(21, 35, 46, 0.92), rgba(10, 18, 28, 0.88)),
    rgba(10, 18, 28, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 14px 34px rgba(2, 10, 22, 0.26);
}

.pbs-main-event-card .generated-card-header {
  margin-bottom: 10px;
}

.pbs-main-event-card .generated-card-title {
  color: #f7fbff;
  font-size: 1.06rem;
  letter-spacing: 0;
}

.pbs-main-summary {
  margin: 0;
  color: #dceafa;
  font-size: 0.88rem;
}

.pbs-main-summary p:last-child {
  margin-bottom: 0;
}

.pbs-scenario-shell {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.pbs-scenario-switcher {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(133, 177, 226, 0.26);
  border-radius: 10px;
  background: rgba(5, 14, 27, 0.58);
}

.pbs-scenario-switcher-label {
  flex: 0 0 auto;
  padding-left: 4px;
  color: rgba(212, 229, 247, 0.78);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.pbs-scenario-options {
  display: grid;
  /* auto-fit needs a definite width to count its tracks, and as a flex item
     with a content-based basis it would resolve to a single column. */
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  grid-auto-flow: row;
  gap: 6px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(133, 177, 226, 0.18);
  border-radius: 8px;
  background: rgba(6, 18, 34, 0.62);
}

.pbs-scenario-option {
  appearance: none;
  min-width: 0;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(218, 234, 250, 0.78);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.1;
  padding: 8px 12px;
  text-align: center;
}

.pbs-scenario-option:hover,
.pbs-scenario-option:focus-visible {
  border-color: rgba(116, 214, 255, 0.42);
  color: #f6fbff;
  outline: none;
}

.pbs-scenario-option:focus-visible {
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.24);
}

.pbs-scenario-option.is-active {
  border-color: rgba(116, 214, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(74, 152, 214, 0.28), rgba(18, 57, 96, 0.2)),
    rgba(14, 42, 70, 0.82);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pbs-scenario-summary-host,
.pbs-scenario-content-host {
  min-width: 0;
}

.pbs-scenario-content {
  transition: opacity 180ms ease, transform 180ms ease, filter 220ms ease;
}

.pbs-scenario-content.is-entering {
  opacity: 0.62;
  transform: translateY(4px);
}

.pbs-scenario-content-highlight {
  animation: pbs-content-highlight 680ms ease;
}

.pension-scenario-switcher {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(133, 177, 226, 0.26);
  border-radius: 10px;
  background: rgba(5, 14, 27, 0.58);
}

.pension-scenario-switcher-label {
  flex: 0 0 auto;
  padding-left: 4px;
  color: rgba(212, 229, 247, 0.78);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.pension-scenario-options {
  display: grid;
  /* auto-fit needs a definite width to count its tracks, and as a flex item
     with a content-based basis it would resolve to a single column. */
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  grid-auto-flow: row;
  gap: 6px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(133, 177, 226, 0.18);
  border-radius: 8px;
  background: rgba(6, 18, 34, 0.62);
}

.pension-scenario-option {
  appearance: none;
  min-width: 0;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(218, 234, 250, 0.78);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.1;
  padding: 8px 12px;
  text-align: center;
}

.pension-scenario-option:hover,
.pension-scenario-option:focus-visible {
  border-color: rgba(116, 214, 255, 0.42);
  color: #f6fbff;
  outline: none;
}

.pension-scenario-option:focus-visible {
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.24);
}

.pension-scenario-option.is-active {
  border-color: rgba(116, 214, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(74, 152, 214, 0.28), rgba(18, 57, 96, 0.2)),
    rgba(14, 42, 70, 0.82);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pbs-table-frame {
  min-width: 0;
  overflow: visible;
  border: 1px solid rgba(139, 186, 236, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(18, 38, 63, 0.9), rgba(6, 17, 31, 0.74)),
    rgba(7, 18, 34, 0.78);
  box-shadow:
    0 20px 44px rgba(0, 8, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pbs-balance-header {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(240px, 0.78fr);
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(139, 186, 236, 0.24);
  background:
    linear-gradient(135deg, rgba(81, 166, 230, 0.18), rgba(123, 255, 191, 0.07) 48%, rgba(255, 209, 102, 0.08)),
    rgba(5, 15, 29, 0.58);
}

.pbs-balance-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.pbs-balance-slab {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 72px;
  border: 1px solid rgba(150, 187, 229, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 247, 255, 0.07), rgba(134, 172, 213, 0.03)),
    rgba(6, 17, 31, 0.54);
  padding: 12px 14px;
}

.pbs-balance-slab-primary {
  min-height: 152px;
  border-color: rgba(116, 214, 255, 0.46);
  background:
    linear-gradient(180deg, rgba(84, 166, 229, 0.22), rgba(19, 44, 73, 0.12)),
    rgba(7, 20, 38, 0.74);
}

.pbs-balance-label,
.pbs-bucket-total-label {
  display: block;
  color: rgba(203, 222, 244, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pbs-balance-value {
  display: block;
  min-width: 0;
  color: #f8fcff;
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 3.05rem);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.pbs-balance-value-secondary {
  font-size: 1.14rem;
  line-height: 1.08;
}

.pbs-balance-formula {
  display: block;
  color: rgba(216, 234, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
}

.pbs-bucket-surface {
  min-width: 0;
  padding: 10px;
}

.pbs-bucket-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.pbs-bucket-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 224px;
  border: 1px solid rgba(127, 171, 222, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 35, 61, 0.84), rgba(7, 18, 34, 0.78)),
    rgba(7, 18, 34, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.pbs-bucket-card[data-bucket="lifestyle"] {
  border-color: rgba(93, 178, 255, 0.34);
}

.pbs-bucket-card[data-bucket="liquidity"] {
  border-color: rgba(123, 255, 191, 0.3);
}

.pbs-bucket-card[data-bucket="longevity"] {
  border-color: rgba(255, 209, 102, 0.32);
}

.pbs-bucket-card[data-bucket="legacy"] {
  border-color: rgba(255, 159, 179, 0.31);
}

.pbs-bucket-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  min-height: 74px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(137, 177, 223, 0.18);
  background: linear-gradient(180deg, rgba(57, 118, 174, 0.2), rgba(20, 50, 84, 0.08));
}

.pbs-bucket-heading-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pbs-bucket-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.pbs-bucket-card-title {
  min-width: 0;
  margin: 0;
  color: #f4f9ff;
  font-size: 0.88rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  line-height: 1.12;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.pbs-bucket-info {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  z-index: 4;
}

.pbs-indicator-info {
  z-index: 5;
}

.pbs-bucket-info-button {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(177, 210, 247, 0.38);
  border-radius: 50%;
  background: rgba(6, 18, 34, 0.64);
  color: #cce6ff;
  cursor: pointer;
  padding: 0;
}

.pbs-bucket-info-button:hover,
.pbs-bucket-info-button:focus-visible,
.pbs-bucket-info.is-open .pbs-bucket-info-button {
  border-color: rgba(116, 214, 255, 0.76);
  background: rgba(46, 163, 255, 0.18);
  color: #f5fbff;
  outline: none;
}

.pbs-bucket-info-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.28);
}

.pbs-bucket-info-icon::before {
  content: 'i';
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
}

.pbs-bucket-info-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: min(260px, calc(100vw - 32px));
  border: 1px solid rgba(156, 197, 242, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 33, 52, 0.98), rgba(9, 18, 32, 0.98)),
    rgba(9, 18, 32, 0.98);
  box-shadow: 0 16px 36px rgba(0, 7, 18, 0.56);
  color: #dcecff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.42;
  opacity: 0;
  padding: 10px 11px;
  pointer-events: none;
  text-transform: none;
  transform: translate(-50%, -3px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 30;
}

.pbs-bucket-info-popover::before {
  content: '';
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(156, 197, 242, 0.36);
  border-top: 1px solid rgba(156, 197, 242, 0.36);
  background: rgba(18, 33, 52, 0.98);
  transform: rotate(45deg);
}

.pbs-bucket-info:hover .pbs-bucket-info-popover,
.pbs-bucket-info:focus-within .pbs-bucket-info-popover,
.pbs-bucket-info.is-open .pbs-bucket-info-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.pbs-bucket-row-list {
  display: grid;
  gap: 0;
  flex: 1;
  padding: 8px 12px;
}

.pbs-bucket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 43px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(128, 164, 204, 0.12);
}

.pbs-bucket-row:last-child {
  border-bottom: 0;
}

.pbs-bucket-row-label {
  min-width: 0;
  color: #dcecff;
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pbs-bucket-row-amount,
.pbs-bucket-total-value {
  color: #e4f2ff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.pbs-bucket-empty-state {
  margin: 0;
  padding: 12px 0;
  color: #9db6d4;
  font-size: 0.78rem;
}

.pbs-bucket-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: auto;
  padding: 11px 12px 12px;
  border-top: 1px solid rgba(145, 184, 227, 0.26);
  background: rgba(12, 26, 45, 0.74);
}

.pbs-bucket-total-value {
  color: #f3f9ff;
  font-size: 0.9rem;
  font-weight: 800;
}

.pbs-bucket-card[data-health-tone="positive"] .pbs-bucket-total {
  background: rgba(30, 79, 57, 0.24);
}

.pbs-bucket-card[data-health-tone="warning"] .pbs-bucket-total {
  background: rgba(90, 67, 20, 0.22);
}

.pbs-bucket-card[data-health-tone="negative"] .pbs-bucket-total {
  background: rgba(96, 28, 46, 0.22);
}

.pbs-bucket-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pbs-bucket-section {
  min-width: 0;
}

.pbs-bucket-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(125, 160, 207, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 18, 35, 0.64);
}

.pbs-bucket-table th,
.pbs-bucket-table td {
  padding: 8px 10px;
}

.pbs-bucket-title-row th {
  color: #f2f9ff;
  background: linear-gradient(90deg, rgba(46, 163, 255, 0.36), rgba(46, 163, 255, 0.12));
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pbs-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pbs-section-heading-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pbs-section-heading-text {
  min-width: 0;
}

.pbs-section-support-text {
  color: rgba(216, 234, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.pbs-health-badge {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 160, 207, 0.26);
  background: rgba(6, 16, 31, 0.44);
  color: #e8f4ff;
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

button.pbs-health-badge {
  cursor: pointer;
}

.pbs-health-badge::before {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.pbs-health-badge:hover,
.pbs-health-badge:focus-visible,
.pbs-indicator-info.is-open .pbs-health-badge {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(46, 163, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pbs-health-badge-info-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
}

.pbs-health-badge[data-tone="positive"] {
  border-color: rgba(123, 255, 191, 0.36);
  background: rgba(23, 66, 47, 0.52);
  color: #bdfbdd;
}

.pbs-health-badge[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.38);
  background: rgba(79, 56, 15, 0.5);
  color: #ffe3a0;
}

.pbs-health-badge[data-tone="negative"] {
  border-color: rgba(255, 159, 179, 0.38);
  background: rgba(82, 22, 39, 0.5);
  color: #ffc6d1;
}

.pbs-explanation-modal-open {
  overflow: hidden;
}

.pbs-explanation-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 8, 17, 0.66);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 120;
}

.pbs-explanation-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pbs-explanation-dialog {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(156, 197, 242, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 37, 58, 0.98), rgba(8, 18, 33, 0.98)),
    rgba(8, 18, 33, 0.98);
  box-shadow: 0 28px 70px rgba(0, 7, 18, 0.64);
  color: #dcecff;
  transform: translateY(8px) scale(0.985);
  transition: transform 150ms ease;
}

.pbs-explanation-modal.is-open .pbs-explanation-dialog {
  transform: translateY(0) scale(1);
}

.pbs-explanation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: start;
  padding: 18px 18px 15px;
  border-bottom: 1px solid rgba(137, 177, 223, 0.18);
  background: linear-gradient(180deg, rgba(57, 118, 174, 0.18), rgba(20, 50, 84, 0.06));
}

.pbs-explanation-heading-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pbs-explanation-title {
  margin: 0;
  color: #f4f9ff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.16;
}

.pbs-explanation-subtitle {
  margin: 0;
  color: rgba(216, 234, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.pbs-explanation-current-pill {
  align-self: start;
  min-height: 26px;
}

.pbs-explanation-close {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(177, 210, 247, 0.34);
  border-radius: 50%;
  background: rgba(6, 18, 34, 0.58);
  color: #dcecff;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.pbs-explanation-close:hover,
.pbs-explanation-close:focus-visible {
  border-color: rgba(116, 214, 255, 0.76);
  background: rgba(46, 163, 255, 0.18);
  color: #f5fbff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 163, 255, 0.2);
}

.pbs-explanation-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.pbs-explanation-current {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(125, 160, 207, 0.24);
  border-radius: 8px;
  background: rgba(6, 16, 31, 0.38);
}

.pbs-explanation-kicker {
  color: rgba(216, 234, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.pbs-explanation-current-value {
  color: #f4f9ff;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.15;
}

.pbs-explanation-calc {
  display: grid;
  gap: 8px;
}

.pbs-explanation-calc h4 {
  margin: 0;
  color: #f4f9ff;
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.2;
}

.pbs-explanation-calc p {
  margin: 0;
  color: #c9dcf3;
  font-size: 0.8rem;
  font-weight: 560;
  line-height: 1.48;
}

.pbs-explanation-formula {
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(125, 160, 207, 0.22);
  border-radius: 8px;
  background: rgba(8, 18, 35, 0.72);
  color: #dcecff;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pbs-explanation-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 160, 207, 0.28);
  border-radius: 8px;
  background: rgba(8, 18, 35, 0.64);
}

.pbs-explanation-table th,
.pbs-explanation-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(128, 164, 204, 0.13);
  color: #dcecff;
  font-size: 0.76rem;
  line-height: 1.32;
  text-align: left;
  vertical-align: top;
}

.pbs-explanation-table th {
  background: rgba(44, 83, 128, 0.3);
  color: #f2f9ff;
  font-weight: 780;
}

.pbs-explanation-table tr:last-child td {
  border-bottom: 0;
}

.pbs-explanation-table tr.is-current td {
  background: rgba(46, 163, 255, 0.08);
}

.pbs-explanation-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 780;
  white-space: nowrap;
}

.pbs-explanation-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.pbs-explanation-status[data-tone="positive"] {
  color: #bdfbdd;
}

.pbs-explanation-status[data-tone="warning"] {
  color: #ffe3a0;
}

.pbs-explanation-status[data-tone="negative"] {
  color: #ffc6d1;
}

.pbs-explanation-current-marker {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(116, 214, 255, 0.3);
  border-radius: 999px;
  color: #cce6ff;
  font-size: 0.62rem;
  font-weight: 760;
  line-height: 1.1;
  vertical-align: middle;
}

.pbs-bucket-table thead tr:nth-child(2) th {
  background: rgba(44, 83, 128, 0.3);
}

.pbs-amount-col {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.pbs-subtotal-row td {
  font-weight: 700;
  border-top: 1px solid rgba(125, 160, 207, 0.44);
}

.pbs-bucket-section[data-health-tone="positive"] .pbs-bucket-table {
  border-color: rgba(123, 255, 191, 0.28);
}

.pbs-bucket-section[data-health-tone="warning"] .pbs-bucket-table {
  border-color: rgba(255, 209, 102, 0.28);
}

.pbs-bucket-section[data-health-tone="negative"] .pbs-bucket-table {
  border-color: rgba(255, 159, 179, 0.28);
}

.pbs-bucket-table .pbs-subtotal-row[data-health-tone="positive"] td,
.pbs-matrix .pbs-subtotal-row td[data-health-tone="positive"] {
  background: rgba(30, 79, 57, 0.24);
}

.pbs-bucket-table .pbs-subtotal-row[data-health-tone="warning"] td,
.pbs-matrix .pbs-subtotal-row td[data-health-tone="warning"] {
  background: rgba(90, 67, 20, 0.22);
}

.pbs-bucket-table .pbs-subtotal-row[data-health-tone="negative"] td,
.pbs-matrix .pbs-subtotal-row td[data-health-tone="negative"] {
  background: rgba(96, 28, 46, 0.22);
}

.pbs-net-worth-row td {
  font-weight: 700;
  color: #f2f8ff;
  background: rgba(111, 156, 207, 0.12);
}

.pbs-net-worth-context {
  display: grid;
  gap: 15px;
  margin-top: 12px;
  padding: 17px 18px 18px;
  border: 1px solid rgba(164, 193, 227, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(221, 238, 255, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(218, 235, 255, 0.1), rgba(130, 165, 202, 0.05)),
    rgba(9, 19, 35, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pbs-net-worth-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pbs-net-worth-context-kicker {
  color: #dcecff;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pbs-net-worth-context-source {
  color: rgba(204, 222, 243, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.pbs-net-worth-context-hero {
  margin: 0;
  max-width: 22ch;
  color: #f6fbff;
  font-size: clamp(1.08rem, 0.94rem + 0.9vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.14;
}

.pbs-net-worth-context-benchmarks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 10px;
}

.pbs-net-worth-benchmark {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid rgba(159, 192, 228, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(242, 248, 255, 0.06), rgba(151, 184, 220, 0.03));
}

.pbs-net-worth-benchmark-label {
  color: rgba(199, 218, 239, 0.82);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.pbs-net-worth-benchmark-value {
  color: #f4f9ff;
  font-size: 1rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pbs-net-worth-context-support {
  display: grid;
  gap: 6px;
  padding-top: 2px;
  border-top: 1px solid rgba(164, 193, 227, 0.14);
}

.pbs-net-worth-context-support-line {
  margin: 0;
  color: #c5d8ec;
  font-size: 0.79rem;
  line-height: 1.45;
}

.pbs-bucket-note {
  margin: 6px 2px 0;
  color: #a8bfdb;
  font-size: 0.78rem;
}

.pbs-outputs-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbs-matrix-panel {
  border: 1px solid rgba(125, 160, 207, 0.28);
  border-radius: 12px;
  background: rgba(8, 18, 35, 0.64);
  overflow: hidden;
}

.pbs-matrix-wrap {
  overflow: auto;
}

.pbs-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pbs-matrix-head th {
  background: linear-gradient(90deg, rgba(46, 163, 255, 0.36), rgba(46, 163, 255, 0.12));
  color: #f2f9ff;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pbs-matrix-head th[data-health-tone="positive"] {
  background: linear-gradient(90deg, rgba(46, 163, 255, 0.24), rgba(123, 255, 191, 0.18));
}

.pbs-matrix-head th[data-health-tone="warning"] {
  background: linear-gradient(90deg, rgba(46, 163, 255, 0.24), rgba(255, 209, 102, 0.18));
}

.pbs-matrix-head th[data-health-tone="negative"] {
  background: linear-gradient(90deg, rgba(46, 163, 255, 0.24), rgba(255, 159, 179, 0.18));
}

.pbs-cell {
  vertical-align: top;
  min-height: 48px;
}

.pbs-cell-name {
  color: #dcecff;
  font-size: 0.82rem;
  line-height: 1.3;
}

.pbs-cell-amt {
  margin-top: 4px;
  text-align: right;
  color: #d9ebff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.pbs-cell-empty {
  background: rgba(10, 20, 38, 0.35);
}

.pbs-subtotal-label {
  color: #e4f2ff;
  font-size: 0.78rem;
}

.pbs-subtotal-amt {
  font-weight: 700;
}

.pbs-stacked-card {
  border: 1px solid rgba(125, 160, 207, 0.28);
  border-radius: 12px;
  background: rgba(8, 18, 35, 0.64);
  padding: 10px;
}

.pbs-stacked-title {
  margin-bottom: 8px;
}

.pbs-detail-table {
  width: 100%;
}

.pbs-flow-chip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  border: 1px solid rgba(151, 217, 255, 0.62);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(24, 54, 83, 0.96), rgba(8, 20, 36, 0.96)),
    rgba(8, 20, 36, 0.96);
  box-shadow: 0 14px 34px rgba(0, 8, 22, 0.5);
  color: #f6fbff;
  font-size: 0.76rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.98;
  padding: 8px 10px;
  transition: transform 680ms cubic-bezier(0.2, 0.82, 0.22, 1), opacity 680ms ease;
  white-space: nowrap;
}

.pbs-flow-chip[data-action="reduce"] {
  border-color: rgba(255, 209, 102, 0.68);
  color: #ffe5a9;
}

.pbs-flow-chip.is-moving {
  opacity: 0.14;
}

.pbs-flow-pulse {
  animation: pbs-flow-pulse 820ms ease;
}

.pbs-detail-table tr.pbs-flow-pulse td {
  animation: pbs-flow-cell-pulse 820ms ease;
}

@keyframes pbs-content-highlight {
  0% {
    filter: brightness(1.12);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes pbs-flow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(116, 214, 255, 0);
  }

  35% {
    box-shadow: 0 0 0 3px rgba(116, 214, 255, 0.28);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(116, 214, 255, 0);
  }
}

@keyframes pbs-flow-cell-pulse {
  0% {
    background: transparent;
  }

  35% {
    background: rgba(116, 214, 255, 0.16);
  }

  100% {
    background: transparent;
  }
}

.liquidity-generated-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  align-items: start;
}

.liquidity-hero-card {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  min-height: 360px;
  border-color: rgba(123, 255, 191, 0.28);
  background:
    linear-gradient(90deg, rgba(123, 255, 191, 0.08), transparent 42%, rgba(255, 209, 102, 0.07)),
    repeating-linear-gradient(90deg, rgba(207, 231, 255, 0.045) 0 1px, transparent 1px 58px),
    linear-gradient(180deg, rgba(17, 32, 39, 0.94), rgba(7, 16, 21, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 42px rgba(2, 10, 18, 0.28);
}

.liquidity-hero-card::before {
  content: '';
  position: absolute;
  inset: 48px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 212, 255, 0.42), transparent);
  pointer-events: none;
}

.liquidity-hero-card .generated-card-header,
.liquidity-hero-body {
  position: relative;
  z-index: 1;
}

.liquidity-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 16px;
  min-width: 0;
}

.liquidity-command {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 8px 4px 4px 0;
}

.liquidity-status-pill {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(190, 202, 207, 0.18);
  border-radius: 999px;
  background: rgba(5, 14, 20, 0.58);
  color: #dcecff;
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1;
  padding: 6px 10px;
  overflow-wrap: anywhere;
}

.liquidity-status-pill[data-tone="positive"] {
  border-color: rgba(123, 255, 191, 0.42);
  color: #bdffdf;
}

.liquidity-status-pill[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.44);
  color: #ffe2a0;
}

.liquidity-status-pill[data-tone="negative"] {
  border-color: rgba(255, 159, 179, 0.42);
  color: #ffc3cf;
}

.liquidity-hero-title {
  max-width: 720px;
  margin: 0;
  color: #f7fbff;
  font-size: 1.72rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.liquidity-hero-summary {
  max-width: 68ch;
  margin: 0;
  color: #c7d8e8;
  font-size: 0.91rem;
  line-height: 1.5;
}

.liquidity-hero-summary p:last-child {
  margin-bottom: 0;
}

.liquidity-readout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: end;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 212, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 12, 18, 0.62);
}

.liquidity-readout-label {
  grid-column: 1 / -1;
  color: rgba(216, 234, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.liquidity-readout-value {
  color: #f8fcff;
  font-size: 3.4rem;
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.liquidity-readout-unit {
  align-self: end;
  color: #9fc2df;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.15;
  padding-bottom: 5px;
}

.liquidity-cockpit {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(143, 212, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 28, 35, 0.82), rgba(5, 15, 22, 0.76)),
    rgba(5, 15, 22, 0.76);
}

.liquidity-meter {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.liquidity-meter-track {
  position: relative;
  height: 46px;
  overflow: visible;
  border: 1px solid rgba(143, 212, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 159, 179, 0.2), rgba(255, 209, 102, 0.16) var(--liquidity-floor), rgba(123, 255, 191, 0.2)),
    rgba(3, 11, 17, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.liquidity-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--liquidity-progress);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(143, 212, 255, 0.34), rgba(123, 255, 191, 0.38)),
    rgba(123, 255, 191, 0.2);
  box-shadow: 0 0 20px rgba(123, 255, 191, 0.18);
}

.liquidity-meter[data-tone="warning"] .liquidity-meter-fill {
  background:
    linear-gradient(90deg, rgba(143, 212, 255, 0.22), rgba(255, 209, 102, 0.42)),
    rgba(255, 209, 102, 0.18);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.14);
}

.liquidity-meter[data-tone="negative"] .liquidity-meter-fill {
  background:
    linear-gradient(90deg, rgba(255, 159, 179, 0.36), rgba(255, 209, 102, 0.2)),
    rgba(255, 159, 179, 0.18);
  box-shadow: 0 0 20px rgba(255, 159, 179, 0.14);
}

.liquidity-meter-marker {
  position: absolute;
  top: -8px;
  display: inline-grid;
  min-width: 42px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(216, 234, 255, 0.3);
  border-radius: 999px;
  background: rgba(4, 12, 18, 0.9);
  color: #e7f3ff;
  font-size: 0.66rem;
  font-weight: 780;
  line-height: 1;
  transform: translateX(-50%);
  z-index: 2;
}

.liquidity-meter-marker-floor {
  left: var(--liquidity-floor);
}

.liquidity-meter-marker-target {
  left: auto;
  right: 4px;
  transform: none;
}

.liquidity-meter-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(216, 234, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.3;
}

.liquidity-surplus-ribbon {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(123, 255, 191, 0.34);
  border-radius: 999px;
  background: rgba(20, 65, 49, 0.36);
  color: #bdffdf;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.15;
  padding: 6px 10px;
  overflow-wrap: anywhere;
}

.liquidity-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.liquidity-stat {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 116px;
  border: 1px solid rgba(190, 202, 207, 0.14);
  border-radius: 8px;
  background: rgba(6, 18, 24, 0.62);
  padding: 11px;
}

.liquidity-stat[data-tone="positive"] {
  border-color: rgba(123, 255, 191, 0.28);
}

.liquidity-stat[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.28);
}

.liquidity-stat[data-tone="negative"] {
  border-color: rgba(255, 159, 179, 0.28);
}

.liquidity-stat-label,
.liquidity-action-label,
.liquidity-evidence-label {
  color: rgba(216, 234, 255, 0.72);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.liquidity-stat-value {
  color: #f5fbff;
  font-size: 1.14rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.liquidity-stat-detail {
  color: #a9bfd5;
  font-size: 0.73rem;
  font-weight: 620;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.liquidity-action-card,
.liquidity-cash-card,
.liquidity-evidence-card {
  min-height: 230px;
}

.liquidity-action-card {
  border-color: rgba(143, 212, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(18, 34, 42, 0.84), rgba(8, 17, 24, 0.78)),
    rgba(8, 17, 24, 0.78);
}

.liquidity-action-body {
  display: grid;
  gap: 13px;
}

.liquidity-action-top {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.liquidity-action-amount {
  color: #f8fcff;
  font-size: 2rem;
  font-weight: 840;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.liquidity-action-detail {
  margin: 0;
  color: #c6d8e8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.liquidity-step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.liquidity-step-item {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 24px;
  color: #dcecff;
}

.liquidity-step-item::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(123, 255, 191, 0.5);
  border-radius: 50%;
  background: rgba(123, 255, 191, 0.16);
}

.liquidity-step-item strong {
  color: #f6fbff;
  font-size: 0.83rem;
  font-weight: 780;
  line-height: 1.25;
}

.liquidity-step-item span {
  color: #acc1d5;
  font-size: 0.76rem;
  line-height: 1.36;
}

.liquidity-cash-list {
  display: grid;
  gap: 0;
}

.liquidity-cash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid rgba(143, 174, 205, 0.14);
  color: #dcecff;
  font-size: 0.84rem;
}

.liquidity-cash-row:last-child {
  border-bottom: 0;
}

.liquidity-cash-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.liquidity-cash-row strong {
  color: #f4faff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.liquidity-evidence-card {
  grid-column: 1 / -1;
}

.liquidity-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.liquidity-evidence-item {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 148px;
  border: 1px solid rgba(143, 212, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 18, 24, 0.55);
  padding: 12px;
}

.liquidity-evidence-value {
  color: #f8fcff;
  font-size: 1.25rem;
  font-weight: 830;
  letter-spacing: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.liquidity-evidence-detail {
  margin: 0;
  color: #adc2d6;
  font-size: 0.76rem;
  line-height: 1.35;
}

.liquidity-evidence-source {
  align-self: end;
  width: fit-content;
  color: #8fd4ff;
  font-size: 0.72rem;
  font-weight: 730;
  text-decoration: none;
}

a.liquidity-evidence-source:hover,
a.liquidity-evidence-source:focus-visible {
  color: #f3f9ff;
  text-decoration: underline;
  outline: none;
}

@media (max-width: 1180px) {
  .liquidity-hero-body {
    grid-template-columns: 1fr;
  }

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

  .pbs-balance-header {
    grid-template-columns: 1fr;
  }

  .pbs-balance-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .pbs-balance-slab-primary {
    min-height: 126px;
  }

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

@media (max-width: 720px) {
  .liquidity-generated-grid,
  .liquidity-stat-grid,
  .liquidity-evidence-grid {
    grid-template-columns: 1fr;
  }

  .liquidity-hero-card {
    min-height: 0;
  }

  .liquidity-hero-title {
    font-size: 1.32rem;
    line-height: 1.12;
  }

  .liquidity-readout {
    width: 100%;
  }

  .liquidity-readout-value {
    font-size: 2.6rem;
  }

  .liquidity-cockpit {
    padding: 10px;
  }

  .liquidity-meter-track {
    height: 52px;
  }

  .liquidity-meter-marker {
    top: -6px;
    min-width: 36px;
  }

  .liquidity-meter-labels {
    display: grid;
  }

  .liquidity-action-amount {
    font-size: 1.62rem;
  }

  .pbs-main-event-card {
    padding: 12px;
  }

  .pbs-scenario-switcher {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
  }

  .pbs-scenario-switcher-label {
    padding-left: 1px;
  }

  .pbs-scenario-options {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .pbs-scenario-option {
    min-height: 44px;
    padding: 10px 12px;
    text-align: left;
  }

  .pension-scenario-switcher {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
  }

  .pension-scenario-switcher-label {
    padding-left: 1px;
  }

  .pension-scenario-options {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .pension-scenario-option {
    min-height: 44px;
    padding: 10px 12px;
    text-align: left;
  }

  .retirement-decision-panel {
    gap: 12px;
    padding: 12px;
  }

  .retirement-required-value {
    font-size: clamp(1.9rem, 11vw, 2.55rem);
  }

  .retirement-scenario-options {
    grid-template-columns: 1fr;
  }

  .retirement-scenario-card {
    min-height: 78px;
  }


  .pbs-table-frame {
    border-radius: 10px;
  }

  .pbs-balance-header,
  .pbs-bucket-grid {
    grid-template-columns: 1fr;
  }

  .pbs-balance-header {
    padding: 9px;
  }

  .pbs-balance-stack {
    grid-template-columns: 1fr;
  }

  .pbs-balance-slab,
  .pbs-balance-slab-primary {
    min-height: 0;
    padding: 12px;
  }

  .pbs-balance-value {
    font-size: 1.84rem;
  }

  .pbs-balance-value-secondary {
    font-size: 1.04rem;
  }

  .pbs-bucket-surface {
    padding: 8px;
  }

  .pbs-bucket-card {
    min-height: 0;
  }

  .pbs-bucket-card-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
  }

  .pbs-bucket-title-line {
    justify-content: space-between;
    width: 100%;
  }

  .pbs-bucket-info-button {
    width: 28px;
    height: 28px;
  }

  .pbs-indicator-info {
    align-self: flex-start;
  }

  .pbs-health-badge {
    min-height: 30px;
    padding: 7px 12px;
  }

  .pbs-bucket-info-popover {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 16px;
    left: 14px;
    width: auto;
    transform: translateY(8px);
  }

  .pbs-bucket-info-popover::before {
    display: none;
  }

  .pbs-bucket-info:hover .pbs-bucket-info-popover,
  .pbs-bucket-info:focus-within .pbs-bucket-info-popover,
  .pbs-bucket-info.is-open .pbs-bucket-info-popover {
    transform: translateY(0);
  }

  .pbs-explanation-modal {
    align-items: end;
    padding: 12px;
  }

  .pbs-explanation-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 8px;
    transform: translateY(18px);
  }

  .pbs-explanation-modal.is-open .pbs-explanation-dialog {
    transform: translateY(0);
  }

  .pbs-explanation-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 15px 14px 13px;
  }

  .pbs-explanation-current-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .pbs-explanation-body {
    padding: 14px;
  }

  .pbs-explanation-table th,
  .pbs-explanation-table td {
    padding: 8px;
    font-size: 0.72rem;
  }

  .pbs-explanation-current-marker {
    display: table;
    margin: 5px 0 0;
  }
}

.generated-charts-card {
  grid-column: 1 / -1;
}

.pension-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  cursor: pointer;
  user-select: none;
}

.pension-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pension-toggle-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(122, 165, 214, 0.6);
  background: rgba(21, 38, 62, 0.92);
  box-shadow: inset 0 0 0 1px rgba(9, 23, 43, 0.56);
  transition: border-color 180ms ease, background 180ms ease;
}

.pension-toggle-switch::after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 2px;
  background: #d9ebff;
  box-shadow: 0 1px 6px rgba(2, 8, 20, 0.7);
  transition: transform 180ms ease;
}

.pension-toggle-input:checked + .pension-toggle-switch {
  border-color: rgba(46, 163, 255, 0.92);
  background: rgba(46, 163, 255, 0.32);
}

.pension-toggle-input:checked + .pension-toggle-switch::after {
  transform: translateX(18px);
}

.pension-toggle-input:focus-visible + .pension-toggle-switch {
  outline: 2px solid rgba(46, 163, 255, 0.72);
  outline-offset: 2px;
}

.pension-toggle-text {
  color: #d5e9ff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.generated-charts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.generated-chart-block {
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background:
    linear-gradient(180deg, rgba(22, 31, 36, 0.86), rgba(9, 15, 18, 0.76)),
    rgba(9, 15, 18, 0.76);
  padding: 10px;
}

.generated-chart-block[data-chart-variant="hero"] {
  padding: 14px;
  border-color: rgba(212, 166, 79, 0.32);
}

.generated-chart-block[data-chart-variant="compact"] .generated-chart-canvas-wrap {
  height: 170px;
}

.generated-chart-block[data-chart-variant="wide"] .generated-chart-canvas-wrap {
  height: clamp(260px, 32vw, 390px);
}

.generated-chart-block[data-chart-variant="pension-drawdown-composite"] {
  padding: 12px;
}

.pension-drawdown-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: flex-start;
  margin: 8px 0 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pension-drawdown-legend-group {
  display: flex;
  min-width: min(100%, 220px);
  flex-direction: column;
  gap: 5px;
}

.pension-drawdown-legend-title {
  color: rgba(211, 232, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pension-drawdown-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pension-drawdown-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  min-height: 26px;
  border: 1px solid rgba(140, 175, 220, 0.28);
  border-radius: 999px;
  background: rgba(8, 21, 35, 0.68);
  color: #eaf4ff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 4px 9px;
}

.pension-drawdown-legend-chip.is-muted {
  opacity: 0.45;
}

.pension-drawdown-legend-swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.pension-drawdown-legend-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pension-drawdown-panels {
  display: grid;
  gap: 8px;
}

.pension-drawdown-panel {
  min-width: 0;
}

.pension-drawdown-panel-title {
  margin: 0 0 5px;
  color: rgba(234, 244, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 750;
}

.pension-drawdown-panel[data-chart-panel="balance"] .pension-drawdown-canvas-wrap {
  height: 160px;
}

.pension-drawdown-panel[data-chart-panel="income"] .pension-drawdown-canvas-wrap {
  height: 230px;
}

.generated-chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.generated-chart-title {
  margin: 0;
  font-size: 0.86rem;
  color: #f2efe8;
}

.chart-download-btn {
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(126, 173, 227, 0.4);
  background: rgba(11, 30, 56, 0.7);
  color: #dceeff;
  font-size: 0.75rem;
  padding: 0 10px;
  cursor: pointer;
}

.chart-download-btn:hover {
  border-color: rgba(46, 163, 255, 0.8);
}

.generated-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 230px;
}

.generated-chart-canvas {
  width: 100%;
  height: 100%;
}

.artifact-metric-grid,
.chart-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 8px;
}

.artifact-metric-card,
.chart-insight-card {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(174, 190, 196, 0.18);
  background: rgba(6, 12, 15, 0.58);
  padding: 10px 11px;
}

.artifact-metric-card[data-featured="true"],
.chart-insight-card[data-featured="true"] {
  border-color: rgba(212, 166, 79, 0.32);
  background: rgba(32, 27, 18, 0.58);
}

.artifact-metric-card[data-tone="positive"],
.chart-insight-card[data-tone="positive"] {
  border-color: rgba(102, 184, 158, 0.34);
}

.artifact-metric-card[data-tone="warning"],
.chart-insight-card[data-tone="warning"] {
  border-color: rgba(212, 166, 79, 0.36);
}

.artifact-metric-card[data-tone="negative"],
.chart-insight-card[data-tone="negative"] {
  border-color: rgba(201, 111, 98, 0.36);
}

.artifact-metric-label,
.chart-insight-card .artifact-metric-label {
  color: #aebdc2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.artifact-metric-value {
  margin-top: 5px;
  color: #f4f1ea;
  font-size: 1.16rem;
  font-weight: 720;
  line-height: 1.1;
}

.artifact-metric-detail {
  margin-top: 5px;
  color: #b9c8cc;
  font-size: 0.78rem;
  line-height: 1.42;
}

.chart-insight-grid {
  margin-top: 10px;
}

.chart-annotation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 8px;
  margin-top: 10px;
}

.chart-annotation-item {
  display: grid;
  gap: 4px;
  border-left: 2px solid #9ec4da;
  border-radius: 6px;
  background: rgba(6, 12, 15, 0.44);
  padding: 8px 10px;
}

.chart-annotation-item[data-tone="positive"] {
  border-left-color: var(--accent-green);
}

.chart-annotation-item[data-tone="warning"] {
  border-left-color: var(--accent-amber);
}

.chart-annotation-item[data-tone="negative"] {
  border-left-color: var(--accent-red);
}

.chart-annotation-label {
  color: #f0ece5;
  font-size: 0.78rem;
  font-weight: 700;
}

.chart-annotation-anchor {
  color: #aebdc2;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.chart-annotation-body {
  margin: 0;
  color: #bdc9cc;
  font-size: 0.76rem;
  line-height: 1.4;
}

.college-generated-grid .college-hero-card,
.college-generated-grid .generated-summary-card,
.college-generated-grid .college-scenarios-card,
.college-generated-grid .generated-charts-card,
.college-generated-grid .generated-table-card {
  grid-column: 1 / -1;
}

.college-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
  border-color: rgba(116, 214, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(12, 30, 42, 0.92), rgba(19, 26, 31, 0.82) 52%, rgba(46, 36, 19, 0.82)),
    rgba(11, 18, 23, 0.86);
  overflow: hidden;
}

.college-hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.college-hero-kicker {
  margin: 0;
  color: #8ed8ff;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.college-hero-title {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(1.76rem, 3.4vw, 3.1rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.02;
}

.college-hero-subtitle {
  max-width: 66ch;
  margin: 0;
  color: #d2e4ee;
  font-size: 0.94rem;
  line-height: 1.46;
}

.college-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.college-hero-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(190, 202, 207, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 17, 0.46);
  padding: 11px;
}

.college-hero-metric[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.32);
  background: rgba(54, 39, 17, 0.42);
}

.college-hero-metric-label {
  color: #a9becd;
  font-size: 0.66rem;
  font-weight: 790;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.college-hero-metric-value {
  min-width: 0;
  color: #f5fbff;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.college-hero-metric-detail {
  color: #bfd0d9;
  font-size: 0.76rem;
  line-height: 1.34;
}

.college-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}

.college-scenario-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  border: 1px solid rgba(145, 178, 203, 0.2);
  border-radius: 8px;
  background: rgba(8, 17, 24, 0.58);
  padding: 12px;
}

.college-scenario-card[data-tone="warning"],
.college-scenario-card[data-tone="risk"] {
  border-color: rgba(255, 209, 102, 0.34);
  background: linear-gradient(180deg, rgba(58, 42, 17, 0.42), rgba(8, 17, 24, 0.58));
}

.college-scenario-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.college-scenario-title {
  margin: 0;
  color: #eef8ff;
  font-size: 0.96rem;
  font-weight: 780;
  line-height: 1.24;
}

.college-scenario-badge {
  flex: 0 0 auto;
  max-width: 44%;
  border: 1px solid rgba(116, 214, 255, 0.22);
  border-radius: 999px;
  color: #bfe8ff;
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1.1;
  padding: 4px 7px;
  text-align: center;
}

.college-scenario-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.college-scenario-values .college-hero-metric {
  padding: 9px;
}

.college-scenario-values .college-hero-metric-value {
  font-size: 0.98rem;
}

.college-scenario-interpretation {
  margin: 0;
  color: #cbdce5;
  font-size: 0.82rem;
  line-height: 1.45;
}

.education-generated-grid .education-topic-card,
.education-generated-grid .generated-summary-card,
.education-generated-grid .education-metrics-card,
.education-generated-grid .education-steps-card,
.education-generated-grid .education-visuals-card,
.education-generated-grid .education-sections-card,
.education-generated-grid .education-references-card {
  grid-column: 1 / -1;
}

.education-topic-line {
  margin: 0;
  color: #ebf6ff;
  font-size: 1.02rem;
  font-weight: 700;
}

.education-audience-line {
  margin: 6px 0 0;
  color: #bdd7f3;
  font-size: 0.84rem;
}

.education-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 9px;
}

.education-metric-card {
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background: rgba(6, 12, 15, 0.54);
  padding: 11px;
}

.education-stepper {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
}

.education-step-tabs {
  display: grid;
  gap: 7px;
  align-content: start;
}

.education-step-tab {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(178, 193, 198, 0.18);
  border-radius: 8px;
  background: rgba(6, 12, 15, 0.44);
  color: #dce5e6;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.education-step-tab.is-active {
  border-color: rgba(212, 166, 79, 0.42);
  background: rgba(31, 26, 17, 0.58);
  color: #f5f0e6;
}

.education-step-number {
  color: var(--accent-amber);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.education-step-tab-label {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.24;
}

.education-step-panels {
  min-width: 0;
}

.education-step-panel {
  min-height: 100%;
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.18);
  background: rgba(6, 12, 15, 0.42);
  padding: 14px;
}

.education-step-kicker {
  margin: 0 0 6px;
  color: var(--accent-amber);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.education-step-title {
  margin: 0 0 8px;
  color: #f5f0e6;
  font-size: 1rem;
  line-height: 1.24;
}

.education-step-focus {
  margin: 12px 0 0;
  border-left: 2px solid var(--accent-amber);
  padding-left: 10px;
  color: #d7d0c4;
  font-size: 0.85rem;
  line-height: 1.48;
}

.education-sections-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.education-section-block {
  border: 1px solid rgba(120, 166, 218, 0.28);
  border-radius: 12px;
  background: rgba(8, 19, 38, 0.62);
  overflow: hidden;
}

.education-section-summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #e9f5ff;
  font-size: 0.95rem;
  font-weight: 700;
  list-style: none;
}

.education-section-summary::-webkit-details-marker {
  display: none;
}

.education-section-summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  margin-right: 8px;
  color: #98cbf8;
}

.education-section-block[open] .education-section-summary::before {
  content: '-';
}

.education-section-body {
  padding: 0 14px 12px;
}

.education-section-body-content {
  color: #e2f1ff;
  font-size: 0.93rem;
  line-height: 1.48;
}

.education-section-body-content p,
.education-section-body-content ul,
.education-section-body-content ol {
  margin: 0 0 8px;
}

.education-section-body-content p:last-child,
.education-section-body-content ul:last-child,
.education-section-body-content ol:last-child {
  margin-bottom: 0;
}

.education-section-bullets {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #d9ecff;
  font-size: 0.9rem;
  line-height: 1.42;
}

.education-why-card {
  margin-top: 12px;
  border-left: 2px solid var(--accent-amber);
  border-radius: 6px;
  background: rgba(32, 27, 18, 0.46);
  padding: 10px 12px;
}

.education-why-label {
  display: block;
  color: #e3bd73;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.education-why-body {
  margin: 5px 0 0;
  color: #ded8cc;
  font-size: 0.84rem;
  line-height: 1.48;
}

.education-visuals-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.education-scene-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.education-scene-group + .education-scene-group {
  padding-top: 16px;
  border-top: 1px solid rgba(115, 167, 222, 0.18);
}

.education-scene-group-label {
  margin: 0;
  color: #8fc9ff;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education-support-scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.education-visual-card {
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background: rgba(7, 13, 16, 0.68);
  padding: 10px;
}

.education-hero-scene-card {
  border-radius: 10px;
  border-color: rgba(212, 166, 79, 0.34);
  background:
    linear-gradient(180deg, rgba(27, 31, 30, 0.94), rgba(9, 14, 16, 0.86)),
    rgba(9, 14, 16, 0.86);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  padding: 14px;
}

.education-hero-scene-card .generated-chart-title {
  font-size: 1.02rem;
  line-height: 1.2;
}

.education-hero-scene-card .education-visual-subtitle {
  margin-top: 6px;
  margin-bottom: 10px;
  max-width: 78ch;
  color: #c6ddf5;
  font-size: 0.88rem;
  line-height: 1.45;
}

.education-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.education-hero-scene-card .education-visual-top {
  align-items: flex-start;
}

.education-visual-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.education-copy-status {
  min-width: 60px;
  color: #9fd1ff;
  font-size: 0.74rem;
}

.education-visual-subtitle {
  margin: 4px 0 8px;
  color: #afc8e5;
  font-size: 0.8rem;
  line-height: 1.34;
}

.education-visual-error {
  margin: 0;
  color: #ffc8d2;
  font-size: 0.82rem;
}

.education-svg-host {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(111, 165, 221, 0.28);
  background: rgba(5, 13, 24, 0.72);
  overflow: hidden;
  padding: 8px;
}

.education-hero-scene-card .education-svg-host {
  min-height: clamp(340px, 52vw, 760px);
  padding: 14px;
  border-color: rgba(124, 181, 238, 0.34);
}

.education-support-scene-card .education-svg-host {
  min-height: 220px;
}

.education-svg-card[data-svg-fit="contain"] .education-svg-host {
  max-height: min(74vh, 780px);
  overflow: auto;
}

.education-svg-card[data-svg-theme="dark"] {
  --education-svg-bg: rgba(11, 17, 21, 0.96);
  --education-svg-surface: rgba(31, 43, 49, 0.94);
  --education-svg-surface-border: rgba(160, 178, 186, 0.48);
  --education-svg-text: #f4f1ea;
  --education-svg-muted: #becad0;
  --education-svg-edge: rgba(173, 197, 206, 0.88);
  --education-svg-accent: #d4a64f;
}

.education-svg-card[data-svg-theme="light"] {
  --education-svg-bg: rgba(245, 250, 255, 0.98);
  --education-svg-surface: rgba(232, 241, 250, 0.98);
  --education-svg-surface-border: rgba(103, 135, 171, 0.58);
  --education-svg-text: #173047;
  --education-svg-muted: #46617a;
  --education-svg-edge: rgba(55, 105, 156, 0.92);
  --education-svg-accent: #1d70ba;
}

.education-svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--education-svg-bg);
}

.education-svg-card[data-svg-fit="contain"] .education-svg {
  width: 100%;
  height: min(72vh, 760px);
}

.education-hero-scene-card .generated-chart-canvas-wrap {
  height: clamp(260px, 34vw, 420px);
}

.education-support-scene-card .generated-chart-canvas-wrap {
  height: 230px;
}

.education-svg .edu-node {
  fill: var(--education-svg-surface);
  stroke: var(--education-svg-surface-border);
  stroke-width: 1.6;
}

.education-svg .edu-node-label {
  fill: var(--education-svg-text);
  font-size: 13px;
  font-weight: 620;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-timeline-date {
  fill: var(--education-svg-accent);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-timeline-title {
  fill: var(--education-svg-text);
  font-size: 13px;
  font-weight: 680;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-timeline-body {
  fill: var(--education-svg-muted);
  font-size: 11.5px;
  font-weight: 520;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-edge {
  fill: none;
  stroke: var(--education-svg-edge);
  stroke-width: 1.8;
}

.education-svg .edu-arrow-head {
  fill: var(--education-svg-edge);
}

.education-svg .edu-edge-label {
  fill: var(--education-svg-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-lane {
  fill: var(--education-svg-surface);
  opacity: 0.74;
  stroke: var(--education-svg-surface-border);
  stroke-width: 1.2;
}

.education-svg .edu-lane-title {
  fill: var(--education-svg-accent);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-lane-label {
  fill: var(--education-svg-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-timeline-axis,
.education-svg .edu-timeline-stem {
  stroke: var(--education-svg-edge);
  stroke-width: 1.5;
  opacity: 0.85;
}

.education-svg .edu-timeline-dot {
  fill: var(--education-svg-accent);
  stroke: var(--education-svg-surface-border);
  stroke-width: 1.1;
}

.education-svg .edu-timeline-when {
  fill: var(--education-svg-muted);
  font-size: 11px;
  font-weight: 650;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-grid-header {
  fill: var(--education-svg-surface);
  stroke: var(--education-svg-surface-border);
  stroke-width: 1.2;
}

.education-svg .edu-grid-row-header {
  fill: var(--education-svg-surface);
  opacity: 0.86;
  stroke: var(--education-svg-surface-border);
  stroke-width: 1.1;
}

.education-svg .edu-grid-cell {
  fill: var(--education-svg-bg);
  opacity: 0.95;
  stroke: var(--education-svg-surface-border);
  stroke-width: 1;
}

.education-svg .edu-grid-header-label,
.education-svg .edu-grid-row-label,
.education-svg .edu-grid-cell-title,
.education-svg .edu-grid-cell-body,
.education-svg .edu-grid-empty {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.education-svg .edu-grid-header-label,
.education-svg .edu-grid-row-label,
.education-svg .edu-grid-cell-title {
  fill: var(--education-svg-text);
  font-size: 12px;
  font-weight: 680;
}

.education-svg .edu-grid-cell-body,
.education-svg .edu-grid-empty {
  fill: var(--education-svg-muted);
  font-size: 11px;
  font-weight: 600;
}

.education-references-list {
  margin: 0;
}

.education-reference-item {
  color: #d7e9fd;
  font-size: 0.84rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .education-stepper {
    grid-template-columns: 1fr;
  }

  .education-step-tabs {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
  }

  .education-hero-scene-card .education-svg-host {
    min-height: 280px;
  }

  .education-support-scenes-grid {
    grid-template-columns: 1fr;
  }
}

.report-generated-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-block {
  border-radius: 10px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background:
    linear-gradient(180deg, rgba(25, 34, 39, 0.9), rgba(9, 15, 18, 0.82)),
    rgba(9, 15, 18, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  padding: 14px;
}

.report-table-block.generated-card {
  min-height: auto;
}

.report-block-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.report-block-title {
  margin: 0;
  color: #f4f1ea;
  font-size: 1rem;
  line-height: 1.2;
}

.report-block-subtitle {
  margin: 0;
  color: #acbabf;
  font-size: 0.82rem;
  line-height: 1.4;
}

.report-timeline-shell {
  width: 100%;
  position: relative;
  --report-timeline-event-count: 1;
  --report-timeline-gap: 18px;
  --report-timeline-card-padding: 16px;
  --report-timeline-track-inset: 16px;
}

.report-timeline-items {
  position: relative;
}

.report-timeline-shell[data-layout="horizontal"] {
  padding-top: 6px;
}

.report-timeline-shell[data-layout="horizontal"] .report-timeline-items {
  display: grid;
  grid-template-columns: repeat(var(--report-timeline-event-count), minmax(0, 1fr));
  gap: var(--report-timeline-gap);
  align-items: stretch;
}

.report-timeline-shell[data-layout="horizontal"] .report-timeline-items::before {
  content: '';
  position: absolute;
  left: var(--report-timeline-track-inset);
  right: var(--report-timeline-track-inset);
  top: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(95, 182, 255, 0.16), rgba(144, 214, 255, 0.8), rgba(95, 182, 255, 0.16));
  box-shadow: 0 0 22px rgba(88, 183, 255, 0.16);
}

.report-timeline-shell[data-layout="horizontal"] .report-timeline-event {
  position: relative;
  min-width: 0;
  padding-top: 34px;
}

.report-timeline-shell[data-layout="horizontal"] .report-timeline-event::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 11px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  border: 1px solid rgba(189, 230, 255, 0.9);
  background:
    radial-gradient(circle at 45% 40%, #eef8ff 0 24%, rgba(88, 183, 255, 0.94) 40%, rgba(19, 67, 110, 0.94) 100%);
  box-shadow: 0 0 0 4px rgba(88, 183, 255, 0.12), 0 0 20px rgba(88, 183, 255, 0.26);
  z-index: 1;
}

.report-timeline-shell[data-layout="horizontal"] .report-timeline-event::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 25px;
  width: 1px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(115, 194, 255, 0.92), rgba(115, 194, 255, 0.18));
}

.report-timeline-shell[data-layout="vertical"] .report-timeline-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-timeline-shell[data-layout="vertical"] .report-timeline-items::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(95, 182, 255, 0.18), rgba(144, 214, 255, 0.76), rgba(95, 182, 255, 0.18));
  box-shadow: 0 0 18px rgba(88, 183, 255, 0.14);
}

.report-timeline-shell[data-layout="vertical"] .report-timeline-event {
  position: relative;
  padding-left: 34px;
}

.report-timeline-shell[data-layout="vertical"] .report-timeline-event::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(189, 230, 255, 0.9);
  background:
    radial-gradient(circle at 45% 40%, #eef8ff 0 24%, rgba(88, 183, 255, 0.94) 40%, rgba(19, 67, 110, 0.94) 100%);
  box-shadow: 0 0 0 4px rgba(88, 183, 255, 0.12), 0 0 18px rgba(88, 183, 255, 0.22);
  z-index: 1;
}

.report-timeline-event-card {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: var(--report-timeline-card-padding);
  border-radius: 16px;
  border: 1px solid rgba(123, 175, 229, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 34, 59, 0.95), rgba(8, 18, 35, 0.9)),
    rgba(8, 18, 35, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(212, 236, 255, 0.05),
    0 12px 30px rgba(2, 8, 18, 0.22);
}

.report-timeline-event-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(95, 182, 255, 0.18), rgba(152, 216, 255, 0.72), rgba(95, 182, 255, 0.18));
  opacity: 0.9;
}

.report-timeline-shell[data-density="spacious"] .report-timeline-event-card {
  gap: 12px;
}

.report-timeline-shell[data-density="compact"] .report-timeline-event-card {
  gap: 8px;
}

.report-timeline-date {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(121, 194, 255, 0.24);
  background: rgba(46, 163, 255, 0.12);
  color: #94d8ff;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;
}

.report-timeline-event-title {
  margin: 0;
  color: #eff7ff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.32;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.report-timeline-event-body {
  margin: 0;
  color: #c4daef;
  font-size: 0.88rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 860px) {
  .report-timeline-shell[data-layout="horizontal"] .report-timeline-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .report-timeline-shell[data-layout="horizontal"] .report-timeline-items::before {
    left: 11px;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 1px;
    height: auto;
  }

  .report-timeline-shell[data-layout="horizontal"] .report-timeline-event {
    padding-top: 0;
    padding-left: 34px;
  }

  .report-timeline-shell[data-layout="horizontal"] .report-timeline-event::before {
    left: 5px;
    top: 22px;
    transform: none;
  }

  .report-timeline-shell[data-layout="horizontal"] .report-timeline-event::after {
    display: none;
  }

  .report-kpi-row[data-layout="hero"] {
    grid-template-columns: 1fr;
  }

  .report-kpi-row[data-layout="hero"] .report-kpi-item {
    grid-column: auto;
  }

  .report-insight-grid[data-layout="featured"] {
    grid-template-columns: 1fr;
  }

  .report-insight-grid[data-layout="featured"] .report-insight-card,
  .report-insight-grid[data-layout="featured"] .report-insight-card[data-featured="true"] {
    grid-column: auto;
  }
}

.report-markdown-content {
  color: #e5e0d8;
  font-size: 0.92rem;
  line-height: 1.6;
}

.report-markdown-content h1,
.report-markdown-content h2,
.report-markdown-content h3,
.report-markdown-content h4,
.report-markdown-content h5,
.report-markdown-content h6 {
  margin: 0 0 10px;
  color: #f1f8ff;
  line-height: 1.2;
}

.report-markdown-content p,
.report-markdown-content ul,
.report-markdown-content ol,
.report-markdown-content blockquote,
.report-markdown-content pre {
  margin: 0 0 10px;
}

.report-markdown-content p:last-child,
.report-markdown-content ul:last-child,
.report-markdown-content ol:last-child,
.report-markdown-content blockquote:last-child,
.report-markdown-content pre:last-child {
  margin-bottom: 0;
}

.report-markdown-content ul,
.report-markdown-content ol {
  padding-left: 20px;
}

.report-markdown-content a,
.report-source-label {
  color: #8ed0ff;
}

.report-markdown-content code {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 0.9em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: rgba(5, 13, 24, 0.78);
  color: #f1f8ff;
}

.report-markdown-content pre {
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(5, 13, 24, 0.84);
  border: 1px solid rgba(104, 150, 203, 0.22);
}

.report-markdown-content pre code {
  padding: 0;
  background: transparent;
}

.report-markdown-content blockquote {
  padding: 10px 14px;
  border-left: 3px solid rgba(115, 194, 255, 0.72);
  background: rgba(14, 29, 51, 0.82);
  color: #cfe6ff;
}

.report-callout-block {
  position: relative;
  border-color: rgba(158, 196, 218, 0.32);
}

.report-callout-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-callout-body {
  margin: 0;
}

.report-callout-bullets {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #e5f2ff;
  line-height: 1.55;
}

.report-callout-bullets li::marker {
  color: #8ed0ff;
}

.report-callout-block::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 10px 0 0 10px;
  background: #9ec4da;
}

.report-callout-block[data-report-tone="warning"]::before {
  background: #ffd166;
}

.report-callout-block[data-report-tone="success"]::before {
  background: #7bffbf;
}

.report-callout-block[data-report-tone="danger"]::before,
.report-callout-block[data-report-tone="critical"]::before {
  background: #ff8fa3;
}

.report-summary-block.generated-card {
  min-height: auto;
  background:
    linear-gradient(180deg, rgba(26, 36, 39, 0.92), rgba(10, 16, 18, 0.84)),
    rgba(10, 16, 18, 0.84);
}

.report-summary-block .generated-summary-content {
  color: #eee9df;
  font-size: 0.94rem;
  line-height: 1.68;
}

.report-chart-block {
  padding: 12px;
}

.report-inline-error {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 143, 163, 0.34);
  background: rgba(70, 15, 29, 0.42);
  color: #ffd3db;
  font-size: 0.84rem;
  line-height: 1.45;
}

.report-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.report-kpi-row[data-layout="hero"] {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.report-kpi-item {
  border-radius: 14px;
  border: 1px solid rgba(122, 167, 220, 0.28);
  background: rgba(5, 14, 27, 0.7);
  padding: 12px;
}

.report-kpi-row[data-layout="hero"] .report-kpi-item {
  grid-column: span 6;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}

.report-kpi-row[data-layout="hero"] .report-kpi-item[data-featured="true"] {
  grid-column: 1 / -1;
  min-height: 168px;
  padding: 18px;
  border-color: rgba(123, 255, 191, 0.34);
  background:
    radial-gradient(140% 170% at 100% 0%, rgba(123, 255, 191, 0.16) 0%, rgba(5, 14, 27, 0) 58%),
    linear-gradient(180deg, rgba(18, 35, 60, 0.94), rgba(7, 18, 33, 0.9)),
    rgba(7, 18, 33, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.report-kpi-item[data-tone="positive"] {
  border-color: rgba(123, 255, 191, 0.42);
}

.report-kpi-item[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.42);
}

.report-kpi-item[data-tone="negative"] {
  border-color: rgba(255, 143, 163, 0.42);
}

.report-kpi-label {
  color: #a9c6e6;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-kpi-row[data-layout="hero"] .report-kpi-item[data-featured="true"] .report-kpi-label {
  color: #cbe9ff;
  font-size: 0.82rem;
}

.report-kpi-value {
  margin-top: 6px;
  color: #f2f8ff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}

.report-kpi-row[data-layout="hero"] .report-kpi-item[data-featured="true"] .report-kpi-value {
  margin-top: 10px;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  letter-spacing: 0;
}

.report-kpi-detail {
  margin-top: 6px;
  color: #9dbbda;
  font-size: 0.8rem;
  line-height: 1.4;
}

.report-kpi-row[data-layout="hero"] .report-kpi-item[data-featured="true"] .report-kpi-detail {
  margin-top: 10px;
  max-width: 42ch;
  color: #c2dff7;
  font-size: 0.9rem;
  line-height: 1.5;
}

.report-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
}

.report-insight-grid[data-layout="featured"] {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.report-insight-card {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background: rgba(6, 12, 15, 0.58);
  padding: 12px;
}

.report-insight-grid[data-layout="featured"] .report-insight-card {
  grid-column: span 6;
}

.report-insight-grid[data-layout="featured"] .report-insight-card[data-featured="true"] {
  grid-column: 1 / -1;
  border-color: rgba(212, 166, 79, 0.34);
  background: rgba(32, 27, 18, 0.58);
}

.report-insight-card[data-tone="positive"],
.report-scenario-card[data-tone="positive"] {
  border-color: rgba(102, 184, 158, 0.36);
}

.report-insight-card[data-tone="warning"],
.report-scenario-card[data-tone="warning"] {
  border-color: rgba(212, 166, 79, 0.38);
}

.report-insight-card[data-tone="negative"],
.report-scenario-card[data-tone="negative"] {
  border-color: rgba(201, 111, 98, 0.38);
}

.report-insight-label {
  color: #aebdc2;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-insight-value {
  margin-top: 8px;
  color: #f4f1ea;
  font-size: 1.5rem;
  font-weight: 760;
  line-height: 1.08;
}

.report-insight-detail {
  margin: 8px 0 0;
  color: #bfcbcd;
  font-size: 0.84rem;
  line-height: 1.48;
}

.report-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

.report-scenario-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.2);
  background: rgba(6, 12, 15, 0.58);
  padding: 12px;
}

.report-scenario-title {
  margin: 0;
  color: #f4f1ea;
  font-size: 0.98rem;
  line-height: 1.24;
}

.report-scenario-summary {
  margin: 0;
  color: #bfcbcd;
  font-size: 0.84rem;
  line-height: 1.48;
}

.report-scenario-metrics {
  display: grid;
  gap: 7px;
}

.report-scenario-metric {
  border-radius: 7px;
  border: 1px solid rgba(178, 193, 198, 0.16);
  background: rgba(255, 255, 255, 0.025);
  padding: 8px 9px;
}

.report-scenario-callout {
  margin: auto 0 0;
  border-left: 2px solid var(--accent-amber);
  padding-left: 9px;
  color: #ded6c8;
  font-size: 0.8rem;
  line-height: 1.42;
}

.report-accordion-list {
  display: grid;
  gap: 8px;
}

.report-accordion-item {
  border-radius: 8px;
  border: 1px solid rgba(178, 193, 198, 0.18);
  background: rgba(6, 12, 15, 0.5);
  overflow: hidden;
}

.report-accordion-summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 13px;
  color: #efe9df;
  font-size: 0.9rem;
  font-weight: 720;
}

.report-accordion-summary::-webkit-details-marker {
  display: none;
}

.report-accordion-summary::before {
  content: '+';
  display: inline-flex;
  width: 16px;
  color: var(--accent-amber);
}

.report-accordion-item[open] .report-accordion-summary::before {
  content: '-';
}

.report-accordion-body {
  padding: 0 13px 13px;
}

.report-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(110, 160, 214, 0.22);
  background: rgba(5, 13, 24, 0.6);
}

.report-checklist-item[data-checked="true"] {
  border-color: rgba(123, 255, 191, 0.3);
}

.report-checklist-marker {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 163, 255, 0.18);
  color: #dff1ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.report-checklist-label {
  color: #e6f2ff;
  font-size: 0.9rem;
  line-height: 1.45;
}

.report-checklist-note {
  margin-top: 4px;
  color: #9cb8d6;
  font-size: 0.8rem;
  line-height: 1.4;
}

.report-source-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-source-item {
  color: #d8e9fd;
  line-height: 1.45;
}

.report-source-label {
  font-weight: 700;
  text-decoration: none;
}

.report-source-label:hover {
  text-decoration: underline;
}

.report-source-kind {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(46, 163, 255, 0.12);
  color: #a9d6ff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-source-note {
  margin: 4px 0 0;
  color: #9fbad8;
  font-size: 0.82rem;
}

.report-empty-card {
  min-height: auto;
}

.nav-arrow {
  position: absolute;
  z-index: 18;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(46, 163, 255, 0.78);
  box-shadow: 0 0 18px rgba(46, 163, 255, 0.42);
  background: rgba(7, 16, 29, 0.9);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.nav-arrow:hover:not(:disabled) {
  background: rgba(12, 30, 60, 1);
}

.nav-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.nav-arrow.left {
  left: 20px;
}

.nav-arrow.right {
  right: 20px;
}

.nav-arrow.is-hidden {
  display: none;
}

.mobile-focus-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--mobile-action-bar-safe));
  z-index: 44;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(123, 168, 221, 0.38);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.96), rgba(5, 12, 24, 0.98));
  box-shadow: 0 20px 54px rgba(1, 8, 18, 0.56);
  backdrop-filter: blur(18px);
}

.mobile-focus-nav-btn {
  height: 50px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.mobile-focus-nav-btn.is-primary {
  border-color: rgba(99, 173, 243, 0.5);
  background: linear-gradient(180deg, rgba(20, 53, 92, 0.96), rgba(11, 31, 58, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mobile-focus-nav-icon {
  color: #9fd2ff;
  font-size: 0.92rem;
  line-height: 1;
}

.mobile-focus-nav-label {
  white-space: nowrap;
}

.mobile-module-sheet {
  position: fixed;
  inset: 0;
  z-index: 96;
  pointer-events: none;
}

.mobile-module-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, 0.62);
  opacity: 0;
  transition: opacity 190ms ease;
}

.mobile-module-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(132, 178, 232, 0.34);
  border-bottom: 0;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.985), rgba(6, 13, 25, 0.995));
  box-shadow: 0 -20px 52px rgba(2, 8, 18, 0.62);
  padding: 10px 14px calc(18px + var(--mobile-action-bar-safe));
  transform: translateY(calc(100% + 20px));
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  touch-action: pan-y;
}

.mobile-module-grabber {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(171, 200, 236, 0.56);
  margin: 2px auto 2px;
}

.mobile-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-module-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mobile-module-eyebrow {
  margin: 0;
  color: #9fc1e6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-module-title {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.mobile-module-subtitle {
  margin: 0;
  color: #b3cce8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.mobile-module-close-btn {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 0 14px;
}

.mobile-module-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-bottom: 2px;
}

.mobile-module-item {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(126, 173, 227, 0.28);
  background: linear-gradient(180deg, rgba(12, 24, 45, 0.9), rgba(8, 18, 35, 0.94));
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.mobile-module-item:hover,
.mobile-module-item:focus-visible {
  border-color: rgba(118, 191, 255, 0.68);
  background: linear-gradient(180deg, rgba(15, 32, 58, 0.94), rgba(9, 21, 41, 0.96));
  box-shadow: 0 0 0 1px rgba(69, 159, 235, 0.16);
  outline: none;
}

.mobile-module-item:active {
  transform: translateY(1px);
}

.mobile-module-item.is-active {
  border-color: rgba(107, 188, 255, 0.76);
  box-shadow:
    0 0 0 1px rgba(81, 170, 241, 0.18),
    0 14px 28px rgba(1, 9, 20, 0.34);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(89, 182, 255, 0.18) 0%, rgba(11, 19, 33, 0) 48%),
    linear-gradient(180deg, rgba(16, 31, 55, 0.96), rgba(9, 20, 37, 0.98));
}

.mobile-module-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-module-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-module-item-position {
  color: #d6eafe;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-module-item-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(127, 172, 223, 0.34);
  background: rgba(11, 25, 47, 0.72);
  color: #a9d5ff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-module-item-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(36, 111, 183, 0.3);
  color: #dff2ff;
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-module-item-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #f2f8ff;
}

.mobile-module-item-preview {
  min-height: auto;
  padding: 10px 11px;
  gap: 8px;
}

.mobile-module-item .overview-preview-label {
  font-size: 0.68rem;
}

.mobile-module-item .overview-preview-body {
  min-height: 84px;
}

.mobile-module-item .overview-kpi-grid {
  gap: 8px;
}

.mobile-module-item .overview-kpi-label,
.mobile-module-item .overview-kpi-detail,
.mobile-module-item .overview-insight-item,
.mobile-module-item .overview-meta-chip {
  font-size: 0.7rem;
}

.mobile-module-item .overview-kpi-value {
  font-size: 0.9rem;
}

.mobile-module-item-strip {
  margin-top: -2px;
}

.mobile-module-empty {
  border-radius: 18px;
  border: 1px solid rgba(126, 173, 227, 0.2);
  background: rgba(10, 20, 37, 0.72);
  color: #bad2eb;
  padding: 16px;
  text-align: center;
  font-size: 0.86rem;
}

body.mobile-module-sheet-open .mobile-module-sheet {
  pointer-events: auto;
}

body.mobile-module-sheet-open .mobile-module-backdrop {
  opacity: 1;
}

body.mobile-module-sheet-open .mobile-module-panel {
  transform: translateY(0);
}

.overview-view {
  overflow: hidden;
}

.overview-selection-host {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
}

.overview-selection-bar {
  width: min(920px, calc(100vw - 28px));
  border-radius: 16px;
  border: 1px solid rgba(126, 173, 227, 0.4);
  background: rgba(7, 17, 33, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  pointer-events: auto;
  animation: overview-selection-bar-in 140ms ease;
}

@keyframes overview-selection-bar-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overview-selection-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.overview-selection-label {
  color: #e8f4ff;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.overview-selection-pill {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(153, 207, 255, 0.7);
  background: rgba(24, 78, 126, 0.86);
  color: #eff8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.77rem;
  font-weight: 700;
}

.overview-selection-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-selection-btn {
  height: 30px;
  font-size: 0.78rem;
  padding: 0 10px;
}

.overview-selection-btn.is-primary {
  border-color: rgba(46, 163, 255, 0.9);
  background: rgba(30, 84, 134, 0.86);
}

.overview-selection-btn.is-destructive {
  border-color: rgba(255, 132, 151, 0.6);
  color: #ffdce2;
}

.overview-selection-btn.is-destructive:hover:not(:disabled) {
  border-color: rgba(255, 132, 151, 0.82);
  background: rgba(84, 23, 38, 0.9);
}

.overview-selection-helper {
  color: #bed6f1;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.overview-viewport {
  position: absolute;
  inset: 0;
  overflow: auto;
}

.overview-zoom-wrap {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  will-change: transform;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(var(--overview-cols, 1), var(--overview-card-width, 260px));
  grid-auto-rows: var(--overview-card-height, 176px);
  gap: var(--overview-gap, 18px);
  justify-content: start;
  align-content: start;
}

.overview-card {
  --overview-accent: #59b6ff;
  --overview-accent-soft: rgba(89, 182, 255, 0.18);
  position: relative;
  width: var(--overview-card-width, 260px);
  height: var(--overview-card-height, 176px);
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  border-color: rgba(124, 174, 228, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--overview-accent-soft) 0%, rgba(11, 19, 33, 0) 52%),
    linear-gradient(180deg, rgba(15, 27, 49, 0.94), rgba(6, 13, 25, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 34px rgba(2, 8, 18, 0.44);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.overview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%);
  opacity: 0.85;
  pointer-events: none;
}

.overview-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.overview-card[data-module-kind="education"] {
  --overview-accent: #7ddcff;
  --overview-accent-soft: rgba(125, 220, 255, 0.18);
}

.overview-card[data-module-kind="report"] {
  --overview-accent: #7bffbf;
  --overview-accent-soft: rgba(123, 255, 191, 0.16);
}

.overview-card[data-module-kind="pension"] {
  --overview-accent: #ffd166;
  --overview-accent-soft: rgba(255, 209, 102, 0.16);
}

.overview-card[data-module-kind="mortgage"] {
  --overview-accent: #ff9b7a;
  --overview-accent-soft: rgba(255, 155, 122, 0.16);
}

.overview-card[data-module-kind="loan"] {
  --overview-accent: #c1a5ff;
  --overview-accent-soft: rgba(193, 165, 255, 0.16);
}

.overview-card[data-module-kind="balance-sheet"] {
  --overview-accent: #8fe6d0;
  --overview-accent-soft: rgba(143, 230, 208, 0.15);
}

.overview-card[data-module-kind="analysis"] {
  --overview-accent: #73c4ff;
  --overview-accent-soft: rgba(115, 196, 255, 0.16);
}

.overview-card[data-module-kind="video-summary"] {
  --overview-accent: #ff6f8f;
  --overview-accent-soft: rgba(255, 111, 143, 0.18);
}

.overview-card:hover {
  transform: translateY(-2px);
  border-color: var(--overview-accent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px var(--overview-accent-soft),
    0 22px 40px rgba(1, 7, 18, 0.62);
}

.overview-card.is-active {
  border-color: rgba(186, 229, 255, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px var(--overview-accent-soft),
    0 18px 34px rgba(1, 7, 18, 0.5);
}

.overview-card.is-selected {
  border-color: rgba(123, 184, 235, 0.9);
  box-shadow: 0 0 0 1.5px rgba(130, 196, 250, 0.72), 0 12px 24px rgba(1, 7, 18, 0.62);
}

.overview-selection-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(164, 218, 255, 0.9);
  background: rgba(20, 75, 122, 0.92);
  color: #eff8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.77rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(2, 8, 18, 0.44);
  animation: overview-badge-in 120ms ease;
}

@keyframes overview-badge-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.multi-select-armed .overview-card {
  cursor: copy;
}

.overview-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overview-type-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 62%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eff8ff;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-meta {
  color: rgba(206, 224, 244, 0.64);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.overview-title {
  margin: 0;
  font-size: clamp(1rem, calc(var(--overview-card-width, 260px) / 16), 1.18rem);
  line-height: 1.15;
  letter-spacing: 0;
  color: #f3f9ff;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.3em;
}

.overview-preview {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(118, 170, 224, 0.16);
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.84), rgba(11, 22, 38, 0.56));
}

.overview-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%);
  pointer-events: none;
}

.overview-preview-label {
  position: relative;
  z-index: 1;
  color: rgba(191, 217, 245, 0.72);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-preview-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.overview-preview-body.is-chart {
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.overview-preview-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.overview-preview-chart-baseline {
  stroke: rgba(167, 202, 241, 0.2);
  stroke-width: 1;
}

.overview-preview-svg-host {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(114, 167, 222, 0.14);
  background: rgba(5, 12, 23, 0.58);
}

.overview-preview-svg-host .education-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.overview-preview-svg-host[data-svg-theme="light"] {
  --education-svg-bg: rgba(245, 250, 255, 0.98);
  --education-svg-surface: rgba(232, 241, 250, 0.98);
  --education-svg-surface-border: rgba(103, 135, 171, 0.58);
  --education-svg-text: #173047;
  --education-svg-muted: #46617a;
  --education-svg-edge: rgba(55, 105, 156, 0.92);
  --education-svg-accent: #1d70ba;
}

.overview-preview-body.is-video-summary {
  align-items: stretch;
}

.overview-video-summary-preview {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 111, 143, 0.18), transparent 54%),
    rgba(5, 12, 23, 0.72);
}

.overview-video-summary-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(0.96) contrast(1.08);
}

.overview-video-summary-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(5, 12, 23, 0.72);
  color: #f8fbff;
  font-size: 1.16rem;
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.46);
}

.overview-preview-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(195, 218, 243, 0.74);
  font-size: 0.78rem;
  text-align: center;
}

.overview-kpi-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.overview-kpi-item {
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(116, 170, 227, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-kpi-item[data-tone="positive"] {
  border-color: rgba(123, 255, 191, 0.34);
}

.overview-kpi-item[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.34);
}

.overview-kpi-item[data-tone="negative"] {
  border-color: rgba(255, 143, 163, 0.34);
}

.overview-kpi-label {
  color: rgba(194, 219, 244, 0.72);
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-kpi-value {
  color: #f5fbff;
  font-size: clamp(0.94rem, calc(var(--overview-card-width, 260px) / 18), 1.06rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-kpi-detail {
  color: rgba(193, 217, 243, 0.58);
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-insight-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overview-insight-item {
  position: relative;
  padding-left: 12px;
  color: rgba(243, 249, 255, 0.9);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.overview-insight-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--overview-accent);
}

.overview-insight-item:first-child {
  color: #ffffff;
}

.overview-meta-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.overview-meta-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(120, 172, 227, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(223, 237, 252, 0.8);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.overview-card:hover .overview-type-chip,
.overview-card:hover .overview-meta-chip {
  border-color: rgba(255, 255, 255, 0.18);
}

.overview-card:hover .overview-preview {
  border-color: rgba(255, 255, 255, 0.12);
}

.overview-drag-ghost {
  opacity: 0.5;
}

.overview-drag-chosen {
  border-color: #8fd0ff;
}

.overview-drag-dragging {
  transform: scale(1.02);
}

.zoom-ghost {
  overflow: hidden;
  will-change: transform, opacity;
  transform-origin: top left;
}

.dev-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(460px, calc(100vw - 24px));
  z-index: 60;
  border-radius: 16px;
  border: 1px solid rgba(108, 162, 221, 0.34);
  background: linear-gradient(180deg, rgba(7, 16, 31, 0.96), rgba(8, 19, 36, 0.96));
  box-shadow: 0 22px 48px rgba(1, 9, 20, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dev-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(108, 162, 221, 0.22);
}

.dev-panel-title {
  margin: 0;
  font-size: 0.95rem;
  color: #e5f2ff;
}

.dev-close-btn {
  height: 30px;
}

.dev-panel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: auto;
}

.dev-label {
  color: #b6cdeb;
  font-size: 0.8rem;
}

.dev-select {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 0 10px;
}

.dev-textarea {
  width: 100%;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid rgba(127, 160, 200, 0.34);
  background: rgba(6, 15, 29, 0.72);
  color: #e9f3ff;
  padding: 12px;
  resize: vertical;
  line-height: 1.42;
}

.dev-panel-actions {
  margin-top: auto;
  padding: 12px 14px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(108, 162, 221, 0.2);
}

.toast-host {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-host.has-interactive-toast {
  pointer-events: auto;
}

body.overview-has-selection .toast-host {
  bottom: 96px;
}

.toast {
  max-width: min(420px, calc(100vw - 28px));
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.34);
  background: rgba(6, 16, 33, 0.94);
  color: #eaf4ff;
  padding: 9px 12px;
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.6);
  font-size: 0.84rem;
}

.toast.error {
  border-color: rgba(255, 122, 141, 0.55);
}

.toast-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
}

.toast-undo-message {
  color: #eaf4ff;
}

.toast-undo-btn {
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(126, 173, 227, 0.52);
  background: rgba(11, 30, 56, 0.86);
  color: #dceeff;
  font-size: 0.75rem;
  padding: 0 9px;
  cursor: pointer;
}

.toast-undo-btn:hover:not(:disabled) {
  border-color: rgba(46, 163, 255, 0.82);
}

.toast-undo-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.delete-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 8, 16, 0.68);
}

.delete-confirm-card {
  width: min(420px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid rgba(108, 162, 221, 0.34);
  background: linear-gradient(180deg, rgba(8, 18, 35, 0.98), rgba(7, 14, 28, 0.98));
  box-shadow: 0 22px 48px rgba(1, 9, 20, 0.8);
  padding: 14px;
}

.delete-confirm-title {
  margin: 0;
  font-size: 0.96rem;
  color: #eaf4ff;
}

.delete-confirm-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.delete-confirm-btn.is-destructive {
  border-color: rgba(255, 132, 151, 0.6);
  color: #ffdce2;
}


.compare-root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.compare-controls {
  border-radius: 12px;
  border: 1px solid rgba(126, 173, 227, 0.42);
  background: rgba(7, 16, 31, 0.86);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.compare-label {
  color: #e1f0ff;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-control-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compare-control-btn {
  height: 30px;
  font-size: 0.77rem;
  padding: 0 10px;
}

.compare-panes {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.compare-pane {
  min-width: 0;
  min-height: 0;
}

.compare-pane .focused-pane {
  height: 100%;
  padding: 0;
}

.compare-pane .focused-module-card {
  width: 100%;
  height: 100%;
  padding: 14px;
}

.publish-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 8, 16, 0.72);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.publish-modal-card {
  width: min(560px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  border-radius: 16px;
  border: 1px solid rgba(108, 162, 221, 0.34);
  background: linear-gradient(180deg, rgba(8, 18, 35, 0.98), rgba(7, 14, 28, 0.98));
  padding: 16px;
  box-shadow: 0 22px 48px rgba(1, 9, 20, 0.8);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.publish-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.publish-modal-title {
  margin: 0;
  font-size: 1.02rem;
  color: #e5f2ff;
}

.publish-close-btn {
  height: 30px;
}

.publish-modal-subtitle {
  margin: 10px 0 8px;
  color: #a7c2e0;
  font-size: 0.84rem;
}

.publish-mode-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.publish-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(108, 162, 221, 0.22);
  background: rgba(7, 16, 31, 0.36);
  color: #d9eaff;
  cursor: pointer;
}

.publish-mode-option:has(input:checked) {
  border-color: rgba(101, 186, 255, 0.68);
  background: rgba(22, 84, 139, 0.26);
}

.publish-mode-option input {
  margin-top: 2px;
  accent-color: #65baff;
}

.publish-mode-option strong,
.publish-mode-option small {
  display: block;
}

.publish-mode-option strong {
  font-size: 0.84rem;
}

.publish-mode-option small {
  margin-top: 3px;
  color: #abc7e5;
  font-size: 0.74rem;
  line-height: 1.35;
}

.publish-client-pin-info {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(108, 162, 221, 0.18);
  background: rgba(7, 16, 31, 0.34);
  color: #bfd7f1;
  font-size: 0.8rem;
  line-height: 1.5;
}

.publish-pin-input-wrap {
  margin: 0 0 10px;
}

.publish-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.8fr);
  gap: 10px;
  margin: 0 0 12px;
}

.publish-field-wrap {
  display: grid;
  gap: 6px;
}

.publish-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: #d8e8fb;
  font-size: 0.82rem;
}

.publish-toggle-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #65baff;
}

.publish-pin-input-label {
  display: block;
  margin: 0 0 6px;
  color: #c6ddf7;
  font-size: 0.8rem;
}

.publish-pin-input {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 0 10px;
  letter-spacing: 0.12em;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

.publish-pin-help {
  margin: 6px 2px 0;
  color: #a7c2e0;
  font-size: 0.75rem;
}

.publish-error {
  min-height: 1.2em;
  margin: 0 0 8px;
  color: transparent;
  font-size: 0.82rem;
}

.publish-error.is-visible {
  color: #ffadbc;
}

.publish-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(108, 162, 221, 0.22);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.publish-pin-wrap {
  text-align: center;
}

.publish-pin-label {
  color: #b7cce8;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.publish-pin-value {
  margin-top: 2px;
  color: #f4fbff;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.publish-link-value {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 0 10px;
}

.publish-select-input {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 0 10px;
}

.publish-link-stack {
  display: grid;
  gap: 8px;
}

.publish-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(108, 162, 221, 0.22);
  border-radius: 12px;
  background: rgba(7, 16, 31, 0.4);
}

.publish-meta-label {
  color: #a9c6e6;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.publish-meta-value {
  color: #f3fbff;
  font-size: 0.86rem;
  text-align: right;
}

.publish-email-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(108, 162, 221, 0.18);
  background: rgba(7, 16, 31, 0.34);
  color: #bfd7f1;
  font-size: 0.8rem;
  line-height: 1.5;
}

.publish-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.codex-video-brief-modal-card {
  max-width: 640px;
}

.codex-video-brief-review {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.codex-video-brief-notice {
  padding: 11px 12px;
  border: 1px solid rgba(122, 182, 223, 0.28);
  border-radius: 12px;
  background: rgba(12, 37, 61, 0.46);
  color: #d4eaff;
  font-size: 0.84rem;
  line-height: 1.48;
}

.codex-video-brief-modules {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0 0 0 24px;
  color: #dceeff;
  font-size: 0.86rem;
  line-height: 1.4;
}

.video-summary-modal-card {
  max-width: 640px;
}

.video-summary-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.video-summary-field {
  display: grid;
  gap: 6px;
  color: #c6ddf7;
  font-size: 0.8rem;
}

.video-summary-input {
  height: 38px;
}

.video-summary-textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 10px;
  font: inherit;
}

.video-summary-preview {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(108, 162, 221, 0.22);
  background: rgba(7, 16, 31, 0.42);
}

.video-summary-preview-thumb {
  min-height: 92px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 111, 143, 0.16), transparent 56%),
    rgba(5, 12, 23, 0.7);
  background-position: center;
  background-size: cover;
}

.video-summary-preview.is-empty .video-summary-preview-thumb {
  display: grid;
  place-items: center;
}

.video-summary-preview.is-empty .video-summary-preview-thumb::before {
  content: '▶';
  color: rgba(242, 249, 255, 0.78);
  font-size: 1.5rem;
}

.video-summary-preview-title {
  color: #edf7ff;
  font-size: 0.94rem;
  font-weight: 700;
}

.video-summary-preview-meta {
  margin-top: 4px;
  color: #a8c0dc;
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (max-width: 680px) {
  .publish-mode-group,
  .publish-form-grid,
  .video-summary-preview {
    grid-template-columns: 1fr;
  }
}

.access-manager-page #accessManagerApp {
  position: relative;
  width: 100%;
  height: 100%;
}

.lead-manager-page #leadManagerApp {
  position: relative;
  width: 100%;
  height: 100%;
}

.access-manager-search-input {
  width: 100%;
}

.access-manager-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.access-manager-main {
  position: absolute;
  inset: var(--topbar-height) 0 0 0;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.access-manager-rail,
.access-manager-detail-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(108, 162, 221, 0.24);
  background:
    linear-gradient(180deg, rgba(11, 23, 42, 0.92), rgba(7, 14, 28, 0.9)),
    rgba(7, 14, 28, 0.86);
  box-shadow: 0 22px 48px rgba(1, 9, 20, 0.5);
}

.access-manager-rail-header {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.access-manager-eyebrow {
  margin: 0;
  color: #90b7de;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-manager-title,
.access-manager-detail-title {
  margin: 0;
  color: #f1f8ff;
  line-height: 1.1;
}

.access-manager-title {
  font-size: 1.58rem;
}

.access-manager-subtitle,
.access-manager-empty-state p {
  margin: 0;
  color: #abc5e2;
  font-size: 0.9rem;
  line-height: 1.55;
}

.access-manager-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(108, 162, 221, 0.18);
  background: rgba(7, 16, 31, 0.34);
  color: #bfd7f1;
  font-size: 0.8rem;
  line-height: 1.5;
}

.access-manager-session-list {
  display: grid;
  gap: 10px;
}

.access-session-card {
  width: 100%;
  display: grid;
  gap: 10px;
  height: auto;
  min-height: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(108, 162, 221, 0.2);
  background: rgba(7, 16, 31, 0.5);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.access-session-card:hover {
  border-color: rgba(86, 180, 255, 0.46);
  background: rgba(10, 22, 42, 0.7);
}

.access-session-card:active {
  transform: translateY(1px);
}

.access-session-card:focus-visible {
  outline: 2px solid rgba(86, 180, 255, 0.62);
  outline-offset: 2px;
}

.access-session-card.is-selected {
  border-color: rgba(86, 180, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(86, 180, 255, 0.2), 0 12px 28px rgba(5, 18, 35, 0.26);
  background: rgba(9, 22, 42, 0.78);
}

.access-session-card-top,
.access-session-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.access-session-card-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.access-session-card-name {
  margin: 0;
  color: #eff8ff;
  font-size: 0.98rem;
  font-weight: 700;
}

.access-session-card-email,
.access-session-card-id,
.access-session-card-summary,
.access-manager-detail-id {
  margin: 0;
  color: #9fbad8;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.access-session-card-meta {
  display: grid;
  justify-content: flex-start;
  gap: 4px;
}

.access-session-card-id {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.75rem;
  color: #88a8cc;
}

.access-session-card-summary {
  color: #b2cae5;
}

.access-manager-empty-state,
.access-manager-detail-card {
  display: grid;
  gap: 16px;
}

.access-manager-empty-state {
  min-height: 100%;
  align-content: center;
  justify-items: start;
}

.access-manager-empty-state h2 {
  margin: 0;
  color: #eff8ff;
}

.access-manager-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.access-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 88px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(108, 162, 221, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: #d8ebff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.access-status-badge.is-active {
  border-color: rgba(109, 217, 165, 0.38);
  background: rgba(35, 120, 88, 0.16);
  color: #9bf0c7;
}

.access-status-badge.is-expired {
  border-color: rgba(255, 196, 94, 0.34);
  background: rgba(120, 88, 30, 0.16);
  color: #ffd585;
}

.access-status-badge.is-revoked {
  border-color: rgba(255, 131, 151, 0.36);
  background: rgba(120, 36, 54, 0.16);
  color: #ffb0bf;
}

.access-status-badge.is-new {
  border-color: rgba(86, 180, 255, 0.44);
  background: rgba(25, 88, 142, 0.18);
  color: #b9e3ff;
}

.access-status-badge.is-reviewing {
  border-color: rgba(255, 213, 133, 0.4);
  background: rgba(130, 92, 32, 0.16);
  color: #ffe1a6;
}

.access-status-badge.is-awaiting-client {
  border-color: rgba(127, 205, 177, 0.4);
  background: rgba(39, 118, 95, 0.17);
  color: #b8f3dc;
}

.access-status-badge.is-new-lead,
.access-status-badge.is-awaiting-meeting,
.access-status-badge.is-session-in-progress,
.access-status-badge.is-session-published,
.access-status-badge.is-post-session-email-sent,
.access-status-badge.is-client-opened {
  border-color: rgba(127, 205, 177, 0.4);
  background: rgba(39, 118, 95, 0.17);
  color: #b8f3dc;
}

.access-status-badge.is-booked {
  border-color: rgba(109, 217, 165, 0.46);
  background: rgba(35, 120, 88, 0.2);
  color: #9bf0c7;
}

.access-status-badge.is-meeting-booked {
  border-color: rgba(109, 217, 165, 0.46);
  background: rgba(35, 120, 88, 0.2);
  color: #9bf0c7;
}

.access-status-badge.is-declined {
  border-color: rgba(255, 131, 151, 0.36);
  background: rgba(120, 36, 54, 0.16);
  color: #ffb0bf;
}

.access-status-badge.is-expired {
  border-color: rgba(255, 176, 96, 0.42);
  background: rgba(128, 73, 18, 0.16);
  color: #ffd2a3;
}

.access-status-badge.is-archived {
  border-color: rgba(171, 193, 215, 0.24);
  background: rgba(120, 136, 154, 0.12);
  color: #c4d3e3;
}

.access-manager-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-stage-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.client-stage-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(127, 160, 200, 0.24);
  border-radius: 999px;
  background: rgba(7, 16, 31, 0.38);
  color: #cde2f7;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 8px 11px;
}

.client-stage-tab:hover,
.client-stage-tab:focus-visible,
.client-stage-tab.is-active {
  border-color: rgba(127, 205, 177, 0.55);
  background: rgba(39, 118, 95, 0.2);
  color: #f2fbff;
}

.client-pipeline-section {
  gap: 12px;
}

.client-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-section-header .publish-select-input {
  width: min(320px, 100%);
}

.client-inline-actions {
  padding-top: 2px;
}

.lead-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.lead-filter-row .access-manager-search-input {
  grid-column: 1 / -1;
}

.lead-status-filter {
  width: 100%;
}

.lead-detail-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(108, 162, 221, 0.18);
}

.lead-detail-section h3 {
  margin: 0;
  color: #eff8ff;
  font-size: 1rem;
}

.lead-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 12px;
}

/* Case applications in the client pipeline (js/client_manager.js). */
.client-application-meta {
  margin: 0;
  color: #a9c1dc;
  font-size: 0.86rem;
}

.client-application-body {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.24);
  background: rgba(7, 16, 31, 0.5);
}

.client-application-body h4 {
  margin: 0 0 4px;
  color: #8fd0ff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.client-application-body ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #f0f7ff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.client-application-body ul ul {
  margin: 2px 0 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(143, 208, 255, 0.22);
}

.client-application-body .client-application-label {
  color: #a9c1dc;
}

.client-application-body .client-application-question {
  white-space: pre-wrap;
}

.client-application-body .client-application-unsure {
  color: #ffd79a;
}

.lead-manager-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 10px;
  line-height: 1.5;
}

.lead-manager-textarea[readonly] {
  color: #d5e6f8;
  background: rgba(7, 16, 31, 0.42);
}

.lead-schedule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-schedule-message {
  min-height: 220px;
}

.lead-event-list {
  display: grid;
  gap: 8px;
}

.lead-event-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(108, 162, 221, 0.18);
  background: rgba(7, 16, 31, 0.34);
}

.lead-event-item strong {
  color: #e7f4ff;
  font-size: 0.84rem;
  text-transform: capitalize;
}

.lead-event-item span {
  color: #a9c5e1;
  font-size: 0.76rem;
}

.session-unlock-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 8, 16, 0.78);
}

.session-unlock-card {
  width: min(430px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid rgba(108, 162, 221, 0.34);
  background: linear-gradient(180deg, rgba(8, 18, 35, 0.98), rgba(7, 14, 28, 0.98));
  padding: 18px;
  box-shadow: 0 22px 48px rgba(1, 9, 20, 0.8);
}

.session-unlock-card h1 {
  margin: 0;
  font-size: 1.08rem;
}

.session-unlock-hint {
  margin: 8px 0 0;
  color: #a7c2e0;
  font-size: 0.84rem;
}

.session-unlock-input {
  width: 100%;
  height: 40px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(127, 160, 200, 0.32);
  background: rgba(7, 16, 31, 0.68);
  color: #f0f7ff;
  padding: 0 10px;
  letter-spacing: 0.2em;
  text-align: center;
  font-size: 1.16rem;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

.session-unlock-input + .session-unlock-input {
  margin-top: 8px;
}

.session-unlock-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.published-recovery-card {
  width: min(520px, calc(100vw - 32px));
}

.published-recovery-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.session-unlock-error {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: #ffadbc;
  font-size: 0.82rem;
  text-align: center;
}

.read-only-session .module-title-input,
.read-only-session .module-notes-input {
  background: rgba(255, 255, 255, 0.03);
  color: #dceafb;
}

.read-only-session .module-title-shell {
  grid-template-columns: 1fr;
}

@media (min-width: 721px) and (max-width: 1024px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-home-link {
    width: auto;
  }

  .topbar-input {
    width: clamp(150px, 24vw, 220px);
    min-width: 0;
  }

  .topbar-right {
    flex: 0 1 auto;
    gap: 8px;
  }

  .topbar-right > a.ui-button[href="./clients.html"],
  .topbar-right > #newModuleBtn,
  .topbar-right > #videoSummaryBtn,
  .topbar-right > #resetBtn,
  .topbar-right > #advisorAuthStatus {
    display: none;
  }

  .topbar-right > #newCallBtn,
  .topbar-right > #publishSessionBtn,
  .topbar-right > #zoomToggleBtn {
    min-width: 82px;
    padding: 0 11px;
    white-space: nowrap;
  }

  .mobile-header-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .mobile-overflow-sheet {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: block;
    pointer-events: none;
  }

  .mobile-overflow-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 16, 0.5);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .mobile-overflow-panel {
    position: absolute;
    right: 12px;
    top: calc(var(--topbar-height) + 8px);
    width: min(320px, calc(100vw - 24px));
    border-radius: 16px;
    border: 1px solid rgba(132, 178, 232, 0.34);
    background: linear-gradient(180deg, rgba(9, 18, 34, 0.98), rgba(6, 13, 25, 0.99));
    box-shadow: 0 20px 42px rgba(2, 8, 18, 0.58);
    padding: 12px;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .mobile-overflow-grabber {
    display: none;
  }

  .mobile-overflow-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .mobile-overflow-title {
    margin: 0;
    font-size: 0.95rem;
  }

  .mobile-overflow-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-overflow-btn {
    width: 100%;
    height: 40px;
  }

  body.mobile-overflow-open .mobile-overflow-sheet {
    pointer-events: auto;
  }

  body.mobile-overflow-open .mobile-overflow-backdrop {
    opacity: 1;
  }

  body.mobile-overflow-open .mobile-overflow-panel {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 10px;
    gap: 10px;
  }

  .topbar-input {
    width: min(180px, 38vw);
  }

  .session-status {
    display: none;
  }

  .access-manager-search-input {
    width: 100%;
  }

  .access-manager-main {
    grid-template-columns: 1fr;
  }

  .access-manager-meta-grid {
    grid-template-columns: 1fr;
  }

  .lead-context-grid,
  .lead-schedule-grid {
    grid-template-columns: 1fr;
  }

  .client-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .swipe-stage {
    width: min(100vw - 12px, 1600px);
    max-width: calc(100vw - 12px);
    height: calc(100vh - var(--topbar-height) - 14px);
    max-height: calc(100vh - var(--topbar-height) - 14px);
    border-radius: 22px;
  }

  .swipe-stage.is-compare {
    width: min(100vw - 24px, 1000px);
    height: min(100vh - var(--topbar-height) - 24px, 760px);
  }

  .focused-module-card {
    width: 100%;
    height: 100%;
    padding: 16px;
    gap: 10px;
  }

  .module-header-band {
    gap: 10px;
  }

  .module-title-shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .module-title-input {
    font-size: clamp(1.18rem, 5vw, 1.48rem);
    padding: 11px 12px;
  }

  .module-title-edit-btn {
    min-width: 38px;
    height: 30px;
    margin: 7px 7px 0 0;
    font-size: 0.68rem;
  }

  .module-notes-summary {
    padding: 9px 11px;
  }

  .module-notes-input {
    height: 92px;
    min-height: 82px;
  }

  /* minmax(0, 1fr), not 1fr: a column of 1fr will not go narrower than its widest
     card's min-content, so a table of four or five columns grew the column to 382px
     in a 252px slot and the module was laid out at the width it was cut off at. A
     table now scrolls inside its own wrapper, which is what the wrapper is for. */
  .generated-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .retirement-generated-grid {
    grid-template-columns: 1fr;
  }

  .college-hero-card {
    grid-template-columns: 1fr;
  }

  .college-hero-metrics,
  .college-scenario-values {
    grid-template-columns: 1fr;
  }

  .retirement-decision-panel {
    grid-column: 1;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .retirement-required-pot-card {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(190, 202, 207, 0.12);
  }

  .assumptions-editor-grid {
    grid-template-columns: 1fr;
  }

  .pbs-bucket-tables {
    grid-template-columns: 1fr;
  }

  .pbs-net-worth-context-benchmarks {
    grid-template-columns: 1fr;
  }

  .generated-charts-card {
    grid-column: auto;
  }

  .publish-form-grid {
    grid-template-columns: 1fr;
  }

  .overview-selection-host {
    bottom: 10px;
    padding: 0 8px;
  }

  .overview-selection-bar {
    align-items: flex-start;
    flex-direction: column;
    width: min(100vw - 16px, 920px);
  }

  .overview-selection-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .overview-selection-helper {
    width: 100%;
  }

  .overview-card {
    padding: 12px;
    gap: 8px;
  }

  .overview-preview {
    padding: 9px;
    gap: 7px;
  }

  .overview-kpi-grid {
    gap: 6px;
  }

  .compare-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-control-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .compare-panes {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(0, 1fr);
  }

  .nav-arrow.left {
    left: 10px;
  }

  .nav-arrow.right {
    right: 10px;
  }

  .dev-panel {
    inset: 8px;
    width: auto;
  }

  .publish-link-value {
    width: calc(100vw - 72px);
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 58px;
    --mobile-action-bar-height: 72px;
    --mobile-action-bar-safe: env(safe-area-inset-bottom, 0px);
  }

  .topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-left {
    flex: 1;
    flex-basis: 100%;
    min-width: 0;
    gap: 8px;
  }

  .app-home-link {
    width: auto;
    min-height: 55px;
    padding: 5px 10px;
  }

  .app-home-link-image {
    height: auto;
  }

  .topbar-input {
    width: 100%;
    min-width: 0;
    height: 36px;
    font-size: 0.95rem;
  }

  .topbar-right {
    gap: 8px;
  }

  .overview-type-chip {
    padding: 4px 8px;
    font-size: 0.65rem;
  }

  .overview-meta {
    font-size: 0.7rem;
  }

  .overview-preview-label,
  .overview-meta-chip {
    font-size: 0.64rem;
  }

  .overview-insight-item {
    font-size: 0.75rem;
  }

  .topbar-right > :not(.mobile-topbar-meta) {
    display: none;
  }

  .access-manager-page .topbar-right {
    display: flex;
  }

  .access-manager-page .topbar-right > * {
    display: inline-flex;
  }

  .access-manager-page .topbar-left .ui-button {
    height: 34px;
    padding: 0 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .access-manager-main {
    padding: 12px;
    gap: 12px;
  }

  .access-manager-rail,
  .access-manager-detail-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .mobile-topbar-meta {
    gap: 8px;
  }

  .session-status {
    display: inline;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
  }

  .mobile-header-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px calc(10px + var(--mobile-action-bar-safe));
    border-top: 1px solid rgba(125, 165, 214, 0.35);
    background: linear-gradient(180deg, rgba(7, 13, 25, 0.9), rgba(6, 11, 22, 0.96));
    backdrop-filter: blur(12px);
  }

  .mobile-focus-nav {
    display: grid;
  }

  .mobile-action-btn {
    height: 48px;
    min-width: 0;
    padding: 4px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .mobile-action-icon {
    font-size: 0.86rem;
    line-height: 1;
    opacity: 0.92;
  }

  .mobile-action-label {
    font-size: 0.67rem;
    line-height: 1;
    white-space: nowrap;
  }

  .toast-host {
    right: 12px;
    bottom: calc(12px + var(--mobile-action-bar-height) + var(--mobile-action-bar-safe));
  }

  body.focus-mode .toast-host {
    bottom: calc(18px + var(--mobile-action-bar-height) + var(--mobile-action-bar-safe));
  }

  .greeting-view {
    padding-bottom: calc(26px + var(--mobile-action-bar-height) + var(--mobile-action-bar-safe));
  }

  .focused-view {
    padding: 8px 0 calc(12px + var(--mobile-action-bar-height) + var(--mobile-action-bar-safe));
  }

  .swipe-stage {
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    height: calc(100vh - var(--topbar-height) - var(--mobile-action-bar-height) - var(--mobile-action-bar-safe) - 16px);
    max-height: calc(100vh - var(--topbar-height) - var(--mobile-action-bar-height) - var(--mobile-action-bar-safe) - 16px);
    border-radius: 20px;
  }

  .swipe-stage.is-compare {
    width: calc(100vw - 18px);
    height: min(760px, calc(100vh - var(--topbar-height) - var(--mobile-action-bar-height) - var(--mobile-action-bar-safe) - 20px));
  }

  .nav-arrow {
    display: none;
  }

  .overview-selection-host {
    bottom: calc(8px + var(--mobile-action-bar-height) + var(--mobile-action-bar-safe));
  }

  .mobile-module-sheet {
    display: block;
  }

  .mobile-overflow-sheet {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: block;
    pointer-events: none;
  }

  .mobile-overflow-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 16, 0.58);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .mobile-overflow-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(132, 178, 232, 0.34);
    border-bottom: 0;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    background: linear-gradient(180deg, rgba(9, 18, 34, 0.98), rgba(6, 13, 25, 0.99));
    box-shadow: 0 -20px 42px rgba(2, 8, 18, 0.58);
    padding: 10px 14px calc(16px + var(--mobile-action-bar-safe));
    transform: translateY(calc(100% + 20px));
    transition: transform 230ms cubic-bezier(0.2, 0.8, 0.2, 1);
    touch-action: pan-y;
  }

  .mobile-overflow-grabber {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(171, 200, 236, 0.56);
    margin: 2px auto 10px;
  }

  .mobile-overflow-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
  }

  .mobile-overflow-title {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
  }

  .mobile-overflow-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-overflow-btn {
    width: 100%;
    height: 42px;
  }

  body.mobile-overflow-open .mobile-overflow-sheet {
    pointer-events: auto;
  }

  body.mobile-overflow-open .mobile-overflow-backdrop {
    opacity: 1;
  }

  body.mobile-overflow-open .mobile-overflow-panel {
    transform: translateY(0);
  }
}

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

/* House purchase planner */

.overview-card[data-module-kind="house-purchase"] {
  --overview-accent: #6ad0b1;
  --overview-accent-soft: rgba(106, 208, 177, 0.18);
}

.house-purchase-generated-section {
  --house-blue: #74b9dd;
  --house-green: #66b89e;
  --house-amber: #d4a64f;
  --house-coral: #d47c70;
  --house-ink: #f4f7f4;
  --house-muted: #aec0c8;
  gap: 12px;
}

.house-purchase-generated-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.house-purchase-card {
  overflow: hidden;
  border-color: rgba(151, 190, 202, 0.22);
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(106, 167, 200, 0.1), transparent 48%),
    linear-gradient(180deg, rgba(25, 36, 42, 0.92), rgba(11, 18, 22, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 16px 30px rgba(0, 0, 0, 0.18);
}

.house-purchase-card > .generated-card-header {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(174, 200, 208, 0.12);
}

.house-purchase-card > .generated-card-header .generated-card-title {
  color: #eef7f6;
  font-size: 0.92rem;
  letter-spacing: 0.005em;
}

.house-purchase-hero-card,
.house-purchase-readiness-card,
.house-purchase-scenario-card,
.house-purchase-mortgage-card,
.house-purchase-supports-card {
  grid-column: 1 / -1;
}

.house-purchase-funding-card {
  grid-column: span 5;
}

.house-purchase-deposit-card {
  grid-column: span 7;
}

.house-purchase-actions-card {
  grid-column: span 5;
}

.house-purchase-assumptions-card {
  grid-column: span 7;
}

.house-purchase-error-card,
.house-purchase-start-card,
.house-purchase-wizard-card {
  grid-column: 1 / -1;
}

.house-purchase-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  gap: 7px;
  padding: 3px 10px 3px 5px;
  border: 1px solid rgba(145, 179, 188, 0.28);
  border-radius: 999px;
  background: rgba(19, 32, 38, 0.74);
  color: #cbd8dc;
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-transform: uppercase;
}

.house-purchase-status-icon {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: rgba(170, 194, 201, 0.14);
  font-size: 0.68rem;
}

.house-purchase-status[data-tone="positive"] {
  border-color: rgba(102, 184, 158, 0.46);
  background: rgba(31, 90, 72, 0.28);
  color: #aee8d2;
}

.house-purchase-status[data-tone="warning"] {
  border-color: rgba(212, 166, 79, 0.48);
  background: rgba(103, 75, 25, 0.3);
  color: #f0d79e;
}

.house-purchase-status[data-tone="negative"] {
  border-color: rgba(212, 124, 112, 0.5);
  background: rgba(105, 42, 36, 0.3);
  color: #f2bab2;
}

.house-purchase-edit-btn,
.house-purchase-primary-btn,
.house-purchase-secondary-btn,
.house-purchase-preset-btn {
  min-height: 40px;
  border: 1px solid rgba(127, 184, 201, 0.4);
  border-radius: 10px;
  background: rgba(10, 25, 31, 0.82);
  color: #e8f3f5;
  padding: 8px 13px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.house-purchase-edit-btn {
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 11px;
  color: #cde9f7;
  font-size: 0.7rem;
}

.house-purchase-primary-btn {
  border-color: rgba(102, 184, 158, 0.72);
  background: linear-gradient(180deg, rgba(48, 128, 104, 0.94), rgba(31, 91, 73, 0.96));
  box-shadow: 0 10px 24px rgba(9, 44, 34, 0.28);
  color: #f6fffb;
}

.house-purchase-secondary-btn {
  color: #c4d6dc;
}

.house-purchase-edit-btn:hover,
.house-purchase-primary-btn:hover,
.house-purchase-secondary-btn:hover,
.house-purchase-preset-btn:hover {
  border-color: rgba(127, 209, 185, 0.82);
  background-color: rgba(30, 75, 64, 0.7);
  transform: translateY(-1px);
}

.house-purchase-edit-btn:focus-visible,
.house-purchase-primary-btn:focus-visible,
.house-purchase-secondary-btn:focus-visible,
.house-purchase-preset-btn:focus-visible,
.house-purchase-control:focus-visible,
.house-purchase-assumptions-details > summary:focus-visible,
.house-purchase-source-links a:focus-visible {
  outline: 2px solid rgba(116, 185, 221, 0.86);
  outline-offset: 2px;
}

.house-purchase-primary-btn:active,
.house-purchase-secondary-btn:active,
.house-purchase-preset-btn:active {
  transform: translateY(0);
}

.house-purchase-preset-btn:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

/* Advisor template and staged wizard */

.house-purchase-start-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  min-height: 360px;
  padding: 0;
  border-color: rgba(102, 184, 158, 0.38);
  background:
    radial-gradient(circle at 15% 18%, rgba(116, 185, 221, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(14, 34, 42, 0.96), rgba(12, 24, 28, 0.96));
}

.house-purchase-start-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-right: 1px solid rgba(140, 191, 195, 0.18);
  background:
    radial-gradient(circle at 20% 80%, rgba(102, 184, 158, 0.22), transparent 31%),
    repeating-linear-gradient(40deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 28px),
    linear-gradient(160deg, rgba(10, 27, 36, 0.92), rgba(14, 40, 39, 0.9));
}

.house-purchase-start-route {
  position: absolute;
  left: 19%;
  right: 20%;
  top: 47%;
  height: 95px;
  border-top: 4px dashed rgba(116, 185, 221, 0.78);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.house-purchase-start-pin {
  position: absolute;
  left: 16%;
  top: 55%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(116, 185, 221, 0.72);
  border-radius: 50% 50% 50% 0;
  background: rgba(14, 43, 59, 0.95);
  color: #94d2ee;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 9px rgba(116, 185, 221, 0.08);
}

.house-purchase-start-pin::first-letter {
  transform: rotate(45deg);
}

.house-purchase-start-home,
.house-purchase-route-home {
  position: absolute;
  display: block;
  width: 48px;
  height: 37px;
  border: 2px solid rgba(174, 232, 211, 0.86);
  border-top: 0;
  border-radius: 3px;
  background: rgba(29, 92, 74, 0.76);
}

.house-purchase-start-home {
  right: 16%;
  top: 33%;
}

.house-purchase-start-home::before,
.house-purchase-route-home::before {
  content: '';
  position: absolute;
  left: 5px;
  top: -18px;
  width: 31px;
  height: 31px;
  border-left: 2px solid rgba(174, 232, 211, 0.86);
  border-top: 2px solid rgba(174, 232, 211, 0.86);
  background: rgba(29, 92, 74, 0.9);
  transform: rotate(45deg);
  z-index: -1;
}

.house-purchase-start-home i,
.house-purchase-route-home i {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 12px;
  height: 21px;
  background: rgba(7, 25, 22, 0.72);
}

.house-purchase-start-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(26px, 5vw, 58px);
}

.house-purchase-eyebrow {
  color: #92cbb9;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.house-purchase-start-copy h3 {
  max-width: 18ch;
  margin: 12px 0 14px;
  color: #f5faf7;
  font-size: clamp(1.65rem, 3.1vw, 2.65rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.house-purchase-start-copy > p {
  max-width: 61ch;
  margin: 0;
  color: #b7c9ce;
  line-height: 1.6;
}

.house-purchase-start-btn {
  min-height: 48px;
  margin-top: 24px;
  padding-inline: 20px;
}

.house-purchase-start-copy .house-purchase-start-note {
  margin-top: 10px;
  color: #95acae;
  font-size: 0.76rem;
}

.house-purchase-start-copy .house-purchase-codex-note {
  margin-top: 25px;
  padding-top: 14px;
  border-top: 1px solid rgba(154, 190, 198, 0.14);
  color: #82999f;
  font-size: 0.73rem;
}

.house-purchase-wizard-card {
  padding: clamp(16px, 2.4vw, 28px);
  border-color: rgba(116, 185, 221, 0.32);
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(102, 184, 158, 0.11), transparent 55%),
    linear-gradient(180deg, rgba(21, 36, 43, 0.98), rgba(10, 18, 23, 0.98));
}

.house-purchase-wizard-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.house-purchase-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9db3ba;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.house-purchase-progress-meta strong {
  color: #d9e7e8;
  font-weight: 760;
}

.house-purchase-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(136, 170, 180, 0.14);
}

.house-purchase-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--house-blue), var(--house-green));
  box-shadow: 0 0 16px rgba(102, 184, 158, 0.32);
  transition: width 220ms ease;
}

.house-purchase-step-intro {
  margin: 28px 0 22px;
}

.house-purchase-step-intro h3 {
  margin: 0 0 7px;
  color: #f3f8f7;
  font-size: clamp(1.25rem, 2.1vw, 1.72rem);
  letter-spacing: -0.02em;
}

.house-purchase-step-intro p,
.house-purchase-form-group > p {
  margin: 0;
  color: var(--house-muted);
  font-size: 0.84rem;
  line-height: 1.52;
}

.house-purchase-step-content {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.house-purchase-form-group {
  padding: 16px;
  border: 1px solid rgba(147, 185, 194, 0.15);
  border-radius: 12px;
  background: rgba(10, 23, 28, 0.42);
}

.house-purchase-form-group > h4 {
  margin: 0 0 5px;
  color: #dceaea;
  font-size: 0.88rem;
}

.house-purchase-form-group > .house-purchase-form-grid {
  margin-top: 14px;
}

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

.house-purchase-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.house-purchase-field.is-wide {
  grid-column: 1 / -1;
}

.house-purchase-field-label {
  color: #d9e6e8;
  font-size: 0.76rem;
  font-weight: 720;
}

.house-purchase-required {
  color: #d8b56f;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.house-purchase-control-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid rgba(138, 177, 188, 0.28);
  border-radius: 10px;
  background: rgba(6, 16, 20, 0.78);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.house-purchase-field:focus-within .house-purchase-control-wrap {
  border-color: rgba(116, 185, 221, 0.72);
  box-shadow: 0 0 0 3px rgba(116, 185, 221, 0.1);
}

.house-purchase-control {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0f5f4;
  padding: 9px 11px;
  font-size: 0.86rem;
}

.house-purchase-control option {
  color: #eef4f5;
  background: #101b20;
}

.house-purchase-control-affix {
  padding: 0 10px;
  color: #8eaaaf;
  font-size: 0.75rem;
  font-weight: 680;
  white-space: nowrap;
}

.house-purchase-control-affix:first-child {
  border-right: 1px solid rgba(139, 176, 186, 0.13);
}

.house-purchase-control-affix:last-child {
  border-left: 1px solid rgba(139, 176, 186, 0.13);
}

.house-purchase-field-help {
  color: #839ba1;
  font-size: 0.68rem;
  line-height: 1.45;
}

.house-purchase-split-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 184, 158, 0.28);
  border-radius: 10px;
  background: rgba(40, 104, 83, 0.14);
  color: #a8c7bc;
  font-size: 0.68rem;
}

.house-purchase-split-summary strong {
  color: #d8ebe4;
  font-size: 0.73rem;
}

.house-purchase-split-summary[data-tone="negative"] {
  border-color: rgba(212, 124, 112, 0.42);
  background: rgba(105, 42, 36, 0.2);
  color: #ddb0aa;
}

.house-purchase-split-summary[data-tone="negative"] strong {
  color: #f0c2bc;
}

.house-purchase-wizard-status {
  min-height: 20px;
  margin-top: 16px;
  color: #f0b5ad;
  font-size: 0.76rem;
}

.house-purchase-wizard-status ul {
  margin: 0;
  padding: 10px 12px 10px 28px;
  border: 1px solid rgba(212, 124, 112, 0.35);
  border-radius: 10px;
  background: rgba(91, 38, 32, 0.24);
}

.house-purchase-wizard-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(153, 184, 193, 0.13);
}

.house-purchase-step-actions {
  display: flex;
  gap: 9px;
}

.house-purchase-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.house-purchase-review-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border-left: 3px solid var(--house-green);
  border-radius: 8px;
  background: rgba(46, 111, 89, 0.17);
  color: #bcd4cc;
  font-size: 0.78rem;
}

.house-purchase-review-note strong {
  color: #e6f5ef;
}

/* Result hierarchy */

.house-purchase-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: clamp(22px, 4vw, 50px);
  padding: clamp(10px, 1.8vw, 22px) 4px 6px;
}

.house-purchase-hero-story {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.house-purchase-hero-story h4 {
  max-width: 22ch;
  margin: 14px 0 10px;
  color: #f4f8f5;
  font-size: clamp(1.6rem, 3.1vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.house-purchase-hero-story > p,
.house-purchase-hero-summary {
  max-width: 70ch;
  margin: 0;
  color: #b5c5ca;
  font-size: 0.86rem;
  line-height: 1.62;
}

.house-purchase-hero-summary {
  margin-top: 10px;
}

.house-purchase-hero-summary p {
  margin: 0 0 8px;
}

.house-purchase-route-visual {
  width: 100%;
  margin-top: 28px;
}

.house-purchase-route-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: #899fa6;
  font-size: 0.68rem;
  line-height: 1.45;
}

.house-purchase-route-labels span:last-child {
  text-align: right;
}

.house-purchase-route-labels strong {
  color: #d9e9e9;
  font-size: 0.82rem;
}

.house-purchase-route-track {
  position: relative;
  height: 8px;
  margin-right: 45px;
  border-radius: 999px;
  background: rgba(135, 169, 178, 0.15);
}

.house-purchase-route-track > span:first-child {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--house-blue), var(--house-green));
}

.house-purchase-route-home {
  right: -43px;
  top: -14px;
  width: 31px;
  height: 25px;
}

.house-purchase-route-home::before {
  left: 4px;
  top: -12px;
  width: 20px;
  height: 20px;
}

.house-purchase-route-home i {
  left: 12px;
  width: 8px;
  height: 14px;
}

.house-purchase-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.house-purchase-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(148, 182, 190, 0.14);
  border-radius: 10px;
  background: rgba(7, 18, 22, 0.5);
}

.house-purchase-metric[data-tone="positive"] {
  border-color: rgba(102, 184, 158, 0.28);
}

.house-purchase-metric[data-tone="negative"] {
  border-color: rgba(212, 124, 112, 0.3);
}

.house-purchase-metric-label {
  color: #839ba1;
  font-size: 0.66rem;
  font-weight: 720;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.house-purchase-metric-value {
  overflow-wrap: anywhere;
  color: #f0f6f4;
  font-size: clamp(0.94rem, 1.6vw, 1.18rem);
  line-height: 1.17;
}

.house-purchase-metric-detail {
  color: #8fa4a9;
  font-size: 0.67rem;
  line-height: 1.42;
}

.house-purchase-gates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.house-purchase-gate {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 146px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(148, 183, 191, 0.15);
  border-radius: 10px;
  background: rgba(7, 18, 22, 0.48);
}

.house-purchase-gate::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: #78919a;
}

.house-purchase-gate[data-tone="positive"]::after {
  background: var(--house-green);
}

.house-purchase-gate[data-tone="warning"]::after {
  background: var(--house-amber);
}

.house-purchase-gate[data-tone="negative"]::after {
  background: var(--house-coral);
}

.house-purchase-gate-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(153, 190, 198, 0.2);
  border-radius: 50%;
  color: #9eb4b9;
  font-size: 0.67rem;
  font-weight: 800;
}

.house-purchase-gate h4 {
  margin: 2px 0 9px;
  color: #e7f0ef;
  font-size: 0.8rem;
}

.house-purchase-gate p {
  margin: 10px 0 0;
  color: #8fa4a9;
  font-size: 0.68rem;
  line-height: 1.48;
}

.house-purchase-funding-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
  color: #8da2a8;
  font-size: 0.72rem;
}

.house-purchase-funding-total strong {
  color: #f1f6f4;
  font-size: 1.2rem;
}

.house-purchase-funding-rail {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(154, 187, 195, 0.16);
  border-radius: 999px;
  background: rgba(4, 12, 15, 0.68);
}

.house-purchase-funding-segment {
  min-width: 0;
  background: var(--house-green);
}

.house-purchase-funding-segment[data-kind="estimated"] {
  background: var(--house-blue);
}

.house-purchase-funding-segment[data-kind="confirmed-support"] {
  background: #8ec8a0;
}

.house-purchase-funding-segment[data-kind="gap"] {
  background: var(--house-coral);
}

.house-purchase-funding-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.house-purchase-funding-legend article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #cbd8da;
  font-size: 0.74rem;
}

.house-purchase-funding-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--house-green);
}

.house-purchase-funding-legend article[data-kind="estimated"] i {
  background: var(--house-blue);
}

.house-purchase-funding-legend article[data-kind="confirmed-support"] i {
  background: #8ec8a0;
}

.house-purchase-funding-legend article[data-kind="gap"] i {
  background: var(--house-coral);
}

.house-purchase-funding-legend span {
  display: flex;
  flex-direction: column;
}

.house-purchase-funding-legend small {
  color: #788f95;
  font-size: 0.61rem;
}

.house-purchase-funding-legend strong {
  color: #edf3f1;
  font-size: 0.76rem;
}

.house-purchase-potential-support {
  margin-top: 15px;
  padding: 11px;
  border: 1px solid rgba(212, 166, 79, 0.42);
  border-radius: 9px;
  background-color: rgba(92, 67, 21, 0.22);
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(212, 166, 79, 0.08) 8px 12px);
  color: #d8c18f;
  font-size: 0.65rem;
}

.house-purchase-potential-support > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.house-purchase-potential-support > div span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(54, 40, 15, 0.58);
}

.house-purchase-chart-wrap {
  min-width: 0;
  padding-top: 5px;
}

.house-purchase-deposit-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  overflow: visible;
}

.house-purchase-chart-grid line {
  stroke: rgba(151, 184, 193, 0.13);
  stroke-width: 1;
}

.house-purchase-chart-target {
  stroke: var(--house-amber);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.house-purchase-chart-date {
  stroke: rgba(116, 185, 221, 0.72);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}

.house-purchase-chart-area {
  fill: url('#house-purchase-gradient');
  fill: rgba(102, 184, 158, 0.14);
}

.house-purchase-chart-line {
  fill: none;
  stroke: var(--house-green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 6px rgba(102, 184, 158, 0.2));
}

.house-purchase-chart-lump {
  fill: var(--house-amber);
  stroke: #182429;
  stroke-width: 2;
}

.house-purchase-chart-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: -8px 7px 0;
  color: #80979d;
  font-size: 0.64rem;
}

.house-purchase-chart-labels strong {
  color: #d5bd85;
  font-weight: 720;
}

.house-purchase-journey-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.house-purchase-journey-breakdown .house-purchase-metric {
  padding: 10px;
}

.house-purchase-scenario-intro,
.house-purchase-supports-intro {
  margin: 2px 0 14px;
  color: #9db0b5;
  font-size: 0.74rem;
  line-height: 1.5;
}

.house-purchase-scenario-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.house-purchase-scenario-controls > legend {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  padding: 0;
  color: #c5d5d7;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.house-purchase-scenario-field .house-purchase-field-label {
  font-size: 0.68rem;
}

.house-purchase-scenario-field .house-purchase-control {
  font-size: 0.78rem;
}

.house-purchase-scenario-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.house-purchase-preset-btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #bad1d6;
  font-size: 0.68rem;
}

.house-purchase-preset-btn.is-reset {
  margin-left: auto;
  border-color: rgba(212, 166, 79, 0.38);
  color: #dec78f;
}

.house-purchase-scenario-deltas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(151, 185, 193, 0.13);
}

.house-purchase-mortgage-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.house-purchase-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(149, 181, 190, 0.14);
  border-radius: 9px;
}

.house-purchase-table {
  width: 100%;
  border-collapse: collapse;
  color: #c8d5d7;
  font-size: 0.71rem;
}

.house-purchase-table th,
.house-purchase-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(149, 181, 190, 0.1);
  text-align: left;
  white-space: nowrap;
}

.house-purchase-table th {
  background: rgba(7, 18, 22, 0.66);
  color: #91a7ad;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.house-purchase-table tr:last-child td {
  border-bottom: 0;
}

.house-purchase-inline-disclosure {
  margin: 12px 0 0;
  color: #84999f;
  font-size: 0.67rem;
  line-height: 1.5;
}

.house-purchase-schemes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.house-purchase-scheme-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 183, 191, 0.15);
  border-radius: 11px;
  background: rgba(7, 18, 22, 0.46);
}

.house-purchase-scheme-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.house-purchase-scheme-header h4 {
  margin: 4px 0 0;
  color: #edf4f2;
  font-size: 0.88rem;
}

.house-purchase-scheme-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 0;
  padding: 11px;
  border-radius: 9px;
  background: rgba(15, 34, 40, 0.68);
  color: #8ea3a9;
  font-size: 0.67rem;
}

.house-purchase-scheme-amount strong {
  color: #ecf4f1;
  font-size: 1rem;
}

.house-purchase-scheme-amount[data-kind="potential"] {
  border: 1px solid rgba(212, 166, 79, 0.34);
  background-color: rgba(92, 67, 21, 0.22);
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(212, 166, 79, 0.08) 8px 12px);
  color: #d6c08e;
}

.house-purchase-scheme-range {
  margin: -5px 0 12px;
  color: #cdbb91;
  font-size: 0.66rem;
  line-height: 1.45;
}

.house-purchase-scheme-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  gap: 7px;
  margin: 0 0 13px;
}

.house-purchase-scheme-facts .house-purchase-metric {
  padding: 9px;
}

.house-purchase-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.house-purchase-criteria-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #c2d0d2;
  font-size: 0.72rem;
}

.house-purchase-criteria-list li > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(133, 158, 166, 0.13);
  color: #9cb0b6;
  font-size: 0.66rem;
  font-weight: 850;
}

.house-purchase-criteria-list li[data-tone="positive"] > span {
  background: rgba(102, 184, 158, 0.18);
  color: #9de1ca;
}

.house-purchase-criteria-list li[data-tone="negative"] > span {
  background: rgba(212, 124, 112, 0.18);
  color: #eeb0a7;
}

.house-purchase-criteria-list li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.house-purchase-criterion-status {
  width: fit-content;
  color: #aabcc0;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.house-purchase-criteria-list li[data-tone="positive"] .house-purchase-criterion-status {
  color: #9de1ca;
}

.house-purchase-criteria-list li[data-tone="negative"] .house-purchase-criterion-status {
  color: #eeb0a7;
}

.house-purchase-criteria-list li[data-tone="warning"] .house-purchase-criterion-status {
  color: #e6ca90;
}

.house-purchase-criteria-list small {
  color: #82979c;
  font-size: 0.65rem;
  line-height: 1.4;
}

.house-purchase-equity-warning {
  margin: 13px 0 0;
  padding: 10px;
  border-left: 3px solid var(--house-amber);
  border-radius: 7px;
  background: rgba(91, 66, 22, 0.2);
  color: #cdbb91;
  font-size: 0.67rem;
  line-height: 1.5;
}

.house-purchase-service-timeline {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(149, 181, 190, 0.12);
}

.house-purchase-service-timeline > strong {
  color: #cddad9;
  font-size: 0.69rem;
}

.house-purchase-service-timeline > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.house-purchase-service-timeline span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(12, 29, 34, 0.62);
  color: #8fa4a9;
}

.house-purchase-service-timeline small,
.house-purchase-service-timeline em {
  font-size: 0.6rem;
  font-style: normal;
}

.house-purchase-service-timeline b {
  color: #e0c88f;
  font-size: 0.68rem;
}

.house-purchase-service-timeline em {
  grid-column: 1 / -1;
}

.house-purchase-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.house-purchase-actions-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(149, 183, 191, 0.13);
  border-radius: 9px;
  background: rgba(7, 18, 22, 0.42);
}

.house-purchase-actions-list li > span {
  color: #7bbfa9;
  font-size: 0.66rem;
  font-weight: 840;
  letter-spacing: 0.07em;
}

.house-purchase-actions-list strong {
  color: #e8f0ee;
  font-size: 0.77rem;
}

.house-purchase-actions-list p {
  margin: 4px 0 0;
  color: #8fa3a8;
  font-size: 0.67rem;
  line-height: 1.46;
}

.house-purchase-assumptions-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #c5d4d6;
  font-size: 0.76rem;
  font-weight: 720;
  list-style: none;
}

.house-purchase-assumptions-details > summary::-webkit-details-marker {
  display: none;
}

.house-purchase-assumptions-details > summary::after {
  content: '+';
  color: #86bea9;
  font-size: 1.2rem;
}

.house-purchase-assumptions-details[open] > summary::after {
  content: '−';
}

.house-purchase-assumptions-details > .house-purchase-table-wrap {
  margin-top: 9px;
}

.house-purchase-assumptions-details h4 {
  margin: 18px 0 9px;
  color: #d8e4e3;
  font-size: 0.78rem;
}

.house-purchase-rule-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.house-purchase-rule-versions article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(7, 18, 22, 0.46);
  color: #879ca1;
  font-size: 0.65rem;
}

.house-purchase-rule-versions strong {
  color: #cbd8d8;
  font-size: 0.7rem;
}

.house-purchase-rule-versions article[data-tone="warning"] {
  border: 1px solid rgba(212, 166, 79, 0.3);
  background: rgba(92, 67, 21, 0.17);
}

.house-purchase-rule-versions em {
  color: #d9c08a;
  font-size: 0.62rem;
  font-style: normal;
  line-height: 1.35;
}

.house-purchase-rule-warning {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 3px solid var(--house-amber);
  border-radius: 7px;
  background: rgba(92, 67, 21, 0.18);
  color: #d4bd89;
  font-size: 0.66rem;
  line-height: 1.45;
}

.house-purchase-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.house-purchase-source-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(116, 185, 221, 0.25);
  border-radius: 999px;
  color: #9bd0e9;
  font-size: 0.66rem;
  font-weight: 680;
  text-decoration: none;
}

.house-purchase-source-links a:hover {
  border-color: rgba(116, 185, 221, 0.62);
  color: #d9eff8;
}

.house-purchase-disclosures {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(148, 181, 190, 0.13);
}

.house-purchase-disclosures p {
  margin: 0;
  color: #7f9499;
  font-size: 0.64rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .house-purchase-funding-card,
  .house-purchase-deposit-card,
  .house-purchase-actions-card,
  .house-purchase-assumptions-card {
    grid-column: 1 / -1;
  }

  .house-purchase-gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-purchase-scenario-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .house-purchase-mortgage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .house-purchase-start-card,
  .house-purchase-hero-layout {
    grid-template-columns: 1fr;
  }

  .house-purchase-start-visual {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(140, 191, 195, 0.18);
  }

  .house-purchase-start-copy {
    padding: 27px;
  }

  .house-purchase-form-grid,
  .house-purchase-schemes-grid {
    grid-template-columns: 1fr;
  }

  .house-purchase-review-grid,
  .house-purchase-hero-metrics,
  .house-purchase-journey-breakdown,
  .house-purchase-scenario-deltas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-purchase-scenario-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .house-purchase-generated-grid {
    display: flex;
    flex-direction: column;
  }

  .house-purchase-generated-grid > .generated-card {
    width: 100%;
  }

  .house-purchase-card,
  .house-purchase-wizard-card {
    padding: 13px;
  }

  .house-purchase-start-card {
    padding: 0;
  }

  .house-purchase-start-visual {
    min-height: 180px;
  }

  .house-purchase-start-copy {
    padding: 22px 18px 24px;
  }

  .house-purchase-start-copy h3 {
    font-size: 1.75rem;
  }

  .house-purchase-start-btn {
    width: 100%;
    min-height: 48px;
  }

  .house-purchase-progress-meta {
    flex-direction: column;
    gap: 4px;
  }

  .house-purchase-step-intro {
    margin: 23px 0 18px;
  }

  .house-purchase-form-group {
    padding: 13px;
  }

  .house-purchase-control,
  .house-purchase-edit-btn,
  .house-purchase-primary-btn,
  .house-purchase-secondary-btn,
  .house-purchase-source-links a {
    min-height: 44px;
  }

  .house-purchase-wizard-navigation {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .house-purchase-wizard-navigation > button,
  .house-purchase-step-actions,
  .house-purchase-step-actions > button {
    width: 100%;
  }

  .house-purchase-step-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-purchase-step-actions > button:only-child {
    grid-column: 1 / -1;
  }

  .house-purchase-hero-layout {
    gap: 24px;
  }

  .house-purchase-hero-story h4 {
    font-size: 1.8rem;
  }

  .house-purchase-gates,
  .house-purchase-review-grid,
  .house-purchase-hero-metrics,
  .house-purchase-journey-breakdown,
  .house-purchase-scenario-controls,
  .house-purchase-scenario-deltas,
  .house-purchase-mortgage-metrics,
  .house-purchase-rule-versions {
    grid-template-columns: 1fr;
  }

  .house-purchase-gate {
    min-height: 0;
  }

  .house-purchase-chart-labels {
    flex-wrap: wrap;
  }

  .house-purchase-chart-labels strong {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .house-purchase-preset-btn {
    min-height: 44px;
    flex: 1 1 calc(50% - 7px);
  }

  .house-purchase-preset-btn.is-reset {
    margin-left: 0;
  }

  .house-purchase-scheme-header {
    align-items: stretch;
    flex-direction: column;
  }

  .house-purchase-service-timeline > div {
    grid-template-columns: 1fr;
  }

  .house-purchase-table th,
  .house-purchase-table td {
    padding: 9px;
  }
}

/* ============================================================================
   THE REPAYMENT-CASE MODULE

   Dark UI shown on a shared screen in daylight, so contrast is not optional.
   One centred column, everything reflowing through auto-fit tracks: nothing
   that holds text has a fixed height, and at phone width the hero pair, the
   charts, the stat row and the notes all collapse to one column on their own.

   Hover lifts by a pixel and brightens a border. Active pushes back down.
   No opacity fades and no scaling -- the only motion that means anything in
   this module is the motion driven by the clock.
   ========================================================================= */

.rcm {
  --rcm-ink: #f4f8fc;
  --rcm-body: #b7c8d9;
  --rcm-muted: #8fa6bc;
  --rcm-faint: #6f8599;
  --rcm-accent: #8dd3ff;
  --rcm-accent-deep: #4eb0ff;
  --rcm-positive: #7ad7b4;
  --rcm-amber: #e2b765;
  --rcm-hairline: rgba(149, 188, 225, 0.18);
  --rcm-divider: rgba(149, 188, 225, 0.13);
  --rcm-panel: rgba(10, 20, 35, 0.55);
  --rcm-track: rgba(149, 188, 225, 0.08);
  --rcm-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  /* The y-scale gutter. In px because the gutter and the x-axis sit in
     different font sizes, and an em in each puts the years out of line with
     the curve they label. */
  --rcm-chart-gutter: 38px;
  --rcm-chart-gap: 8px;

  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 30px);
  color: var(--rcm-ink);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.rcm-eyebrow {
  color: var(--rcm-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.25;
  text-transform: uppercase;
}

.rcm-eyebrow-accent {
  color: var(--rcm-accent);
}

.rcm-eyebrow-amber {
  color: var(--rcm-amber);
}

.rcm-inline-figure {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
}

/* ------------------------------------------------------------- 1. context */

.rcm-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

.rcm-context-facts {
  color: var(--rcm-muted);
  font-family: var(--rcm-mono);
  font-size: 12px;
}

/* --------------------------------------------------------- 2. case ladder */

.rcm-ladder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
  min-width: 0;
}

.rcm-case {
  appearance: none;
  display: block;
  min-width: 0;
  border: 1px solid var(--rcm-hairline);
  border-radius: 12px;
  background: rgba(149, 188, 225, 0.05);
  cursor: pointer;
  padding: 13px 16px 14px;
  text-align: left;
  font-family: inherit;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rcm-case:hover {
  border-color: rgba(141, 211, 255, 0.5);
  transform: translateY(-1px);
}

.rcm-case:active {
  transform: translateY(1px);
}

.rcm-case:focus-visible {
  outline: 2px solid var(--rcm-accent);
  outline-offset: 2px;
}

.rcm-case.is-active {
  border-color: var(--rcm-accent);
  background: rgba(92, 183, 242, 0.16);
}

.rcm-case-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rcm-case-name {
  color: var(--rcm-body);
  font-size: 14px;
  font-weight: 600;
  text-wrap: balance;
}

.rcm-case.is-active .rcm-case-name {
  color: var(--rcm-ink);
}

.rcm-case-amount {
  color: var(--rcm-muted);
  font-family: var(--rcm-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

/* The commitment rail. This is what makes the cards a ladder rather than four
   equal options: the fill is each case's share of the largest amount anyone
   puts in, so increasing commitment is visible before a word is read. */
.rcm-case-rail {
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: rgba(149, 188, 225, 0.14);
}

.rcm-case-rail-fill {
  height: 3px;
  border-radius: 2px;
  background: rgba(141, 211, 255, 0.32);
  transition: background 180ms ease;
}

.rcm-case.is-active .rcm-case-rail-fill {
  background: var(--rcm-accent);
}

/* -------------------------------------------------------- 3. the premise */

.rcm-premise {
  max-width: 74ch;
  margin: 0;
  color: var(--rcm-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------------------------------------------------- 4. lump-sum timing */

.rcm-timing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  border: 1px solid rgba(149, 188, 225, 0.14);
  border-radius: 999px;
  background: rgba(10, 20, 35, 0.5);
  padding: 12px 16px;
  transition: opacity 200ms ease;
}

/* Dimmed rather than hidden, with the sentence saying why: a control that
   vanishes on some cases is a control the client has to rediscover. */
.rcm-timing.is-inactive {
  opacity: 0.5;
}

.rcm-timing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rcm-pill {
  appearance: none;
  border: 1px solid var(--rcm-hairline);
  border-radius: 999px;
  background: rgba(149, 188, 225, 0.06);
  color: var(--rcm-body);
  cursor: pointer;
  padding: 7px 14px;
  font-family: var(--rcm-mono);
  font-size: 12.5px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rcm-pill:hover:not(:disabled) {
  border-color: rgba(141, 211, 255, 0.5);
  transform: translateY(-1px);
}

.rcm-pill:active:not(:disabled) {
  transform: translateY(1px);
}

.rcm-pill:focus-visible {
  outline: 2px solid var(--rcm-accent);
  outline-offset: 2px;
}

.rcm-pill.is-active {
  border-color: var(--rcm-accent);
  background: var(--rcm-accent);
  color: #050a11;
}

.rcm-pill:disabled {
  color: var(--rcm-faint);
  cursor: default;
}

.rcm-timing-note {
  flex: 1 1 260px;
  color: var(--rcm-muted);
  font-size: 12.5px;
  text-wrap: pretty;
}

/* ------------------------------------------------------- 5. the hero card */

.rcm-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--rcm-hairline);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 42, 64, 0.5), rgba(8, 16, 28, 0.86));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  padding: clamp(20px, 3vw, 36px);
}

.rcm-band {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.rcm-hero-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  min-width: 0;
}

.rcm-hero {
  min-width: 0;
}

.rcm-hero .rcm-eyebrow {
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.18em;
}

/* TWO HEROES, EACH PERMANENTLY LABELLED. One hero that changes meaning
   between cases is the defect this replaces: the same large figure read as
   "interest you pay" on one click and "interest you save" on the next. */
.rcm-hero-figure {
  color: var(--rcm-ink);
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.rcm-hero-figure-positive {
  color: var(--rcm-positive);
}

.rcm-hero-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.rcm-hero-money {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: clamp(15px, 2vw, 21px);
}

.rcm-hero-sub {
  max-width: 32ch;
  margin-top: 12px;
  color: var(--rcm-body);
  font-size: 15.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

.rcm-split-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
}

.rcm-split-row-baseline {
  align-items: baseline;
}

.rcm-caption {
  color: var(--rcm-muted);
}

.rcm-label-accent {
  color: var(--rcm-accent);
  font-weight: 600;
}

.rcm-label-positive {
  color: var(--rcm-positive);
  font-weight: 600;
}

.rcm-mono-muted {
  color: var(--rcm-muted);
  font-family: var(--rcm-mono);
  font-size: 12.5px;
}

/* ------------------------------------------------------ band 2: the rail */

.rcm-rail {
  position: relative;
  height: 6px;
  margin-top: 4px;
  border-radius: 3px;
  background: rgba(149, 188, 225, 0.12);
}

.rcm-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rcm-accent-deep), var(--rcm-accent));
}

.rcm-rail-remainder {
  position: absolute;
  top: 0;
  right: 0;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(122, 215, 180, 0.6) 0 6px, transparent 6px 12px);
}

.rcm-rail-marker {
  position: absolute;
  top: -13px;
  width: 2px;
  height: 32px;
  border-radius: 1px;
  background: var(--rcm-ink);
  transform: translateX(-1px);
}

/* The contractual end date, which never moves whatever the client chooses. */
.rcm-rail-end {
  position: absolute;
  top: -9px;
  right: 0;
  width: 1px;
  height: 24px;
  background: rgba(190, 202, 207, 0.4);
}

.rcm-rail-ticks {
  position: absolute;
  top: 15px;
  right: 0;
  left: 0;
  height: 14px;
}

.rcm-rail-tick {
  position: absolute;
  color: var(--rcm-faint);
  font-family: var(--rcm-mono);
  font-size: 10.5px;
  transform: translateX(-50%);
}

.rcm-rail-gutter {
  height: 12px;
}

/* ---------------------------------------------- band 3: the interest bar */

.rcm-interest-bar {
  display: flex;
  height: clamp(58px, 7vw, 78px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--rcm-track);
}

/* THE CUT LINE. The 2px ink border on the right of this segment is the most
   important element in the module: it is what the client's eye is already on
   when the number changes, which is how they learn without being told that
   money going in is the thing that moves it. It must stay visible against
   the fill at both 3% and 39%, so it is ink rather than a tint of the fill. */
.rcm-interest-fill {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  border-right: 2px solid var(--rcm-ink);
  background: linear-gradient(180deg, rgba(78, 176, 255, 0.55), rgba(78, 176, 255, 0.3));
  padding-left: 16px;
}

.rcm-interest-figure {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: clamp(13px, 1.6vw, 17px);
  white-space: nowrap;
}

.rcm-interest-hatch {
  flex: 1;
  min-width: 0;
  background: repeating-linear-gradient(135deg, rgba(122, 215, 180, 0.22) 0 8px, transparent 8px 16px);
}

/* -------------------------------------------------- band 4: the cost bar */

/* Deliberately on the SAME denominator as the interest bar above it. The
   client's own money is not a small grey pill beside a large green saving:
   it is a bar on the same ruler, which is the only honest way to show it. */
.rcm-cost-bar {
  height: clamp(28px, 3.6vw, 38px);
  border-radius: 8px;
  background: var(--rcm-track);
}

.rcm-cost-fill {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 100%;
  min-width: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(226, 183, 101, 0.6), rgba(226, 183, 101, 0.32));
  padding-left: 16px;
}

.rcm-cost-fill.is-empty {
  background: none;
  padding-left: 0;
}

.rcm-cost-figure {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: 13px;
  white-space: nowrap;
}

/* ----------------------------------------------------- band 5: the charts */

.rcm-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(22px, 3vw, 40px);
  min-width: 0;
}

.rcm-chart {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.rcm-chart .rcm-eyebrow {
  letter-spacing: 0.14em;
}

/* The scale lives in a gutter beside the plot, not inside the SVG: these
   charts stretch to their container with preserveAspectRatio="none", which
   would stretch any text drawn in them along with the curve. */
.rcm-chart-plot {
  display: grid;
  grid-template-columns: var(--rcm-chart-gutter) minmax(0, 1fr);
  gap: 0 var(--rcm-chart-gap);
  align-items: stretch;
  min-width: 0;
}

.rcm-chart-yaxis {
  position: relative;
}

/* Positioned against the same two y coordinates the paths are drawn between,
   so a tick names the line it sits on rather than the edge of the box. */
.rcm-chart-ytick {
  position: absolute;
  right: 0;
  color: var(--rcm-faint);
  font-family: var(--rcm-mono);
  font-size: 10.5px;
  line-height: 1;
  transform: translateY(-50%);
  white-space: nowrap;
}

.rcm-chart-area {
  position: relative;
  min-width: 0;
  /* A finger dragging ACROSS the chart reads it; a finger dragging UP still
     scrolls the page. `none` would trap the scroll on a tall phone page where
     two charts sit in the middle of everything else. */
  touch-action: pan-y;
}

.rcm-svg {
  display: block;
  width: 100%;
  height: clamp(130px, 17vw, 186px);
}

/* Distinct from the payoff marker, which is solid ink and means something
   permanent: this one is the client's own pointer and it is dashed. */
.rcm-chart-guide {
  position: absolute;
  top: 0;
  bottom: 14px;
  width: 1px;
  background: repeating-linear-gradient(180deg, rgba(244, 248, 252, 0.55) 0 3px, transparent 3px 6px);
  pointer-events: none;
  transform: translateX(-0.5px);
}

/* Pinned to the top of the plot rather than following the pointer down the
   curve, so a finger never covers the figure it was put there to reveal. */
.rcm-chart-readout {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 100%;
  border: 1px solid rgba(149, 188, 225, 0.28);
  border-radius: 9px;
  background: rgba(6, 14, 26, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  padding: 7px 10px;
  pointer-events: none;
}

/* `display: flex` above outranks the user agent's `[hidden] { display: none }`,
   so without this the empty chip sat on the chart permanently -- a small
   bordered oval floating over the first column, there from page load. */
.rcm-chart-readout[hidden] {
  display: none;
}

.rcm-chart-readout-when {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: 11.5px;
}

.rcm-chart-readout-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 11.5px;
}

/* The label may wrap on a narrow phone; the figure never does. */
.rcm-chart-readout-value {
  white-space: nowrap;
}

.rcm-chart-readout-label {
  color: var(--rcm-muted);
}

.rcm-chart-readout-value {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
}

.rcm-chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--rcm-faint);
  font-family: var(--rcm-mono);
  font-size: 10.5px;
  /* Aligned to the plot, not the gutter, so the years sit under the curve. */
  margin-left: calc(var(--rcm-chart-gutter) + var(--rcm-chart-gap));
}

/* ------------------------------------------------------ 6. the comparison */

.rcm-panel {
  border: 1px solid var(--rcm-hairline);
  border-radius: 16px;
  background: var(--rcm-panel);
  min-width: 0;
}

.rcm-table-panel {
  overflow: hidden;
}

.rcm-table-scroll {
  overflow-x: auto;
}

.rcm-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.rcm-table th {
  color: var(--rcm-muted);
  font-weight: 600;
  padding: 12px 14px;
  text-align: right;
}

.rcm-table th:first-child {
  padding-left: 18px;
  text-align: left;
}

.rcm-table th:last-child,
.rcm-table td:last-child {
  padding-right: 18px;
}

.rcm-table td {
  border-top: 1px solid rgba(149, 188, 225, 0.12);
  color: var(--rcm-body);
  font-family: var(--rcm-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  padding: 12px 14px;
  text-align: right;
}

.rcm-table .rcm-table-case {
  color: var(--rcm-body);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding-left: 18px;
  text-align: left;
}

.rcm-table .rcm-table-per-euro {
  color: var(--rcm-positive);
}

.rcm-table tr.is-active {
  background: rgba(92, 183, 242, 0.1);
}

.rcm-table tr.is-active .rcm-table-case {
  color: var(--rcm-ink);
}

/* ---------------------------------------------------------- 7. the notes */

/* LOAD-BEARING. The per-euro column ranks the cases differently from every
   other measure on the screen, and without these two paragraphs a client
   reads that difference as a contradiction. */
.rcm-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px 36px;
  padding: clamp(18px, 2.4vw, 28px);
}

.rcm-note {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

.rcm-note-body {
  margin: 0;
  color: var(--rcm-body);
  font-size: 14.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ------------------------------------------- 8. keep the term instead */

.rcm-reduction {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--rcm-hairline);
  padding-top: clamp(30px, 4vw, 48px);
}

.rcm-reduction-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rcm-reduction-title {
  max-width: 26ch;
  margin: 0;
  color: var(--rcm-ink);
  font-family: 'Iowan Old Style', 'Source Serif 4', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.rcm-reduction-lede {
  max-width: 64ch;
  margin: 0;
  color: var(--rcm-body);
  font-size: 15.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

.rcm-reduction-card {
  gap: clamp(24px, 3vw, 34px);
}

.rcm-payment-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rcm-reduction-figure {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: clamp(20px, 3.4vw, 34px);
}

/* Both bars share one scale from zero, so a repayment that falls by eight per
   cent is drawn falling by eight per cent. The difference figure is NOT put
   inside the gap between them -- at true scale it never fits. */
.rcm-payment-bar {
  position: relative;
  height: clamp(30px, 4vw, 40px);
  border-radius: 8px;
  background: rgba(149, 188, 225, 0.06);
}

.rcm-payment-fill-now {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(149, 188, 225, 0.34), rgba(149, 188, 225, 0.18));
}

.rcm-payment-fill-after {
  height: 100%;
  border-radius: 8px;
  border-right: 2px solid var(--rcm-ink);
  background: linear-gradient(180deg, rgba(226, 183, 101, 0.55), rgba(226, 183, 101, 0.3));
}

.rcm-payment-hatch {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 8px 8px 0;
  background: repeating-linear-gradient(135deg, rgba(226, 183, 101, 0.18) 0 8px, transparent 8px 16px);
}

.rcm-payment-caption {
  color: var(--rcm-muted);
  font-size: 12.5px;
  text-align: right;
}

.rcm-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 18px 30px;
  border-top: 1px solid rgba(149, 188, 225, 0.14);
  padding-top: clamp(4px, 1vw, 8px);
}

.rcm-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rcm-stat-value {
  color: var(--rcm-ink);
  font-family: var(--rcm-mono);
  font-size: 19px;
}

.rcm-reduction-note {
  max-width: 72ch;
  margin: 0;
  color: var(--rcm-body);
  font-size: 14.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ------------------------------------------------------- 9. disclosure */

.rcm-disclosure {
  max-width: 78ch;
  margin: 0;
  color: var(--rcm-faint);
  font-size: 12.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* A stadium radius is a pill only while the row is one line. Once the year
   pills wrap onto a second row it becomes a lozenge with the label floating
   inside the curve, so at phone width it goes back to being a panel. */
@media (max-width: 640px) {
  .rcm-timing {
    border-radius: 16px;
  }
}

/* Under reduced motion the clock runs at zero duration, so nothing here
   should be transitioning either. */
@media (prefers-reduced-motion: reduce) {
  .rcm-case,
  .rcm-pill,
  .rcm-case-rail-fill,
  .rcm-timing {
    transition: none;
  }

  .rcm-case:hover,
  .rcm-case:active,
  .rcm-pill:hover:not(:disabled),
  .rcm-pill:active:not(:disabled) {
    transform: none;
  }
}
#clientVoiceNote[hidden] { display: none !important; }
#clientVoiceNote .voice-download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#clientVoiceNote h4, #clientVoiceNote p { margin: 0; }

/* ============================================================================
   THE FUTURE COST FUND

   The fund over the years, in the brand tokens at the top of this file. One
   element carries the screen: the line. Everything around it stays quiet.
   Blue marks the fund and the selected case; green appears once, as the dot
   beside "Covered", and never without that word. Text stays in text colours.

   Nothing animates through CSS. The only motion in this module is the fund
   line travelling between cases, and that is driven by the module's own clock
   so that it can be settled, cancelled and left alone under reduced motion.
   ========================================================================= */

.fcf {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(16px, 2vw, 26px);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.fcf-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.14;
}

.fcf-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.25vw, 20px);
  font-weight: 500;
  line-height: 1.4;
}

.fcf-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: clamp(8px, 1vw, 16px);
  min-width: 0;
}

.fcf-case {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-ui);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.fcf-case:hover {
  border-color: rgba(106, 167, 200, 0.6);
}

.fcf-case:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.fcf-case.is-active {
  border-color: var(--electric-blue);
  background: var(--bg-1);
  box-shadow: 0 0 0 1px var(--electric-blue);
}

.fcf-case-name {
  font-size: clamp(15px, 1.35vw, 22px);
  font-weight: 600;
  line-height: 1.25;
}

.fcf-case.is-active .fcf-case-name {
  font-weight: 800;
}

.fcf-case-amount {
  color: var(--muted);
  font-size: clamp(13px, 1.1vw, 18px);
  font-weight: 500;
  line-height: 1.35;
}

.fcf-headline {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  text-wrap: balance;
}

.fcf-support {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.15vw, 22px);
  font-weight: 500;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ chart */

.fcf-chart {
  position: relative;
  width: 100%;
  min-width: 0;
}

.fcf-chart.has-header-row {
  margin-top: 44px;
}

.fcf-panel {
  position: absolute;
  top: 0;
  border-radius: var(--radius-card);
  background: var(--bg-1);
}

.fcf-svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}

.fcf-grid {
  stroke: rgba(247, 244, 238, 0.12);
  stroke-width: 1;
}

.fcf-base {
  stroke: rgba(247, 244, 238, 0.32);
  stroke-width: 1;
}

.fcf-area {
  fill: rgba(106, 167, 200, 0.3);
  stroke: none;
}

.fcf-line {
  fill: none;
  stroke: var(--electric-blue);
  stroke-linejoin: round;
  stroke-width: 3;
}

.fcf-chart.is-narrow .fcf-line {
  stroke-width: 2.5;
}

.fcf-grid-label {
  position: absolute;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.fcf-chart.is-narrow .fcf-grid-label {
  font-size: 11px;
  line-height: 16px;
}

.fcf-block {
  position: absolute;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(247, 244, 238, 0.92);
  border-radius: 4px;
  background: rgba(247, 244, 238, 0.08);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

.fcf-chart.is-narrow .fcf-block {
  border-radius: 3px;
}

.fcf-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-green);
}

.fcf-panel-head {
  position: absolute;
}

.fcf-panel-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
}

.fcf-panel-amount {
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
}

.fcf-panel-covered {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

.fcf-chart.is-narrow .fcf-panel-title {
  font-size: 13px;
  line-height: 18px;
}

.fcf-chart.is-narrow .fcf-panel-covered {
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.fcf-chart.is-narrow .fcf-panel-covered .fcf-dot {
  width: 8px;
  height: 8px;
}

.fcf-panel-head.is-above {
  text-align: right;
}

.fcf-panel-head.is-above .fcf-panel-covered {
  justify-content: flex-end;
}

.fcf-label {
  position: absolute;
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  white-space: nowrap;
}

.fcf-label-muted {
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.fcf-label-fund {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.fcf-chart.is-narrow .fcf-label {
  font-size: 14px;
  line-height: 20px;
}

.fcf-chart.is-narrow .fcf-label-muted,
.fcf-chart.is-narrow .fcf-label-fund {
  font-size: 12px;
  line-height: 16px;
  white-space: normal;
}

.fcf-tick {
  position: absolute;
  width: 1px;
  height: 8px;
  background: rgba(247, 244, 238, 0.32);
}

.fcf-axis-label {
  position: absolute;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.fcf-axis-label.is-cost {
  color: var(--text);
  font-weight: 700;
}

.fcf-chart.is-narrow .fcf-axis-label {
  font-size: 12px;
  line-height: 16px;
}

.fcf-chart.is-narrow .fcf-axis-label.is-first {
  transform: none;
}

/* ------------------------------------------------------------- under it */

.fcf-covered {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.fcf-by-year {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.fcf-covered[hidden],
.fcf-by-year[hidden] {
  display: none;
}

.fcf-footnote {
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, 1vw, 18px);
  font-weight: 500;
  line-height: 1.45;
}

/* ======================================================================
   Household cash flow (.hcf-)

   After everything you pay, what is left each year. A staircase on a wide
   screen and a single bar on a phone, drawn by js/household_cash_flow_module.js
   from the geometry in js/household_cash_flow_view.js. Every mark is placed
   there; this block only dresses it.
   ====================================================================== */

.hcf {
  --hcf-income: #7d8a92;
  --hcf-cost: #434f58;
  --hcf-changed: #3f7391;
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(16px, 2vw, 26px);
  /* Amounts are centred on their bar and may reach a little past the plot. */
  padding-inline: 28px;
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.hcf [hidden] {
  display: none !important;
}

.hcf-probe {
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.hcf-muted {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.35vw, 26px);
  font-weight: 500;
  line-height: 1.2;
}

.hcf-heading {
  margin: 6px 0 0;
  font-size: clamp(24px, 3.1vw, 60px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.hcf-cases {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.hcf-case {
  appearance: none;
  min-height: 64px;
  padding: 8px 29px;
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: var(--radius-ui);
  background: var(--bg-1);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(15px, 1.25vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.hcf-case:hover {
  border-color: rgba(106, 167, 200, 0.6);
}

.hcf-case:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* The thicker border is the non-colour cue, with aria-pressed. The padding
   gives back what the border takes, on every side, so the button is the same
   size selected even when its text is three lines and sets the height. */
.hcf-case.is-active {
  padding: 7px 28px;
  border: 2px solid var(--electric-blue);
  background: rgba(106, 167, 200, 0.16);
  color: var(--text);
}

.hcf.is-bar .hcf-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hcf.is-bar .hcf-case {
  padding: 8px 13px;
  font-size: 15px;
}

.hcf.is-bar .hcf-case.is-active {
  padding: 7px 12px;
}

/* ------------------------------------------------------------------ answer */

.hcf-stage {
  display: block;
  min-width: 0;
}

.hcf-stage.is-beside {
  display: flex;
  align-items: flex-end;
  gap: 48px;
}

.hcf-answer {
  display: flex;
  flex-direction: column;
}

.hcf-stage.is-beside .hcf-answer {
  width: 328px;
  flex: none;
}

.hcf-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 1.5vw, 28px);
  font-weight: 600;
  line-height: 1.2;
}

.hcf-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--muted);
}

.hcf-swatch.is-left_over {
  background: var(--accent-green);
}

.hcf-swatch.is-tight {
  background: var(--accent-amber);
}

.hcf-swatch.is-short {
  background: var(--accent-red);
}

.hcf-figure {
  margin-top: 12px;
  font-size: clamp(44px, 4.2vw, 80px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.hcf-unit {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 28px);
  font-weight: 500;
  line-height: 1.2;
}

.hcf-monthly {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 24px);
  font-weight: 500;
  line-height: 1.2;
}

.hcf-sentence {
  margin: 0;
  font-size: clamp(18px, 2.1vw, 40px);
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.hcf.is-bar .hcf-sentence {
  min-height: 5.6em;
  font-size: 18px;
  line-height: 1.4;
}

.hcf-footnote {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 500;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ chart */

.hcf-chart {
  position: relative;
  min-width: 0;
}

.hcf-floor {
  position: absolute;
  height: 1px;
  background: rgba(247, 244, 238, 0.32);
}

/* Once a case runs below it, the floor is the line the picture reads against. */
.hcf-floor.has-band {
  background: rgba(247, 244, 238, 0.55);
}

.hcf-zero {
  position: absolute;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.hcf-connector {
  position: absolute;
  height: 1px;
  background: rgba(247, 244, 238, 0.3);
}

.hcf-bar {
  position: absolute;
  background: var(--hcf-cost);
}

.hcf-bar.is-income {
  background: var(--hcf-income);
}

.hcf-bar.is-changed {
  background: var(--hcf-changed);
}

.hcf-bar.is-left {
  background: var(--accent-green);
}

/* What is short hangs below the floor. Red always sits beside the word "Short". */
.hcf-bar.is-short {
  background: var(--accent-red);
}

/* Today's bar where it was: an outline, never a fill. */
.hcf-outline {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid rgba(247, 244, 238, 0.55);
  pointer-events: none;
}

.hcf-amount {
  position: absolute;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.hcf-name {
  position: absolute;
  text-align: center;
}

.hcf-name-label {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.hcf-name-delta {
  margin-top: 6px;
  font-weight: 500;
  line-height: 1.2;
}

.hcf-amount.is-quiet,
.hcf-name.is-quiet {
  opacity: 0.55;
}

.hcf-key {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.hcf-key-swatch {
  display: inline-block;
  width: 36px;
  height: 18px;
  box-sizing: border-box;
  border: 1.5px solid rgba(247, 244, 238, 0.55);
}

.hcf-last-label {
  position: absolute;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.hcf-last-label-today {
  color: var(--muted);
}

.hcf-end-mark {
  position: absolute;
  height: 3px;
  background: var(--accent-amber);
  opacity: 0;
}

/* -------------------------------------------------------------------- bar */

.hcf-bar-head {
  position: absolute;
  top: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  white-space: nowrap;
}

.hcf-bar-head-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}

.hcf-bar-head-amount {
  font-size: 17px;
  font-weight: 700;
  line-height: 20px;
}

.hcf-bar-rule {
  position: absolute;
  top: 32px;
  height: 1px;
  background: rgba(247, 244, 238, 0.18);
}

.hcf-track {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg-0);
}

.hcf-segment {
  position: absolute;
  left: 0;
  background: var(--hcf-cost);
}

.hcf-segment.is-changed {
  background: var(--hcf-changed);
}

.hcf-segment.is-left {
  background: var(--accent-green);
}

.hcf-segment.is-short {
  background: var(--accent-red);
}

/* Where income ends, across the bar, once a case runs past it. */
.hcf-bar-income-end {
  position: absolute;
  height: 1px;
  background: rgba(247, 244, 238, 0.6);
  pointer-events: none;
}

.hcf-cleared-tick {
  position: absolute;
  left: 0;
  height: 3px;
  background: var(--electric-blue);
  opacity: 0;
}

.hcf-bar-end-mark {
  position: absolute;
  left: 0;
  height: 4px;
  background: var(--accent-amber);
  opacity: 0;
}

.hcf-row {
  position: absolute;
}

.hcf-row-stub {
  position: absolute;
  top: 10px;
  left: -16px;
  width: 12px;
  height: 1px;
  background: rgba(247, 244, 238, 0.4);
}

.hcf-row-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.hcf-row-name {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.hcf-row-leader {
  flex: 1;
  height: 1px;
  align-self: flex-end;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(247, 244, 238, 0.14);
}

.hcf-row-amount {
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 20px;
}

.hcf-row-delta {
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.hcf.is-compact .hcf-bar-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  white-space: normal;
}

.hcf.is-compact .hcf-bar-head-amount {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hcf.is-compact .hcf-row-line {
  display: block;
  white-space: normal;
}

.hcf.is-compact .hcf-row-name,
.hcf.is-compact .hcf-row-amount {
  display: block;
  overflow-wrap: anywhere;
}

.hcf.is-compact .hcf-row-leader {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hcf * {
    transition: none !important;
  }
}

/* ======================================================= Protection gap (.pg-) */

.pg {
  --pg-floor: rgba(106, 167, 200, 0.66);
  --pg-earn: rgba(106, 167, 200, 0.38);
  --pg-short: rgba(201, 111, 98, 0.42);
  --pg-filled: rgba(102, 184, 158, 0.5);
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.pg--rail {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  column-gap: 116px;
  align-items: start;
  padding-right: 20px;
}

.pg-rail,
.pg-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 28px;
}

.pg--rail .pg-rail {
  gap: 48px;
}

.pg-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.pg-household {
  margin: 10px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 38px;
}

.pg-household[hidden],
.pg-status[hidden],
.pg-seg-l2[hidden],
.pg-seg-text[hidden],
.pg-label[hidden],
.pg-bracket[hidden],
.pg-word[hidden],
.pg-end[hidden],
.pg-end-tick[hidden] {
  display: none;
}

.pg-savings {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 30px;
}

.pg-cases {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.pg--row .pg-cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.pg-case {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  padding: 6px 24px;
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: var(--radius-ui);
  background: var(--bg-1);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

.pg-case:hover {
  border-color: rgba(247, 244, 238, 0.34);
  color: var(--text);
}

.pg-case:focus-visible {
  outline: 3px solid var(--electric-blue);
  outline-offset: 3px;
}

/* The same outer size selected or not: the thicker edge is an inset shadow. */
.pg-case.is-active {
  border-color: var(--electric-blue);
  background: rgba(106, 167, 200, 0.14);
  box-shadow: inset 0 0 0 1px var(--electric-blue);
  color: var(--text);
  font-weight: 700;
}

.pg-headline {
  margin: 0;
  font-size: clamp(30px, 2.7vw, 52px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Line 1 and the status word sit on one line; line 2 starts the next. */
.pg-line1 {
  display: inline;
}

.pg-line2 {
  display: block;
}

.pg-status {
  display: inline-block;
  margin-left: 14px;
  color: var(--accent-amber);
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}

.pg-sentence {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 26px);
  font-weight: 500;
  line-height: 1.32;
}

.pg-block {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.pg-caption {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.pg-bar,
.pg-strip {
  position: relative;
  min-width: 0;
  width: 100%;
}

.pg-track,
.pg-strip-track {
  position: absolute;
  left: 0;
  background: var(--bg-1);
}

.pg-seg,
.pg-gap,
.pg-fill,
.pg-short,
.pg-divider,
.pg-bracket,
.pg-need-tick,
.pg-end-tick,
.pg-axis-tick {
  position: absolute;
}

.pg-seg {
  overflow: hidden;
  box-shadow: inset 1px 0 0 var(--bg-0);
}

.pg-seg-floor {
  background: var(--pg-floor);
}

.pg-seg-takeHome {
  background: var(--pg-earn);
}

.pg-seg-text {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 360px;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
}

.pg-seg-floor .pg-seg-text {
  width: 220px;
  padding: 0 14px;
}

.pg-seg-l1,
.pg-seg-l2 {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
}

.pg-seg-floor .pg-seg-l1,
.pg-seg-floor .pg-seg-l2 {
  font-size: 16px;
  line-height: 18px;
}

.pg-seg-amount {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 32px;
}

.pg-seg-floor .pg-seg-amount {
  font-size: 26px;
  line-height: 30px;
}

.pg-gap {
  background: var(--pg-short);
}

.pg.is-left-over .pg-gap {
  background: var(--pg-filled);
}

.pg-bracket {
  box-sizing: border-box;
  border: 2px solid rgba(247, 244, 238, 0.55);
  border-bottom: none;
}

.pg-need-tick,
.pg-end-tick {
  width: 2px;
  background: var(--text);
}

.pg-label {
  position: absolute;
  white-space: nowrap;
}

.pg-label-title {
  display: block;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
}

.pg-label[data-key='gap'] .pg-label-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.pg-label-amount {
  display: block;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
}

.pg-label[data-key^='seg'] .pg-label-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.pg-label[data-key^='seg'] .pg-label-amount {
  font-size: 22px;
  line-height: 26px;
}

.pg-scale {
  position: absolute;
  color: var(--muted);
  font-size: 18px;
  line-height: 22px;
}

.pg-scale-start {
  left: 0;
}

.pg-scale-end {
  right: 0;
}

.pg-fill {
  background: var(--pg-filled);
}

.pg-short {
  background: var(--pg-short);
}

.pg-divider {
  width: 1px;
  background: rgba(247, 244, 238, 0.12);
}

.pg-divider.is-year {
  background: rgba(247, 244, 238, 0.4);
}

.pg-word {
  position: absolute;
  display: flex;
  align-items: center;
  font-size: 30px;
  font-weight: 600;
  white-space: nowrap;
}

.pg-end {
  position: absolute;
  text-align: right;
  white-space: nowrap;
}

.pg-end-lead {
  display: block;
  color: var(--muted);
  font-size: 20px;
  line-height: 24px;
}

.pg-end-text {
  display: block;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 72px;
}

.pg-axis-tick {
  width: 1px;
  height: 10px;
  background: rgba(247, 244, 238, 0.5);
}

.pg-axis-name {
  position: absolute;
  color: var(--muted);
  font-size: 20px;
  line-height: 24px;
  white-space: nowrap;
}

.pg-axis-name.is-center {
  transform: translateX(-50%);
}

.pg-axis-name.is-right {
  transform: translateX(-100%);
}

.pg-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

/* The phone: smaller type, the same drawing. */
.pg.is-narrow .pg-kicker { font-size: 15px; line-height: 20px; }
.pg.is-narrow .pg-household { font-size: 20px; line-height: 28px; margin-top: 2px; }
.pg.is-narrow .pg-savings { font-size: 16px; line-height: 22px; margin-top: 2px; }
.pg.is-narrow .pg-case { min-height: 56px; padding: 6px 14px; font-size: 16px; }
.pg.is-narrow .pg-headline { font-size: 28px; line-height: 34px; }
.pg.is-narrow .pg-status { margin-left: 10px; }
.pg.is-narrow .pg-sentence { font-size: 16px; line-height: 22px; }
.pg.is-narrow .pg-caption { font-size: 15px; line-height: 20px; }
.pg.is-narrow .pg-seg-text { width: 200px; padding: 0 8px; }
.pg.is-narrow .pg-seg-l1,
.pg.is-narrow .pg-seg-l2 { font-size: 14px; line-height: 18px; }
.pg.is-narrow .pg-seg-amount,
.pg.is-narrow .pg-seg-floor .pg-seg-amount { font-size: 20px; line-height: 24px; }
.pg.is-narrow .pg-label-title { font-size: 15px; line-height: 20px; }
.pg.is-narrow .pg-label[data-key='gap'] .pg-label-title { font-size: 15px; }
.pg.is-narrow .pg-label-amount { font-size: 20px; line-height: 26px; }
.pg.is-narrow .pg-label[data-key^='seg'] .pg-label-title { font-size: 14px; line-height: 18px; }
.pg.is-narrow .pg-label[data-key^='seg'] .pg-label-amount { font-size: 18px; line-height: 22px; }
.pg.is-narrow .pg-scale { font-size: 14px; line-height: 18px; }
.pg.is-narrow .pg-word { font-size: 16px; }
.pg.is-narrow .pg-end-lead { font-size: 15px; line-height: 20px; }
.pg.is-narrow .pg-end-text { font-size: 32px; line-height: 40px; }
.pg.is-narrow .pg-axis-name { font-size: 15px; line-height: 20px; }
.pg.is-narrow .pg-footnote { font-size: 14px; line-height: 20px; }

/* =========================================================================
   RENTAL, KEEP OR SELL

   One bar, cut down step by step from the headline to what is left, in the
   brand tokens at the top of this file. One element carries the screen: the
   bars. Everything around it stays quiet. Blue is the headline; the result is
   green when money is left over and red when it is short, and is always
   beside its word. Text stays in text colours.

   Nothing animates through CSS. The only motion in this module is the bars
   travelling between Keep and Sell, and that is driven by the module's own
   clock so that it can be settled, cancelled and left alone under reduced
   motion.

   The sizes below are the ones js/rental_keep_or_sell_view.js lays out with.
   ========================================================================= */

.rks {
  --rks-selected: #16222b;
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(16px, 2vw, 26px);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.rks-title {
  max-width: 1500px;
  margin: 0;
  font-size: clamp(20px, 2.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.24;
}

.rks-cases {
  display: grid;
  max-width: 1060px;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: clamp(8px, 1vw, 20px);
}

.rks-case {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border: 2px solid rgba(247, 244, 238, 0.14);
  border-radius: var(--radius-ui);
  background: var(--bg-1);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.rks.is-narrow .rks-cases {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rks:not(.is-narrow) .rks-case {
  min-height: 88px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.rks-case:hover {
  border-color: rgba(106, 167, 200, 0.6);
}

.rks-case:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.rks-case.is-active {
  border-color: var(--electric-blue);
  background: var(--rks-selected);
}

.rks-case-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.rks:not(.is-narrow) .rks-case-name {
  font-size: clamp(20px, 1.55vw, 30px);
}

.rks-case.is-active .rks-case-name {
  font-weight: 800;
}

.rks-case-answer {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.rks:not(.is-narrow) .rks-case-answer {
  font-size: clamp(16px, 1.35vw, 26px);
}

/* ------------------------------------------------------------------ stage */

.rks-stage {
  min-width: 0;
  padding: 30px 48px 40px;
  border-radius: var(--radius-card);
  background: var(--bg-1);
}

.rks-stage.is-narrow {
  padding: 20px 16px;
}

.rks-headline {
  min-height: 2.72em;
  margin: 0 0 clamp(16px, 2vw, 32px);
  font-size: clamp(16px, 1.45vw, 28px);
  font-weight: 500;
  line-height: 1.36;
}

.rks-stage.is-narrow .rks-headline {
  min-height: 69px;
  font-size: 16px;
  line-height: 23px;
}

.rks-chart {
  position: relative;
  min-width: 0;
}

.rks-chart.is-narrow {
  margin: 0 auto;
}

.rks-zero {
  position: absolute;
  top: 0;
  width: 0;
  border-left: 1px solid rgba(247, 244, 238, 0.45);
}

.rks-headline-line {
  position: absolute;
  top: 0;
  width: 0;
  border-left: 1px dashed rgba(247, 244, 238, 0.3);
}

.rks-zero-label {
  position: absolute;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 20px;
  line-height: 28px;
}

.rks-chart.is-narrow .rks-zero-label {
  font-size: 14px;
  line-height: 22px;
}

.rks-connector {
  position: absolute;
  width: 1px;
  background: rgba(247, 244, 238, 0.35);
}

.rks-bar {
  position: absolute;
  border-radius: 4px;
}

.rks-bar.is-start {
  background: var(--electric-blue);
}

.rks-bar.is-cut {
  background: rgba(247, 244, 238, 0.28);
}

.rks-bar.is-result.is-left-over {
  background: var(--accent-green);
}

.rks-bar.is-result.is-short {
  background: var(--accent-red);
}

.rks-bar.is-result.is-level {
  background: rgba(247, 244, 238, 0.55);
}

.rks-name {
  position: absolute;
  overflow: hidden;
  color: var(--muted);
  font-size: 25px;
  font-weight: 500;
  /* A name that is too long wraps to a second line. The layout sizes the box
     for it, so it is never cut off. */
  white-space: normal;
}

.rks-name.is-start,
.rks-name.is-result {
  color: var(--text);
  font-weight: 700;
}

.rks-chart.is-narrow .rks-name {
  /* A name sits on its bar. When the box is two lines tall for a long name, a
     short one is not left hanging at the top of it. */
  display: flex;
  align-items: flex-end;
  padding-right: 6px;
  background: var(--bg-1);
  font-size: 16px;
}

/* A name or a label sits over the zero and headline lines, so the lines stop
   behind it. The shadow widens the mask without moving the text. */
.rks-label {
  position: absolute;
  background: var(--bg-1);
  box-shadow: -6px 0 0 0 var(--bg-1), 6px 0 0 0 var(--bg-1);
  white-space: nowrap;
}

.rks-value {
  color: var(--text);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rks-word {
  margin-left: 12px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
}

.rks-word[hidden] {
  display: none;
}

.rks-chart.is-narrow .rks-value {
  font-size: 19px;
}

.rks-chart.is-narrow .rks-word {
  margin-left: 6px;
  font-size: 14px;
}

/* On a very narrow chart the word sits under the number, so the bars keep
   their room. */
.rks-chart.is-stacked .rks-label {
  white-space: normal;
}

.rks-chart.is-stacked .rks-value,
.rks-chart.is-stacked .rks-word {
  display: block;
}

.rks-chart.is-stacked .rks-value {
  line-height: 22px;
}

.rks-chart.is-stacked .rks-word {
  margin-left: 0;
  line-height: 16px;
}

.rks-chart.is-stacked .rks-word[hidden] {
  display: none;
}

.rks-footnote {
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, 1vw, 20px);
  font-weight: 500;
  line-height: 1.45;
}

/* =========================================================================
   HOME, TRADE DOWN

   A home budget built from two blocks, in the brand tokens at the top of this
   file: the money from selling after buying costs, and a new loan whose block
   changes by case. Beside it, a track of what is repaid on the mortgage today,
   split into what is still repaid and what is freed. One element carries the
   screen: the bar. Everything around it stays quiet. Blue is the home; green
   appears only as the freed part of the track, and always beside the word
   "Freed". Text stays in text colours.

   The home and the year are on different scales, and each says so. Nothing
   animates through CSS. The only motion in this module is the blocks and the
   track travelling between cases, and that is driven by the module's own clock
   so that it can be settled, cancelled and left alone under reduced motion.

   The sizes below are the ones js/home_trade_down_view.js lays out with.
   ========================================================================= */

.htd {
  --htd-selected: #16222b;
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(16px, 2vw, 26px);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.htd-title {
  max-width: 1300px;
  margin: 0;
  font-size: clamp(20px, 2.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.24;
}

.htd-cases {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 405px));
  gap: clamp(8px, 1vw, 20px);
}

.htd.is-narrow .htd-cases {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.htd-case {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: 2px solid rgba(247, 244, 238, 0.14);
  border-radius: var(--radius-ui);
  background: var(--bg-1);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.htd:not(.is-narrow) .htd-case {
  min-height: 88px;
  padding: 0 24px;
}

.htd-case:hover {
  border-color: rgba(106, 167, 200, 0.6);
}

.htd-case:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

.htd-case.is-active {
  border-color: var(--electric-blue);
  background: var(--htd-selected);
}

.htd-case-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.htd:not(.is-narrow) .htd-case-name {
  font-size: clamp(20px, 1.4vw, 27px);
}

.htd-case.is-active .htd-case-name {
  font-weight: 800;
}

.htd-case-sub {
  display: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.htd:not(.is-narrow) .htd-case-sub {
  display: block;
  font-size: clamp(16px, 1.15vw, 22px);
}

/* ------------------------------------------------------------------ stage */

.htd-stage {
  min-width: 0;
  padding: 30px 48px 40px;
  border-radius: var(--radius-card);
  background: var(--bg-1);
}

.htd-stage.is-narrow {
  padding: 20px 16px;
}

.htd-headline {
  min-height: 2.72em;
  margin: 0 0 clamp(16px, 2vw, 32px);
  font-size: clamp(16px, 1.45vw, 28px);
  font-weight: 500;
  line-height: 1.36;
}

.htd-stage.is-narrow .htd-headline {
  min-height: 69px;
  font-size: 16px;
  line-height: 23px;
}

.htd-chart {
  position: relative;
  min-width: 0;
}

.htd-chart.is-narrow {
  margin: 0 auto;
}

/* ---------------------------------------------------------------- the home */

.htd-figure {
  position: absolute;
  line-height: 84px;
  white-space: nowrap;
}

.htd-figure-value {
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.htd-figure-word {
  margin-left: 16px;
  color: var(--muted);
  font-size: 26px;
  font-weight: 500;
}

.htd-chart.is-narrow .htd-figure {
  line-height: 52px;
}

.htd-chart.is-narrow .htd-figure-value {
  font-size: 44px;
}

.htd-chart.is-narrow .htd-figure-word {
  margin-left: 10px;
  font-size: 16px;
}

.htd-today-line {
  position: absolute;
  width: 0;
  border-left: 1px dashed rgba(247, 244, 238, 0.4);
}

.htd-today-label {
  position: absolute;
  color: var(--muted);
  font-size: 22px;
  line-height: 30px;
}

.htd-today-name,
.htd-today-value {
  display: block;
}

.htd-today-value {
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
}

.htd-chart.is-narrow .htd-today-label {
  font-size: 14px;
  line-height: 18px;
  text-align: right;
}

.htd-chart.is-narrow .htd-today-name,
.htd-chart.is-narrow .htd-today-value {
  display: inline;
}

.htd-chart.is-narrow .htd-today-value {
  margin-left: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.htd-block {
  position: absolute;
}

.htd-block.is-one {
  border-radius: 4px 0 0 4px;
  background: var(--electric-blue);
}

.htd-block.is-two {
  border-radius: 0 4px 4px 0;
  background: rgba(106, 167, 200, 0.28);
  box-shadow: inset 0 0 0 2px var(--electric-blue);
}

.htd-label {
  position: absolute;
}

.htd-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 44px;
}

.htd-name {
  color: var(--muted);
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
}

.htd-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}

.htd-note[hidden] {
  display: none;
}

.htd-chart.is-narrow .htd-amount {
  font-size: 20px;
  line-height: 26px;
}

.htd-chart.is-narrow .htd-name {
  font-size: 14px;
  line-height: 18px;
}

.htd-note-full {
  position: absolute;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 17px;
}

/* ---------------------------------------------------------------- the year */

.htd-rule {
  position: absolute;
  width: 0;
  height: 0;
  border: 0 solid rgba(247, 244, 238, 0.14);
}

.htd-chart:not(.is-narrow) .htd-rule {
  border-left-width: 1px;
}

.htd-chart.is-narrow .htd-rule {
  border-top-width: 1px;
}

.htd-freed {
  position: absolute;
  white-space: nowrap;
}

.htd-freed-value {
  display: block;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 84px;
}

.htd-freed-word {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
}

.htd-chart.is-narrow .htd-freed-value,
.htd-chart.is-narrow .htd-freed-word {
  display: inline;
}

.htd-chart.is-narrow .htd-freed-value {
  font-size: 40px;
  line-height: 48px;
}

.htd-chart.is-narrow .htd-freed-word {
  margin-left: 10px;
  font-size: 16px;
}

.htd-track {
  position: absolute;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(247, 244, 238, 0.08);
}

.htd-track-repaid {
  position: absolute;
  background: rgba(247, 244, 238, 0.26);
}

.htd-track-freed {
  position: absolute;
  background: var(--accent-green);
}

.htd-row {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.htd-row-name {
  color: var(--muted);
  font-size: 24px;
}

.htd-row-value {
  font-size: 28px;
  font-weight: 700;
}

.htd-chart.is-narrow .htd-row-name {
  font-size: 16px;
}

.htd-chart.is-narrow .htd-row-value {
  font-size: 18px;
}

.htd-track-note {
  position: absolute;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}

.htd-chart.is-narrow .htd-track-note {
  font-size: 13px;
  line-height: 17px;
}

/* ------------------------------------------------------------- compact */

/* A chart under 400px (a phone: the app's shell leaves 252px for the module on
   a 320px one). The figures put their word beneath them, the two labels sit one
   above the other behind a swatch of their block, and each year row puts its
   name over its amount. Sizes the figure and the freed amount are fitted in
   js/home_trade_down_view.js and set inline. */

.htd-chart.is-compact .htd-figure {
  line-height: 1.15;
  white-space: normal;
}

.htd-chart.is-compact .htd-figure-value,
.htd-chart.is-compact .htd-figure-word {
  display: block;
}

.htd-chart.is-compact .htd-figure-word {
  margin-left: 0;
  font-size: 16px;
  line-height: 20px;
}

.htd-chart.is-compact .htd-today-label {
  white-space: nowrap;
}

.htd-chart.is-compact .htd-label {
  box-sizing: border-box;
  padding-left: 20px;
}

.htd-chart.is-compact .htd-label::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  content: '';
}

.htd-chart.is-compact .htd-label.is-one::before {
  background: var(--electric-blue);
}

.htd-chart.is-compact .htd-label.is-two::before {
  background: rgba(106, 167, 200, 0.28);
  box-shadow: inset 0 0 0 2px var(--electric-blue);
}

.htd-chart.is-compact .htd-freed {
  white-space: normal;
}

.htd-chart.is-compact .htd-freed-value,
.htd-chart.is-compact .htd-freed-word {
  display: block;
}

.htd-chart.is-compact .htd-freed-word {
  margin-top: 4px;
  margin-left: 0;
  font-size: 16px;
  line-height: 20px;
}

.htd-chart.is-compact .htd-row {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.htd-chart.is-compact .htd-row-name {
  font-size: 14px;
  line-height: 20px;
}

.htd-chart.is-compact .htd-row-value {
  font-size: 18px;
  line-height: 24px;
}

.htd-footnote {
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, 1vw, 20px);
  font-weight: 500;
  line-height: 1.45;
}


/* =========================================================================
   THE GOALS AND RESOURCES SCREEN

   Two pictures, each on its own scale and never added: your money now, and
   your money each year. In the brand tokens at the top of base.css. Grey is
   what you have and what your goals need, in text colours. Blue marks the
   selected case. Green and red appear only beside a word: a square beside
   "Short by" or "To spare", a mark beside "Covered" or "Not covered". Money you
   do not have is a red outline with a light tint and never a solid fill.

   Nothing animates through CSS. The only motion in this module is the marks
   travelling between cases, and that is driven by the module's own clock so
   that it can be settled, cancelled and left alone under reduced motion.

   These rules are a block of their own for now. At wiring time they are
   appended to base.css under the module prefix, as the fund's are.
   ========================================================================= */

.gar {
  grid-column: 1 / -1;
  display: block;
  min-width: 0;
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.gar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.gar-title {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.gar-badge {
  padding: 0 10px;
  border: 1px solid rgba(247, 244, 238, 0.28);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

/* ------------------------------------------------------------------ cases */

.gar-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.gar-case {
  appearance: none;
  display: flex;
  min-width: 0;
  min-height: 76px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: stretch;
  padding: 12px;
  border: 2px solid rgba(247, 244, 238, 0.14);
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.gar-case:hover {
  border-color: rgba(106, 167, 200, 0.6);
}

.gar-case:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 3px;
}

.gar-case.is-active {
  border-color: var(--electric-blue);
  background: rgba(106, 167, 200, 0.14);
}

.gar-case-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.gar-radio {
  display: none;
  flex: none;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.gar-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}

.gar-case.is-active .gar-radio {
  border-color: var(--electric-blue);
}

.gar-case.is-active .gar-radio-dot {
  background: var(--electric-blue);
}

.gar-case-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gar-case-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.gar-case-cash {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

/* ----------------------------------------------------------- the answer */

.gar-question {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 22px;
}

.gar-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.gar-status {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 11px;
  background: var(--muted);
}

.gar-status.is-short {
  background: var(--accent-red);
}

.gar-status.is-spare {
  background: var(--accent-green);
}

.gar-status.is-left {
  background: var(--accent-amber);
}

.gar-headline {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 36px;
}

.gar-support {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

/* The two quiet figures, under the answer on a smaller screen. */

.gar-quiet {
  margin-top: 16px;
  border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.gar-quiet-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(247, 244, 238, 0.1);
}

.gar-quiet-row-later {
  display: block;
}

.gar-quiet-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.gar-quiet-value {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}

.gar-quiet-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

/* ----------------------------------------------------------------- squares */

.gar-sq {
  flex: none;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: 2px solid var(--muted);
}

.gar-sq.is-short {
  border-color: var(--accent-red);
  background: rgba(201, 111, 98, 0.18);
}

.gar-sq.is-spare,
.gar-sq-left {
  border-color: var(--accent-green);
  background: rgba(102, 184, 158, 0.18);
}

.gar-sq.is-left {
  border-color: var(--accent-amber);
  background: rgba(212, 166, 79, 0.18);
}

/* ----------------------------------------------------------------- panels */

.gar-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.gar-panel {
  min-width: 0;
  box-sizing: border-box;
  padding: 16px 16px 18px;
  border-radius: 12px;
  background: var(--bg-1);
}

.gar-panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.gar-panel-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.gar-figures {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 12px;
}

.gar-figure {
  flex: none;
  white-space: nowrap;
}

.gar-figure:first-child {
  min-width: 102px;
}

.gar-figure-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.gar-figure-amount {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

.gar-figure-row {
  display: block;
}

.gar-figure-unit {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

/* ------------------------------------------------------------------ plots */

.gar-plot {
  position: relative;
  margin-top: 10px;
}

.gar-plot-year {
  margin-top: 12px;
}

.gar-plot > * {
  position: absolute;
}

.gar-ceiling,
.gar-water {
  height: 1px;
}

.gar-ceiling {
  background: rgba(247, 244, 238, 0.28);
}

.gar-water {
  background: rgba(247, 244, 238, 0.5);
}

.gar-bar-have {
  background: #7d8a92;
}

.gar-plot-now .gar-bar-have {
  border-radius: 0 0 6px 6px;
}

.gar-bar-freed {
  background: rgba(125, 138, 146, 0.6);
  box-shadow: inset 0 2px 0 var(--bg-1);
}

.gar-block {
  background: #434f58;
  box-shadow: inset 0 2px 0 var(--bg-1);
}

.gar-plot-now .gar-block {
  box-shadow: inset 0 -2px 0 var(--bg-1);
}

.gar-short-block,
.gar-left {
  box-sizing: border-box;
  border: 1.5px solid var(--accent-red);
  background: rgba(201, 111, 98, 0.14);
}

.gar-left {
  border-color: var(--accent-green);
  background: rgba(102, 184, 158, 0.14);
}

.gar-block-name {
  box-sizing: border-box;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  pointer-events: none;
}

.gar-freed-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 17px;
}

.gar-short {
  white-space: nowrap;
}

.gar-short-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gar-short-line .gar-sq {
  width: 12px;
  height: 12px;
}

.gar-short-word {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.gar-short-amount {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

/* ---------------------------------------------------- your money now, rows */

.gar-now-rows {
  margin-top: 12px;
  border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.gar-now-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.gar-now-row + .gar-now-row {
  border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.gar-now-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ------------------------------------------------------------------ goals */

.gar-panel-goals {
  margin-top: 0;
  padding-bottom: 6px;
}

.gar-goals {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.gar-goal {
  padding: 12px 0;
  border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.gar-goal-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.gar-goal-amount {
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.gar-goal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 2px;
}

.gar-glyph {
  flex: none;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  background: transparent;
}

.gar-glyph.is-covered {
  border-color: var(--accent-green);
  background: var(--accent-green);
}

.gar-glyph.is-partly {
  border-color: var(--accent-amber);
  background: linear-gradient(90deg, var(--accent-amber) 50%, transparent 50%);
}

.gar-goal-state {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.gar-goal-detail {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

/* ------------------------------------------- two pictures side by side */

.gar.is-pair .gar-cases {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gar.is-pair .gar-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gar.is-pair .gar-panel-goals {
  grid-column: 1 / -1;
}

.gar.is-pair .gar-panels {
  align-items: start;
}

.gar.is-pair .gar-panel-goals .gar-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

/* ---------------------------------------------------------- the 1920 frame */

.gar.is-wide .gar-head {
  gap: 8px 24px;
}

.gar.is-wide .gar-title {
  font-size: 21px;
  line-height: 28px;
}

.gar.is-wide .gar-badge {
  padding: 0 12px;
  font-size: 17px;
  line-height: 26px;
}

.gar.is-wide .gar-cases {
  grid-template-columns: 300px repeat(4, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 0;
  margin-top: 14px;
}

.gar.is-wide .gar-rowlabels {
  padding-top: 2px;
}

.gar.is-wide .gar-rowlabel {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 20px;
}

.gar.is-wide .gar-rowlabel-gap {
  height: 77px;
}

.gar.is-wide .gar-rowlabel-needed {
  height: 60px;
}

.gar.is-wide .gar-rowlabel-paid,
.gar.is-wide .gar-rowlabel-later {
  height: 42px;
}

.gar.is-wide .gar-case {
  height: 225px;
  padding: 0 18px;
}

.gar.is-wide .gar-radio {
  display: flex;
}

.gar.is-wide .gar-case-head {
  height: 76px;
}

.gar.is-wide .gar-case-text {
  gap: 0;
}

.gar.is-wide .gar-case-name {
  font-size: 19px;
  line-height: 24px;
}

.gar.is-wide .gar-case-cash {
  font-size: 16px;
  line-height: 20px;
}

.gar.is-wide .gar-case-needed {
  display: flex;
  height: 60px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.gar.is-wide .gar-case-needed-amount {
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
}

.gar.is-wide .gar-case-needed-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.gar.is-wide .gar-case-paid {
  display: flex;
  height: 42px;
  align-items: center;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
  line-height: 24px;
}

.gar.is-wide .gar-case-later {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
}

.gar.is-wide .gar-question {
  margin-top: 22px;
  font-size: 25px;
  line-height: 30px;
}

.gar.is-wide .gar-answer {
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}

.gar.is-wide .gar-status {
  width: 20px;
  height: 20px;
  margin-top: 0;
}

.gar.is-wide .gar-headline {
  font-size: 76px;
  line-height: 84px;
}

.gar.is-wide .gar-support {
  margin-top: 4px;
  font-size: 24px;
  line-height: 32px;
}

.gar.is-wide .gar-panels {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 20px;
  margin-top: 22px;
}

.gar.is-wide .gar-panel {
  padding: 20px 28px;
}

.gar.is-wide .gar-panel-now {
  flex: none;
  width: 600px;
}

.gar.is-wide .gar-panel-year {
  flex: 1 1 0;
}

.gar.is-wide .gar-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
}

.gar.is-wide .gar-panel-title {
  font-size: 28px;
  line-height: 34px;
}

.gar.is-wide .gar-panel-sub {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
}

.gar.is-wide .gar-figures {
  gap: 24px;
  margin-top: 8px;
}

.gar.is-wide .gar-figure:first-child {
  min-width: 196px;
}

.gar.is-wide .gar-figure-label {
  font-size: 19px;
  line-height: 24px;
}

.gar.is-wide .gar-figure-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.gar.is-wide .gar-figure-amount {
  font-size: 34px;
  line-height: 42px;
}

.gar.is-wide .gar-figure-unit {
  display: inline;
  font-size: 17px;
  line-height: 22px;
}

.gar.is-wide .gar-plot,
.gar.is-wide .gar-plot-year {
  margin-top: 10px;
}

.gar.is-wide .gar-block-name {
  font-size: 15px;
  line-height: 20px;
}

.gar.is-wide .gar-freed-note {
  font-size: 15px;
  line-height: 19px;
}

.gar.is-wide .gar-short-line {
  gap: 10px;
}

.gar.is-wide .gar-short-line .gar-sq {
  width: 14px;
  height: 14px;
}

.gar.is-wide .gar-short-word {
  font-size: 21px;
  line-height: 26px;
}

.gar.is-wide .gar-short-amount {
  font-size: 30px;
  line-height: 38px;
}

.gar.is-wide .gar-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
}

.gar.is-wide .gar-side-title .gar-sq {
  width: 12px;
  height: 12px;
}

.gar.is-wide .gar-side-amount {
  font-size: 21px;
  font-weight: 700;
  line-height: 28px;
  white-space: nowrap;
}

.gar.is-wide .gar-year-body {
  display: grid;
  margin-top: 10px;
}

.gar.is-wide .gar-year-body .gar-plot {
  margin-top: 0;
}

.gar.is-wide .gar-goals {
  margin: 0;
}

.gar.is-wide .gar-goal-name {
  font-size: 19px;
  line-height: 24px;
}

.gar.is-wide .gar-goal-amount {
  font-size: 19px;
  line-height: 24px;
}

.gar.is-wide .gar-goal-line {
  gap: 2px 9px;
  margin-top: 0;
}

.gar.is-wide .gar-goal-state {
  font-size: 17px;
  line-height: 22px;
}

.gar.is-wide .gar-goal-detail {
  font-size: 15px;
}

.gar-relief-footnote { color: var(--text-muted, #a9b5bd); font-size: 14px; line-height: 1.5; }
.gar-relief-footnote p { margin: 0 0 8px; }

/* Compact cards fit the app module as well as a standalone phone frame. */
.gar:not(.is-wide) .gar-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.gar:not(.is-wide) .gar-figure,
.gar:not(.is-wide) .gar-figure:first-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.gar:not(.is-wide) .gar-short {
  white-space: normal;
  overflow-wrap: anywhere;
}
.gar:not(.is-wide) .gar-now-row {
  flex-wrap: wrap;
  gap: 4px 12px;
}
