/* ==========================================================================
   e401klink – application styles
   Replaces general.css / admin.css for MBL Lite.
   ========================================================================== */

:root {
	--ink: #142330;
	--body: #22313E;
	--muted: #55626F;
	--line: #DCE2E8;
	--line-strong: #B4BEC8;
	--ground: #F3F5F7;
	--surface: #FFFFFF;
	--primary: #0D5B7F;
	--primary-hover: #0A4864;
	--primary-soft: #E6F0F5;
	--accent: #B8432A;
	--accent-soft: #FBEDE8;
	--ok: #1D6F47;
	--ok-soft: #E5F3EB;
	--danger: #A3352B;
	--danger-soft: #FBECEA;
	--warn-ink: #6E4600;
	--warn-soft: #FFF5E0;
	--warn-line: #EBC777;
	--font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { 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(--ground);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
p + p { margin-top: 12px; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
form { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 24px; height: 24px; }

/* ==========================================================================
   Shell: header, side menu, footer
   ========================================================================== */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 32px; height: 72px; display: flex; align-items: center; gap: 16px; }
.topbar .brand { display: flex; align-items: center; }
.topbar .brand img { height: 50px; width: auto; display: block; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.client-logo { display: flex; align-items: center; }
.client-logo img { display: block; width: auto; height: 50px; max-width: 150px; object-fit: contain; }
.topbar-div { width: 1px; height: 32px; background: var(--line); }
.signout { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.signout:hover { color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; margin-left: -8px; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn:hover { background: #EEF2F5; }
.menu-btn .close { display: none; }
.nav-open .menu-btn .open { display: none; }
.nav-open .menu-btn .close { display: block; }

.layout { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 32px 56px; display: flex; gap: 40px; align-items: flex-start; }
.side { flex: 0 0 236px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 24px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; }
.nav-group a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-group a:hover { background: #E9EDF1; color: var(--ink); }
.nav-group a svg { color: var(--muted); }
.nav-group a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-group a.on svg { color: var(--primary); }
.nav-mobile-only { display: none; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.main.narrow { max-width: 760px; }
.col { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 24px; }

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.footer-in a { color: var(--muted); }
.footer-in .copy { margin-left: auto; }

/* ==========================================================================
   Page header
   ========================================================================== */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-title { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.lede { color: var(--muted); font-size: 16px; max-width: 70ch; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; min-height: 32px; align-self: flex-start; }
.crumb:hover { color: var(--ink); }
.plan-select { display: flex; flex-direction: column; gap: 4px; min-width: 280px; }
.plan-select label { font-size: 13px; font-weight: 500; color: var(--muted); }

/* ==========================================================================
   Surfaces
   ========================================================================== */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h2 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.card p { color: var(--body); }
.card.flush { padding-top: 8px; padding-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.split > .grow { flex: 1 1 420px; }
.sec-title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.placeholder { color: var(--accent); font-style: italic; }

.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: 10px; border: 1px solid; font-size: 14px; }
.callout > svg { margin-top: 1px; }
.callout .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.callout ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.callout.info { background: var(--primary-soft); border-color: #BFD7E4; color: #0B4561; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.callout.error { background: var(--danger-soft); border-color: #EDBDB7; color: var(--danger); }
.callout h2 { font-size: 16px; font-weight: 600; color: inherit; }

/* Confirmation panel */
.done-panel { display: flex; flex-direction: column; gap: 18px; padding: 32px; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.done-icon svg { stroke-width: 2.25; }
.done-panel h2 { font-size: 22px; }
.contact-box { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 16px 18px; background: var(--ground); border-radius: 10px; font-size: 15px; }
.contact-box .lbl { width: 100%; font-size: 13px; color: var(--muted); }
.contact-box a, .contact-line a { display: inline-flex; align-items: center; gap: 6px; }

/* Home tiles */
.tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); min-height: 168px; transition: border-color .15s; }
.tile:hover { border-color: var(--primary); color: var(--ink); }
.tile .ib, .ib { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.tile .ib.admin { background: var(--accent-soft); color: var(--accent); }
.tile .txt { display: flex; flex-direction: column; gap: 6px; }
.tile .t { font-size: 17px; font-weight: 600; }
.tile .d { font-size: 14px; color: var(--muted); }
.tile.compact { min-height: 0; }

/* Link-out cards */
.go { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.go:hover { border-color: var(--primary); color: var(--ink); }
.go .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.go .t { font-size: 17px; font-weight: 600; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 8px; font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; -webkit-appearance: none; appearance: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: #EEF2F5; color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .q { font-size: 14px; font-weight: 500; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
	width: 100%; min-height: 44px; padding: 10px 12px;
	border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
	font: 400 15px/1.4 var(--font); color: var(--ink);
}
.textarea { min-height: 140px; resize: vertical; }
.select {
	-webkit-appearance: none; appearance: none; padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355626F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.input[readonly] { background: var(--ground); color: var(--muted); }
.input.short { max-width: 220px; }
.affix { display: flex; align-items: stretch; max-width: 280px; }
.affix .pre, .affix .post { display: flex; align-items: center; padding: 0 12px; background: var(--ground); border: 1px solid var(--line-strong); color: var(--muted); }
.affix .pre { border-right: 0; border-radius: 8px 0 0 8px; }
.affix .post { border-left: 0; border-radius: 0 8px 8px 0; }
.affix .input { border-radius: 0; min-width: 0; }
.affix .pre + .input { border-radius: 0 8px 8px 0; }
.affix .input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.affix .pre + .input:not(:last-child) { border-radius: 0; }
.affix .input:first-child:not(:last-child) { border-radius: 8px 0 0 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 24px; }
fieldset.fs { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.fs > legend { padding: 0; margin-bottom: 10px; }
.reveal { padding-left: 16px; border-left: 2px solid var(--line); }

/* Pill choices (radio buttons) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice span {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	min-height: 44px; min-width: 72px; padding: 0 16px; line-height: 1.2;
	border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
	font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.choice span:hover { border-color: var(--primary); }
.choice input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.seg.fill .choice { flex: 1 1 0; }
.seg.fill .choice span { width: 100%; border-radius: 8px; padding: 0 8px; }

/* Radio / checkbox cards */
.rcard { position: relative; display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; }
.rcard > input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.rcard:has(> input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: #F7FBFD; }
.rcard .nm { font-weight: 600; font-size: 16px; }
.rcard .ln { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.rcard .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }

.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

/* Steps */
.steps { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.steps .s { display: flex; align-items: center; gap: 8px; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); }
.steps .s.on { color: var(--ink); font-weight: 600; }
.steps .s.on .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps .s.done .dot { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.steps .line { width: 40px; height: 1px; background: var(--line-strong); }

/* ==========================================================================
   Data display
   ========================================================================== */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: #fff; padding: 16px 20px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.3; }
.stat .v.text { font-size: 18px; padding-top: 3px; }
.stat .n { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat.hl { background: var(--primary-soft); }
.stat.hl .k { color: #0B4561; }
.stat.hl .v { color: var(--primary); }

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.bar { height: 8px; border-radius: 4px; background: #E6EBEF; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }

.kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 12px 20px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd:empty::before { content: '—'; color: #8A96A1; }

.linklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.linklist li + li { border-top: 1px solid var(--line); }
.linklist a, .linklist .row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 4px; text-decoration: none; color: var(--ink); }
.linklist a:hover { color: var(--primary); }
.linklist .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.linklist .grow { flex: 1; min-width: 0; }
.linklist .meta { display: block; font-size: 13px; color: var(--muted); }
.linklist .end { color: var(--muted); }
.linklist .row.off .ic { background: var(--ground); color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.carrier-head { display: flex; align-items: center; gap: 16px; }
.carrier-head img { display: block; max-height: 56px; max-width: 140px; width: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
.carrier + .carrier { margin-top: 8px; }

/* Rollover options */
.opt-n { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 600; }

/* Long legal text */
.prose-card { padding: 32px 36px; }
.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; color: var(--body); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 16px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }

/* ==========================================================================
   Investment advice
   ========================================================================== */

.qrow { border: 0; margin: 0; padding: 20px 0; min-width: 0; }
.qrow + .qrow { border-top: 1px solid var(--line); }
.qrow > legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 15px; color: var(--body); }
.qrow > legend b { font-weight: 600; color: var(--ink); }
.qrow > .seg { clear: both; }

.alloc { display: grid; grid-template-columns: minmax(140px, 200px) 1fr 48px; gap: 10px 16px; align-items: center; }
.alloc .bar { height: 12px; border-radius: 6px; }
.alloc .pct { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.fund-card { display: flex; flex-direction: column; padding-bottom: 14px; }
.fund-card .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fund-card .hd h3 { flex: 1; font-size: 17px; font-weight: 600; }
.fund-card .hd .pct { font-size: 17px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.fund { padding: 10px 0; border-top: 1px solid var(--line); }
.fund .ft { color: var(--muted); }
.result-title { font-size: 26px; font-weight: 600; color: var(--primary); }

/* Help "?" icon (hover handled by help.js) */
.help_icon { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--font); cursor: help; flex: none; }
.help_icon:hover { border-color: var(--primary); color: var(--primary); }

/* ==========================================================================
   Company census (admin)
   ========================================================================== */

.census { display: flex; gap: 24px; align-items: flex-start; }
.census-list { flex: 0 0 300px; padding: 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 24px; }
.census-scroll { max-height: calc(100vh - 260px); min-height: 240px; overflow-y: auto; margin-top: 4px; }
.census-detail { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; }
.grp { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 14px 12px 6px; border: 0; background: transparent; font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; }
button.grp { cursor: pointer; }
button.grp svg { transition: transform .15s; }
button.grp[aria-expanded="true"] svg { transform: rotate(180deg); }
.cnt { font-weight: 500; letter-spacing: 0; text-transform: none; background: #EEF2F5; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.emp { display: block; width: 100%; text-align: left; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; font: 400 15px var(--font); color: var(--ink); cursor: pointer; }
.emp:hover { background: #EEF2F5; }
.emp.on { background: var(--primary); color: #fff; font-weight: 500; }
.census-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px; text-align: center; color: var(--muted); }
.census-back { display: none; }

/* Desktop: the census screen fits the window and only the employee list (and, if needed, the record) scrolls */
@media (min-width: 901px) and (min-height: 560px) {
	body:has(.census) { height: 100vh; overflow: hidden; }
	body:has(.census) .app { height: 100vh; min-height: 0; }
	body:has(.census) .layout { flex: 1 1 auto; min-height: 0; padding-bottom: 24px; align-items: stretch; }
	body:has(.census) .side { align-self: flex-start; }
	body:has(.census) .main { min-height: 0; }
	body:has(.census) #data_form { flex: 1 1 auto; min-height: 0; display: flex; }
	.census { flex: 1 1 auto; min-height: 0; align-items: stretch; }
	.census-list { position: static; min-height: 0; }
	.census-scroll { flex: 1 1 auto; max-height: none; min-height: 0; }
	.census > .census-detail { min-height: 0; overflow-y: auto; }
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-card { width: 100%; max-width: 920px; display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.login-intro { flex: 1 1 340px; background: var(--primary); color: #fff; padding: 48px 44px; display: flex; flex-direction: column; gap: 28px; }
.login-intro h2 { font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.login-intro ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; font-size: 16px; color: #DCEBF2; }
.login-intro li { display: flex; gap: 12px; align-items: flex-start; }
.login-intro li svg { color: #fff; margin-top: 2px; }
.login-main { flex: 1 1 360px; padding: 48px 44px; display: flex; flex-direction: column; gap: 24px; }
.login-main img.mbl_logo { display: block; height: 80px; width: auto; max-width: 260px; object-fit: contain; object-position: left center; align-self: center; }
.login-main h1 { font-size: 24px; font-weight: 600; line-height: 1.3; }
#login_form { display: none; }
#login_form form { display: flex; flex-direction: column; gap: 18px; }
#ajax_warning, #error_warning { display: none; }

/* ==========================================================================
   Help tooltip created by agencysmart/js/common.js (showHelpPopup)
   ========================================================================== */

.help_tooltip { position: absolute; left: 0; top: 0; padding: 10px 12px; max-width: 340px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.45; border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 35, 48, .25); cursor: pointer; z-index: 20; }

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 900px) {
	.topbar-in { height: 60px; padding: 0 8px 0 16px; gap: 8px; }
	.topbar .brand img { height: 30px; }
	.client-logo img { height: 34px; max-width: 110px; }
	.menu-btn { display: inline-flex; order: 3; margin: 0; }
	.topbar-right { gap: 4px; }
	.topbar-right .topbar-div, .topbar-right .signout { display: none; }

	.layout { display: block; padding: 20px 16px 40px; }
	.side { display: none; position: static; }
	.nav-open .side {
		display: flex; position: absolute; left: 0; right: 0; top: 60px; z-index: 4;
		padding: 12px 12px 20px; background: #fff; border-bottom: 1px solid var(--line);
		box-shadow: 0 12px 24px rgba(20, 35, 48, .12); max-height: calc(100vh - 60px); overflow-y: auto;
	}
	.nav-group a { min-height: 48px; font-size: 16px; }
	.nav-mobile-only { display: flex; }

	.main, .col { gap: 18px; }
	.page-title { font-size: 24px; }
	.lede { font-size: 15px; }
	.plan-select { min-width: 0; width: 100%; }
	.card { padding: 18px; }
	.grid2, .grid3, .form-grid { grid-template-columns: 1fr; }
	.tile { min-height: 0; flex-direction: row; align-items: center; }
	.tile .txt { gap: 2px; }
	.tile .t { font-size: 16px; }
	.tile .d { font-size: 13px; }
	.footer-in { padding: 16px; gap: 6px 16px; }
	.footer-in .copy { margin-left: 0; width: 100%; }

	.stats, .stats.six, .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat { padding: 12px 14px; }
	.stat .v { font-size: 19px; }
	.seg.fill { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.actions .btn { flex: 1 1 auto; }
	.kv { grid-template-columns: 1fr; gap: 2px; }
	.kv dd { margin-bottom: 12px; }
	.alloc { grid-template-columns: minmax(110px, 1fr) 1.2fr 40px; gap: 10px; font-size: 14px; }
	.done-panel { padding: 22px; }
	.prose-card { padding: 20px; }
	.prose { font-size: 15px; }

	.census { display: block; }
	.census-list { position: static; padding: 8px; }
	.census-scroll { max-height: none; }
	.census.has-selection .census-list { display: none; }
	.census:not(.has-selection) .census-detail { display: none; }
	.census-back { display: inline-flex; }

	.login-wrap { padding: 0; align-items: stretch; }
	.login-card { border-radius: 0; border: 0; align-content: flex-start; }
	.login-intro { padding: 32px 24px 24px; gap: 16px; }
	.login-intro h2 { font-size: 22px; }
	.login-intro ul { display: none; }
	.login-main { padding: 28px 24px; }
}

@media print {
	.topbar, .side, .footer, .menu-btn { display: none !important; }
	body { background: #fff; }
	.layout { padding: 0; display: block; }
	.card { border: 0; padding: 0; }
}
