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

  :root {
    --brand: #115D3F;
    --brand-dark: #0D4930;
    --brand-light: #EFF7F3;
    --ink: #2E2E2E;
    --ink-2: #555555;
    --ink-3: #909090;
    --surface: #FFFFFF;
    --surface-2: #F5F5F5;
    --surface-3: #EBEBEB;
    --border: #E3E3E3;
    --border-strong: #C0C0C0;
    --s-grey: #9CA3AF;
    --s-grey-bg: #F3F4F6;
    --s-grey-text: #6B7280;
    --s-red: #DC2626;
    --s-red-bg: #FFF5F5;
    --s-red-text: #B91C1C;
    --s-amber: #D97706;
    --s-amber-bg: #FFFBEB;
    --s-amber-text: #92400E;
    --s-green: #059669;
    --s-green-bg: #F0FDF9;
    --s-green-text: #065F46;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  }

  html, body { height: 100%; font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; background: var(--surface-2); color: var(--ink); font-size: 14px; line-height: 1.5; }
  /* Softer marketing type for the homepage (Poppins — rounded geometric,
     friendlier than DM Sans, less bubbly than Nunito). The dashboard/
     assessment app keeps Inter for dense data legibility. */
  #landing.home-page,
  #landing.home-page button,
  #landing.home-page input,
  #landing.home-page select,
  #landing.home-page textarea,
  #emailCapture,
  #emailCapture button,
  #emailCapture input { font-family: 'Poppins','Inter','Helvetica Neue',Arial,sans-serif; }

  /* ── LANDING ─────────────────────────────────────────── */
  #landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
  }
  .landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    border-bottom: 1px solid var(--border);
  }
  .brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .brand-cross {
    width: 36px; height: 36px;
    background: var(--brand);
    border-radius: 4px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .brand-cross svg { width: 20px; height: 20px; fill: white; }
  .brand-name {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.3px;
  }
  .brand-name span { color: var(--brand); }

  .landing-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 65px 48px 74px;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
  }
  .landing-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 20px;
  }
  .landing-hero h1 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.8px;
    color: var(--ink);
    margin-bottom: 24px;
  }
  .landing-hero h1 em { font-style: normal; color: var(--brand); font-weight: 700; }
  .landing-hero p {
    font-size: 17px;
    font-weight: 300;
    color: var(--ink-2);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
  }
  .landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
  }
  .btn-primary { background: var(--brand); color: white; }
  .btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--border-strong); }
  .btn-secondary:hover { border-color: var(--ink); background: var(--surface-2); }
  .btn-ghost { background: transparent; color: var(--ink-2); border: none; padding: 8px 16px; }
  .btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
  .btn-sm { padding: 7px 14px; font-size: 13px; }
  .btn-xs { padding: 5px 10px; font-size: 12px; }
  .btn-danger { background: var(--s-red-bg); color: var(--s-red-text); border: 1.5px solid #FCA5A5; }
  .btn-danger:hover { background: #FEE2E2; }
  .btn-success { background: var(--s-green-bg); color: var(--s-green-text); border: 1.5px solid #6EE7B7; }
  .btn-success:hover { background: #D1FAE5; }
  .btn-amber { background: var(--s-amber-bg); color: var(--s-amber-text); border: 1.5px solid #FCD34D; }

  .landing-footer {
    text-align: center;
    padding: 24px;
    color: var(--ink-3);
    font-size: 12px;
    border-top: 1px solid var(--border);
  }

  /* ── ASSESSMENT ───────────────────────────────────────── */
  #assessment {
    display: none;
    min-height: 100vh;
    background: var(--surface);
    flex-direction: column;
  }
  .assess-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    border-bottom: 1px solid var(--border);
  }
  .assess-progress {
    flex: 1;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
  }
  .progress-label {
    font-size: 12px;
    color: var(--ink-3);
    margin-bottom: 8px;
  }
  .progress-bar {
    height: 3px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: var(--brand);
    border-radius: 99px;
    transition: width 0.4s ease;
  }
  .assess-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 24px;
    overflow-y: auto;
  }
  .assess-card {
    width: 100%;
    max-width: 560px;
  }
  .assess-step-num {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
  }
  .assess-card h2 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
  }
  .assess-card .sub { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }

  .option-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 32px;
  }
  .option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  }
  .option-btn:hover { border-color: var(--brand); background: var(--brand-light); }
  .option-btn.selected { border-color: var(--brand); background: var(--brand-light); }
  .option-btn.selected .option-radio { background: var(--brand); border-color: var(--brand); }
  .option-btn.selected .option-radio::after { opacity: 1; }
  .option-radio {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border-strong);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
  }
  .option-radio::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 7px; height: 7px;
    background: white;
    border-radius: 50%;
    opacity: 0;
  }
  .option-text strong { display: block; font-weight: 500; font-size: 14px; color: var(--ink); }
  .option-text span { font-size: 12px; color: var(--ink-3); }

  .checkbox-btn .option-check {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: all 0.15s;
  }
  .checkbox-btn.selected .option-check { background: var(--brand); border-color: var(--brand); }
  .checkbox-btn.selected .option-check::after {
    content: '';
    display: block;
    width: 10px; height: 7px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(1px, -1px);
  }

  .assess-nav { display: flex; justify-content: space-between; align-items: center; }

  /* ── HELP SYSTEM ─────────────────────────────────────── */
  .help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--ink-3);
    font-size: 12px;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    cursor: pointer;
    padding: 5px 12px;
    margin-bottom: 24px;
    transition: all 0.15s;
    letter-spacing: 0;
  }
  .help-trigger:hover { color: var(--brand); border-color: #C5DDD3; background: var(--brand-light); }
  .help-trigger.active { color: var(--brand-dark); border-color: #A8CCC0; background: var(--brand-light); }
  .help-trigger-icon {
    width: 15px; height: 15px;
    border-radius: 50%;
    background: currentColor;
    color: white;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.15s;
  }
  .help-trigger-icon::after { content: 'i'; color: white; }
  .help-trigger:hover .help-trigger-icon,
  .help-trigger.active .help-trigger-icon { background: var(--brand); }

  .help-panel {
    background: var(--brand-light);
    border: 1px solid #C5DDD3;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease, padding 0.2s ease;
  }
  .help-panel.open {
    max-height: 400px;
    padding: 0;
  }
  .help-panel-inner {
    padding: 16px 18px;
  }
  .help-panel-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .help-panel-title::before {
    content: '';
    display: inline-block;
    width: 12px; height: 2px;
    background: var(--brand);
    border-radius: 99px;
  }
  .help-panel p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-2);
    margin-bottom: 8px;
  }
  .help-panel p:last-child { margin-bottom: 0; }
  .help-panel strong { color: var(--ink); font-weight: 600; }
  .help-panel ul {
    list-style: none;
    margin: 6px 0 8px;
    padding: 0;
    display: grid;
    gap: 4px;
  }
  .help-panel ul li {
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.5;
    padding-left: 14px;
    position: relative;
  }
  .help-panel ul li::before {
    content: '·';
    position: absolute;
    left: 4px;
    color: var(--brand);
    font-weight: 700;
  }

  /* Assessment result screen */
  .assess-result { text-align: center; }
  .result-badge {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
  }
  .result-badge.high { background: #FEF2F2; color: #B91C1C; }
  .result-badge.medium { background: var(--s-amber-bg); color: var(--s-amber-text); }
  .result-badge.low { background: var(--s-green-bg); color: var(--s-green-text); }
  .result-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

  .result-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin: 32px 0;
    text-align: left;
  }
  .req-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .req-card-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
  .req-card-value { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 26px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
  .req-card-desc { font-size: 12px; color: var(--ink-2); line-height: 1.4; }

  /* ── APP SHELL ─────────────────────────────────────────── */
  #app {
    display: none;
    height: 100vh;
    overflow: hidden;
  }
  .app-layout {
    display: flex;
    height: 100%;
  }

  /* ── SIDEBAR ─────────────────────────────────────────── */
  .sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .sidebar-logo .brand-name { font-size: 16px; }

  .sidebar-org {
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-org-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
  .sidebar-org-name { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.3; }
  .sidebar-org-site { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

  .sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink-2);
    user-select: none;
    position: relative;
  }
  .nav-item:hover { background: var(--surface-2); color: var(--ink); }
  .nav-item.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 500; }
  .nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
  .nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--s-red);
    color: white;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 12px 12px 6px;
  }

  .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
  }

  /* ── MORE SORTS BUTTON ───────────────────────────────── */
  @keyframes moreSortsEntry {
    0%   { opacity: 0; transform: translateX(-24px); }
    60%  { opacity: 1; transform: translateX(6px); }
    80%  { transform: translateX(-3px); }
    100% { opacity: 1; transform: translateX(0); }
  }
  @keyframes badgePop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.4); opacity: 1; }
    80%  { transform: scale(0.9); }
    100% { transform: scale(1); }
  }
  @keyframes badgeShake {
    0%   { transform: rotate(0deg) scale(1); }
    15%  { transform: rotate(-18deg) scale(1.1); }
    30%  { transform: rotate(18deg) scale(1.1); }
    45%  { transform: rotate(-12deg); }
    60%  { transform: rotate(12deg); }
    75%  { transform: rotate(-6deg); }
    90%  { transform: rotate(6deg); }
    100% { transform: rotate(0deg) scale(1); }
  }
  .nav-more-sorts {
    background: #FFFBEB;
    color: #78350F !important;
    font-weight: 700 !important;
    border: 1.5px solid #FCD34D;
    border-radius: 8px;
    padding: 4px 6px !important;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 0px !important;
    min-height: 44px;
  }
  .nav-more-sorts:hover { background: #FEF3C7 !important; border-color: #F59E0B !important; }
  #navBadgeMoreSorts {
    display: flex;
  }
  .master-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
  }
  .master-status:hover { border-color: var(--border-strong); }
  .master-dot-lg {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.4s;
  }
  .ms-text { flex: 1; }
  .ms-label { font-size: 11px; color: var(--ink-3); }
  .ms-value { font-size: 13px; font-weight: 600; color: var(--ink); }

  /* ── MAIN CONTENT ────────────────────────────────────── */
  .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-2);
  }
  .main-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 57px;
    flex-shrink: 0;
  }
  .main-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }
  .main-actions { display: flex; align-items: center; gap: 10px; }
  .last-assessed {
    font-size: 12px;
    color: var(--ink-3);
    padding: 6px 12px;
    background: var(--surface-2);
    border-radius: 99px;
    border: 1px solid var(--border);
  }

  .main-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
  }

  /* ── OVERVIEW ─────────────────────────────────────────── */
  .overview-status-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  .status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.15s;
    cursor: pointer;
  }
  .status-card:hover { box-shadow: var(--shadow-md); }
  .status-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .status-icon-wrap svg { width: 22px; height: 22px; }
  .sc-label { font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
  .sc-fraction { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 24px; font-weight: 700; line-height: 1; color: var(--ink); margin-bottom: 3px; }
  .sc-status { font-size: 12px; font-weight: 500; }

  /* Status light pill */
  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
  }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; }
  .pill-grey { background: var(--s-grey-bg); color: var(--s-grey-text); }
  .pill-grey .status-dot { background: var(--s-grey); }
  .pill-red { background: var(--s-red-bg); color: var(--s-red-text); }
  .pill-red .status-dot { background: var(--s-red); }
  .pill-amber { background: var(--s-amber-bg); color: var(--s-amber-text); }
  .pill-amber .status-dot { background: var(--s-amber); }
  .pill-green { background: var(--s-green-bg); color: var(--s-green-text); }
  .pill-green .status-dot { background: var(--s-green); }

  /* Big overview cards */
  .overview-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .overview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.15s;
  }
  .overview-card:hover { box-shadow: var(--shadow-md); }
  .oc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
  }
  .oc-status-bar {
    width: 4px;
    height: 44px;
    border-radius: 99px;
    flex-shrink: 0;
  }
  .oc-title { flex: 1; }
  .oc-title h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
  .oc-title p { font-size: 12px; color: var(--ink-2); }
  .oc-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
  }
  .oc-message { font-size: 13px; color: var(--ink-2); flex: 1; line-height: 1.5; }
  .oc-actions { display: flex; gap: 8px; flex-shrink: 0; }

  /* ── FIRST AIDERS ─────────────────────────────────────── */
  .section-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .summary-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-2);
  }
  .summary-chip-num {
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
  }
  .summary-chip-red { border-color: #FCA5A5; background: var(--s-red-bg); color: var(--s-red-text); }
  .summary-chip-red .summary-chip-num { color: var(--s-red); }
  .summary-chip-amber { border-color: #FCD34D; background: var(--s-amber-bg); color: var(--s-amber-text); }
  .summary-chip-amber .summary-chip-num { color: var(--s-amber); }
  .summary-chip-green { border-color: #6EE7B7; background: var(--s-green-bg); color: var(--s-green-text); }
  .summary-chip-green .summary-chip-num { color: var(--s-green); }

  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
  }

  .fa-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
  }
  .fa-table-head {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 1.2fr;
    padding: 10px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ink-3);
    gap: 12px;
  }
  .fa-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 1.2fr;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    gap: 12px;
    transition: background 0.1s;
  }
  .fa-row:last-child { border-bottom: none; }
  .fa-row:hover { background: var(--surface-2); }
  .fa-name { font-weight: 500; font-size: 13.5px; color: var(--ink); }
  .fa-role { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
  .fa-cell { font-size: 13px; color: var(--ink-2); }
  .fa-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

  .empty-slot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--s-red-bg);
    border-bottom: 1px solid #FECACA;
  }
  .empty-slot-icon {
    width: 38px; height: 38px;
    border: 1.5px dashed #FCA5A5;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #FCA5A5;
    flex-shrink: 0;
    font-size: 20px;
  }
  .empty-slot-text { flex: 1; }
  .empty-slot-text strong { font-size: 13px; font-weight: 500; color: var(--s-red-text); display: block; }
  .empty-slot-text span { font-size: 12px; color: #B91C1C; opacity: 0.7; }

  /* ── KITS ────────────────────────────────────────────── */
  .kit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
  .kit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.15s;
  }
  .kit-card:hover { box-shadow: var(--shadow); }
  .kit-card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .kit-type-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 4px;
  }
  .kit-name { font-size: 14px; font-weight: 600; color: var(--ink); }
  .kit-location { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
  .kit-body { padding: 14px 20px 16px; }
  .kit-info-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .kit-info-label { font-size: 12px; color: var(--ink-3); }
  .kit-info-value { font-size: 12px; font-weight: 500; color: var(--ink); }
  .kit-actions { display: flex; gap: 8px; margin-top: 14px; }

  /* Smart Kit connect animation */
  .connect-spinner {
    display: none;
    width: 14px; height: 14px;
    border: 2px solid rgba(200,16,46,0.3);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── AED ─────────────────────────────────────────────── */
  .aed-main-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
  }
  .aed-status-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .aed-big-dot {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 24px;
    transition: all 0.5s;
  }
  .aed-info h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
  .aed-info p { font-size: 13px; color: var(--ink-2); }
  .aed-details { padding: 20px 24px; }
  .aed-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }
  .aed-detail-item label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-3); display: block; margin-bottom: 4px; }
  .aed-detail-item span { font-size: 13px; color: var(--ink); }
  .aed-actions { display: flex; gap: 10px; flex-wrap: wrap; }

  /* ── NOTIFICATIONS ──────────────────────────────────── */
  .notif-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
  }
  .notif-section-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
  }
  .notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .notif-row:last-child { border-bottom: none; }
  .notif-row-label { font-size: 13.5px; color: var(--ink); font-weight: 400; }
  .notif-row-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
  .notif-select {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    color: var(--ink);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 7px 12px;
    background: var(--surface);
    cursor: pointer;
    min-width: 180px;
  }
  .toggle-wrap { display: flex; align-items: center; gap: 10px; }
  .toggle {
    position: relative;
    width: 36px; height: 20px;
    cursor: pointer;
  }
  .toggle input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-3);
    border-radius: 99px;
    transition: 0.3s;
    border: 1.5px solid var(--border);
  }
  .toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px; width: 14px;
    left: 2px; top: 1px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: var(--shadow);
  }
  .toggle input:checked + .toggle-slider { background: var(--brand); border-color: var(--brand); }
  .toggle input:checked + .toggle-slider::before { transform: translateX(16px); }
  .toggle-label { font-size: 13px; color: var(--ink-2); }

  /* ── SHARE ───────────────────────────────────────────── */
  .share-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
  .share-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: box-shadow 0.15s;
  }
  .share-card:hover { box-shadow: var(--shadow-md); }
  .share-card h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
  .share-card p { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; line-height: 1.5; }
  .integration-list { display: grid; gap: 10px; }
  .integration-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
    cursor: pointer;
  }
  .integration-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
  .integration-logo {
    width: 32px; height: 32px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
  }
  .integration-name { font-size: 13px; font-weight: 500; color: var(--ink); }
  .integration-desc { font-size: 12px; color: var(--ink-3); }
  .integration-action { margin-left: auto; }

  /* ── MODAL ───────────────────────────────────────────── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,20,22,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
  }
  @keyframes modalIn { from { opacity:0; transform: translateY(8px) scale(0.98); } }
  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
  }
  .modal-header h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
  .modal-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9) !important;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--brand) !important;
    font-size: 16px !important;
    transition: all 0.15s;
  }
  .modal-close:hover { background: #E8F5EE !important; color: #0A4A2E !important; }
  .modal-body { padding: 24px; }
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
  }

  .form-group { margin-bottom: 18px; }
  .form-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
  .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.15s;
    outline: none;
  }
  .form-input:focus { border-color: var(--brand); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    outline: none;
  }
  .form-select:focus { border-color: var(--brand); }

  /* ── TOAST ───────────────────────────────────────────── */
  #toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
  }
  #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  #toast.success { background: var(--s-green); }
  #toast.warning { background: #B45309; }

  /* ── SCROLL POPUP ──────────────────────────────────── */
  #scrollPopupOverlay {
    position: fixed;
    inset: 0;
    background: rgba(20,20,22,0.45);
    z-index: 899;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
  }
  #scrollPopupOverlay.show { opacity: 1; pointer-events: all; }

  #scrollPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -44%) scale(0.96);
    background: var(--surface);
    border: 2px solid var(--brand);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 460px;
    width: 90%;
    text-align: center;
  }
  #scrollPopup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
  }
  #scrollPopup .popup-text {
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
  }
  #scrollPopup .popup-sub {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: -8px;
  }
  #scrollPopup .popup-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-3);
    font-size: 18px;
    line-height: 1;
  }
  #scrollPopup .popup-close:hover { color: var(--ink); }


  /* ── DASHBOARD REVEAL BOX ──────────────────────────── */
  @keyframes dashBoxReveal {
    0%   { opacity: 0; transform: translateY(24px) scale(0.97); }
    60%  { opacity: 1; transform: translateY(-4px) scale(1.005); }
    80%  { transform: translateY(2px) scale(0.998); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .dash-reveal-box {
    border: 2.5px solid var(--brand);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    margin: 38px 0 16px;
    background: var(--surface);
    box-shadow: 0 0 0 0 rgba(17,93,63,0);
    transition: box-shadow 0.4s ease;
  }
  .dash-reveal-box.revealed {
    box-shadow: 0 0 0 4px rgba(17,93,63,0.1);
    animation: dashBoxReveal 0.65s cubic-bezier(0.22,0.61,0.36,1) forwards;
  }

  /* ── RESULT SECTION ANIMATIONS ──────────────────────── */
  @keyframes slideInRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes stampPop {
    0%   { opacity: 0; transform: scale(0.55); }
    65%  { opacity: 1; transform: scale(1.08); }
    82%  { transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
  }
  .result-card-anim {
    opacity: 0;
    transform: translateX(32px);
  }
  .result-card-anim.visible {
    animation: slideInRight 0.45s cubic-bezier(0.22,0.61,0.36,1) forwards;
  }
  .stamp-anim {
    opacity: 0;
  }
  .stamp-anim.pop {
    animation: stampPop 0.5s cubic-bezier(0.22,0.61,0.36,1) forwards;
  }

  /* ── TAB HERO ICONS ─────────────────────────────────── */
  .tab-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }
  .tab-hero-icon {
    width: 56px; height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.9;
  }
  .tab-hero-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
  }
  .tab-hero-text p {
    font-size: 13px;
    color: var(--ink-3);
    margin: 0;
  }
  /* ── REQUIRE BADGE ──────────────────────────────────── */
  .requirement-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
  }
  .req-mandatory { background: #FEF2F2; color: #B91C1C; }
  .req-recommended { background: #FFFBEB; color: #92400E; }
  .req-notreq { background: var(--s-grey-bg); color: var(--s-grey-text); }

  /* Misc */
  .divider { height: 1px; background: var(--border); margin: 20px 0; }
  .text-muted { color: var(--ink-3); }
  .text-sm { font-size: 12px; }
  .flex { display: flex; }
  .flex-between { display: flex; align-items: center; justify-content: space-between; }
  .gap-8 { gap: 8px; }
  .mb-16 { margin-bottom: 16px; }
  .mb-20 { margin-bottom: 20px; }

  /* Info banner */
  .info-banner {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.5;
    align-items: flex-start;
  }
  .info-banner.amber { background: var(--s-amber-bg); color: var(--s-amber-text); border: 1px solid #FCD34D; }
  .info-banner.green { background: var(--s-green-bg); color: var(--s-green-text); border: 1px solid #6EE7B7; }
  .info-banner.red { background: var(--s-red-bg); color: var(--s-red-text); border: 1px solid #FCA5A5; }
  .info-banner.blue { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

  /* Compliance score bar */
  .compliance-bar-wrap { margin-bottom: 24px; }
  .compliance-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
  .compliance-bar-track {
    height: 6px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
  }
  .compliance-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s ease, background 0.5s;
  }

  /* ── ASSESSMENT LOADER ──────────────────────────────── */
  .tick-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .tick-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-3);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background 0.4s ease;
  }
  .tick-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }
  .assess-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    min-height: 320px;
  }
  .loader-spinner {
    width: 48px; height: 48px;
    border: 3px solid #D0E8DC;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 28px;
    transition: all 0.4s;
  }
  .loader-spinner.done {
    border-color: var(--brand);
    border-top-color: var(--brand);
    animation: none;
    background: var(--brand);
  }
  .loader-spinner.done::after {
    content: '✓';
    display: block;
    color: white;
    font-size: 22px;
    line-height: 42px;
    text-align: center;
  }
  .loader-msg {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    transition: opacity 0.2s ease;
  }
  .loader-sub {
    font-size: 13px;
    color: var(--ink-3);
    margin-bottom: 32px;
    transition: opacity 0.2s ease;
  }

  /* ── STAMP BADGE ────────────────────────────────────── */
  .stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border: 2.5px solid currentColor;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1.2;
  }
  .stamp-required    { color: #B91C1C; background: #FFF5F5; }
  .stamp-recommended { color: #B45309; background: #FFFBEB; }
  .stamp-strong      { color: #B45309; background: #FFFBEB; }
  .stamp-optional    { color: #374151; background: #F9FAFB; }
  .stamp-consider    { color: #374151; background: #F9FAFB; }

  /* ── VERTICAL RESULT CARDS ──────────────────────────── */
  .result-card-v {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
  }
  .result-card-v-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
  }
  .result-card-v-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 6px;
  }
  .result-card-v-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
  }
  .result-card-v-body {
    padding: 20px 24px 24px;
  }
  .result-card-v-desc {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 14px;
  }
  .result-course-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--brand-light);
    border: 1px solid #C5DDD3;
    border-radius: var(--radius);
    margin-bottom: 16px;
    transition: background 0.15s, box-shadow 0.15s;
  }
  .result-course-box:hover {
    background: #DCF0E8;
    box-shadow: 0 2px 8px rgba(17,93,63,0.12);
  }
  .result-course-icon {
    width: 36px; height: 36px;
    background: var(--brand);
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: white;
    font-size: 16px;
  }
  .result-course-name { font-size: 13px; font-weight: 600; color: var(--ink); }
  .result-course-sub  { font-size: 12px; color: var(--ink-2); }
  .result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   SITE TABS — multi-site org dashboard selector
════════════════════════════════════════════════════════════ */
.site-tabs-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-tabs-wrap::-webkit-scrollbar { display: none; }
.site-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: max-content;
}
.site-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.site-tab:hover { background: var(--surface); color: var(--ink); }
.site-tab.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(17,93,63,0.25);
}
.site-tab-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}
.site-tab.active .site-tab-dot { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   FIRST AIDER PHOTO — profile picture in FA rows
════════════════════════════════════════════════════════════ */
.fa-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.fa-photo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 2px solid #C5DDD3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
}
.fa-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.fa-contact span {
  font-size: 11px;
  color: var(--ink-3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SORTED FIRST AID — HOMEPAGE (replaces legacy landing)
   ─────────────────────────────────────────────────────────────────────────── */
.home-page {
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  /* IMPORTANT: keep visible so hover-preview popups can extend beyond the card row. */
  overflow: visible;
  font-family: 'Poppins','Inter','Helvetica Neue',Arial,sans-serif;
}

/* ─── Topbar (full-width green rule under menu, matches stats row rules) ─── */
.home-topbar {
  position: relative;
  width: 100%;
  border-bottom: 3px solid #115D3F;
  background: var(--surface);
  z-index: 5;
  animation: sfaFadeDown 0.55s ease 0.05s both;
}
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 32px;
  max-width: 1380px;
  margin: 0 auto;
}
.home-topbar-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.18s ease;
}
.home-topbar-logo:hover { transform: translateY(-1px); opacity: 0.92; }
.home-topbar-logo img {
  /* New 2-line logo (FIRST AID / NEW ZEALAND) is ~3.18:1 instead of the
     old 6.28:1, so we bump the height to keep similar wordmark size. */
  height: 61px; /* -15% from 72 */
  width: auto;
  display: block;
}
.home-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
/* All three menu buttons share the same rounded SaaS shape as the CTA pair
   below, just sized down for the nav. Equal min-width for a tidy row. */
.home-nav-link,
.home-nav-login,
.home-nav-assess {
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  padding: 11px 22px;
  min-width: 120px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

/* CONTACT — outlined white */
.home-nav-link {
  background: #FFFFFF;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.home-nav-link:hover {
  border-color: var(--ink);
  background: var(--surface-2);
  transform: translateY(-1px);
}

/* LOGIN — slightly grey outlined (differentiates from CONTACT) */
.home-nav-login {
  background: var(--surface-2);
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.home-nav-login:hover {
  background: var(--surface-3);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ASSESS — red filled (matches "Begin Assessment" CTA style) */
.home-nav-assess {
  background: #C8102E;
  color: #FFFFFF;
  border: 1.5px solid #C8102E;
  box-shadow: 0 4px 14px rgba(200,16,46,0.22);
}
.home-nav-assess:hover {
  background: #A00C24;
  border-color: #A00C24;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(200,16,46,0.30);
}

/* ─── Hero text ─── */
.home-intro {
  text-align: center;
  padding: 80px 24px 36px;
  max-width: 1280px;
  margin: 0 auto;
}
.home-hero-eyebrow {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.6px;
  color: var(--brand);
  text-transform: uppercase;
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  animation: sfaFadeUp 0.6s ease 0.15s forwards;
}
.home-hero-eyebrow-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  color: var(--brand);
  transform: scale(0);
  transform-origin: center;
  animation: sfaEyebrowPop 0.55s cubic-bezier(.34,1.7,.5,1) 0.4s forwards;
}
@keyframes sfaEyebrowPop {
  0%   { opacity: 0; transform: scale(0) rotate(-45deg); }
  60%  { opacity: 1; transform: scale(1.18) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.home-hero-main {
  font-family: inherit;
  font-size: 68px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 0 0 40px;
  opacity: 0;
  transform: translateY(14px);
  animation: sfaFadeUp 0.8s cubic-bezier(.2,.85,.3,1.1) 0.28s forwards;
}
.home-hero-main .hero-sorted { color: var(--brand); letter-spacing: 0.5px; }

.home-hero-lead {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink-3);
  font-weight: 400;
  line-height: 1.5;
  margin: 0 auto 20px;
  max-width: 820px;
  opacity: 0;
  transform: translateY(12px);
  animation: sfaFadeUp 0.7s ease 0.55s forwards;
}
.home-hero-lead strong {
  font-weight: 700;
  color: var(--ink-2);
}
.home-hero-headline {
  font-family: inherit;
  font-size: 19px; /* -25% from 25px */
  font-weight: 700;
  color: #C8102E;
  letter-spacing: 0.2px;
  line-height: 1.3;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}
.home-hero-phrase {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.85);
  animation: sfaHeadlinePop 0.55s cubic-bezier(.34,1.6,.5,1) forwards;
  animation-delay: calc(0.8s + var(--w) * 0.22s);
}

/* ─── Cards row ─── */
.home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 56px auto 0;
  padding: 0 32px;
  /* keep visible so popup can extend beyond cell */
  overflow: visible;
}
.home-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 26px 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  animation: sfaCardIn 0.8s cubic-bezier(.2,.85,.3,1.05) both;
  animation-delay: calc(1.4s + var(--i) * 0.14s);
  z-index: 1;
}
.home-card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(17,93,63,0.12), 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-4px);
  z-index: 60; /* lift hovered card so its preview overlaps neighbours */
}
.home-card-num {
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  line-height: 1;
}
.home-card-num span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #BFBFBF;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08);
}
.home-card-title {
  font-family: inherit;
  font-size: 26px;
  font-weight: 700; /* reduced weight */
  color: var(--ink);
  letter-spacing: 0.3px;
  line-height: 1.15;
  margin: 0 0 11px; /* -50% — was 22px */
  opacity: 0;
  transform: translateY(10px);
  animation: sfaFadeUp 0.6s ease forwards;
  animation-delay: calc(1.6s + var(--i) * 0.14s);
}
.home-card-title .t-top { color: #8C8C8C; }   /* slightly lighter grey for first line */
.home-card-title .t-bot { color: var(--ink); }
.home-card-iconwrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3px 0 12px; /* -50% — was 6 / 24 */
  pointer-events: none; /* whole card handles hover now */
}
.home-card-icon {
  width: 132px;
  height: 132px;
  transition: transform 0.3s cubic-bezier(.2,.85,.3,1.1), filter 0.25s ease;
}
.home-card:hover .home-card-icon {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 6px 14px rgba(17,93,63,0.25));
}
/* Card 2 (Tailored Options) — sized in line with the other cards. */
.home-cards .home-card:nth-child(2) .home-card-icon { transform: scale(1.0); }
.home-cards .home-card:nth-child(2):hover .home-card-icon {
  transform: scale(1.07) rotate(-2deg);
}
.home-card-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 12px;
  text-align: left;       /* body copy left-aligned in cards */
  align-self: stretch;
}
.home-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  align-self: stretch;
}
.home-card-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 6px;
}
.home-card-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-2);
}
.home-card-list li.hl { color: #C8102E; }   /* red, no bold */
.home-card-list li.hl::before { background: #C8102E; }

/* ─── Hover preview (overlays the card) ─── */
.home-card-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 460px;
  max-width: 92vw;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(0,0,0,0.22), 0 6px 14px rgba(0,0,0,0.10);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.88);
  transform-origin: 50% 50%;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(.2,.85,.3,1.1);
  z-index: 200; /* always in front of every card */
}
.home-card-preview svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
/* Whole-card hover triggers the preview */
.home-card:hover .home-card-preview,
.home-card:focus-within .home-card-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Edge cards: nudge preview inward so it doesn't clip the viewport */
.home-cards .home-card:first-child .home-card-preview {
  left: 0;
  transform: translate(-8%, -50%) scale(0.88);
}
.home-cards .home-card:first-child:hover .home-card-preview,
.home-cards .home-card:first-child:focus-within .home-card-preview {
  transform: translate(-8%, -50%) scale(1);
}
.home-cards .home-card:last-child .home-card-preview {
  left: auto;
  right: 0;
  transform: translate(8%, -50%) scale(0.88);
}
.home-cards .home-card:last-child:hover .home-card-preview,
.home-cards .home-card:last-child:focus-within .home-card-preview {
  transform: translate(8%, -50%) scale(1);
}

/* ─── CTA ─── */
.home-cta {
  text-align: center;
  /* top -33% (128 → 86); bottom +25% (96 → 120) */
  padding: 86px 24px 120px;
  animation: sfaFadeUp 0.75s ease 1.55s both;
}
.home-cta-question {
  font-family: inherit;
  font-size: 20px;
  color: var(--ink-2);
  margin: 0 0 34px; /* +20% gap above the buttons */
}
.home-cta-question em { font-style: italic; color: var(--ink); font-weight: 600; }
/* Inline wordmark used in place of the word "sorted" — sized to baseline */
.home-cta-sorted {
  height: 1.6em;
  width: auto;
  display: inline-block;
  vertical-align: -0.35em;
  margin: 0 4px;
}
.home-cta-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-cta-primary,
.home-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.4px;
  padding: 18px 34px;
  min-width: 280px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.home-cta-primary {
  background: #C8102E;
  color: #FFFFFF;
  border: 1.5px solid #C8102E;
  box-shadow: 0 6px 18px rgba(200,16,46,0.24);
}
.home-cta-primary:hover {
  background: #A00C24;
  border-color: #A00C24;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(200,16,46,0.32);
}
.home-cta-secondary {
  background: #FFFFFF;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.home-cta-secondary:hover {
  border-color: var(--ink);
  background: var(--surface-2);
  transform: translateY(-1px);
}

/* Stagger the legacy stats + integrations rows in */
#landing.home-page > div[style*="grid-template-columns:1fr 1fr 1fr"] {
  animation: sfaFadeUp 0.75s ease 1.75s both;
}
#landing.home-page > div[style*="border-top:1px solid var(--border)"] {
  animation: sfaFadeUp 0.75s ease 1.9s both;
}

.home-footer {
  text-align: center;
  padding: 26px 24px 36px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.6;
}
.home-footer-links {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 18px;
}
.home-footer-links a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.home-footer-links a:hover {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-dark);
}

/* ─── Animations ─── */
@keyframes sfaFadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sfaFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sfaLogoIn {
  0%   { opacity: 0; transform: translateY(-30px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(6px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sfaHeadlineIn {
  0%   { opacity: 0; transform: scale(0.85); letter-spacing: 12px; }
  100% { opacity: 1; transform: scale(1); letter-spacing: 0.5px; }
}
@keyframes sfaHeadlinePop {
  0%   { opacity: 0; transform: translateY(20px) scale(0.6); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.12); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sfaCardIn {
  0%   { opacity: 0; transform: translateY(28px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-card-preview { width: 360px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   END-OF-FLOW — "Creating dashboard" loader, dashboard preview blur,
   and registration-confirm modal
   ─────────────────────────────────────────────────────────────────────────── */
#dashLoader {
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 1500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#dashLoader.show { display: flex !important; opacity: 1; }
.dl-spinner {
  width: 54px;
  height: 54px;
  border: 3px solid #D0E8DC;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 26px;
}
.dl-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.dl-sub {
  font-size: 13.5px;
  color: var(--ink-3);
}

#app.blurred {
  filter: blur(6px);
  pointer-events: none;
  transition: filter 0.4s ease;
  user-select: none;
}

#endFlowOverlay {
  position: fixed;
  inset: 0;
  background: rgba(20,20,22,0.55);
  backdrop-filter: blur(2px);
  z-index: 1600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.28s ease;
}
#endFlowOverlay.show { display: flex !important; opacity: 1; }
#endFlowModal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  padding: 34px 32px 30px;
  text-align: center;
  animation: modalIn 0.28s ease;
}
.ef-icon, .ef-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.ef-icon { background: var(--brand-light); color: var(--brand); }
.ef-icon svg { width: 30px; height: 30px; }
.ef-check { background: var(--brand); color: #fff; }
.ef-check svg { width: 32px; height: 32px; }
.ef-title {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0 0 10px;
}
.ef-sub {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 22px;
}
.ef-confirm-btn {
  width: 100%;
  padding: 15px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.3px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(17,93,63,0.22);
}
.ef-confirm-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17,93,63,0.30);
}
@media (max-width: 480px) {
  #endFlowModal { padding: 28px 22px 24px; }
  .ef-title { font-size: 18px; }
  .ef-sub { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE & TABLET — global overflow safety + dashboard drawer
   ─────────────────────────────────────────────────────────────────────────── */
.sidebar-backdrop { display: none; }
.mobile-nav-btn { display: none; }

@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }

  /* ─── DASHBOARD: slide-out sidebar drawer ─── */
  #app { height: 100vh; overflow: hidden; }
  .app-layout { position: relative; height: 100%; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 84vw;
    max-width: 320px;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.2,.85,.3,1);
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
  }
  body.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 18px 0 40px rgba(0,0,0,0.18);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20,20,22,0.45);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }

  .main {
    width: 100%;
    height: 100vh;
  }
  .main-header {
    padding: 0 14px;
    height: 54px;
    gap: 10px;
  }
  .mobile-nav-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-right: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-nav-btn span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    border-radius: 2px;
  }
  .main-title { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-actions { gap: 6px; }
  .last-assessed { display: none; }
  .main-actions .btn-sm { padding: 7px 10px; font-size: 12px; }
  .main-actions .btn-sm svg { margin-right: 3px !important; }
  /* Hide reassess label on phones to save room — keep the icon */
  .main-actions .btn-secondary.btn-sm { font-size: 0; padding: 7px 9px; }
  .main-actions .btn-secondary.btn-sm svg { margin-right: 0 !important; }
  .main-content { padding: 16px; }
}

@media (max-width: 640px) {
  /* ─── HOMEPAGE ─── */
  .home-nav { padding: 12px 16px; gap: 10px; }
  .home-nav-actions { gap: 8px; }
  .home-nav-link, .home-nav-login, .home-nav-assess {
    font-size: 12px;
    padding: 8px 14px;
    letter-spacing: 1px;
    min-width: 0;
  }
  .home-topbar-logo img { height: 36px; }

  .home-intro { padding: 54px 18px 24px; }
  .home-hero-eyebrow { font-size: 10.5px; letter-spacing: 2px; margin-bottom: 14px; }
  .home-hero-main { font-size: 40px; letter-spacing: 0; margin-bottom: 22px; }
  .home-hero-lead {
    font-size: 14px;
    margin-bottom: 18px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
  }
  .home-hero-headline {
    font-size: 19px;
    flex-direction: column;
    align-items: center;
    gap: 10px 0;
  }
  .home-hero-headline .home-hero-phrase { display: block; }

  /* Cards: stack, lift gap from hero, redesign tile header so the title sits
     on the left and the icon on the right (no number circle on mobile). */
  .home-cards { grid-template-columns: 1fr; gap: 18px; padding: 0 16px; margin-top: 38px; }
  .home-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title icon"
      "desc  desc"
      "list  list";
    align-items: center;
    text-align: left;
    column-gap: 14px;
    row-gap: 14px;
    padding: 22px 20px 24px;
  }
  .home-card-num { display: none; }
  .home-card-title {
    grid-area: title;
    text-align: left;
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
  }
  .home-card-iconwrap {
    grid-area: icon;
    width: 86px;
    height: 86px;
    margin: 0;
  }
  .home-card-icon { width: 82px; height: 82px; }
  .home-card-desc { grid-area: desc; margin: 0; }
  .home-card-list { grid-area: list; }
  .home-card-preview { width: 260px; max-width: 88vw; }

  .home-cta { padding: 48px 16px 80px; }
  .home-cta-question {
    font-size: 14px;
    margin-bottom: 26px;
    white-space: nowrap;
  }
  .home-cta-sorted { height: 1.4em; vertical-align: -0.28em; }
  .home-cta-actions { display: flex; flex-direction: column; width: 100%; gap: 10px; }
  .home-cta-primary,
  .home-cta-secondary {
    font-size: 14px;
    padding: 14px 18px;
    min-width: 0;
    width: 100%;
    letter-spacing: 1.2px;
  }

  /* Stats row — stack vertically so "Always sorted" doesn't overflow */
  .home-stats {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .home-stats > div {
    padding: 20px 18px !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .home-stats > div:last-child { border-bottom: none !important; }
  .home-stats > div > div:first-child { font-size: 28px !important; }
  .home-stats > div > div:nth-child(2) { font-size: 12.5px !important; }

  /* Workflow logos strip */
  .home-workflows { padding: 48px 14px 30px !important; }
  .home-workflows-inner { gap: 24px !important; }
  .home-workflows-inner > span {
    white-space: normal !important;
    text-align: center;
    width: 100%;
    font-size: 11.5px !important;
    line-height: 1.45;
  }
  .home-workflows-inner img {
    max-height: 42px !important;   /* +50% from 28px */
    width: auto !important;
    object-fit: contain;
  }

  .home-footer { padding: 22px 18px 30px; font-size: 11px; }
  .home-footer-links { gap: 14px; }

  /* ─── ASSESSMENT FLOW ─── */
  #assessment { min-height: 100dvh; }
  .assess-header {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .assess-header .brand-logo img { height: 30px !important; }
  .assess-progress { max-width: none; margin: 0; padding: 0 4px; }
  .progress-label { font-size: 11px; margin-bottom: 5px; }
  .assess-header .btn-ghost {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .assess-body { padding: 28px 16px 40px; }
  .assess-card { max-width: 100%; }
  .assess-card h2 { font-size: 22px; line-height: 1.25; }
  .assess-card .sub { font-size: 13px; }
  .assess-step-num { font-size: 10.5px; margin-bottom: 10px; }
  .option-btn { padding: 14px 16px; gap: 12px; }
  .option-text strong { font-size: 13.5px; }
  .option-text span { font-size: 11.5px; }
  .option-grid.cols-2 { grid-template-columns: 1fr; }
  .assess-nav { flex-direction: column-reverse; gap: 10px; align-items: stretch; }
  .assess-nav .btn { width: 100%; justify-content: center; }
  .help-trigger { font-size: 11.5px; padding: 5px 11px; margin-bottom: 18px; }
  .help-panel-inner { padding: 14px 14px; }

  /* Form rows in assessment / modals — stack */
  .form-row { grid-template-columns: 1fr; gap: 12px; }

  /* Result screen */
  .assess-result .result-badge { font-size: 12px; height: 32px; padding: 6px 12px; }
  .result-card-v { margin-bottom: 22px; }
  .result-card-v-header { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 16px 12px; }
  .result-card-v-body { padding: 14px 16px 18px; }
  .result-card-v-title { font-size: 15px; }
  .result-course-box { padding: 10px 12px; gap: 10px; }
  .result-actions { gap: 8px; }
  .result-actions .btn { flex: 1; min-width: 0; justify-content: center; font-size: 13px; }
  .stamp { font-size: 11px; padding: 5px 12px; letter-spacing: 1px; }
  .compliance-bar-wrap { margin-bottom: 18px; }
  .info-banner { padding: 10px 12px; font-size: 12px; }

  /* Loader screen */
  .assess-loader { padding: 40px 18px; min-height: 280px; }
  .tick-row { padding: 12px 14px; gap: 12px; }
  .tick-label { font-size: 14px; }

  /* ─── EMAIL CAPTURE ─── */
  #emailCapture { padding: 32px 18px; }
  .ec-logo { height: 72px; margin-bottom: 20px; }
  .ec-title { font-size: 24px; line-height: 1.25; }
  .ec-sub { font-size: 14px; }
  .ec-form { max-width: 100%; }
  .ec-form input, .ec-form button { font-size: 14.5px; padding: 13px 14px; }
  .ec-fine { font-size: 11.5px; padding: 0 8px; }

  /* ─── DASHBOARD CONTENT ─── */
  .tab-hero { gap: 12px; padding-bottom: 14px; margin-bottom: 16px; }
  .tab-hero-icon { width: 44px; height: 38px; }
  .tab-hero-text h2 { font-size: 16px; }
  .tab-hero-text p { font-size: 12px; }

  .overview-status-bar { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
  .status-card { padding: 14px 16px; gap: 12px; }
  .status-icon-wrap { width: 38px; height: 38px; }
  .status-icon-wrap svg { width: 18px; height: 18px; }
  .sc-fraction { font-size: 20px; }

  .overview-cards { gap: 12px; }
  .oc-header { padding: 14px 16px; gap: 10px; }
  .oc-title h3 { font-size: 14px; }
  .oc-body { flex-direction: column; align-items: stretch; padding: 12px 16px 14px; gap: 12px; }
  .oc-actions { width: 100%; }
  .oc-actions .btn { flex: 1; justify-content: center; }

  /* First aiders table → card list */
  .fa-table-head { display: none; }
  .fa-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
  .fa-actions { justify-content: flex-start; margin-top: 6px; flex-wrap: wrap; }
  .fa-cell { font-size: 12.5px; }
  .empty-slot { padding: 14px 16px; gap: 12px; }

  /* Kits grid → single column */
  .kit-grid { grid-template-columns: 1fr; gap: 12px; }
  .kit-card-header { padding: 14px 16px 10px; }
  .kit-body { padding: 12px 16px 14px; }
  .kit-actions { flex-wrap: wrap; }
  .kit-actions .btn { flex: 1; min-width: 0; justify-content: center; }

  .section-summary { gap: 5px; }
  .summary-chip { padding: 5px 10px; font-size: 11.5px; }
  .summary-chip-num { font-size: 13px; }
  .section-header { flex-wrap: wrap; gap: 8px; }

  /* Site tabs already scroll horizontally — just trim padding */
  .site-tabs-wrap { margin: 0 -16px 14px; padding: 0 16px; }

  /* ─── MODALS ─── */
  .modal-overlay { padding: 0; }
  .modal {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .modal-header { padding: 16px 18px; }
  .modal-header h3 { font-size: 15px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px; flex-wrap: wrap; gap: 8px; }
  .modal-footer .btn { flex: 1; min-width: 0; justify-content: center; }

  /* Scroll popup */
  #scrollPopup {
    padding: 22px 20px;
    width: calc(100% - 32px);
    max-width: 100%;
    gap: 14px;
  }
  #scrollPopup .popup-text { font-size: 16px; }
  #scrollPopup .popup-sub { font-size: 12px; }

  /* Toast — allow wrap on tiny screens */
  #toast {
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
    font-size: 12.5px;
    padding: 10px 16px;
  }
}

/* Extra-tight screens (older phones / small Android) */
@media (max-width: 360px) {
  .home-hero-main { font-size: 34px; }
  .home-nav-link, .home-nav-login, .home-nav-assess { font-size: 11px; padding: 7px 11px; letter-spacing: 0.8px; }
  .home-topbar-logo img { height: 32px; }
  .ec-title { font-size: 21px; }
  .assess-card h2 { font-size: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT / LOGIN modal tweaks + EMAIL CAPTURE screen
   ─────────────────────────────────────────────────────────────────────────── */
#emailCapture {
  display: none;
  min-height: 100vh;
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
#emailCapture.show { display: flex; animation: sfaFadeUp 0.55s ease both; }
.ec-logo { height: 96px; width: auto; margin-bottom: 28px; }
.ec-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 14px;
}
.ec-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  max-width: 620px;
  line-height: 1.2;
}
.ec-sub {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 540px;
  line-height: 1.6;
  margin: 0 auto 28px;
}
.ec-form {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ec-form input {
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease;
}
.ec-form input:focus { border-color: var(--brand); }
.ec-form button {
  background: #111111;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 15px;
  padding: 16px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}
.ec-form button:hover { background: var(--brand); transform: translateY(-1px); }
.ec-fine {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 18px;
  max-width: 460px;
}
.ec-success {
  background: var(--s-green-bg);
  border: 1px solid #6EE7B7;
  color: var(--s-green-text);
  padding: 18px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.ec-success.show { display: block; }
