/* =========================================================
   Uganda Airlines Salary & Benefits Survey - True North Consult
   ========================================================= */
:root {
  --navy: #003366;
  --navy-700: #00284f;
  --navy-50: #eef3f9;
  --green: #008000;
  --green-600: #006d00;
  --green-50: #ecf7ec;
  --lime: #9ACD32;
  --lime-50: #f4faea;
  --ink: #1b2633;
  --ink-2: #44515f;
  --muted: #6b7785;
  --line: #e2e7ee;
  --line-2: #eef1f5;
  --bg: #f4f6f9;
  --card: #ffffff;
  --danger: #c0392b;
  --danger-50: #fdf0ee;
  --warn: #b7791f;
  --warn-50: #fff8eb;
  --info: #2b6cb0;
  --info-50: #ebf4ff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 1px 3px rgba(16, 32, 56, .06);
  --shadow-lg: 0 10px 30px rgba(16, 32, 56, .12);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
a { color: var(--navy); }
a:hover { color: var(--green); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5rem; font-weight: 650; }
h1 { font-size: 1.65rem; }
.h2, h2 { font-size: 1.25rem; }
.h3, h3 { font-size: 1.05rem; }
p { margin: 0 0 .9rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 1rem; }
[hidden], .is-hidden { display: none !important; }
.ic { flex: none; vertical-align: middle; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 560px; }
.site-main { padding: 28px 0 48px; min-height: calc(100vh - var(--topbar-h) - 60px); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--green) 70% 88%, var(--lime) 88%); }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand-logo { height: 38px; width: auto; }
.brand-sep { width: 1px; height: 28px; background: var(--line); }
.brand-title { font-weight: 600; color: var(--navy); font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.save-status { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); padding: 6px 12px; border-radius: 99px; background: var(--line-2); white-space: nowrap; }
.save-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.save-status[data-state="saving"] .dot { background: var(--lime); animation: pulse 1s infinite; }
.save-status[data-state="dirty"] .dot { background: var(--warn); }
.save-status[data-state="error"] { background: var(--danger-50); color: var(--danger); }
.save-status[data-state="error"] .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; color: var(--ink); }
.user-btn:hover { background: var(--line-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-weight: 600; font-size: .9rem; flex: none; }
.user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 500; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.user-menu.open .menu { display: block; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; font-size: .85rem; color: var(--ink-2); word-break: break-all; }
.menu a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.menu a:hover { background: var(--navy-50); color: var(--navy); }

.site-footer { border-top: 1px solid var(--line); padding: 18px 0; font-size: .8rem; color: var(--muted); background: #fff; text-align: center; }

/* ---------- Cards, buttons, inputs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn:focus-visible, .input:focus-visible { outline: 3px solid rgba(154, 205, 50, .55); outline-offset: 1px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-600); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }
.btn-outline { background: #fff; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy-50); color: var(--navy); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #c9d2de; color: var(--navy); background: #fafbfc; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-xs { padding: 4px 10px; font-size: .8rem; font-weight: 600; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--navy); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.input { width: 100%; font: inherit; font-size: .93rem; color: var(--ink); background: #fff; border: 1px solid #cfd7e2; border-radius: var(--radius-sm); padding: 9px 12px; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: #b4c0cf; }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 51, 102, .12); }
textarea.input { resize: vertical; min-height: 84px; }
.input-select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2344515f' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 10px; cursor: pointer; }
.input-sm { max-width: 220px; }
.field { display: block; margin-bottom: 16px; }
.field > span:first-child { display: block; font-size: .87rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw-toggle.on, .pw-toggle:hover { color: var(--navy); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }

/* ---------- Alerts, badges, toasts, modal ---------- */
.alert { position: relative; padding: 12px 40px 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; border: 1px solid; }
.alert-success { background: var(--green-50); border-color: #c4e5c4; color: #135c13; }
.alert-danger { background: var(--danger-50); border-color: #f2c9c3; color: #8f2a1f; }
.alert-warning { background: var(--warn-50); border-color: #f3dfb5; color: #7a5212; }
.alert-info { background: var(--info-50); border-color: #c8ddf5; color: #1f4f80; }
.alert-x { position: absolute; right: 8px; top: 7px; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: inherit; opacity: .6; cursor: pointer; }
.alert-x:hover { opacity: 1; }
.sticky-alert { position: sticky; top: calc(var(--topbar-h) + 10px); z-index: 20; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--green-50); color: var(--green); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-navy { background: var(--navy-50); color: var(--navy); }
.badge-danger { background: var(--danger-50); color: var(--danger); }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow-lg); transition: opacity .4s, transform .4s; }
.toast-success { background: var(--green); }
.toast-danger { background: var(--danger); }
.toast-warn { background: #8a5a12; }
.toast.out { opacity: 0; transform: translateY(8px); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 25, 45, .45); z-index: 300; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }
.modal p { color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }

.pbar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.pbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: 99px; transition: width .5s; }
.pbar-sm { height: 6px; }

/* ---------- Landing ---------- */
.page-landing { background: linear-gradient(180deg, #fff 0, var(--bg) 420px); }
.landing { padding: 40px 0 56px; }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); gap: 36px; align-items: start; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.landing-intro h1 { font-size: 2.1rem; margin-bottom: 8px; }
.lead { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 22px; }
.preamble { padding: 26px 28px; }
.preamble h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 12px; }
.preamble p { color: var(--ink-2); }
.contact-card { display: flex; gap: 14px; align-items: flex-start; background: var(--navy-50); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 6px; font-size: .92rem; }
.contact-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.contact-title { font-weight: 650; color: var(--navy); }
.features { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: .94rem; }
.features li span { width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; flex: none; }
.landing-login { position: sticky; top: calc(var(--topbar-h) + 24px); }
.login-card { padding: 30px; border-top: 4px solid var(--navy); }
.login-card h2 { font-size: 1.3rem; }

/* ---------- Survey layout ---------- */
.page-survey { background: var(--bg); }
.survey-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr) 330px; gap: 24px; max-width: 1600px; margin: 0 auto; padding: 26px 20px 60px; align-items: start; }
body.lp-collapsed .survey-shell { grid-template-columns: 260px minmax(0, 1fr); }

.steps { position: sticky; top: calc(var(--topbar-h) + 20px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps-head { padding: 18px 18px 16px; border-bottom: 1px solid var(--line-2); }
.steps-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--green); }
.steps-progress { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 10px; }
.steps-pct { font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1; }
.steps-pct-label { color: var(--muted); font-size: .85rem; }
.steps-list { list-style: none; margin: 0; padding: 8px; }
.step { display: flex; gap: 11px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .88rem; line-height: 1.35; }
.step:hover { background: var(--line-2); color: var(--navy); }
.step.active { background: var(--navy-50); color: var(--navy); font-weight: 600; }
.step-dot { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c5cfdb; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); flex: none; background: #fff; }
.step-dot .ic { display: none; }
.step.active .step-dot { border-color: var(--navy); color: var(--navy); }
.step.is-done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.is-done .step-dot .n { display: none; }
.step.is-done .step-dot .ic { display: block; }
.step-label { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.step-label b { font-weight: 700; }
.step-count { color: var(--muted); font-weight: 400; font-size: .75rem; }
.step-review { margin-top: 6px; border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; padding-top: 12px; }
.step-review .step-dot { border-style: dashed; }
.steps-mobile { display: none; }

.survey-main { min-width: 0; }
.sec-head { margin-bottom: 18px; }
.sec-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.sec-head h1 { font-size: 1.6rem; }
.sec-desc { color: var(--muted); margin: 0; }
.prose p { color: var(--ink-2); }

.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.howto-item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: .88rem; }
.howto-item b { display: block; color: var(--navy); margin-bottom: 2px; }
.howto-item span { color: var(--ink-2); }
.howto-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--green-50); color: var(--green); display: grid; place-items: center; flex: none; }

.q-list { padding: 4px 0; }
.q { padding: 22px 26px; border-bottom: 1px solid var(--line-2); transition: background .4s; }
.q:last-child { border-bottom: 0; }
.q-followup { border-left: 3px solid var(--lime); padding-left: 23px; background: linear-gradient(90deg, var(--lime-50), #fff 160px); }
.q.reveal { animation: reveal .6s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
.q.attention { background: var(--warn-50); }
.q-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.q-code { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 6px; background: var(--navy-50); color: var(--navy); font-size: .76rem; font-weight: 700; margin-top: 1px; }
.q-text { font-weight: 600; color: var(--ink); font-size: .98rem; }
.req { color: var(--danger); font-weight: 700; }
.q-help { font-size: .84rem; color: var(--muted); margin: -4px 0 12px 46px; }
.q-body { margin-left: 46px; }
.q-body > .input { max-width: 560px; }
.q-body > textarea.input { max-width: 100%; }

.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { position: relative; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #cfd7e2; border-radius: 99px; font-size: .9rem; background: #fff; transition: all .15s; }
.check span::before { content: ""; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #9aa8b8; background: #fff center/11px no-repeat; }
.check input:checked + span { border-color: var(--green); background: var(--green-50); color: #135c13; font-weight: 600; }
.check input:checked + span::before { background-color: var(--green); border-color: var(--green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); }
.check input:focus-visible + span { outline: 3px solid rgba(154, 205, 50, .55); }

/* grids */
.grid-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.grid-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.grid th, .grid td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.grid thead th { background: #f7f9fb; color: var(--ink-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); }
.grid tbody tr:last-child th, .grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: #fafcfe; }
.grid .grid-rowhead { width: 46%; font-weight: 500; color: var(--ink); }
.grid-multi .grid-rowhead { width: 40%; }
.grid td .input { padding: 7px 10px; font-size: .9rem; }
.grid-multi td:nth-child(2) { width: 170px; }
.grid-group td { background: var(--navy-50); color: var(--navy); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 7px 12px; }
.grid-empty td { color: var(--muted); font-style: italic; text-align: center; padding: 16px; }
.grid tr.flash { background: var(--lime-50); }
.lvl-cell { display: flex; align-items: center; gap: 10px; }
.lvl-title { flex: 1; min-width: 0; }
.lvl-no { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 700; }
.lvl-info { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: italic 700 .72rem/1 Georgia, serif; cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.lvl-info:hover { background: var(--navy); color: #fff; }
.lvl-info-inline { display: inline-grid; vertical-align: middle; cursor: default; }

.sec-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.sec-nav-right { display: flex; gap: 10px; flex-wrap: wrap; }

/* job level panel */
.levels-panel { position: sticky; top: calc(var(--topbar-h) + 20px); max-height: calc(100vh - var(--topbar-h) - 40px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
body.lp-collapsed .levels-panel { display: none; }
.lp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px; background: var(--navy); color: #fff; }
.lp-head h3 { color: #fff; margin: 0; font-size: 1.02rem; }
.lp-kicker { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--lime); font-weight: 700; }
.lp-sub { font-size: .8rem; opacity: .8; }
.lp-close { border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; flex: none; }
.lp-close:hover { background: rgba(255, 255, 255, .25); }
.lp-body { overflow: auto; padding: 8px; }
.lp-item { border-radius: 8px; transition: background .3s; }
.lp-item + .lp-item { border-top: 1px solid var(--line-2); }
.lp-item summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink); border-radius: 8px; }
.lp-item summary::-webkit-details-marker { display: none; }
.lp-item summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 1.1rem; }
.lp-item[open] summary::after { content: "\2212"; }
.lp-item summary:hover { background: var(--line-2); }
.lp-item[open] { background: #fafbfd; }
.lp-item.flash { background: var(--lime-50); }
.lp-desc { padding: 0 12px 12px 44px; font-size: .84rem; color: var(--ink-2); }
.lp-desc ul { margin: 0 0 8px; padding-left: 16px; }
.lp-desc li { margin-bottom: 3px; }
.lp-ex { background: var(--green-50); border-radius: 6px; padding: 8px 10px; font-size: .82rem; }
.lp-ex strong { color: var(--green); }
.levels-fab { display: none; }
.lp-backdrop { display: none; }
body.lp-collapsed .levels-fab { display: inline-flex; position: fixed; right: 20px; bottom: 20px; z-index: 40; gap: 8px; align-items: center; background: var(--navy); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; box-shadow: var(--shadow-lg); }
.levels-fab:hover { background: var(--navy-700); }

/* ---------- Review / response ---------- */
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.review-score { text-align: center; flex: none; }
.ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line-2) 0); display: grid; place-items: center; margin: 0 auto 6px; }
.ring span { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.missing-card { border-left: 4px solid var(--danger); margin-bottom: 20px; }
.dot-danger { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.missing-list { list-style: none; padding: 0; margin: 10px 0 0; }
.missing-list li + li { border-top: 1px solid var(--line-2); }
.missing-list a { display: flex; gap: 12px; align-items: center; padding: 10px 4px; text-decoration: none; color: var(--ink); }
.missing-list a:hover { background: #fafbfc; }
.ml-text { flex: 1; min-width: 0; font-size: .9rem; }
.ml-text small { display: block; color: var(--muted); }
.ml-go { color: var(--navy); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.ready-card { display: flex; gap: 16px; align-items: center; border-left: 4px solid var(--green); margin-bottom: 20px; }
.ready-card p { margin: 0; }
.ready-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; flex: none; }
.review-sec { margin-bottom: 16px; overflow: hidden; }
.review-sec-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.review-sec-head h2 { margin: 0; }
.q-list-view .q { padding: 16px 22px; }
.q-list-view .q-followup { padding-left: 19px; }
.ans { background: #f7f9fb; border-radius: 6px; padding: 8px 12px; color: var(--ink); white-space: normal; }
.ans-empty { color: #a0aab5; font-style: italic; }
.submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg); margin-top: 20px; }
.submitted-note { display: flex; gap: 8px; align-items: center; color: #135c13; background: var(--green-50); padding: 10px 14px; border-radius: var(--radius-sm); }
.empty-state { text-align: center; padding: 40px 30px; }

/* ---------- Admin ---------- */
.layout-admin { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--navy); color: #c9d6e6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sb-brand { padding: 22px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sb-brand img { height: 36px; width: auto; display: block; }
.sb-app { margin-top: 8px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); font-weight: 700; }
.sb-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.sb-nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; color: #c9d6e6; text-decoration: none; border-radius: 8px; font-size: .92rem; font-weight: 500; }
.sb-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-nav a.active { background: rgba(154, 205, 50, .16); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.sb-nav a.active .ic { color: var(--lime); }
.sb-foot { padding: 14px 12px 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.sb-foot a { display: flex; gap: 10px; align-items: center; padding: 7px 12px; color: #c9d6e6; text-decoration: none; border-radius: 6px; }
.sb-foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-user { display: flex; gap: 10px; align-items: center; padding: 4px 12px 10px; }
.sb-user .avatar { background: var(--green); }
.sb-name { color: #fff; font-weight: 600; font-size: .88rem; }
.sb-mail { font-size: .75rem; opacity: .75; word-break: break-all; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.admin-top h1 { font-size: 1.25rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-actions { display: flex; gap: 10px; }
.sb-toggle { display: none; border: 0; background: none; color: var(--navy); cursor: pointer; padding: 4px; }
.admin-content { padding: 26px 28px 48px; max-width: 1400px; width: 100%; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { padding: 18px 20px; }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.2; margin-top: 4px; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi-accent { border-top: 3px solid var(--green); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-body { padding: 18px 20px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 160px; }
.toolbar .search { min-width: 260px; flex: 1; max-width: 380px; }
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { background: #f7f9fb; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 650; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr:hover { background: #fafcfe; }
.table .num { text-align: right; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn, .table .actions form { margin-left: 4px; }
.table .actions form { display: inline; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: .8rem; color: var(--muted); }
.prog-cell { min-width: 140px; }
.prog-cell .pct { font-size: .78rem; color: var(--muted); }

.cat-bars .cb-row { margin-bottom: 14px; }
.cb-top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 6px; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.stack span { display: block; height: 100%; }
.stack .s-sub { background: var(--green); }
.stack .s-prog { background: var(--lime); }
.stack .s-open { background: #a9c4e2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.sec-progress { display: grid; gap: 10px; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 60px; gap: 14px; align-items: center; font-size: .88rem; }
.sp-row .pct { text-align: right; color: var(--muted); font-size: .82rem; }

.cred-box { background: var(--navy-50); border: 1px dashed #9db4cf; border-radius: var(--radius-sm); padding: 14px 16px; font-family: Consolas, Menlo, monospace; font-size: .92rem; margin: 10px 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.builder-sec { margin-bottom: 18px; }
.builder-sec .panel-head { background: #fafbfc; }
.bq { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.bq:last-child { border-bottom: 0; }
.bq-main { flex: 1; min-width: 0; }
.bq-text { font-weight: 500; }
.bq-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.bq-actions { display: flex; gap: 4px; flex: none; }
.bq-child { padding-left: 46px; }
.chip { font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); font-weight: 600; }
.chip-req { background: var(--danger-50); color: var(--danger); }
.chip-cond { background: var(--lime-50); color: #5a7d1a; }
.chip-type { background: var(--navy-50); color: var(--navy); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; text-decoration: none; padding: 0; font: inherit; }
.icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.col-editor .col-row { display: grid; grid-template-columns: 120px 1fr 120px 1fr 90px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.col-editor .col-head { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: .9rem; }
.switch input { width: 16px; height: 16px; accent-color: var(--green); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--green); }
.tabs a:hover { color: var(--navy); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .survey-shell, body.lp-collapsed .survey-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .levels-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); max-height: none; border-radius: 0; z-index: 120; transform: translateX(105%); transition: transform .25s ease; display: flex !important; }
  body.lp-open .levels-panel { transform: none; }
  body.lp-open .lp-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 25, 45, .4); z-index: 110; }
  .levels-fab, body.lp-collapsed .levels-fab { display: inline-flex; position: fixed; right: 18px; bottom: 18px; z-index: 40; gap: 8px; align-items: center; background: var(--navy); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; box-shadow: var(--shadow-lg); }
}
@media (max-width: 980px) {
  .landing-grid { grid-template-columns: 1fr; }
  .landing-login { position: static; order: -1; }
  .survey-shell, body.lp-collapsed .survey-shell { grid-template-columns: 1fr; padding-top: 0; }
  .steps { display: none; }
  .steps-mobile { display: flex; gap: 12px; align-items: center; position: sticky; top: var(--topbar-h); z-index: 30; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .steps-mobile .input { flex: 1; }
  .steps-mobile-pct { font-weight: 700; color: var(--navy); }
  .howto { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .cols-3-1 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-100%); transition: transform .25s; }
  body.sb-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .sb-toggle { display: block; }
  .admin-content, .admin-top { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .brand-sep, .brand-title, .user-name { display: none; }
  .brand-logo { height: 32px; }
  .save-status { padding: 5px 10px; }
  .q { padding: 18px 16px; }
  .q-followup { padding-left: 13px; }
  .q-help, .q-body { margin-left: 0; }
  .landing-intro h1 { font-size: 1.6rem; }
  .preamble, .login-card, .card-pad { padding: 20px; }
  .review-head { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sp-row { grid-template-columns: 1fr 80px 44px; }
  /* stack grid rows as cards on phones */
  .grid thead { display: none; }
  .grid, .grid tbody, .grid tr, .grid th, .grid td { display: block; width: 100% !important; }
  .grid tr { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .grid th, .grid td { border: 0; padding: 4px 0; }
  .grid td::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
  .grid-group td::before, .grid-empty td::before { content: none; }
  .grid tr.grid-group { padding: 0; border: 0; }
  .submit-bar { flex-direction: column-reverse; align-items: stretch; }
  .col-editor .col-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-footer, .no-print, .levels-fab, .steps, .submit-bar, .alert-x { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; break-inside: avoid-page; }
  .review-sec { break-inside: auto; }
  .q { break-inside: avoid; }
  .site-main { padding: 0; }
}
.cred-inline { font-family: Consolas, Menlo, monospace; background: #fff; border: 1px dashed #9db4cf; padding: 2px 8px; border-radius: 5px; font-weight: 700; }
.contact-lines { line-height: 1.8; }
.instructions { margin-top: 16px; border-left: 4px solid var(--lime); }
.instructions h2 { margin-bottom: 8px; }
.instructions ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.instructions li { margin-bottom: 4px; }

/* ---------- 30 Oct: multi-select cells, locked menu, guidance ---------- */
.ms summary { list-style: none; cursor: pointer; min-width: 160px; white-space: normal; line-height: 1.35; padding-top: 7px; padding-bottom: 7px; }
.ms summary::-webkit-details-marker { display: none; }
.ms-ph { color: #8a96a3; }
.ms-pop { margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.ms-pop label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: .86rem; }
.ms-pop label:hover { background: var(--line-2); }
.ms-pop input { accent-color: var(--green); width: 15px; height: 15px; }
.grid-wide .grid-rowhead { width: 30%; }
.grid-multi td .input-select { min-width: 120px; }
.cell-na { color: #a0aab5; padding-left: 4px; }
.nav-locked .js-step:not([data-sec="0"]), .nav-locked .js-review { opacity: .45; cursor: not-allowed; }
.nav-locked .js-step:not([data-sec="0"]):hover, .nav-locked .js-review:hover { background: none; color: var(--ink-2); }
.guidance h2 { font-size: 1.2rem; margin-bottom: 10px; }
.guidance h3 { font-size: 1rem; margin: 18px 0 8px; }
.guidance .def { padding-left: 2px; }
.guidance .def-no { color: var(--muted); }
.guidance-contacts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }

/* ---------- 31 Oct: job level examples split ---------- */
.lp-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); margin: 2px 0 4px; }
.lp-ex-split { display: grid; gap: 8px; margin-top: 10px; }
.lp-ex-col { border-radius: 8px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; }
.lp-ex-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.lp-ex-ga { border-left: 3px solid var(--navy); }
.lp-ex-ga .lp-ex-head { color: var(--navy); }
.lp-ex-ais { border-left: 3px solid var(--green); }
.lp-ex-ais .lp-ex-head { color: var(--green); }
.lp-ex-list { margin: 0; padding-left: 16px; font-size: .82rem; color: var(--ink-2); }
.lp-ex-list li { margin-bottom: 2px; }
.lp-none { font-size: .8rem; color: #a0aab5; font-style: italic; }
.idle-modal .countdown { font-size: 2rem; font-weight: 700; color: var(--navy); text-align: center; margin: 8px 0; }
.form-locked { pointer-events: none; opacity: .55; filter: grayscale(.3); }
.ms-pop { max-height: 260px; overflow-y: auto; }
.grid td[data-col="aircraft"] { min-width: 230px; }
.ms-pop label { white-space: nowrap; }
