/* ═══════════════════════════════════════════════════════════════════════
   Albion Adviser Portal — design system v2
   Brand: navy #06355B · blue #17679A · gold #D7AD3E · Open Sans
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/opensans-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/opensans-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/opensans-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/opensans-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/opensans-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/opensans-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/opensans-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/opensans-800-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --navy: #06355B; --navy-2: #0A4570; --navy-deep: #04263F; --navy-ink: #0B2B47;
  --blue: #17679A; --blue-bright: #2586C4; --blue-soft: #EAF3F9;
  --gold: #D7AD3E; --gold-light: #E8C96A; --gold-deep: #B8912A; --gold-ink: #3A2B05;
  --bg: #F2F5F9; --surface: #FFFFFF; --surface-2: #F8FAFC;
  --ink: #16273B; --muted: #5D6C7E; --faint: #8D9AA9;
  --line: #E2E8F0; --line-soft: #EDF1F6;
  --green: #178A54; --green-bg: #E5F5ED; --green-line: #BFE5D2;
  --red: #C13B2C; --red-bg: #FBEBE8; --red-line: #F0C8C0;
  --amber: #A9731B; --amber-bg: #FAF1DC; --amber-line: #EBD9AE;
  --info-bg: #E8F1F8;
  --radius: 18px; --radius-sm: 11px; --radius-xs: 8px;
  --shadow-1: 0 1px 2px rgba(9, 38, 63, .05), 0 4px 14px rgba(9, 38, 63, .05);
  --shadow-2: 0 2px 4px rgba(9, 38, 63, .07), 0 14px 34px rgba(9, 38, 63, .09);
  --shadow-3: 0 8px 20px rgba(9, 38, 63, .13), 0 28px 60px rgba(9, 38, 63, .16);
  --shadow: var(--shadow-1);
  --shadow-lift: var(--shadow-2);
  --sidebar-w: 268px;
  --ease: cubic-bezier(.22, .8, .26, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Open Sans', -apple-system, 'Segoe UI', sans-serif;
  font-size: 14.5px; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--navy); line-height: 1.28;
  letter-spacing: -.01em; }
h1 { font-size: 25px; font-weight: 800; }
h2 { font-size: 17.5px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 .8em; }
::selection { background: rgba(215, 173, 62, .35); }
:focus-visible { outline: 3px solid rgba(37, 134, 196, .4); outline-offset: 2px; border-radius: 4px; }

/* ─── app shell ─────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: fixed; inset: 0 auto 0 0;
  z-index: 50; display: flex; flex-direction: column; overflow-y: auto;
  background:
    radial-gradient(420px 260px at 110% -8%, rgba(215, 173, 62, .14), transparent 62%),
    radial-gradient(500px 380px at -30% 108%, rgba(37, 134, 196, .18), transparent 60%),
    linear-gradient(178deg, var(--navy-deep) 0%, var(--navy) 46%, #08477A 100%);
  color: #C6D6E4;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.brand { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-logo { display: block; width: 100%; max-width: 196px; height: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.28)); }
.brand-sub { font-size: 9.5px; color: var(--gold-light); letter-spacing: .3em;
  font-weight: 700; margin-top: 9px; opacity: .95; }
.nav-scroll { flex: 1; padding: 10px 14px 14px; }
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .16em;
  color: rgba(232, 201, 106, .8); margin: 20px 10px 7px; font-weight: 800;
}
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9.5px 13px; margin: 2px 0;
  border-radius: 11px; color: #A9BFD2; font-weight: 600; font-size: 13.5px;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
  position: relative;
}
.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .8;
  transition: opacity .16s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none;
  transform: translateX(2px); }
.nav-link:hover svg { opacity: 1; }
.nav-link.active {
  background: linear-gradient(90deg, rgba(215,173,62,.22), rgba(215,173,62,.07));
  color: #fff; box-shadow: inset 3px 0 0 var(--gold);
}
.nav-link.active svg { opacity: 1; color: var(--gold-light); }
.sidebar-foot { padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(2, 20, 36, .25); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--gold-ink); font-weight: 800; font-size: 13px;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.sidebar-user .who { line-height: 1.3; min-width: 0; }
.sidebar-user .who b { color: #fff; font-size: 13px; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who span { font-size: 11px; color: #8FA9BE; }
.logout-btn {
  width: 100%; background: rgba(255,255,255,.09); color: #D5E2ED;
  border: 1px solid rgba(255,255,255,.08); padding: 8px; border-radius: 10px;
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: all .16s var(--ease);
}
.logout-btn:hover { background: rgba(193, 59, 44, .4); border-color: rgba(193,59,44,.4); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex;
  flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 13px 30px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar-user {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 700; color: var(--navy);
  text-decoration: none !important; transition: all .15s;
}
.topbar-user:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(215,173,62,.25); }
.topbar-user .avatar { width: 26px; height: 26px; font-size: 10.5px; box-shadow: none; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px;
  color: var(--navy); border-radius: 8px; }
.burger:hover { background: var(--line-soft); }
.burger svg { width: 22px; height: 22px; display: block; }
.content { padding: 30px 30px 70px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* page head */
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  margin-bottom: 22px; }
.page-head .titles { flex: 1; min-width: 240px; }
.eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.backlink { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.backlink:hover { color: var(--blue); text-decoration: none; }

/* ─── cards & layout ────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 24px; margin-bottom: 22px;
  transition: box-shadow .2s var(--ease);
}
.card.tight { padding: 15px 20px; }
.card.hoverable:hover { box-shadow: var(--shadow-2); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  flex-wrap: wrap; }
.card-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 9px; }
.card-head h2 svg { width: 17px; height: 17px; color: var(--gold-deep); }
.card-head .spacer, .row .spacer { flex: 1; }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* stat tiles */
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-1); position: relative;
  overflow: hidden; display: flex; align-items: center; gap: 14px; }
.stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(215,173,62,0) 75%); }
.stat-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.stat-ico svg { width: 20px; height: 20px; }
.stat-ico.gold { background: rgba(215,173,62,.16); color: var(--gold-deep); }
.stat-ico.green { background: var(--green-bg); color: var(--green); }
.stat-ico.red { background: var(--red-bg); color: var(--red); }
.stat .num { font-size: 25px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .lbl { font-size: 11px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; margin-top: 1px; }

/* ─── buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9.5px 17px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: all .16s var(--ease); white-space: nowrap;
  text-decoration: none !important;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(140deg, var(--navy) 10%, var(--navy-2)); color: #fff;
  box-shadow: 0 1px 2px rgba(6,53,91,.3); }
.btn-primary:hover { box-shadow: 0 7px 18px rgba(6,53,91,.35); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(140deg, var(--gold) 15%, var(--gold-light)); color: var(--gold-ink);
  box-shadow: 0 1px 2px rgba(184,145,42,.4); }
.btn-gold:hover { box-shadow: 0 7px 18px rgba(215,173,62,.5); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: #CBD7E3; color: var(--navy); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.btn-danger { background: #fff; border-color: var(--red-line); color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 5.5px 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ─── badges ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3.5px 11px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent;
}
.badge svg { width: 12px; height: 12px; }
.badge-green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.badge-red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge-blue { background: var(--info-bg); color: var(--blue); border-color: #C9DFEE; }
.badge-grey { background: #EEF2F6; color: var(--muted); border-color: #E0E7EE; }
.badge-navy { background: rgba(6,53,91,.07); color: var(--navy); border-color: rgba(6,53,91,.12); }
.badge-gold { background: rgba(215,173,62,.16); color: #8A6A14; border-color: rgba(215,173,62,.35); }

/* ─── progress ──────────────────────────────────────────────────────── */
.progress-wrap { margin: 12px 0 6px; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; gap: 10px; }
.progress-meta b { color: var(--navy); font-size: 13.5px; }
.progress { height: 12px; border-radius: 999px; background: var(--line-soft);
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(9,38,63,.06); }
.progress > i {
  display: block; height: 100%; border-radius: 999px; min-width: 4px;
  transition: width .8s var(--ease);
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
}
.progress.gold > i { background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); }
.progress.green > i { background: linear-gradient(90deg, #178A54, #2FB57C); }
.pct-chip { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted); }
.pct-chip.done { background: var(--green-bg); color: var(--green); }

/* segmented reading progress */
.segbar { display: flex; gap: 5px; }
.segbar i { flex: 1; height: 6px; border-radius: 4px; background: #DCE4EC; }
.segbar i.done { background: linear-gradient(90deg, var(--green), #2FB57C); }
.segbar i.now { background: var(--gold); box-shadow: 0 0 0 3px rgba(215,173,62,.25); }

/* ─── tables ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); font-weight: 800; padding: 9px 13px;
  border-bottom: 2px solid var(--line); background: var(--surface-2);
  white-space: nowrap; position: sticky; top: 0;
}
.tbl th:first-child { border-radius: var(--radius-xs) 0 0 0; }
.tbl th:last-child { border-radius: 0 var(--radius-xs) 0 0; }
.tbl td { padding: 12px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #F6FAFD; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ─── forms ─────────────────────────────────────────────────────────── */
form.stack > * + * { margin-top: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy-ink);
  margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="url"],
.field select, .field textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid #D3DDE7; border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9C8D6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(23,103,154,.14);
}
.field input[type="file"] { padding: 8px; background: var(--surface-2); border-style: dashed; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-size: 12px; font-weight: 700; color: var(--navy);
  background: #fff; border: 1px solid #CBD7E3; border-radius: 8px;
  padding: 6px 12px; margin-right: 10px; cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { border-color: var(--blue); color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--navy); flex-shrink: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px; margin-top: 4px; }
.check-tile { border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; background: #fff; transition: all .13s; }
.check-tile:hover { border-color: var(--blue); background: var(--blue-soft); }
.check-tile:has(input:checked) { border-color: var(--navy); background: var(--info-bg);
  box-shadow: 0 1px 4px rgba(6,53,91,.12); }
.quick-mins { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.quick-mins button {
  border: 1.5px solid #CBD7E3; background: #fff; border-radius: 999px; padding: 4px 14px;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--navy); cursor: pointer;
  transition: all .13s;
}
.quick-mins button:hover { border-color: var(--gold); background: rgba(215,173,62,.13);
  transform: translateY(-1px); }

/* rich text editor */
.rte-toolbar { display: flex; gap: 3px; flex-wrap: wrap; padding: 7px; border: 1.5px solid #D3DDE7;
  border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--surface-2); }
.rte-toolbar button { border: 0; background: none; border-radius: 7px; padding: 5px 10px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; }
.rte-toolbar button:hover { background: rgba(6,53,91,.09); }
.rte { min-height: 170px; border: 1.5px solid #D3DDE7;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 13px 15px; background: #fff;
  overflow-y: auto; }
.rte:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(23,103,154,.14); }

/* rendered rich text + reading experience */
.prose { font-size: 14.5px; line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.35em; }
.prose h2 { padding-bottom: .25em; border-bottom: 2px solid rgba(215,173,62,.35); }
.prose ul, .prose ol { padding-left: 1.45em; }
.prose li { margin: .3em 0; }
.prose img { max-width: 100%; border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose table td, .prose table th { border: 1px solid var(--line); padding: 7px 11px; }
.prose blockquote { border-left: 3px solid var(--gold); margin: 1em 0; padding: 6px 16px;
  color: var(--muted); background: #FBF7EC; border-radius: 0 10px 10px 0; }
.reader { max-width: 760px; margin: 0 auto; }
.reader .prose { font-size: 16px; line-height: 1.85; }
.reader h1.reader-title { font-size: 26px; margin-bottom: 4px; }

/* ─── flash messages ────────────────────────────────────────────────── */
.flashes { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex;
  flex-direction: column; gap: 9px; max-width: 400px; }
.flash {
  padding: 13px 17px; border-radius: 13px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-3); animation: slideIn .35s var(--ease);
  border: 1px solid; display: flex; gap: 9px; align-items: flex-start;
  background: #fff;
}
.flash-success { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.flash-error { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.flash-info { background: var(--info-bg); color: var(--blue); border-color: #C9DFEE; }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } }
.flash.hide { opacity: 0; transform: translateY(-8px); transition: all .4s; }

/* ─── misc ──────────────────────────────────────────────────────────── */
.empty {
  border: 2px dashed #D3DDE8; border-radius: var(--radius); padding: 38px 22px;
  text-align: center; color: var(--faint); font-weight: 600; background: rgba(255,255,255,.5);
}
.empty svg { width: 30px; height: 30px; display: block; margin: 0 auto 10px; opacity: .5; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 10px; font-size: 12.5px;
}
.copy-chip button { border: 0; background: var(--navy); color: #fff; border-radius: 7px;
  padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer; }
.copy-chip button:hover { background: var(--blue); }
.year-select { display: inline-flex; align-items: center; gap: 8px; }
.year-select select, select[data-autosubmit] {
  padding: 7px 11px; border-radius: 9px; border: 1.5px solid #CBD7E3;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--navy); background: #fff;
  cursor: pointer;
}
.file-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 4.5px 11px; transition: all .13s; }
.file-pill:hover { border-color: var(--blue); text-decoration: none; background: var(--blue-soft); }
.file-pill svg { width: 13px; height: 13px; color: var(--blue); }

/* comments */
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.comment .avatar { width: 34px; height: 34px; font-size: 12px; }
.comment .body { flex: 1; min-width: 0; }
.comment .meta { font-size: 11.5px; color: var(--faint); }
.comment .meta b { color: var(--navy); font-size: 12.5px; }
.comment p { margin: 4px 0 0; white-space: pre-wrap; }

/* ─── exams: cards, player, results ─────────────────────────────────── */
.exam-card { border-left: 5px solid #CBD6E2; }
.exam-card.state-passed { border-left-color: var(--green); }
.exam-card.state-overdue, .exam-card.state-failed { border-left-color: var(--red); }
.exam-card.state-due { border-left-color: var(--gold); }
.exam-card.state-open { border-left-color: var(--blue); }
.exam-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px;
  color: var(--muted); font-weight: 600; margin-top: 4px; }
.exam-meta svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px;
  color: var(--faint); }
.exam-meta b { color: var(--ink); }

.q-block { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.q-block:last-of-type { border-bottom: 0; }
.q-num { font-size: 11px; font-weight: 800; color: var(--gold-deep); letter-spacing: .12em;
  text-transform: uppercase; }
.q-text { font-size: 15.5px; font-weight: 700; color: var(--navy); margin: 7px 0 13px;
  line-height: 1.5; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; margin: 7px 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  transition: all .13s var(--ease); font-size: 14px; background: #fff; position: relative;
}
.opt:hover { border-color: var(--blue); background: #F6FAFD; transform: translateX(2px); }
.opt input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); flex-shrink: 0; }
.opt.sel { border-color: var(--navy); background: var(--info-bg); font-weight: 600;
  box-shadow: 0 1px 6px rgba(6,53,91,.14); }
.opt.correct { border-color: var(--green); background: var(--green-bg); }
.opt.wrong { border-color: var(--red); background: var(--red-bg); }
.opt svg { width: 15px; height: 15px; margin-top: 3px; flex-shrink: 0; }
.opt.correct svg { color: var(--green); } .opt.wrong svg { color: var(--red); }

/* sticky action bar (exam player / reader) */
.actionbar {
  position: sticky; bottom: 14px; z-index: 30; margin-top: 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 15px; padding: 12px 16px;
  box-shadow: var(--shadow-2);
}
.answered-track { flex: 1; min-width: 140px; height: 8px; border-radius: 999px;
  background: var(--line-soft); overflow: hidden; }
.answered-track > i { display: block; height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transition: width .3s var(--ease); }

/* score ring */
.ring-wrap { display: grid; place-items: center; margin: 6px auto 10px; position: relative;
  width: 168px; height: 168px; }
.ring-wrap svg.ring { width: 168px; height: 168px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 13; }
.ring-val { fill: none; stroke-width: 13; stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease); }
.ring-label { position: absolute; text-align: center; }
.ring-label .score { font-size: 34px; font-weight: 800; line-height: 1; }
.ring-label .of { font-size: 11px; color: var(--faint); font-weight: 700; margin-top: 3px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 20px; flex-wrap: wrap; }
.read-dot { width: 9px; height: 9px; border-radius: 50%; background: #D3DDE8;
  display: inline-block; }
.read-dot.done { background: var(--green); }
.read-dot.now { background: var(--gold); box-shadow: 0 0 0 3px rgba(215,173,62,.3); }

/* ─── auth pages ────────────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 26px;
  background:
    radial-gradient(760px 460px at 88% -12%, rgba(215, 173, 62, .2), transparent 60%),
    radial-gradient(900px 560px at -12% 112%, rgba(37, 134, 196, .35), transparent 56%),
    radial-gradient(1400px 900px at 50% 120%, rgba(4, 24, 42, .5), transparent 70%),
    linear-gradient(158deg, var(--navy-deep) 0%, var(--navy) 52%, #0A4977 100%);
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 22px;
  box-shadow: 0 36px 90px rgba(2, 18, 34, .6), 0 4px 18px rgba(2,18,34,.35);
  padding: 40px 38px 32px; position: relative; overflow: hidden;
  animation: cardUp .55s var(--ease);
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light) 55%, transparent); }
@keyframes cardUp { from { opacity: 0; transform: translateY(22px) scale(.985); } }
.auth-logo { width: 236px; max-width: 82%; height: auto; display: block; margin: 4px auto 20px; }
.auth-card h1 { text-align: center; font-size: 18.5px; letter-spacing: .01em;
  margin-bottom: 20px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 13px; }
.auth-foot { text-align: center; color: rgba(255,255,255,.55); font-size: 11.5px;
  margin-top: 18px; letter-spacing: .04em; }
.auth-flash { margin-bottom: 14px; }
.auth-flash .flash { animation: none; box-shadow: none; }

/* ─── responsive ────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(4, 18, 32, .5); }
  .main { margin-left: 0; }
  .burger { display: block; }
  .content { padding: 20px 16px 60px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 11px 14px; }
  .topbar-user span.uname { display: none; }
  .card { padding: 18px; }
}
@media (min-width: 941px) and (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
