/* =====================================================================
   Research Ethics Review Starter - stylesheet
   One file: tokens, base, components, public website, workspace, print.
   Colours are CSS variables: change the tokens below to re-brand.
   Light / dark theme: <html data-theme="light|dark">.
   ===================================================================== */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f3f4fa;
  --surface-3: #e8eaf4;
  --text: #141631;
  --muted: #5d6283;
  --line: #e4e6f1;
  --line-strong: #cfd3e5;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-ink: #ffffff;
  --primary-soft: #eceafe;
  --primary-2: #7c3aed;
  --accent: #0d9488;
  --accent-soft: #d9f5f1;
  --green: #15803d;
  --green-soft: #dcf5e4;
  --red: #dc2626;
  --red-soft: #fde6e6;
  --amber: #b45309;
  --amber-soft: #fdf1dc;
  --blue: #2563eb;
  --blue-soft: #e3ecfd;
  --violet: #7c3aed;
  --violet-soft: #f0e8fe;
  --grey: #6b7090;
  --grey-soft: #eef0f6;
  --side-bg: #15133a;
  --side-bg-2: #1e1a52;
  --side-text: #c9c8ee;
  --side-muted: #8987bd;
  --side-active: rgba(255, 255, 255, .1);
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0d9488 130%);
  --shadow-sm: 0 1px 2px rgba(20, 22, 49, .05), 0 1px 3px rgba(20, 22, 49, .06);
  --shadow: 0 14px 34px -16px rgba(30, 26, 82, .28), 0 2px 6px -2px rgba(20, 22, 49, .06);
  --shadow-lg: 0 34px 80px -30px rgba(30, 26, 82, .48), 0 8px 20px -8px rgba(20, 22, 49, .12);
  --ring: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Segoe UI Variable Display", "SF Pro Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0d1d;
  --surface: #14152b;
  --surface-2: #1b1c36;
  --surface-3: #25274a;
  --text: #ecedfa;
  --muted: #9da0c4;
  --line: #24264a;
  --line-strong: #34376a;
  --primary: #8b85ff;
  --primary-hover: #a5a0ff;
  --primary-ink: #0e0c2c;
  --primary-soft: #23214f;
  --primary-2: #b794ff;
  --accent: #3dd6c3;
  --accent-soft: #11332f;
  --green: #4ade80;
  --green-soft: #12301e;
  --red: #ff7d7d;
  --red-soft: #3b1719;
  --amber: #fbbf57;
  --amber-soft: #36270c;
  --blue: #7fb0ff;
  --blue-soft: #15243f;
  --violet: #c4a7ff;
  --violet-soft: #2a1f4a;
  --grey: #a0a4c4;
  --grey-soft: #20223e;
  --side-bg: #0a0b1a;
  --side-bg-2: #12133a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .75);
  --shadow-lg: 0 32px 72px -24px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; font-weight: 680; letter-spacing: -.015em; font-family: var(--font-display); }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.06rem; } h4 { font-size: .95rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; } .i-lg { width: 26px; height: 26px; } .i-xl { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- helpers */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .87rem; } .tiny { font-size: .78rem; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; } .start { align-items: flex-start; } .end { justify-content: flex-end; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 28px; } .mb { margin-bottom: 16px; } .mb-0 { margin-bottom: 0; } .m-0 { margin: 0; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-primary { color: var(--primary); }
.strong { font-weight: 650; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: inline; }
[data-theme="dark"] .only-light { display: none; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface-2); color: var(--text); font: 600 .9rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .7); }
.btn-grad:hover { color: #fff; filter: brightness(1.06); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent); filter: brightness(1.07); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--surface); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red); filter: brightness(1.08); color: #fff; }
.btn-danger-soft { background: var(--red-soft); color: var(--red); }
.btn-danger-soft:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green); filter: brightness(1.08); color: #fff; }
.btn-white { background: #fff; color: #1e1a52; }
.btn-white:hover { background: #f1f0ff; color: #1e1a52; }
.btn-glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .83rem; }
.btn-xs { height: 28px; padding: 0 10px; font-size: .77rem; gap: 5px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.inline { display: inline; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .label { font-size: .85rem; font-weight: 620; }
.field .hint, .hint { font-size: .8rem; color: var(--muted); }
.req::after { content: " *"; color: var(--red); }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: 400 .93rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 110px; padding: 10px 13px; resize: vertical; line-height: 1.55; }
.textarea.tall { min-height: 220px; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input-sm, .select-sm { height: 34px; font-size: .86rem; }
.select-sm { background-position: calc(100% - 17px) 14px, calc(100% - 12px) 14px; }
input[type=file].input { padding: 8px 10px; height: auto; }
input[type=file]::file-selector-button { border: 0; background: var(--primary-soft); color: var(--primary); font: 600 .82rem var(--font); padding: 6px 12px;
  border-radius: 8px; margin-right: 10px; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks.col { flex-direction: column; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); transition: border-color .15s, box-shadow .15s, background .15s; }
.choice > span b { font-size: .92rem; }
.choice > span small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.choice:hover > span { border-color: var(--primary); }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pill-check { position: relative; }
.pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.pill-check > span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: .86rem; font-weight: 550; cursor: pointer; }
.pill-check input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pill-check input:focus-visible + span { box-shadow: var(--ring); }
.counter { font-size: .74rem; color: var(--muted); text-align: right; margin-top: -2px; }

/* ---------------------------------------------------------------- cards, alerts, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.card-tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { font-size: .82rem; color: var(--muted); }
.card-tight .card-head { padding: 16px 20px 0; }
.card + .card, .card + .grid-cards, .grid-cards + .card, .grid-cards + .grid-cards { margin-top: 18px; }
.card-soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-accent { border-top: 3px solid var(--primary); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; border-radius: 12px; border: 1px solid var(--line); font-size: .92rem;
  background: var(--surface); margin-bottom: 14px; }
.alert .i { margin-top: 1px; }
.alert > div { min-width: 0; }
.alert-error { background: var(--red-soft); border-color: transparent; color: var(--red); }
.alert-success { background: var(--green-soft); border-color: transparent; color: var(--green); }
.alert-warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.alert-info { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.alert-primary { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.alert b { color: inherit; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: .75rem; font-weight: 650;
  white-space: nowrap; background: var(--grey-soft); color: var(--grey); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-lg { height: 30px; padding: 0 13px; font-size: .84rem; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-violet { background: var(--violet-soft); color: var(--violet); }
.b-teal { background: var(--accent-soft); color: var(--accent); }
.b-primary { background: var(--primary-soft); color: var(--primary); }
.b-grey { background: var(--grey-soft); color: var(--grey); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: .74rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700;
  font-size: .82rem; flex: none; text-transform: uppercase; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }

/* ---------------------------------------------------------------- tables and lists */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
.table th a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .title-cell { min-width: 260px; }
.table .title-cell a { color: var(--text); font-weight: 600; }
.table .title-cell a:hover { color: var(--primary); }
.table .sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted); }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty .i { width: 44px; height: 44px; margin: 0 auto 10px; opacity: .55; stroke-width: 1.4; display: block; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
.pager { display: flex; gap: 6px; align-items: center; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .meta { font-size: .8rem; color: var(--muted); }
.item-link { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; color: var(--text); transition: background .12s; }
.item-link:hover { background: var(--surface-2); color: var(--text); }
.item-link + .item-link { margin-top: 2px; }
.item-link .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.item-link .ico.amber { background: var(--amber-soft); color: var(--amber); }
.item-link .ico.teal { background: var(--accent-soft); color: var(--accent); }
.item-link .ico.violet { background: var(--violet-soft); color: var(--violet); }
.item-link .ico.red { background: var(--red-soft); color: var(--red); }
.item-link .ico.green { background: var(--green-soft); color: var(--green); }
.item-link b { display: block; font-weight: 620; font-size: .93rem; }
.item-link small { color: var(--muted); font-size: .8rem; }

/* ---------------------------------------------------------------- tabs, stepper, timeline */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600;
  font-size: .9rem; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: .72rem;
  display: inline-grid; place-items: center; }
.tabs a.active .n { background: var(--primary); color: var(--primary-ink); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); flex-wrap: wrap; }
.seg a { padding: 7px 13px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .n { font-size: .72rem; color: var(--muted); font-weight: 700; }
.seg a.active .n { color: var(--primary); }

.progress-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px 0 4px; counter-reset: step; }
.progress-steps .ps { position: relative; text-align: center; font-size: .78rem; color: var(--muted); padding-top: 38px; font-weight: 550; }
.progress-steps .ps::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 3px; background: var(--line); border-radius: 3px; }
.progress-steps .ps:first-child::before { display: none; }
.progress-steps .ps::after { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 30px;
  border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; color: var(--muted); font-size: .8rem; }
.progress-steps .ps.done { color: var(--text); }
.progress-steps .ps.done::before, .progress-steps .ps.current::before { background: var(--primary); }
.progress-steps .ps.done::after { content: "\2713"; background: var(--primary); border-color: var(--primary); color: #fff; }
.progress-steps .ps.current { color: var(--primary); font-weight: 700; }
.progress-steps .ps.current::after { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }

.wizard { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.wizard-nav { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.wizard-nav .wn-title { padding: 8px 10px 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.wizard-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: .9rem; font-weight: 550; }
.wizard-nav a:hover { background: var(--surface-2); color: var(--text); }
.wizard-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 680; }
.wizard-nav .num { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  color: var(--muted); flex: none; }
.wizard-nav a.done .num { background: var(--green); border-color: var(--green); color: #fff; }
.wizard-nav a.active .num { border-color: var(--primary); color: var(--primary); background: var(--surface); }
.wizard-nav .bar { height: 6px; border-radius: 6px; background: var(--surface-3); margin: 10px 10px 6px; overflow: hidden; }
.wizard-nav .bar span { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.wizard-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.question { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.question:first-of-type { padding-top: 4px; }
.question:last-of-type { border-bottom: 0; }
.question > label, .question > .label { display: block; font-weight: 650; font-size: .95rem; margin-bottom: 4px; }
.question .hint { margin-bottom: 9px; }
.question.cond { padding-left: 16px; border-left: 3px solid var(--primary-soft); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 16px 36px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.timeline li.ok::before { border-color: var(--green); }
.timeline li.warn::before { border-color: var(--amber); }
.timeline li.bad::before { border-color: var(--red); }
.timeline .t { font-size: .76rem; color: var(--muted); }
.timeline b { font-size: .9rem; font-weight: 620; display: block; }
.timeline p { margin: 2px 0 0; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }

.answer { padding: 14px 0; border-bottom: 1px solid var(--line); }
.answer:last-child { border-bottom: 0; }
.answer .q { font-size: .8rem; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.answer .a { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.answer .a.none { color: var(--muted); font-style: italic; }
.section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); font-weight: 750; margin: 18px 0 2px; }
.section-title:first-child { margin-top: 0; }
.doc { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.doc + .doc { margin-top: 8px; }
.doc .ficon { width: 38px; height: 42px; border-radius: 8px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-size: .62rem;
  font-weight: 800; letter-spacing: .03em; flex: none; }
.doc .ficon.word { background: var(--blue-soft); color: var(--blue); }
.doc .ficon.img { background: var(--accent-soft); color: var(--accent); }
.doc .ficon.xls { background: var(--green-soft); color: var(--green); }
.doc b { display: block; font-size: .9rem; font-weight: 620; overflow-wrap: anywhere; }
.doc small { color: var(--muted); font-size: .78rem; }
.doc a.name { color: var(--text); }
.doc a.name:hover { color: var(--primary); }
.message { display: flex; gap: 12px; padding: 10px 0; }
.message .bubble { background: var(--surface-2); border-radius: 4px 14px 14px 14px; padding: 10px 14px; min-width: 0; flex: 1; }
.message.mine .bubble { background: var(--primary-soft); }
.message.internal .bubble { background: var(--amber-soft); }
.message .who { font-size: .8rem; font-weight: 650; }
.message .who span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.message .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; margin-top: 3px; }

/* ---------------------------------------------------------------- toasts, modals, dropdowns */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 90; max-width: min(440px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); font-size: .92rem; transition: opacity .3s, transform .3s; }
.toast .i { margin-top: 1px; }
.toast.ok .i { color: var(--green); } .toast.err .i { color: var(--red); }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; margin-left: auto; }
.toast.hide { opacity: 0; transform: translateY(8px); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 12, 45, .55); backdrop-filter: blur(3px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: grid; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: 18px; padding: 24px; width: min(480px, 100%); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-lg { width: min(700px, 100%); }
.modal h3 { margin-bottom: 6px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.modal-icon.danger { background: var(--red-soft); color: var(--red); }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.menu.open { display: block; animation: fade .12s; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--text); font: 500 .9rem var(--font);
  background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.menu .menu-head { padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .menu-head b { display: block; font-size: .92rem; }
.menu .menu-head small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 50; padding: 4px; max-height: 280px; overflow-y: auto; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--text); }
.suggest button:hover, .suggest button.on { background: var(--primary-soft); }
.suggest small { display: block; color: var(--muted); font-size: .78rem; }
.rel { position: relative; }

/* =====================================================================
   PUBLIC WEBSITE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 750; font-family: var(--font-display); letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6); flex: none; }
.brand .mark .i { width: 20px; height: 20px; stroke-width: 2; }
.brand .name { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.02rem; }
.brand .name small { font-family: var(--font); font-size: .66rem; font-weight: 650; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.mainnav { display: flex; gap: 2px; margin-left: 10px; }
.mainnav a { padding: 8px 12px; border-radius: 10px; font-weight: 560; font-size: .92rem; color: var(--muted); }
.mainnav a:hover, .mainnav a.active { color: var(--text); background: var(--surface-2); }
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.menu-toggle { display: none; }

.hero { position: relative; overflow: hidden; background: #15133a; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(900px 480px at 85% -10%, rgba(124, 58, 237, .55), transparent 60%),
  radial-gradient(700px 420px at 0% 110%, rgba(13, 148, 136, .45), transparent 60%),
  radial-gradient(600px 300px at 50% 50%, rgba(79, 70, 229, .35), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 84px; }
.hero .kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18); font-size: .82rem; font-weight: 600; margin-bottom: 20px; }
.hero .kicker b { background: #fff; color: #4f46e5; border-radius: 99px; padding: 2px 9px; font-size: .74rem; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 760; margin-bottom: 18px; }
.hero h1 .grad-text { background: linear-gradient(90deg, #c4b5fd, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.12rem; color: #d8d6ff; max-width: 560px; margin-bottom: 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.verify-box { margin-top: 30px; display: flex; gap: 8px; max-width: 470px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.verify-box input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: 500 .95rem var(--font); padding: 0 12px; letter-spacing: .06em; }
.verify-box input::placeholder { color: #aeabe0; letter-spacing: 0; }
.verify-box input:focus { outline: none; }
.verify-box.light { background: var(--surface); border-color: var(--line-strong); max-width: 520px; }
.verify-box.light input { color: var(--text); }
.verify-box.light input::placeholder { color: var(--muted); }
.hero-card { background: rgba(255, 255, 255, .97); color: var(--text); border-radius: 22px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); transform: rotate(-1deg); }
[data-theme="dark"] .hero-card { background: var(--surface); }
.hero-card .hc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-card .hc-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.hero-card .hc-row .grow b { display: block; font-size: .88rem; }
.hero-card .hc-row .grow small { color: var(--muted); font-size: .76rem; }
.hero-float { position: absolute; right: -14px; bottom: -26px; background: #fff; color: var(--text); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center; font-size: .82rem; transform: rotate(2deg); }
[data-theme="dark"] .hero-float { background: var(--surface-2); }
.hero-float .ok { width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.hero-visual { position: relative; }

.section { padding: 64px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); letter-spacing: -.02em; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 1.02rem; margin: 0; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 750; color: var(--primary); margin-bottom: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .fi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.feature:nth-child(3n+2) .fi { background: var(--accent-soft); color: var(--accent); }
.feature:nth-child(3n) .fi { background: var(--violet-soft); color: var(--violet); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.steps-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.steps-line .sl { position: relative; padding: 20px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps-line .sl::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; display: grid;
  place-items: center; font-weight: 750; margin-bottom: 12px; }
.steps-line h4 { margin-bottom: 4px; }
.steps-line p { font-size: .85rem; color: var(--muted); margin: 0; }
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.route { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.route .days { font-size: 2rem; font-weight: 780; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.route p { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.news { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.news-card { display: block; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.news-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); }
.news-card time { font-size: .78rem; color: var(--muted); font-weight: 600; }
.news-card h3 { margin: 6px 0; }
.news-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.mtg { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mtg:last-child { border-bottom: 0; }
.date-chip { width: 58px; flex: none; border-radius: 14px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--surface); }
.date-chip .m { background: var(--grad); color: #fff; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; padding: 3px 0; }
.date-chip .d { font-size: 1.35rem; font-weight: 780; padding: 4px 0 5px; line-height: 1; }
.cta-band { border-radius: 24px; padding: 40px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 1.7rem; }
.cta-band p { margin: 0; color: #e9e7ff; }
.page-hero { background: #15133a; color: #fff; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 0%, rgba(124, 58, 237, .55), transparent 60%),
  radial-gradient(500px 260px at 0% 100%, rgba(13, 148, 136, .4), transparent 60%); }
.page-hero .container { position: relative; padding-top: 44px; padding-bottom: 44px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 8px; letter-spacing: -.02em; }
.page-hero p { color: #d8d6ff; margin: 0; max-width: 640px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: #bdbaf0; margin-bottom: 12px; }
.crumbs a { color: #e3e1ff; }
.prose { max-width: 760px; font-size: 1.02rem; line-height: 1.75; }
.prose p { margin-bottom: 1.1em; white-space: pre-line; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.verify-result { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.verify-result .vr-head { padding: 22px 24px; display: flex; gap: 16px; align-items: center; color: #fff; background: linear-gradient(135deg, #15803d, #0d9488); }
.verify-result.bad .vr-head { background: linear-gradient(135deg, #b91c1c, #b45309); }
.verify-result .vr-head .ok { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.verify-result .vr-head h2 { margin: 0; }
.verify-result .vr-head p { margin: 2px 0 0; color: rgba(255, 255, 255, .85); }
.verify-result .vr-body { padding: 22px 24px; }
.site-footer { background: #0f0e2b; color: #b9b7e3; margin-top: 0; padding: 50px 0 26px; font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; color: #fff; }
.site-footer a { display: block; padding: 3px 0; color: #b9b7e3; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .brand .name small { color: #8f8cc7; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 34px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; color: #8f8cc7; font-size: .8rem; }

/* sign-in & register */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #15133a; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 100% 0%, rgba(124, 58, 237, .6), transparent 60%),
  radial-gradient(500px 360px at 0% 100%, rgba(13, 148, 136, .5), transparent 60%); }
.auth-art > * { position: relative; }
.auth-art .brand { color: #fff; }
.auth-art .brand .name small { color: #b9b7e3; }
.auth-art h2 { font-size: 2rem; letter-spacing: -.02em; max-width: 440px; margin-bottom: 18px; }
.auth-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-art li { display: flex; gap: 12px; align-items: flex-start; color: #dcdaff; }
.auth-art li .i { color: #5eead4; margin-top: 2px; }
.auth-art .small { color: #9f9cd6; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form .box { width: min(420px, 100%); }
.auth-form .box.wide { width: min(620px, 100%); }
.auth-form h1 { font-size: 1.8rem; letter-spacing: -.02em; margin-bottom: 4px; }
.demo-box { margin-top: 22px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: .84rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.who-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.who-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.who-btn b { font-size: .82rem; }
.who-btn small { color: var(--muted); font-size: .72rem; }

/* =====================================================================
   WORKSPACE (signed in)
   ===================================================================== */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%); color: var(--side-text); padding: 18px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar .brand { color: #fff; padding: 4px 8px 16px; }
.sidebar .brand .name small { color: var(--side-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .66rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-text); font-weight: 550; font-size: .9rem; position: relative; }
.nav a .i { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(#a78bfa, #5eead4); }
.nav a.active .i { opacity: 1; color: #c4b5fd; }
.nav .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: #7c3aed; color: #fff; font-size: .7rem; font-weight: 700;
  display: grid; place-items: center; }
.nav .count.teal { background: #0d9488; }
.nav .count.red { background: #dc2626; }
.side-foot { margin-top: auto; padding: 14px 8px 2px; font-size: .72rem; color: var(--side-muted); }
.side-cta { margin: 14px 4px 4px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.side-cta b { color: #fff; font-size: .86rem; display: block; margin-bottom: 4px; }
.side-cta p { font-size: .78rem; margin: 0 0 10px; color: var(--side-muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 26px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.quick-find { position: relative; flex: 1; max-width: 460px; }
.quick-find .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.quick-find .input { padding-left: 40px; height: 40px; background: var(--surface); border-radius: 12px; }
.quick-find kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 .7rem var(--mono); color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }
.spacer { flex: 1; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font: inherit; color: var(--text); }
.user-btn:hover { border-color: var(--line-strong); }
.user-btn .who { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-btn .who b { font-size: .84rem; }
.user-btn .who small { font-size: .72rem; color: var(--muted); }
.content { padding: 26px; max-width: 1360px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 550; margin-bottom: 10px; }
.back-link:hover { color: var(--primary); }
.welcome { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; background: var(--grad); color: #fff; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.welcome::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.welcome h1 { margin: 0 0 4px; font-size: 1.55rem; }
.welcome p { margin: 0; color: #e9e7ff; }
.welcome > * { position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center;
  color: var(--text); transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--text); }
.stat .si { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.stat .si.teal { background: var(--accent-soft); color: var(--accent); }
.stat .si.amber { background: var(--amber-soft); color: var(--amber); }
.stat .si.violet { background: var(--violet-soft); color: var(--violet); }
.stat .si.red { background: var(--red-soft); color: var(--red); }
.stat .si.green { background: var(--green-soft); color: var(--green); }
.stat .v { font-size: 1.6rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { font-size: .8rem; color: var(--muted); font-weight: 550; }
.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards > .card, .two-col > .card, .two-col > div > .card:first-child { margin-top: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.two-col.even { grid-template-columns: 1fr 1fr; }
.side-stack > * + * { margin-top: 18px; }
.sticky { position: sticky; top: 84px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; height: 38px; }
.toolbar .select { background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { width: 100%; padding-left: 38px; }
.study-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.study-head .ids { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.study-head h1 { font-size: 1.45rem; margin: 0 0 6px; max-width: 900px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--muted); }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts .i { width: 16px; height: 16px; }
.cert-strip { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--green-soft), var(--accent-soft));
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); flex-wrap: wrap; margin-bottom: 18px; }
.cert-strip .ci { width: 48px; height: 48px; border-radius: 14px; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.cert-strip.expiring { background: linear-gradient(135deg, var(--amber-soft), var(--red-soft)); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.cert-strip.expiring .ci { background: var(--amber); }
.cert-strip.stopped { background: var(--red-soft); border-color: transparent; }
.cert-strip.stopped .ci { background: var(--red); }
.meter { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--grad); border-radius: 8px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; flex: 1; width: 100%; justify-content: center; }
.bars .b1, .bars .b2 { width: 40%; max-width: 18px; border-radius: 5px 5px 2px 2px; min-height: 2px; }
.bars .b1 { background: var(--primary); } .bars .b2 { background: var(--accent); }
.bars small { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 170px 1fr 40px; gap: 10px; align-items: center; font-size: .86rem; padding: 5px 0; }
.hbar .meter { height: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.vote-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.vote-row .grow { font-size: .86rem; }
.vote-row .select { width: 150px; }
.tally { display: flex; gap: 6px; flex-wrap: wrap; }
.tally span { font-size: .76rem; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); font-weight: 600; }
.tally span b { margin-left: 4px; }
.quorum { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; }
.quorum.ok { background: var(--green-soft); color: var(--green); }
.quorum.no { background: var(--amber-soft); color: var(--amber); }
.criteria-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.criteria-row:last-child { border-bottom: 0; }
.criteria-row .textarea { grid-column: 1 / -1; min-height: 60px; }
.seg-radio { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; flex: none; }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio span { display: block; padding: 6px 13px; font-size: .82rem; font-weight: 600; cursor: pointer; border-right: 1px solid var(--line-strong); background: var(--surface); }
.seg-radio label:last-child span { border-right: 0; }
.seg-radio input:checked + span { background: var(--primary); color: var(--primary-ink); }
.seg-radio input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--primary-hover); }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: none; }
.agenda-item { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.agenda-item + .agenda-item { margin-top: 12px; }
.agenda-item .ai-no { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 750; flex: none; }
.chk-list { list-style: none; padding: 0; margin: 0; }
.chk-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: .9rem; }
.chk-list li .i { margin-top: 2px; }
.chk-list li.ok .i { color: var(--green); }
.chk-list li.no .i { color: var(--amber); }

/* =====================================================================
   PRINT PAGES (A4)
   ===================================================================== */
.print-body { background: #e9e9f1; }
.print-tools { display: flex; gap: 8px; justify-content: center; padding: 14px; }
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 24px; background: #fff; color: #111; padding: 18mm 18mm 20mm; box-shadow: 0 10px 40px rgba(0, 0, 0, .15);
  font: 10.5pt/1.55 "Segoe UI", system-ui, Arial, sans-serif; position: relative; }
.sheet h1 { font-size: 16pt; margin: 0 0 4mm; }
.sheet h2 { font-size: 12pt; margin: 6mm 0 2mm; }
.sheet .lh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; border-bottom: 2px solid #4f46e5; padding-bottom: 5mm; margin-bottom: 7mm; }
.sheet .lh .org { display: flex; gap: 4mm; align-items: center; }
.sheet .lh .seal { width: 14mm; height: 14mm; border-radius: 4mm; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: grid; place-items: center; flex: none; }
.sheet .lh .seal .i { width: 8mm; height: 8mm; stroke-width: 2; }
.sheet .lh b { font-size: 12pt; display: block; }
.sheet .lh small { color: #555; font-size: 8.5pt; }
.sheet .lh .ref { text-align: right; font-size: 9pt; color: #333; }
.sheet table.meta { border-collapse: collapse; width: 100%; font-size: 9.5pt; margin: 3mm 0; }
.sheet table.meta td { padding: 1.6mm 2mm; border-bottom: 1px solid #e3e3ea; vertical-align: top; }
.sheet table.meta td:first-child { width: 44mm; color: #555; }
.sheet .body { white-space: pre-wrap; }
.sheet .sig { margin-top: 14mm; display: flex; justify-content: space-between; align-items: flex-end; gap: 10mm; }
.sheet .sig .line { border-top: 1px solid #333; width: 70mm; padding-top: 2mm; font-size: 9.5pt; }
.sheet .foot { position: absolute; left: 18mm; right: 18mm; bottom: 9mm; font-size: 7.5pt; color: #777; display: flex; justify-content: space-between; gap: 6mm; }
.sheet .q { margin: 3mm 0; }
.sheet .q b { display: block; font-size: 9pt; color: #444; }
.sheet .q div { white-space: pre-wrap; }
.cert { border: 3mm solid transparent; border-image: linear-gradient(135deg, #4f46e5, #7c3aed, #0d9488) 1; padding: 12mm; min-height: 255mm; position: relative; }
.cert .title { text-align: center; margin: 8mm 0 6mm; }
.cert .title small { display: block; letter-spacing: .3em; text-transform: uppercase; color: #4f46e5; font-weight: 700; font-size: 9pt; }
.cert .title h1 { font-size: 24pt; margin: 2mm 0; letter-spacing: -.01em; }
.cert .coa { text-align: center; font: 700 13pt ui-monospace, Consolas, monospace; color: #4f46e5; margin-bottom: 6mm; }
.cert .qr { display: flex; gap: 5mm; align-items: center; font-size: 8.5pt; color: #555; }
.cert .qr svg { width: 30mm; height: 30mm; flex: none; }
.cert .sig .line { width: 56mm; }
.draft-mark { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font-size: 60pt; font-weight: 800; color: rgba(220, 38, 38, .1); transform: rotate(-20deg); pointer-events: none; }
@media print {
  @page { size: A4; margin: 0; }
  .print-body { background: #fff; }
  .print-tools { display: none; }
  .sheet { box-shadow: none; margin: 0; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .content-grid { grid-template-columns: 1fr; }
  .wizard { grid-template-columns: 1fr; }
  .wizard-nav { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps-line { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-grid; }
  .mainnav { display: none; }
  .nav-open .mainnav { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); padding: 10px 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); margin: 0; }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 14px; }
  .grid-cards, .grid-cards.three, .two-col.even, .news, .routes { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hide-sm { display: none !important; }
  .user-btn .who { display: none; }
  .hbar { grid-template-columns: 110px 1fr 34px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat .si { width: 38px; height: 38px; border-radius: 11px; }
  .item-link { flex-wrap: wrap; }
  .item-link .grow { flex: 1 1 calc(100% - 60px); }
  .item-link > .badge, .item-link > .tag { margin-left: 54px; }
  .welcome { padding: 20px; }
  .welcome h1 { font-size: 1.3rem; }
  .features, .steps-line { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .progress-steps .ps { font-size: .64rem; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .cta-band { padding: 26px; }
  .demo-grid { grid-template-columns: 1fr; }
  .sheet { width: 100%; min-height: 0; padding: 8mm; }
  .quick-find kbd { display: none; }
}
