:root {
	--navy: #0B2545; --navy-700: #13315C; --navy-50: #E8EDF5;
	--teal: #13A89E; --teal-700: #0C7F77; --teal-50: #E3F6F4;
	--ink: #1B2A41; --slate: #52606D; --muted: #6B7785;
	--surface: #FFFFFF; --canvas: #F5F7FA; --border: #E4E9F0; --border-strong: #CBD5E1;
	--success: #1F9D6B; --success-50: #E5F6EE; --warning: #D98A00; --warning-50: #FDF3DC; --danger: #D64545; --danger-50: #FCE9E9;
	--radius: 12px; --radius-sm: 8px;
	--shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 4px 16px rgba(11, 37, 69, .06);
	--shadow-lg: 0 8px 32px rgba(11, 37, 69, .16);
	--font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--header-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 750; }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.625rem); font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 650; }
p { margin: 0 0 16px; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -48px; background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 300; }
.skip-link:focus { top: 8px; text-decoration: none; }
:focus-visible { outline: 3px solid #3B82F6; outline-offset: 2px; border-radius: 4px; }
#view:focus { outline: none; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }
.container.slim { max-width: 460px; }
.page { padding-top: 32px; padding-bottom: 64px; min-height: calc(100vh - var(--header-h) - 200px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 0; color: var(--slate); }
.icon { flex: none; vertical-align: middle; }

/* ── header ── */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.125rem; color: var(--navy); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { padding: 8px 14px; border-radius: 8px; color: var(--slate); font-weight: 550; font-size: .9375rem; }
.main-nav a:hover { background: var(--canvas); text-decoration: none; color: var(--navy); }
.main-nav a.active { color: var(--navy); background: var(--navy-50); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--navy); cursor: pointer; min-width: 44px; min-height: 44px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; color: var(--navy); font: inherit; font-weight: 600; font-size: .9375rem; }
.user-btn:hover { background: var(--canvas); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: .875rem; font-weight: 700; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 120; }
.menu[hidden] { display: none; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--canvas); text-decoration: none; }
#bottom-nav { display: none; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: .9375rem; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, border-color .15s; min-height: 44px; line-height: 1.2; }
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-700); }
.btn-accent { background: var(--teal-700); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #0A6B64; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--canvas); border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover:not(:disabled) { background: var(--navy-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: .875rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; min-height: 52px; }
.btn-block { width: 100%; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-secondary.busy::after, .btn-ghost.busy::after { border-color: var(--border-strong); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── cards, forms ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; min-height: 46px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352606D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
select:disabled { background-color: var(--canvas); color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(19, 168, 158, .25); }
.hint { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; background: var(--danger-50); color: #9B2C2C; border: 1px solid #F3C4C4; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .9375rem; }
.form-success { display: flex; gap: 10px; background: var(--success-50); color: #146C49; border: 1px solid #BEE6D3; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-wrap { display: grid; place-items: center; padding: 48px 0 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.625rem; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--slate); font-size: .9375rem; }
.social-row { display: grid; gap: 10px; }

/* ── chips, badges ── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--navy-50); color: var(--navy); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.chip.teal { background: var(--teal-50); color: var(--teal-700); }
.chip.good { background: var(--success-50); color: #146C49; }
.chip.ok { background: var(--warning-50); color: #8A5600; }
.chip.low, .chip.bad { background: var(--danger-50); color: #9B2C2C; }
.chip.plain { background: var(--canvas); color: var(--slate); border: 1px solid var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── grid + assessment cards ── */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.a-card { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; color: inherit; }
.a-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); text-decoration: none; }
.a-card h3 { margin: 0; font-size: 1.0625rem; color: var(--navy); }
.a-meta { display: flex; gap: 16px; color: var(--slate); font-size: .875rem; flex-wrap: wrap; }
.a-meta span { display: inline-flex; align-items: center; gap: 6px; }
.a-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .875rem; }
.a-status { font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.a-status.good { color: #146C49; } .a-status.warn { color: #8A5600; } .a-status.lock { color: var(--slate); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; box-shadow: var(--shadow); }
.filters .field { margin: 0; flex: 1 1 160px; min-width: 150px; }
.filters .field.grow { flex: 2 1 220px; }

/* ── empty / loading ── */
.empty { text-align: center; padding: 48px 24px; color: var(--slate); background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty .icon { color: var(--teal-700); margin-bottom: 8px; }
.empty-error .icon { color: var(--danger); }
.empty h3 { margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto 16px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #E9EEF4 25%, #F4F7FA 37%, #E9EEF4 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; margin-bottom: 16px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 64px 0; color: var(--slate); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }

/* ── toasts + modal ── */
#toasts { position: fixed; z-index: 400; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); animation: slideIn .25s ease; max-width: 380px; font-size: .9375rem; }
.toast-success { background: #146C49; } .toast-error { background: #A32E2E; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 350; background: rgba(11, 37, 69, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
.modal-wide { max-width: 640px; }
.modal h2 { margin-bottom: 12px; }
.modal-body { color: var(--slate); }
.modal-body p:last-child { margin-bottom: 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
body.modal-open { overflow: hidden; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--teal-700); background: var(--teal-50); }
.radio-card input { margin-top: 4px; accent-color: var(--teal-700); width: 18px; height: 18px; }
.radio-card small { display: block; color: var(--muted); }
.stat-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }

/* ── stats, bars, tables ── */
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .label { color: var(--slate); font-weight: 550; margin: 0; display: flex; gap: 8px; align-items: center; }
.stat .value { font-size: 2rem; font-weight: 750; color: var(--navy); line-height: 1.2; margin-top: 6px; letter-spacing: -.02em; }
.stat .sub { font-size: .8125rem; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 56px; gap: 12px; align-items: center; margin-bottom: 12px; font-size: .9375rem; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bar { height: 10px; background: var(--canvas); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--teal); transition: width .6s ease; }
.bar > i.low { background: var(--danger); } .bar > i.ok { background: var(--warning); } .bar > i.good { background: var(--success); } .bar > i.navy { background: var(--navy); }
.bar-row .pct { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; padding: 12px 16px; background: var(--canvas); color: var(--slate); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-list { display: grid; gap: 0; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); color: inherit; }
.row-item:last-child { border-bottom: 0; }
a.row-item:hover { text-decoration: none; background: var(--canvas); margin: 0 -12px; padding: 14px 12px; border-radius: 8px; }
.row-item .title { font-weight: 600; color: var(--navy); }
.row-item .sub { font-size: .8125rem; color: var(--muted); }
.score-pill { font-weight: 750; font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 999px; }
.score-pill.good { background: var(--success-50); color: #146C49; } .score-pill.ok { background: var(--warning-50); color: #8A5600; } .score-pill.low { background: var(--danger-50); color: #9B2C2C; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); background: var(--warning-50); border: 1px solid #F1D9A0; margin-bottom: 20px; color: #6B4400; }
.banner.info { background: var(--teal-50); border-color: #B7E3DF; color: #0A5C56; }
.banner strong { color: inherit; }
.tabs { display: inline-flex; padding: 4px; background: #E9EEF4; border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--slate); cursor: pointer; min-height: 36px; }
.tabs button[aria-pressed=true], .tabs button[aria-selected=true] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(11, 37, 69, .15); }

/* ── pricing ── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }
.plan { position: relative; background: #fff; border: 1px solid var(--border-strong); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--teal); box-shadow: 0 8px 32px rgba(19, 168, 158, .15); }
.plan-flag { position: absolute; top: -12px; left: 24px; background: var(--teal-700); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan-price { margin: 8px 0 0; }
.plan-price strong { font-size: 2.25rem; color: var(--navy); letter-spacing: -.03em; }
.plan-price span { color: var(--muted); margin-left: 4px; }
.plan-save { color: var(--success); font-weight: 600; font-size: .875rem; margin: 2px 0 8px; }
.ticks { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 10px; font-size: .9375rem; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { color: var(--success); margin-top: 3px; }

/* ── responsive ── */
@media (max-width: 960px) {
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
	.menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.main-nav, .header-actions { display: none; }
	.site-header.nav-open { height: auto; }
	.site-header.nav-open .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 14px; gap: 8px; }
	.site-header.nav-open .main-nav { display: flex; flex-direction: column; order: 3; width: 100%; margin: 0; }
	.site-header.nav-open .header-actions { display: flex; order: 4; width: 100%; flex-wrap: wrap; }
	.site-header.nav-open .header-actions .btn { flex: 1; }
	.site-header.nav-open .user-menu { width: 100%; }
	.site-header.nav-open .menu { position: static; box-shadow: none; display: block; border: 0; padding: 0; }
	.site-header.nav-open .menu[hidden] { display: block; }
	.site-header.nav-open .user-btn { display: none; }
	body { padding-bottom: 68px; }
	body.focus-mode { padding-bottom: 0; }
	#bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
	#bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; color: var(--muted); font-size: .6875rem; font-weight: 600; border-radius: 8px; min-height: 48px; justify-content: center; }
	#bottom-nav a.active { color: var(--navy); } #bottom-nav a.active .icon { color: var(--teal-700); }
	#bottom-nav a:hover { text-decoration: none; }
	#toasts { bottom: 80px; }
	.page { padding-top: 24px; padding-bottom: 48px; }
}
@media (max-width: 640px) {
	.container { padding: 0 16px; }
	.grid, .grid-2 { grid-template-columns: 1fr; }
	.form-row { grid-template-columns: 1fr; }
	.card { padding: 18px; }
	.bar-row { grid-template-columns: 1fr 48px; }
	.bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
	.bar-row .name { grid-column: 1; }
	.modal { padding: 20px; }
	.modal-actions .btn { flex: 1; }
}
body.focus-mode #header, body.focus-mode #footer, body.focus-mode #bottom-nav { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── footer ── */
#footer { border-top: 1px solid var(--border); background: #fff; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.footer-inner p { margin: 8px 0 0; font-size: .875rem; max-width: 280px; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { color: var(--slate); font-weight: 550; font-size: .9375rem; }
.footer-inner small { width: 100%; padding-top: 16px; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
	.filters { gap: 10px; padding: 14px; }
	.filters .field { flex: 1 1 calc(50% - 6px); min-width: 0; }
	.filters .field.grow { flex-basis: 100%; }
	.filters #f-clear { margin-left: auto; }
}
