/* ═══════════════════════════════════════════════════════════════════════════
   King's Cross — app.css
   Grand Central RS / Woodgate Green design language
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Glober font family ─────────────────────────────────────────────────── */
@font-face {
  font-family: "Glober";
  src: url("/assets/fonts/Glober-Light.woff") format("woff"),
       url("/assets/fonts/Glober-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Glober";
  src: url("/assets/fonts/Glober-Book.woff") format("woff"),
       url("/assets/fonts/Glober-Book.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Glober";
  src: url("/assets/fonts/Glober-SemiBold.woff") format("woff"),
       url("/assets/fonts/Glober-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Glober";
  src: url("/assets/fonts/Glober-Bold.woff") format("woff"),
       url("/assets/fonts/Glober-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --grn:        #2A704F;
  --grn-deep:   #075738;
  --grn-hover:  #1d5439;
  --lime:       #A3CF5E;
  --orange:     #F26A21;
  --yellow:     #FCDC3D;
  --bg:         #fbfbfc;
  --surf:       #ffffff;
  --surf2:      #f5f5f7;
  --line:       #E5E5E7;
  --line2:      #eef0f0;
  --ink:        #1d1d1f;
  --mut:        #6b6f72;
  --cap:        #8a8d90;
  --side:       #075738;

  --sidebar-w:       240px;
  --sidebar-w-rail:  64px;
  --radius:          8px;
  --radius-lg:       12px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.08);
  --shadow-md:       0 4px 12px rgba(0,0,0,.10);
  --transition:      0.18s ease;
}

/* ── Base reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Glober", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img, svg { display: block; }
ul { list-style: none; }

/* ── Typography scale ───────────────────────────────────────────────────── */
h1, .h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
h2, .h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.25; }
h3, .h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
h4, .h4 { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
p       { font-size: 0.9375rem; line-height: 1.6; color: var(--mut); }

.text-cap  { font-size: 0.75rem; color: var(--cap); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.text-mut  { color: var(--mut); }
.text-sm   { font-size: 0.8125rem; }
.text-mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 0.8125rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — App Shell (advisor views)
   ═══════════════════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--side);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition);
  position: relative;
  z-index: 50;
}

.sidebar.rail { width: var(--sidebar-w-rail); }

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  min-height: 72px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  flex: 1;
  min-width: 0;
}

.sidebar__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--lime);
}

.sidebar__wordmark {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--transition);
}

.sidebar.rail .sidebar__wordmark { opacity: 0; pointer-events: none; width: 0; }

.sidebar__collapse-btn {
  color: rgba(255,255,255,.5);
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.sidebar__collapse-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Nav */
.sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,.65);
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--lime);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .7;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.nav-label {
  opacity: 1;
  transition: opacity var(--transition);
}
.sidebar.rail .nav-label { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }
.sidebar.rail .nav-item  { justify-content: center; padding: 10px; }

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,.3);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 16px 12px 6px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.rail .nav-section-title { opacity: 0; }

/* Sidebar footer */
.sidebar__footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar__theme-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: rgba(255,255,255,.5);
  font-size: 0.8125rem;
  border-radius: 6px;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}
.sidebar__theme-btn:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.sidebar.rail .sidebar__theme-btn span { display: none; }

/* ── Main content ───────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-header {
  padding: 28px 32px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surf);
}

.page-header__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grn);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.page-header__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-body {
  padding: 24px 32px;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Cards, KPI, Search
   ═══════════════════════════════════════════════════════════════════════════ */

/* Card */
.card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

/* KPI cards */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.kpi-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-card__sub {
  font-size: 0.8125rem;
  color: var(--cap);
}

.kpi-card--accent .kpi-card__value { color: var(--grn); }
.kpi-card--lime   .kpi-card__value { color: #357a3c; }

/* Search bar */
.search-bar-wrap {
  margin-bottom: 20px;
}

.search-bar {
  position: relative;
  max-width: 400px;
}

.search-bar__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cap);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surf);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus {
  border-color: var(--grn);
  box-shadow: 0 0 0 3px rgba(42,112,79,.12);
}
.search-bar input::placeholder { color: var(--cap); }

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Badges & Pills
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--complete   { background: #e6f4ed; color: #1a6637; }
.badge--pending    { background: #fef9e0; color: #92710a; }
.badge--not-started { background: var(--surf2); color: var(--mut); }
.badge--caution    { background: #fef3ea; color: #b34d0a; }

/* Stat pills (client profile header) */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: 0.875rem;
}

.stat-pill__label {
  color: var(--mut);
  font-size: 0.75rem;
}

.stat-pill__value {
  font-weight: 700;
  color: var(--ink);
}

.stat-pill--green { border-color: var(--grn); background: #f0f9f4; }
.stat-pill--green .stat-pill__value { color: var(--grn-deep); }

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Buttons
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background var(--transition), box-shadow var(--transition), transform .08s ease;
  cursor: pointer;
  border: none;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--grn);
  color: #fff;
}
.btn--primary:hover { background: var(--grn-hover); box-shadow: 0 2px 8px rgba(42,112,79,.3); }

.btn--secondary {
  background: var(--surf);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--secondary:hover { background: var(--surf2); }

.btn--ghost {
  background: transparent;
  color: var(--grn);
  border: 1px solid var(--grn);
}
.btn--ghost:hover { background: rgba(42,112,79,.06); }

.btn--orange {
  background: var(--orange);
  color: #fff;
}
.btn--orange:hover { background: #d85e1c; }

/* Google SSO button */
.btn--google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 24px;
  gap: 12px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.btn--google:hover { box-shadow: 0 2px 6px rgba(0,0,0,.15); background: #f8f9fa; }
.btn--google svg { width: 20px; height: 20px; }

.btn--lg { font-size: 1.0625rem; padding: 13px 28px; }
.btn--full { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Tables
   ═══════════════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.table-header__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--surf2);
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-align: left;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  font-size: 0.875rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line2);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: #fafafa; }

.data-table .cell-name { font-weight: 600; }
.data-table .cell-email { color: var(--mut); font-size: 0.8125rem; }
.data-table .cell-score { font-weight: 700; color: var(--grn-deep); }
.data-table .cell-link a { color: var(--grn); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Sign In
   ═══════════════════════════════════════════════════════════════════════════ */
.signin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.signin-brand {
  background: var(--grn-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  overflow: hidden;
}

.signin-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Cg opacity='.07' fill='none' stroke='%23fff' stroke-width='1'%3E%3Cline x1='0' y1='0' x2='400' y2='600'/%3E%3Cline x1='200' y1='0' x2='600' y2='600'/%3E%3Cline x1='400' y1='0' x2='0' y2='600'/%3E%3Cline x1='0' y1='300' x2='400' y2='300'/%3E%3C/g%3E%3C/svg%3E")
    center/cover no-repeat;
}

.signin-brand__content { position: relative; z-index: 1; }
.signin-brand__footer  { position: relative; z-index: 1; }

.signin-brand__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 48px;
}
.signin-brand__logo svg   { width: 40px; height: 40px; color: var(--lime); }
.signin-brand__logo-name  { font-size: 1.25rem; font-weight: 700; }
.signin-brand__logo-sub   { font-size: 0.75rem; color: rgba(255,255,255,.5); }

.signin-brand__headline {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.signin-brand__tagline {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  max-width: 340px;
  line-height: 1.6;
}

.signin-brand__legal {
  font-size: 0.75rem;
  color: rgba(255,255,255,.3);
  line-height: 1.6;
}

/* Sign-in form panel */
.signin-form-panel {
  background: var(--surf);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.signin-form {
  width: 100%;
  max-width: 380px;
}

.signin-form__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.signin-form__sub {
  font-size: 0.9375rem;
  color: var(--mut);
  margin-bottom: 36px;
  line-height: 1.55;
}

.signin-form__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--cap);
  font-size: 0.8125rem;
}
.signin-form__divider::before,
.signin-form__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.signin-notice {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--surf2);
  border-radius: var(--radius);
  border-left: 3px solid var(--grn);
  font-size: 0.8125rem;
  color: var(--mut);
  line-height: 1.55;
}

.signin-pipeda {
  margin-top: 32px;
  font-size: 0.75rem;
  color: var(--cap);
  line-height: 1.6;
  text-align: center;
}
.signin-pipeda a { color: var(--grn); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Client Profile
   ═══════════════════════════════════════════════════════════════════════════ */
.client-header {
  padding: 24px 32px;
  background: var(--surf);
  border-bottom: 1px solid var(--line);
}

.client-header__name { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }

.stat-pill-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Module grid */
.module-section { margin-bottom: 28px; }
.module-section__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.module-tile {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.module-tile:hover { box-shadow: var(--shadow-md); }

.module-tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surf2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.module-tile--done .module-tile__icon { background: #e6f4ed; }
.module-tile--done .module-tile__icon svg { color: var(--grn); }

.module-tile__label { font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.module-tile__meta  { font-size: 0.75rem; color: var(--cap); }

.module-tile--pending { border-style: dashed; border-color: var(--line2); background: var(--surf2); }
.module-tile--pending .module-tile__label { color: var(--mut); }

/* Score chart placeholder */
.chart-placeholder {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cap);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.chart-placeholder::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(42,112,79,.07), transparent);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.chart-placeholder__label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Questionnaire (standalone client view)
   ═══════════════════════════════════════════════════════════════════════════ */
.q-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.q-topbar {
  background: var(--surf);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.q-topbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.q-topbar__logo svg { width: 28px; height: 28px; color: var(--grn); }
.q-topbar__logo-name { font-size: 0.9375rem; font-weight: 700; }

/* Progress bar */
.q-progress-wrap {
  background: var(--surf2);
  height: 4px;
  flex: 1;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 24px;
  max-width: 360px;
}
.q-progress-bar {
  height: 100%;
  background: var(--grn);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.q-progress-count {
  font-size: 0.8125rem;
  color: var(--mut);
  white-space: nowrap;
}

/* Question card */
.q-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

.q-card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  width: 100%;
  max-width: 680px;
  box-shadow: var(--shadow-md);
}

.q-card__step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grn);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}

.q-card__question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 36px;
}

/* Likert scale */
.likert-wrap { margin-bottom: 40px; }

.likert-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.likert-labels span {
  font-size: 0.6875rem;
  color: var(--cap);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.likert-options {
  display: flex;
  gap: 8px;
}

.likert-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.likert-option input[type="radio"] { display: none; }

.likert-option__dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mut);
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  width: 100%;
  border-radius: var(--radius);
  height: 48px;
}

.likert-option:hover .likert-option__dot {
  border-color: var(--grn);
  color: var(--grn);
}

.likert-option input:checked + .likert-option__dot {
  background: var(--grn);
  border-color: var(--grn);
  color: #fff;
  box-shadow: 0 2px 8px rgba(42,112,79,.3);
}

/* Scale 10 options */
.scale10-options {
  display: flex;
  gap: 4px;
}
.scale10-option { flex: 1; }
.scale10-option input[type="radio"] { display: none; }
.scale10-option__btn {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--mut);
  cursor: pointer;
  transition: all var(--transition);
}
.scale10-option input:checked + .scale10-option__btn {
  background: var(--grn);
  border-color: var(--grn);
  color: #fff;
}

/* Pick / select */
.q-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surf);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6f72' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  outline: none;
  margin-bottom: 32px;
}
.q-select:focus { border-color: var(--grn); box-shadow: 0 0 0 3px rgba(42,112,79,.12); }

/* Q navigation */
.q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Q step show/hide */
.q-step { display: none; }
.q-step.active { display: block; }

/* Q footer */
.q-footer {
  background: var(--surf);
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--cap);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Capacity Review
   ═══════════════════════════════════════════════════════════════════════════ */
.capacity-form { max-width: 760px; }

.cap-question {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.cap-question__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.cap-question__id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grn);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(42,112,79,.08);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cap-question__dim {
  font-size: 0.75rem;
  color: var(--cap);
  flex-shrink: 0;
}

.cap-question__weight {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  background: var(--surf2);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.cap-question__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.cap-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surf);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6f72' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  outline: none;
}
.cap-select:focus { border-color: var(--grn); box-shadow: 0 0 0 3px rgba(42,112,79,.12); }

/* Capacity score panel */
.cap-score-panel {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.cap-score-panel__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.cap-score-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--grn);
  line-height: 1;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Results
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pie chart row */
.pie-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.pie-card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.pie-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}

.pie-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-placeholder__value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  z-index: 1;
  position: relative;
}

.pie-placeholder--min  { background: conic-gradient(var(--grn) 72deg, var(--lime) 72deg); }
.pie-placeholder--best { background: conic-gradient(var(--grn) 162deg, var(--lime) 162deg); }
.pie-placeholder--max  { background: conic-gradient(var(--grn) 252deg, var(--lime) 252deg); }

.pie-placeholder::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--surf);
  border-radius: 50%;
  z-index: 0;
}

.pie-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--mut);
}

.pie-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.pie-legend__dot--eq { background: var(--grn); }
.pie-legend__dot--fi { background: var(--lime); }

/* Score gauges row */
.gauge-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.gauge-card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.gauge-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}

/* CSS semicircle gauge */
.gauge {
  position: relative;
  width: 160px;
  height: 80px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.gauge__track {
  position: absolute;
  top: 0; left: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(
    var(--line) 0deg,
    var(--line) 180deg,
    transparent 180deg
  );
}

.gauge__fill {
  position: absolute;
  top: 0; left: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(
    var(--grn) 0deg,
    var(--grn) calc(var(--gauge-pct, 0) * 1.8deg),
    transparent calc(var(--gauge-pct, 0) * 1.8deg)
  );
}

.gauge__mask {
  position: absolute;
  bottom: 0; left: 20px;
  width: 120px;
  height: 60px;
  background: var(--surf);
  border-radius: 0 0 60px 60px;
}

.gauge__value {
  position: absolute;
  bottom: 4px;
  left: 0; right: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

/* Risk profile matrix */
.results-lower-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-bottom: 28px;
  align-items: start;
}

.risk-matrix-card {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.risk-matrix-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}

.risk-matrix {
  display: grid;
  grid-template-columns: 20px repeat(5, 40px);
  grid-template-rows: repeat(5, 40px) 20px;
  gap: 3px;
}

.rm-cell {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  position: relative;
}

.rm-label {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--cap);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-cell--1 { background: #e8f5ee; color: var(--mut); }
.rm-cell--2 { background: #c6e6d3; color: var(--mut); }
.rm-cell--3 { background: #88c9a5; color: var(--mut); }
.rm-cell--4 { background: var(--grn); }
.rm-cell--5 { background: var(--grn-deep); }

.rm-cell--marker::after {
  content: "●";
  position: absolute;
  font-size: 1rem;
  color: var(--orange);
  text-shadow: 0 0 0 2px #fff;
}

/* Psychology / insights section */
.psychology-section { margin-top: 4px; }

.psychology-section__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.psychology-section__sub {
  font-size: 0.875rem;
  color: var(--mut);
  margin-bottom: 20px;
}

.insight-group { margin-bottom: 20px; }

.insight-group__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.insight-group--orange .insight-group__header { background: #fef3ea; color: #b34d0a; }
.insight-group--yellow .insight-group__header { background: #fefae7; color: #7a6000; }
.insight-group--green  .insight-group__header { background: #eaf4ee; color: #1a6637; }

.insight-group__flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.insight-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: .7;
}

/* Accordion using details/summary */
.insight-accordion {
  background: var(--surf);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.insight-item {
  border-bottom: 1px solid var(--line2);
}
.insight-item:last-child { border-bottom: none; }

.insight-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
  transition: background var(--transition);
}
.insight-item summary:hover { background: var(--surf2); }
.insight-item summary::-webkit-details-marker { display: none; }

.insight-chevron {
  margin-left: auto;
  color: var(--cap);
  transition: transform var(--transition);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.insight-item[open] .insight-chevron { transform: rotate(180deg); }
.insight-item[open] summary { background: var(--surf2); }

.insight-body {
  padding: 0 16px 16px 40px;
  font-size: 0.875rem;
  color: var(--mut);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Forms
   ═══════════════════════════════════════════════════════════════════════════ */
.send-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.form-required { color: var(--orange); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surf);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--grn);
  box-shadow: 0 0 0 3px rgba(42,112,79,.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--cap); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6f72' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-textarea { resize: vertical; }

.form-hint {
  font-size: 0.8125rem;
  color: var(--cap);
  margin: 0;
  line-height: 1.5;
}

.form-fieldset {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 0;
}

.form-legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS — Alerts & Flash
   ═══════════════════════════════════════════════════════════════════════════ */
.flash-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(42,112,79,.08);
  border: 1px solid var(--grn);
  border-radius: var(--radius);
  color: var(--grn);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

.alert--caution {
  background: #fef3ea;
  border: 1px solid #f5d0b0;
  color: #b34d0a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREEN — Couples Dashboard
   ═══════════════════════════════════════════════════════════════════════════ */
.couples-partner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.couples-partner-card {
  padding: 24px;
}

.couples-partner-card__badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grn);
  background: rgba(42,112,79,.08);
  padding: 2px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}

.couples-partner-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */
.flex  { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .signin-page { grid-template-columns: 1fr; }
  .signin-brand { display: none; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .pie-row { grid-template-columns: 1fr; }
  .q-card { padding: 28px 20px; }
}
