/* ───────────── Tokens ───────────── */
:root {
  --bg: #F3F4F9;
  --surface: #FFFFFF;
  --surface-2: #F8F9FC;
  --hover: #ECEEF5;
  --line: #E2E5EE;
  --line-2: #CDD1DE;
  --ink: #1B1E3A;
  --ink-2: #5A5F7A;
  --ink-3: #8B90A8;
  --accent: #262B7F;
  --accent-2: #1D2166;
  --accent-soft: #E9EAF8;
  --brand-red: #D3262E;
  --brand-red-soft: #FDECEC;
  --on-accent: #FFFFFF;
  --mark: #D3262E;
  --present: #2E8A57; --present-soft: #E1F2E7;
  --late: #C2610C;    --late-soft: #FFF0E0;
  --absent: #CC4137;  --absent-soft: #FBE3DF;
  --shadow-pop: 0 18px 50px -18px rgba(27,30,58, .35), 0 2px 6px rgba(27,30,58, .06);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 62px;
  color-scheme: light;
}
/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--font); font-size: 15.5px; line-height: 1.5; color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; flex: none; }
.splash { min-height: 100dvh; display: grid; place-items: center; }

/* ───────────── Buttons & inputs ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; white-space: nowrap; background: none; text-decoration: none; color: inherit;
  transition: background-color .12s, border-color .12s, transform .06s;
}
.btn:active { transform: translateY(1px); }
.btn.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn.btn-primary:hover { background: var(--accent-2); }
.btn-quiet { border-color: var(--line-2); background: var(--surface); }
.btn-quiet:hover { background: var(--hover); }
.btn-text { padding: 0 10px; color: var(--ink-2); }
.btn-text:hover { color: var(--ink); background: var(--hover); }
.btn-danger { color: var(--absent); border-color: var(--line-2); background: var(--surface); }
.btn-danger:hover { background: var(--absent-soft); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; height: 46px; font-size: 15.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.ibtn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px;
  border: 0; background: none; color: var(--ink-2); flex: none;
}
.ibtn:hover { background: var(--hover); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .field-row + .field, .field + .field-row { margin-top: 14px; }
.field-row > .field { margin-top: 0 !important; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 13px; color: var(--ink-3); }
.input {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 130px; padding: 11px 13px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238C948D' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-3); }
.err { color: var(--absent); font-size: 13.5px; min-height: 0; }
.err:not(:empty) { margin-top: 12px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--hover); }
.seg button { height: 32px; padding: 0 13px; border: 0; border-radius: 8px; background: none; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.toggles button { height: 36px; min-width: 46px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.toggles button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ───────────── Auth ───────────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; border-right: 1px solid var(--line); }
.auth-side h1 { font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; letter-spacing: -.035em; max-width: 13ch; margin-top: 18px; }
.auth-side .lede { color: var(--ink-2); font-size: 17px; max-width: 40ch; margin-top: 16px; }
.register {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; max-width: 440px;
  overflow: hidden; font-size: 14px;
}
.register-head, .register-row { display: grid; grid-template-columns: 1fr repeat(5, 30px) 52px; align-items: center; gap: 4px; padding: 9px 14px; }
.register-head { color: var(--ink-3); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.register-head span:not(:first-child), .register-row span:not(:first-child) { text-align: center; }
.register-row + .register-row { border-top: 1px solid var(--line); }
.register-row b { font-weight: 600; }
.register-row .s { font-weight: 700; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 26px; letter-spacing: -.03em; }
.auth-card .sub { color: var(--ink-2); margin: 6px 0 26px; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.demo-note { margin-top: 22px; padding: 12px 14px; border-radius: 10px; background: var(--late-soft); color: var(--ink); font-size: 13.5px; }
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { border-right: 0; padding: calc(28px + env(safe-area-inset-top)) 22px 0; gap: 0; }
  .auth-side h1 { font-size: 32px; }
  .auth-side .lede, .auth-side .register, .auth-side .foot { display: none; }
  .auth-main { align-items: flex-start; padding: 26px 22px calc(32px + env(safe-area-inset-bottom)); }
}

/* ───────────── Brand ───────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }

/* ───────────── Shell ───────────── */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 20px 12px 16px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.rail .brand { padding: 0 10px 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px;
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px;
}
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.rail-sec { display: flex; align-items: center; justify-content: space-between; margin: 24px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.rail-sec button { border: 0; background: none; color: var(--ink-3); width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.rail-sec button:hover { background: var(--hover); color: var(--ink); }
.rail-group { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.rail-group:hover { background: var(--hover); }
.rail-group[aria-current="page"] { background: var(--hover); font-weight: 600; }
.rail-group span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-group small { color: var(--ink-3); font-size: 12.5px; }
.dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.rail-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); padding: 0 10px 12px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--present); flex: none; }
.sync[data-state="saving"] i { background: var(--late); animation: blink 1s infinite; }
.sync[data-state="offline"] i { background: var(--absent); }
.sync[data-state="demo"] i { background: var(--late); }
@keyframes blink { 50% { opacity: .25; } }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; text-decoration: none; }
.me:hover { background: var(--hover); }
.me b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--ink-3); font-size: 12.5px; }
.me > div { min-width: 0; flex: 1; }

.main { min-width: 0; }
.appbar, .tabbar { display: none; }
.page { max-width: 1060px; margin: 0 auto; padding: 34px 40px 72px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .appbar {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30;
    min-height: 52px; padding: env(safe-area-inset-top) 8px 0;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .15s;
  }
  .appbar.scrolled { border-bottom-color: var(--line); }
  .appbar .title { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 6px; }
  .appbar .brand { font-size: 17px; padding-left: 8px; flex: 1; }
  .appbar .brand img { width: 26px; height: 26px; }
  .appbar .back { text-decoration: none; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--accent); font-weight: 600; height: 40px; padding: 0 6px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .page { padding: 10px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
}

/* ───────────── Page header ───────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.035em; }
.head .meta { margin-top: 6px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14.5px; }
.head .meta span { display: inline-flex; align-items: center; gap: 6px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.crumb:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) {
  .head { margin-bottom: 20px; }
  .head h1 { font-size: 28px; }
  .crumb { display: none; }
}

/* ───────────── Panels & lists ───────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.panel-head h2 { font-size: 16.5px; letter-spacing: -.015em; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 980px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 13px; padding: 12px 18px; min-height: 60px; text-decoration: none; color: inherit; width: 100%; border: 0; background: none; text-align: left; }
a.row:hover, button.row:hover { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { display: block; font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { text-align: right; flex: none; }
.row .big { font-weight: 700; font-size: 16px; }
.chev { color: var(--ink-3); }

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.figures > div { background: var(--surface); padding: 16px 18px; }
.figures b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.figures span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 640px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } .figures b { font-size: 24px; } }

.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-p { background: var(--present-soft); color: var(--present); }
.tag-l { background: var(--late-soft); color: var(--late); }
.tag-a { background: var(--absent-soft); color: var(--absent); }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; flex: none; color: #24302A; letter-spacing: .01em; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.gmark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; color: #fff; }

.meter { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.empty { padding: 44px 24px; text-align: center; }
.empty .tally { margin: 0 auto 14px; color: var(--ink-3); }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 40ch; margin: 0 auto 18px; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 0 0 11px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tabs a small { color: var(--ink-3); font-weight: 500; margin-left: 5px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; max-width: 320px; min-width: 180px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 38px; height: 40px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 20px; }
.banner img { width: 40px; height: 40px; border-radius: 10px; }
.banner .grow { flex: 1; min-width: 0; }
.banner b { display: block; }
.banner span { font-size: 13.5px; color: var(--ink-2); }

/* ───────────── Students add form ───────────── */
.addform { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .addform { grid-template-columns: 1fr 1fr; } .addform .phone { grid-column: 1 / -1; } .addform button { grid-column: 1 / -1; } }
.phone-link { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.phone-link:hover { color: var(--accent); }

/* ───────────── Grading sheet ───────────── */
.grade { --n: 3; }
.gr-head, .gr-row, .gr-foot {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: minmax(190px, 1fr) 128px repeat(var(--n), 78px) 64px;
  padding: 0 18px;
}
.gr-head { height: 48px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.gr-head span:not(:first-child), .gr-foot span:not(:first-child) { text-align: center; }
.gr-head small { display: block; font-weight: 500; font-size: 11.5px; }
.gr-row { min-height: 64px; border-bottom: 1px solid var(--line); }
.gr-row.is-absent .gr-who b { color: var(--ink-3); }
.gr-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.gr-who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-who small { display: none; color: var(--ink-2); font-size: 13px; }
.gr-scores { display: contents; }
.gr-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.gr-cell label { display: none; }
.gr-cell input {
  width: 64px; height: 42px; text-align: center; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; outline: none;
  -moz-appearance: textfield; appearance: textfield;
}
.gr-cell input::-webkit-outer-spin-button, .gr-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gr-cell input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gr-cell input.full { background: var(--present-soft); border-color: transparent; color: var(--present); }
.gr-cell input.low { background: var(--absent-soft); border-color: transparent; color: var(--absent); }
.gr-cell input:disabled { background: var(--surface-2); border-style: dashed; color: var(--ink-3); }
.gr-total { text-align: center; font-weight: 700; font-size: 16px; }
.gr-foot { height: 52px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 0 0 14px 14px; }

.att { display: inline-flex; gap: 4px; }
.att button {
  width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 700; font-size: 13px; color: var(--ink-3);
}
.att button:hover { border-color: var(--ink-3); color: var(--ink); }
.att button[data-v="p"][aria-pressed="true"] { background: var(--present); border-color: var(--present); color: #fff; }
.att button[data-v="l"][aria-pressed="true"] { background: var(--late); border-color: var(--late); color: #fff; }
.att button[data-v="a"][aria-pressed="true"] { background: var(--absent); border-color: var(--absent); color: #fff; }

@media (max-width: 760px) {
  .gr-head { display: none; }
  .gr-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; row-gap: 12px; }
  .gr-who small { display: block; }
  .gr-scores { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .gr-cell { align-items: stretch; }
  .gr-cell label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gr-cell input { width: 100%; }
  .gr-total { display: none; }
  .gr-foot { grid-template-columns: 1fr; height: auto; padding: 12px 16px; text-align: left; }
  .gr-foot span { display: none; }
  .gr-foot .m-only { display: block !important; text-align: left !important; font-weight: 500; }
}
.m-only { display: none; }

/* ───────────── Attendance register ───────────── */
.reg-wrap { overflow-x: auto; border-radius: 14px; }
table.reg { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.reg th, .reg td { padding: 0 6px; height: 50px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.reg thead th { height: 52px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.reg thead th b { display: block; font-size: 15px; color: var(--ink); font-weight: 700; }
.reg .who { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding-left: 18px; min-width: 170px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.reg tbody tr:last-child td { border-bottom: 0; }
.reg thead th:not(.who):not(.rate) { width: 60px; }
.reg .rate { padding-right: 18px; font-weight: 700; text-align: right; }
.cell { width: 34px; height: 30px; border-radius: 8px; border: 1px dashed var(--line-2); background: none; font-weight: 700; font-size: 12.5px; color: var(--ink-3); }
.cell[data-v="p"] { background: var(--present-soft); color: var(--present); border: 0; }
.cell[data-v="l"] { background: var(--late-soft); color: var(--late); border: 0; }
.cell[data-v="a"] { background: var(--absent-soft); color: var(--absent); border: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); padding: 12px 18px; border-top: 1px solid var(--line); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

/* ───────────── Rating ───────────── */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; align-items: end; }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px 16px; text-align: center; min-width: 0; color: inherit; font: inherit; }
.pod .place { width: 30px; height: 30px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--hover); color: var(--ink-2); }
.pod .avatar { margin: 0 auto 10px; }
.pod b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pod .v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.pod small { color: var(--ink-3); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod.first { padding-top: 26px; padding-bottom: 22px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pod.first .place { background: var(--mark); color: #3A2E00; }
.pod.first .avatar { width: 64px; height: 64px; font-size: 21px; }
@media (max-width: 560px) { .podium { gap: 8px; } .pod { padding: 14px 8px; } .pod .v { font-size: 18px; } }

.rank-row { display: grid; grid-template-columns: 30px 38px minmax(0, 1fr) minmax(70px, 22%) 64px; align-items: center; gap: 12px; padding: 10px 18px; width: 100%; border: 0; background: none; text-align: left; }
.rank-row:hover { background: var(--surface-2); }
.rank-row .n { font-weight: 700; color: var(--ink-3); text-align: center; }
.rank-row.top3 .n { color: var(--ink); }
.rank-row .v { text-align: right; font-weight: 700; font-size: 16px; }
@media (max-width: 560px) { .rank-row { grid-template-columns: 24px 36px minmax(0, 1fr) 56px; padding: 10px 14px; } .rank-row .meter { display: none; } }

/* ───────────── Sheet (modal / bottom sheet) ───────────── */
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(15, 20, 17, .45); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 520px; max-height: min(88dvh, 820px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-pop); animation: rise .2s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.sheet.wide { max-width: 640px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 6px 22px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.sheet-head h2 { flex: 1; font-size: 19px; }
.sheet-body { padding: 10px 22px 6px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 22px; position: sticky; bottom: 0; background: var(--surface); }
.grabber { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@media (max-width: 640px) {
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet, .sheet.wide { max-width: none; border-radius: 18px 18px 0 0; max-height: 92dvh; animation: up .24s cubic-bezier(.2, .8, .2, 1); }
  .sheet-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1; height: 46px; }
  .grabber { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
  .field-row { grid-template-columns: 1fr; }
}
@keyframes up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-bg { animation: none; } }

.task-line { display: grid; grid-template-columns: minmax(0, 1fr) 84px 36px; gap: 8px; align-items: center; }
.task-line + .task-line { margin-top: 8px; }
.adders { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.adders button { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px dashed var(--line-2); background: none; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.adders button:hover { border-style: solid; color: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 9px; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-top h2 { font-size: 21px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; font-size: 13px; }
.quick a.off { background: var(--hover); color: var(--ink-3); pointer-events: none; }
.mini-figs { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }
.mini-figs div { padding: 11px 12px; }
.mini-figs div + div { border-left: 1px solid var(--line); }
.mini-figs b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.mini-figs span { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 420px) { .mini-figs { grid-template-columns: repeat(2, 1fr); } .mini-figs div:nth-child(3) { border-left: 0; } .mini-figs div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.subhead { font-size: 14.5px; font-weight: 700; margin: 22px 0 8px; }
.skill { display: grid; grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 14px; padding: 5px 0; }
.skill b { text-align: right; font-weight: 600; }
.hist { border: 1px solid var(--line); border-radius: 12px; }
.hist div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; }
.hist div + div { border-top: 1px solid var(--line); }
.hist .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────── Board ───────────── */
.board { position: fixed; inset: 0; z-index: 90; background: #11142E; color: #EEF0F8; overflow-y: auto; padding: calc(32px + env(safe-area-inset-top)) 6vw calc(32px + env(safe-area-inset-bottom)); }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.board h1 { font-size: clamp(30px, 4.6vw, 60px); font-weight: 800; letter-spacing: -.04em; }
.board .what { color: #8E9990; font-size: clamp(15px, 1.5vw, 20px); margin-top: 6px; }
.board-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.6fr) 110px; gap: 22px; align-items: center; padding: 14px 0; border-top: 1px solid #262A45; font-size: clamp(17px, 1.9vw, 26px); }
.board-row .n { font-weight: 800; color: #6C766E; }
.board-row:nth-child(1) .n { color: #D3262E; }
.board-row:nth-child(2) .n, .board-row:nth-child(3) .n { color: #C9D2CB; }
.board-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-row .b { height: 14px; border-radius: 7px; background: #22263F; overflow: hidden; }
.board-row .b i { display: block; height: 100%; border-radius: 7px; background: #8C90D8; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.board-row .v { text-align: right; font-weight: 800; }
.board .btn-quiet { background: transparent; color: #EEF1EE; border-color: #353A57; }
@media (max-width: 640px) { .board-row { grid-template-columns: 40px minmax(0, 1fr) 72px; gap: 12px; } .board-row .b { display: none; } }

/* ───────────── Toast ───────────── */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 11px; font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px); transition: opacity .18s, transform .18s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) { #toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); } }

/* Settings */
.settings .row { min-height: 58px; }
.install-steps { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.install-steps li + li { margin-top: 3px; }

/* ═════════════ Learn English ═════════════ */
.sec { font-size: 17px; letter-spacing: -.015em; margin: 6px 0 12px; }
.sec + * { margin-bottom: 30px; }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lvl { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.lvl:hover { border-color: var(--line-2); transform: translateY(-1px); }
.lvl.soon { background: var(--surface-2); }
.lvl.soon b, .lvl.soon p { color: var(--ink-2); }
.lvl-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.cefr { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 13px; letter-spacing: .01em; }
.lvl.soon .cefr { background: var(--line-2); color: var(--ink-2); }
.lvl b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.lvl p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; flex: 1; }
.lvl-prog { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.lvl-prog .meter { flex: 1; }
@media (max-width: 900px) { .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .lvl { padding: 14px 13px; } .lvl p { font-size: 13px; } }

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skill-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.skill-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.skill-card .grow { flex: 1; min-width: 0; }
.skill-card b { display: block; font-size: 17px; letter-spacing: -.02em; }
.skill-card .s { display: block; font-size: 13.5px; color: var(--ink-2); margin: 2px 0 12px; }
.skill-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-n { font-size: 13px; font-weight: 600; }
.skill-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.skill-ic svg { width: 22px; height: 22px; }
.skill-ic.lg { width: 52px; height: 52px; border-radius: 14px; }
.skill-ic.lg svg { width: 26px; height: 26px; }
.skill-reading { background: #E9EAF8; color: #1D2166; }
.skill-listening { background: #E1F2E7; color: #2E8A57; }
.skill-writing { background: #FFF0E0; color: #B4580E; }
.skill-speaking { background: #FBE4E6; color: #B23A68; }
@media (max-width: 760px) { .skills { grid-template-columns: minmax(0, 1fr); } }

.step-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--hover); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.step-n.done { background: var(--present-soft); color: var(--present); }
.step-n.full { background: var(--accent-soft); color: var(--accent); }
.row.is-off { opacity: .62; }

/* Quiz */
.qz { max-width: 680px; }
.qz-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.qz-top h1 { font-size: 28px; font-weight: 800; letter-spacing: -.035em; margin-top: 2px; }
.qz-count { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.qz-count small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.qz-steps { display: flex; gap: 5px; margin: 16px 0 18px; }
.qz-steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.qz-steps i.cur { background: var(--ink-3); }
.qz-steps i.ok { background: var(--present); }
.qz-steps i.no { background: var(--absent); }
.qz-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.qz-q { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; margin-bottom: 22px; }
.blank { display: inline-block; min-width: 72px; padding: 0 6px; border-bottom: 2.5px solid var(--accent); color: var(--accent); text-align: center; line-height: 1.25; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 17px; font-weight: 600; text-align: left; transition: border-color .1s, background .1s; }
.opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.opt .key { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--hover); color: var(--ink-2); font-size: 13px; font-weight: 700; flex: none; }
.opt.right { border-color: var(--present); background: var(--present-soft); color: var(--present); }
.opt.right .key { background: var(--present); color: #fff; }
.opt.wrong { border-color: var(--absent); background: var(--absent-soft); color: var(--absent); }
.opt.wrong .key { background: var(--absent); color: #fff; }
.opt.dim { opacity: .5; }
.opt:disabled { cursor: default; }
.gapf { display: flex; gap: 8px; }
.gapf .input { height: 52px; font-size: 18px; font-weight: 600; }
.gapf .btn { height: 52px; }
.gapf .input.right { border-color: var(--present); color: var(--present); background: var(--present-soft); }
.gapf .input.wrong { border-color: var(--absent); color: var(--absent); background: var(--absent-soft); }
.fb { margin-top: 16px; padding: 14px 16px; border-radius: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fb.ok { background: var(--present-soft); }
.fb.no { background: var(--absent-soft); }
.fb b { font-size: 15.5px; }
.fb.ok b { color: var(--present); }
.fb.no b { color: var(--absent); }
.fb p { flex-basis: 100%; color: var(--ink-2); font-size: 14.5px; }
.qz-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; min-height: 46px; }
.qz-foot .btn { height: 46px; padding: 0 22px; }
.kbd-hint { font-size: 13px; }
@media (pointer: coarse) { .kbd-hint { display: none; } }
@media (max-width: 560px) {
  .qz-top h1 { font-size: 23px; }
  .qz-card { padding: 20px 16px; border-radius: 14px; }
  .qz-q { font-size: 20px; }
  .opt { font-size: 16px; }
  .qz-foot .btn { flex: 1; }
}
.result { display: flex; align-items: center; gap: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.result h1 { font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
.result p { margin-top: 4px; }
.ring { --p: 0; width: 116px; height: 116px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--hover) 0); }
.ring span { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.ring small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.ring.sm { width: 70px; height: 70px; }
.ring.sm span { font-size: 19px; }
.ring.sm small { font-size: 12px; }
@media (max-width: 560px) { .result { flex-direction: column; text-align: center; padding: 22px 16px; } .result .actions { justify-content: center; } }
.review { list-style: none; margin: 0; padding: 0 0 6px; }
.review li { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.review .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.review .mark svg { width: 14px; height: 14px; stroke-width: 2.6; }
.review li.ok .mark { background: var(--present-soft); color: var(--present); }
.review li.no .mark { background: var(--absent-soft); color: var(--absent); }
.review p { font-weight: 600; }
.review .blank { display: inline-block; min-width: 0; border-bottom-width: 2px; }
.review span.muted, .review span.why { display: block; font-size: 14px; }
.review .why { color: var(--ink-2); margin-top: 2px; }

/* Exam player */
.xp-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 12px; z-index: 20; }
.xp-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.xp-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-title span { font-size: 13px; }
.xp-timer { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 9px; background: var(--hover); font-weight: 700; font-size: 15px; }
.xp-timer.warn { background: var(--absent-soft); color: var(--absent); }
.xp-result { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.xp-result > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xp-result b { font-size: 17px; }
.xp-result .muted { font-size: 14px; }
.xp-switch { display: none; margin-bottom: 12px; }
.xp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.xp.is-reading .xp-body, .xp.is-writing .xp-body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
.xp-pane { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.xp.is-reading .xp-pane { max-height: calc(100dvh - 120px); overflow-y: auto; position: sticky; top: 80px; overscroll-behavior: contain; }
.xp-passage h2 { font-size: 22px; letter-spacing: -.025em; margin-bottom: 14px; }
.xp-passage p { font-size: 16px; line-height: 1.7; margin-bottom: 14px; max-width: 68ch; }
.xp-passage .pl { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 9px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 800; vertical-align: 2px; }
.qg-part { font-size: 12.5px; font-weight: 700; color: var(--accent); margin: 6px 0 8px; }
.qg + .qg-part, .xp-passage p + .qg-part { margin-top: 26px; }
.qg { margin-bottom: 22px; }
.qg-head { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); margin-bottom: 4px; }
.qg-head b { font-size: 14.5px; }
.qg-head p { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.match-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.match-list b { display: inline-block; min-width: 34px; }
.qi { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.qi:last-child { border-bottom: 0; }
.qn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line-2); font-weight: 700; font-size: 13.5px; }
.qi.ok .qn { background: var(--present); border-color: var(--present); color: #fff; }
.qi.no .qn { background: var(--absent); border-color: var(--absent); color: #fff; }
.qb { flex: 1; min-width: 0; }
.qb > p { font-size: 15.5px; line-height: 1.55; margin-top: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { height: 34px; padding: 0 13px; border-radius: 9px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 12.5px; color: var(--ink-2); letter-spacing: .02em; }
.pill:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mopts { display: grid; gap: 6px; margin-top: 10px; }
.mopt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); text-align: left; font-size: 15px; line-height: 1.4; }
.mopt:hover:not(:disabled) { border-color: var(--accent); }
.mopt .key { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--hover); font-weight: 700; font-size: 12px; flex: none; margin-top: 0; }
.mopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mopt[aria-pressed="true"] .key { background: var(--accent); color: var(--on-accent); }
.pill:disabled, .mopt:disabled { cursor: default; }
.gapin { display: inline-block; width: 170px; max-width: 100%; height: 34px; padding: 0 10px; margin: 2px 2px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-weight: 600; outline: none; }
.gapin:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
select.match { width: auto; min-width: 140px; height: 38px; margin-top: 8px; }
.qa { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; font-size: 14px; }
.qa svg { width: 16px; height: 16px; stroke-width: 2.4; margin-top: 2px; }
.qa.ok { color: var(--present); font-weight: 600; }
.qa.no { color: var(--ink-2); }
.qa.no svg { color: var(--absent); }
.xp-end { padding-top: 16px; }
.audio-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.audio-card > svg { width: 26px; height: 26px; color: var(--present); }
.audio-card audio { width: 100%; margin-top: 6px; }
.prompt p { font-size: 16.5px; line-height: 1.65; margin-top: 12px; }
.prompt img { max-width: 100%; border-radius: 10px; margin-top: 14px; border: 1px solid var(--line); }
.write { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
textarea.input.essay { border: 0; border-radius: 0; min-height: 52dvh; padding: 20px 22px; font-size: 16.5px; line-height: 1.7; resize: vertical; }
.essay:focus { box-shadow: none; }
.wfoot { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; background: var(--surface-2); }
.hide-sm { display: inline; }
@media (max-width: 860px) {
  .xp-bar { top: calc(env(safe-area-inset-top) + 58px); }
  .xp.is-reading .xp-switch { display: inline-flex; width: 100%; }
  .xp.is-reading .xp-switch button { flex: 1; }
  .xp.is-reading .xp-body, .xp.is-writing .xp-body { grid-template-columns: minmax(0, 1fr); }
  .xp.is-reading .xp-pane { max-height: none; position: static; overflow: visible; }
  .xp.is-reading[data-pane="passage"] .xp-qs, .xp.is-reading[data-pane="questions"] .xp-passage { display: none; }
  .xp-pane { padding: 18px 16px; }
  .write { padding: 0; }
  textarea.input.essay { min-height: 45dvh; padding: 16px; }
  .hide-sm { display: none; }
  .xp-bar > a.btn { display: none; }
  .xp-bar { padding-left: 14px; }
}

/* Speaking */
.sp-card { padding: 26px; }
.sp-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13.5px; }
.sp-q h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.3; }
.sp-q .qz-steps { margin: 22px 0; }
.sp-actions { align-items: center; }
.sp-actions .grow { flex: 1; }
.cue { padding: 20px 22px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.cue h2 { font-size: 22px; letter-spacing: -.025em; margin: 12px 0 10px; line-height: 1.3; }
.cue ul { margin: 6px 0 8px; padding-left: 20px; font-size: 16px; line-height: 1.7; }
.cue p { font-size: 16px; }
.sp-stage { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.big-timer { font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.big-timer.talk { color: var(--accent); }
.big-timer.warn { color: var(--absent); }
.rec-on { color: var(--absent); border-color: var(--absent); }
.rec-on svg { fill: currentColor; animation: blink 1.2s infinite; }
.is-speaking .row audio { height: 36px; max-width: 220px; }
@media (max-width: 560px) {
  .sp-card { padding: 20px 16px; }
  .sp-q h2 { font-size: 22px; }
  .sp-actions .grow { display: none; }
  .sp-actions .btn { flex: 1; }
  .sp-actions #spRec { flex-basis: 100%; }
  .is-speaking .row { flex-wrap: wrap; }
  .is-speaking .row audio { max-width: 100%; width: 100%; }
}

/* ═════════════ CDI Reading (computer-delivered IELTS) ═════════════ */
body.cdi-open { overflow: hidden; }
.cdi { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #fff; color: #1d1d1f;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); font-size: 16px; }
.cdi-top { flex: none; height: 62px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid #E3E5EE; background: #fff; }
.cdi-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; text-decoration: none; color: inherit; justify-self: start; }
.cdi-brand img { width: 30px; height: 30px; }
.cdi-timer { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; background: #FDEBEC; border: 1px solid #F6C5C8; color: #D3262E; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.cdi-timer svg { width: 17px; height: 17px; }
.cdi-timer.warn { background: #D3262E; color: #fff; border-color: #D3262E; }
.cdi-timer.done { background: #EEF6F1; border-color: #CFE6D8; color: #2E8A57; }
.cdi-tools { justify-self: end; display: flex; gap: 8px; }
.cdi-ibtn { width: 40px; height: 40px; border-radius: 9px; border: 1px solid #DCDFEA; background: #fff; display: grid; place-items: center; color: #3b3b3f; }
.cdi-ibtn:hover { background: #F3F4F9; }
.cdi-ibtn svg { width: 19px; height: 19px; }
.cdi-switch { display: none; }
.cdi-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--split)) 14px minmax(0, 1fr); }
.cdi-pane { overflow-y: auto; min-height: 0; padding: 26px 30px 30px; scrollbar-width: thin; scrollbar-color: #A6AAB9 transparent; }
.cdi-divider { position: relative; cursor: col-resize; background: #F2F3F8; border-left: 1px solid #E3E5EE; border-right: 1px solid #E3E5EE; touch-action: none; }
.cdi-divider span { position: absolute; left: 50%; top: 50%; width: 6px; height: 60px; transform: translate(-50%, -50%); border-radius: 3px; background: #C7CBDA; }
.cdi-divider:hover span, .cdi.dragging .cdi-divider span { background: #262B7F; }
.cdi.dragging { user-select: none; cursor: col-resize; }
.cdi-h { font-size: 26px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid #E3E5EE; }
.cdi-qs .cdi-h { text-transform: none; }
.cdi-label { font-weight: 700; text-transform: uppercase; margin-bottom: 18px; }
.cdi-spend { font-weight: 700; margin-bottom: 22px; line-height: 1.55; }
.cdi-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.cdi-subtitle { font-style: italic; margin-bottom: 20px; }
.cdi-p { line-height: 1.95; text-align: justify; hyphens: auto; margin-bottom: 22px; }
.cdi-pl { font-weight: 800; margin-right: 4px; }
mark.hl { background: #DDE3FF; color: inherit; border-radius: 2px; padding: 0 1px; cursor: pointer; }
.hl-tool { position: fixed; z-index: 95; display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: #1B1E3A; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.hl-tool button { border: 0; background: none; color: #fff; font-weight: 600; font-size: 13.5px; padding: 7px 12px; border-radius: 7px; }
.hl-tool button:hover { background: rgba(255,255,255,.12); }
.cdi-group { margin-bottom: 30px; }
.cdi-group h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.cdi-group h3 span { font-weight: 700; }
.cdi-ins { line-height: 1.75; margin-bottom: 4px; }
.cdi-q { padding: 12px 8px 14px; margin: 0 -8px; border-radius: 10px; transition: background .3s; }
.cdi-q + .cdi-q { margin-top: 10px; }
.cdi-stem { line-height: 1.65; margin-bottom: 10px; }
.cdi-stem > b:first-child { margin-right: 4px; }
.cdi-opts { display: flex; flex-direction: column; gap: 4px; padding-left: 8px; }
.cdi-radio { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; width: fit-content; min-width: 200px; }
.cdi-radio:hover { background: #F3F4F9; }
.cdi-radio input { appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid #6B6B70; margin: 0; flex: none; display: grid; place-items: center; background: #fff; cursor: pointer; }
.cdi-radio input::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #262B7F; transform: scale(0); transition: transform .12s; }
.cdi-radio input:checked { border-color: #262B7F; }
.cdi-radio input:checked::after { transform: scale(1); }
.cdi-radio input:focus-visible { outline: 2px solid #262B7F; outline-offset: 2px; }
.cdi-radio input:disabled { cursor: default; }
.cdi-radio:has(input:checked) { background: #ECEDF9; }
.cdi-radio.is-key, .cdi-radio.is-key:has(input:checked) { box-shadow: inset 0 0 0 1.5px #2E8A57; background: #EEF7F1; }
.cdi-radio.is-key input:checked { border-color: #2E8A57; }
.cdi-radio.is-key input::after { background: #2E8A57; }
.cdi-radio.is-wrong, .cdi-radio.is-wrong:has(input:checked) { box-shadow: inset 0 0 0 1.5px #D3262E; background: #FCEDEA; }
.cdi-radio.is-wrong input:checked { border-color: #D3262E; }
.cdi-radio.is-wrong input::after { background: #D3262E; }
.cdi-notes h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 22px 0 18px; }
.cdi-notes h4 { font-size: 19px; font-weight: 700; margin: 22px 0 10px; }
.cdi-notes ul { margin: 0; padding-left: 26px; }
.cdi-notes li { line-height: 2.6; margin-bottom: 4px; }
.cdi-gapwrap { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; border-radius: 8px; padding: 2px 4px; transition: background .3s; }
.cdi-gn { font-weight: 700; }
.cdi-gap { width: 210px; max-width: 46vw; height: 32px; padding: 0 9px; border: 1.5px solid #BCC0CF; border-radius: 4px; background: #fff; font: inherit; font-size: 15.5px; outline: none; }
.cdi-gap:focus { border-color: #262B7F; box-shadow: 0 0 0 3px #E7E8F7; }
.cdi-gap:disabled { background: #F8F9FC; color: #1d1d1f; }
.cdi-select { height: 32px; border: 1.5px solid #BCC0CF; border-radius: 4px; padding: 0 8px; background: #fff; }
.cdi-list { list-style: none; padding: 0; margin: 10px 0 14px; line-height: 1.8; }
.flash { background: #E3E7FF !important; }
.cdi-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; vertical-align: middle; margin-left: 4px; }
.cdi-mark svg { width: 17px; height: 17px; stroke-width: 2.6; }
.cdi-mark.ok { color: #2E8A57; }
.cdi-mark.no { color: #D3262E; }
.cdi-mark.no span { color: #2E8A57; background: #EEF7F1; border-radius: 6px; padding: 1px 7px; }
.cdi-nav { flex: none; display: flex; align-items: center; gap: 16px; padding: 4px 22px 10px; border-top: 1px solid #E3E5EE; background: #fff; }
.cdi-parts { flex: 1; min-width: 0; display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 10px 4px 2px; }
.cdi-parts::-webkit-scrollbar { display: none; }
.cdi-part { display: flex; align-items: flex-end; gap: 12px; flex: none; }
.cdi-pname { border: 0; background: none; padding: 0 0 4px; font-weight: 800; font-size: 17px; color: #1d1d1f; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.cdi-part:not(.on) .cdi-pname { color: #6B6B70; font-weight: 600; font-size: 15px; }
.cdi-pname small { font-size: 12px; font-weight: 500; color: #8E8A84; }
.cdi-nums { display: flex; gap: 6px; }
.cdi-num { position: relative; min-width: 30px; height: 30px; padding: 0 4px; border: 1.5px solid transparent; border-radius: 4px; background: none; font-size: 16px; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.cdi-num::before { content: ""; position: absolute; left: -2px; right: -2px; top: -9px; height: 3px; border-radius: 2px; background: #DAD6CF; }
.cdi-num.done::before { background: #2E8A57; }
.cdi-num.cur { border-color: #1d1d1f; font-weight: 700; }
.cdi-num:hover { background: #F3F4F9; }
.cdi-num.ok { color: #2E8A57; font-weight: 700; }
.cdi-num.ok::before { background: #2E8A57; }
.cdi-num.no { color: #D3262E; font-weight: 700; }
.cdi-num.no::before { background: #D3262E; }
.cdi-submit { flex: none; height: 42px; padding: 0 22px; border: 0; border-radius: 8px; background: #2E8A57; color: #fff; font-weight: 700; font-size: 15.5px; }
.cdi-submit:hover { background: #267649; }
.cdi-modal-bg { position: absolute; inset: 0; z-index: 5; background: rgba(29, 24, 21, .45); display: grid; place-items: center; padding: 20px; }
.cdi-modal { width: 100%; max-width: 520px; background: #fff; border-radius: 22px; padding: 30px 28px 24px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); animation: rise .2s ease-out; }
.cdi-modal h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cdi-modal h2::after { content: ""; display: block; width: 64px; height: 3px; border-radius: 2px; background: #262B7F; margin: 10px auto 0; }
.cdi-score { font-size: 64px; font-weight: 800; letter-spacing: -.04em; margin: 14px 0 10px; color: #1B1E3A; }
.cdi-band { margin: -4px 0 14px; color: #5A5F7A; }
.cdi-band b { color: #262B7F; font-size: 18px; }
.cdi-rows { display: grid; gap: 8px; margin-bottom: 18px; }
.cdi-rows div { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border: 1px solid #E6E8F0; border-radius: 12px; background: #F8F9FC; font-weight: 600; }
.cdi-rows b { padding-left: 16px; border-left: 1px solid #DCDFEA; }
.cdi-mbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cdi-btn { height: 50px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; }
.cdi-btn.ghost { background: #F4F5FA; border-color: #E3E5EE; color: #1B1E3A; }
.cdi-btn.dark { background: #262B7F; color: #fff; }
.cdi-btn.dark:hover { background: #1D2166; }
.cdi-again { margin-top: 14px; border: 0; background: none; color: #262B7F; font-weight: 600; font-size: 14.5px; }
.cdi-again:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .cdi { font-size: 15.5px; }
  .cdi-top { height: 56px; padding: 0 12px; }
  .cdi-brand span, .cdi-brand { font-size: 0; gap: 0; }
  .cdi-brand img { width: 30px; height: 30px; }
  .cdi-timer { height: 36px; padding: 0 12px; font-size: 15px; }
  .cdi-ibtn { width: 36px; height: 36px; }
  #cdiFull { display: none; }
  .cdi-switch { display: flex; gap: 4px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #E3E5EE; }
  .cdi-switch button { flex: 1; height: 38px; border: 1px solid #DCDFEA; border-radius: 9px; background: #fff; font-weight: 700; font-size: 14px; color: #5A5F7A; }
  .cdi-switch button[aria-pressed="true"] { background: #1B1E3A; border-color: #1B1E3A; color: #fff; }
  .cdi-main { grid-template-columns: minmax(0, 1fr); }
  .cdi-divider { display: none; }
  .cdi[data-pane="passage"] .cdi-qs, .cdi[data-pane="questions"] .cdi-passage { display: none; }
  .cdi-pane { padding: 18px 16px 24px; }
  .cdi-h { font-size: 20px; padding-bottom: 12px; margin-bottom: 16px; }
  .cdi-p { line-height: 1.8; text-align: left; }
  .cdi-notes h2 { font-size: 24px; }
  .cdi-notes ul { padding-left: 18px; }
  .cdi-gap { width: 150px; }
  .cdi-radio { min-width: 0; width: 100%; }
  .cdi-nav { padding: 4px 12px 10px; gap: 10px; }
  .cdi-pname { font-size: 15px; }
  .cdi-num { min-width: 28px; font-size: 15px; }
  .cdi-submit { height: 40px; padding: 0 14px; font-size: 14.5px; }
  .cdi-score { font-size: 52px; }
  .cdi-mbtns { grid-template-columns: 1fr; }
}
/* Review: evidence and explanations */
mark.ev { background: #E9EEFF; color: inherit; border-bottom: 2px solid #5B74E8; border-radius: 3px; padding: 1px 2px; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background .3s; }
mark.ev.no { background: #FFF0EC; border-bottom-color: #262B7F; }
mark.ev.flash { background: #DDE3FF !important; }
.ev-n { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 5px; background: #3D57D6; color: #fff; font-size: 11.5px; font-weight: 800; line-height: 17px; vertical-align: 2px; }
mark.ev.no .ev-n { background: #262B7F; }
.cdi-ex { margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 14.5px; line-height: 1.55; }
.cdi-ex.ok { background: #EEF7F1; border-color: #CBE6D5; }
.cdi-ex.no { background: #FCEDEA; border-color: #F2C8BD; }
.cdi-ex-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cdi-ex-top svg { width: 16px; height: 16px; stroke-width: 2.6; }
.cdi-ex.ok .cdi-ex-top svg, .cdi-ex.ok .cdi-ex-top > b { color: #2E8A57; }
.cdi-ex.no .cdi-ex-top svg, .cdi-ex.no .cdi-ex-top > b { color: #D3262E; }
.cdi-ex-top > b { margin-left: -6px; }
.cdi-ex p { margin-top: 6px; color: #3A3E5C; }
.cdi-ex-link { margin-top: 6px; border: 0; background: none; padding: 0; color: #3D57D6; font-weight: 700; font-size: 13.5px; }
.cdi-ex-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cdi-notes li .cdi-ex { line-height: 1.55; margin: 8px 0 12px; }
/* CDI: extra question formats */
.cdi-box { border: 1px solid #DCDFEA; border-radius: 10px; padding: 14px 16px; margin: 12px 0 16px; background: #F8F9FC; }
.cdi-box > b { display: block; margin-bottom: 6px; }
.cdi-box .cdi-list { margin: 0; }
.cdi-list li { display: flex; gap: 10px; }
.cdi-list li b { min-width: 34px; }
.cdi-mq { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.cdi-mq .cdi-stem { margin: 0; flex: 1 1 260px; }
.cdi-mq .cdi-ex { flex-basis: 100%; }
.cdi-select { min-width: 84px; height: 34px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cdi-select:focus { outline: none; border-color: #262B7F; box-shadow: 0 0 0 3px #E7E8F7; }
.cdi-select:disabled { background: #F8F9FC; color: #1d1d1f; opacity: 1; }
.cdi-notes.summary h2 { font-size: 22px; margin: 16px 0 10px; }
.cdi-sum { line-height: 2.5; margin-bottom: 10px; }
.cdi-sum .cdi-ex { line-height: 1.55; }
.cdi-notes.flow h2 { font-size: 22px; margin: 16px 0 12px; text-align: center; }
.cdi-flow { display: flex; flex-direction: column; align-items: stretch; max-width: 560px; margin: 0 auto; }
.cdi-step { border: 1.5px solid #CDD1DE; border-radius: 10px; padding: 12px 14px; line-height: 2.2; background: #fff; }
.cdi-step .cdi-ex { line-height: 1.55; }
.cdi-arrow { text-align: center; font-size: 22px; color: #A39C93; line-height: 1.4; }
.cdi-note { font-size: 14px; font-style: italic; color: #6B6B70; margin-top: -6px; }
.cdi-check input { border-radius: 4px; }
.cdi-check input::after { border-radius: 2px; width: 10px; height: 10px; }

/* ═════════════ Classroom slides (projector) ═════════════ */
body.sl-open { overflow: hidden; }
.sl { position: fixed; inset: 0; z-index: 70; background: #1B1E3A; }
.sl-view { position: absolute; inset: 0; overflow: hidden; }
.sl-stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform-origin: center; background: #FFFFFF; overflow: hidden; color: #1B1E3A; font-family: var(--font); }
.s-fx { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.sl-bar { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(31, 26, 23, .88); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .3s, transform .3s; max-width: calc(100vw - 24px); }
.sl.idle .sl-bar { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.sl.idle { cursor: none; }
.sl-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; text-decoration: none; flex: none; }
.sl-btn:hover { background: rgba(255,255,255,.18); }
.sl-btn svg { width: 20px; height: 20px; }
.sl-next { background: #262B7F; }
.sl-next:hover { background: #262B7F; }
.sl-name { font-weight: 600; font-size: 14px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.sl-prog { width: 160px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.sl-prog i { display: block; height: 100%; background: #D3262E; transition: width .3s; }
.sl-count { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.75); min-width: 52px; text-align: center; }
@media (max-width: 700px) { .sl-name, .sl-prog { display: none; } }

/* slide frame */
.sd { position: absolute; inset: 0; padding: 70px 100px 110px; display: flex; flex-direction: column; animation: sdIn .45s cubic-bezier(.2,.8,.2,1); }
.sd.from-left { animation-name: sdInL; }
@keyframes sdIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes sdInL { from { opacity: 0; transform: translateX(-40px); } }
.sd::before { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: #ECEDF9; z-index: -1; }
.sd::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 10px; background: linear-gradient(90deg, #262B7F 0 33%, #D3262E 33% 66%, #2E8A57 66%); }
.s-kicker { font-size: 24px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #262B7F; }
.s-h { font-size: 52px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 8px 0 28px; max-width: 1400px; }
.s-hint { font-size: 24px; color: #6B7090; margin: -18px 0 22px; }
.s-note { font-size: 26px; line-height: 1.4; color: #3E4260; background: #EEF0FB; border-radius: 16px; padding: 14px 22px; margin-top: auto; }
.mk { color: #262B7F; font-weight: 800; }
[data-s] { transition: opacity .35s, transform .35s; }
.sd [data-s]:not(.on):not(.card):not(.tile) { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* title & end */
.t-wrap, .end { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; }
.t-wrap h1, .end h1 { font-size: 104px; font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 18px 0 26px; max-width: 1000px; }
.t-wrap p { font-size: 40px; color: #5A5F7A; max-width: 900px; }
.s-art { position: absolute; right: 0; top: 50%; width: 460px; transform: translateY(-50%); }
.t-brand { position: absolute; left: 0; bottom: -40px; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 28px; }
.t-brand img { width: 44px; height: 44px; }
.end ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 1000px; }
.end li { animation: sdIn .5s both; }
.end li:nth-child(2) { animation-delay: .15s; } .end li:nth-child(3) { animation-delay: .3s; } .end li:nth-child(4) { animation-delay: .45s; } .end li:nth-child(5) { animation-delay: .6s; }
.end li { font-size: 30px; padding: 12px 22px; border-radius: 16px; background: #fff; border: 2px solid #E6E8F2; }

/* compare */
.cmp { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.cmp-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.lang { width: 80px; height: 80px; border-radius: 22px; background: #1B1E3A; color: #fff; display: grid; place-items: center; font-size: 32px; font-weight: 800; flex: none; }
.ws { display: flex; gap: 16px; flex-wrap: wrap; }
.w { position: relative; font-size: 46px; font-weight: 800; padding: 10px 24px 12px; border-radius: 20px; background: #fff; border: 4px solid; }
.w em { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); font-style: normal; font-size: 20px; font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.ws.sm .w { font-size: 28px; padding: 6px 14px 8px; border-width: 3px; border-radius: 14px; }
.ws.sm .w em { display: none; }
.r-S { border-color: #262B7F; color: #1D2166; } .w.r-S em { color: #1D2166; }
.r-V { border-color: #3C6FD8; color: #2A55B8; } .w.r-V em { color: #2A55B8; }
.r-O { border-color: #2E8A57; color: #237049; } .w.r-O em { color: #237049; }
.formula-line { flex-basis: 100%; padding-left: 108px; margin-top: 26px; }
.formula { display: inline-block; font-size: 26px; padding: 8px 18px !important; font-weight: 700; color: #3E4260; background: #F6F1EC; padding: 12px 22px; border-radius: 14px; }
.cmp-more { display: flex; align-items: center; gap: 18px; margin-left: 108px; }
.cmp-more .arr, .ex .arr { font-size: 40px; color: #A3A8BF; }
.legend { display: none; }
.legend span { font-size: 20px; font-weight: 700; padding: 8px 16px; border-radius: 10px; border: 3px solid; background: #fff; }

/* rule */
.rule { display: flex; flex-direction: column; gap: 30px; flex: 1; }
.pts { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.pts li { font-size: 36px; line-height: 1.4; padding-left: 52px; position: relative; }
.pts li::before { content: ""; position: absolute; left: 6px; top: 14px; width: 24px; height: 24px; border-radius: 7px; background: #262B7F; transform: rotate(45deg) scale(.8); }
.exs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.ex { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-radius: 20px; background: #fff; border: 3px solid #E6E8F2; }
.ex .uz { font-size: 28px; color: #5A5F7A; white-space: nowrap; }
.ex .en { font-size: 34px; font-weight: 700; white-space: nowrap; }

/* flip cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; flex: 1; align-content: start; }
.cards.wide { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; height: 200px; border: 0; padding: 0; background: none; perspective: 1000px; cursor: pointer; font: inherit; }
.cards.wide .card { height: 220px; }
.card .f, .card .b { position: absolute; inset: 0; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; backface-visibility: hidden; transition: transform .6s cubic-bezier(.3,1.3,.5,1); padding: 18px; text-align: center; }
.card .f { background: #fff; border: 4px solid #E6E8F2; }
.card .f b { font-size: 60px; font-weight: 800; line-height: 1.1; }
.cards.wide .card .f b { font-size: 34px; }
.card .f small { font-size: 22px; color: #6B7090; }
.card .b { background: #262B7F; color: #fff; font-size: 64px; line-height: 1.15; font-weight: 800; transform: rotateY(180deg); }
.cards.wide .card .b { font-size: 34px; background: #2E8A57; }
.card.on .f { transform: rotateY(-180deg); }
.card.on .b { transform: rotateY(0); }
.card:nth-child(3n+2) .b { background: #3C6FD8; } .card:nth-child(3n) .b { background: #2E8A57; }
.cards.wide .card:nth-child(n) .b { background: #2E8A57; }

/* table */
.tbl-wrap { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.tbl { border-collapse: separate; border-spacing: 0 6px; width: 100%; font-size: 30px; }
.tbl th { text-align: left; font-size: 22px; color: #6B7090; text-transform: uppercase; letter-spacing: .06em; padding: 0 24px; }
.tbl td { background: #fff; padding: 9px 22px; border-top: 3px solid #E6E8F2; border-bottom: 3px solid #E6E8F2; }
.tbl td:first-child { border-left: 3px solid #E6E8F2; border-radius: 16px 0 0 16px; }
.tbl td:last-child { border-right: 3px solid #E6E8F2; border-radius: 0 16px 16px 0; }
.tbl td.k { font-weight: 800; color: #1D2166; }
.pairs { display: flex; gap: 18px; }
.pair { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-radius: 20px; background: #1B1E3A; color: #fff; font-size: 34px; }
.pair b { color: #D3262E; font-size: 44px; }
.exl { display: flex; gap: 18px; flex-wrap: wrap; }
.exl p { font-size: 30px; padding: 10px 22px; border-radius: 16px; background: #EEF0FB; }

/* two columns */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; flex: 1; align-content: start; }
.col { background: #fff; border: 4px solid #E6E8F2; border-radius: 28px; padding: 30px 34px; display: flex; flex-direction: column; gap: 14px; }
.col:nth-child(2) { border-color: #262B7F; }
.ch { font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #6B7090; }
.col .big { font-size: 56px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.col p { font-size: 34px; padding: 10px 0; border-top: 2px dashed #E6E8F2; }

/* quick check */
.qz { flex: 1; display: flex; flex-direction: column; }
.dots { display: flex; gap: 10px; margin-bottom: 30px; }
.dots i { width: 46px; height: 10px; border-radius: 5px; background: #E6E8F2; }
.dots i.cur { background: #1B1E3A; } .dots i.ok { background: #2E8A57; } .dots i.no { background: #D9463B; }
.qbox .q { font-size: 76px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 40px; }
.gap { display: inline-block; min-width: 200px; border-bottom: 8px solid #262B7F; text-align: center; color: #262B7F; }
.gap.ok { color: #2E8A57; border-color: #2E8A57; } .gap.no { color: #2E8A57; border-color: #2E8A57; }
.opts { display: grid; gap: 20px; }
.opts.n2 { grid-template-columns: repeat(2, 1fr); } .opts.n3 { grid-template-columns: repeat(3, 1fr); }
.opt { display: flex; align-items: center; gap: 20px; padding: 26px 30px; border-radius: 24px; border: 4px solid #DCDFEA; background: #fff; font: inherit; font-size: 44px; font-weight: 800; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.opt:hover { border-color: #262B7F; transform: translateY(-3px); }
.opt .key { width: 58px; height: 58px; border-radius: 16px; background: #ECEEF5; display: grid; place-items: center; font-size: 28px; flex: none; color: #5A5F7A; }
.opt.ok { border-color: #2E8A57; background: #E4F4EA; color: #1E6B41; }
.opt.ok .key { background: #2E8A57; color: #fff; }
.opt.no { border-color: #D9463B; background: #FCE6E3; color: #A9322A; animation: shake .4s; }
.opt.no .key { background: #D9463B; color: #fff; }
.opt.dim { opacity: .45; }
.opt.pop { animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.fb { font-size: 38px; font-weight: 700; margin-top: 28px; color: #3E4260; min-height: 50px; }

/* transform */
.tf { flex: 1; display: grid; grid-template-columns: 380px 1fr; grid-template-rows: 1fr auto; gap: 18px 40px; }
.tf-list { display: flex; flex-direction: column; gap: 10px; }
.tf-tab { text-align: left; padding: 10px 16px; border-radius: 14px; border: 3px solid #E6E8F2; background: #fff; font: inherit; font-size: 21px; font-weight: 600; color: #5A5F7A; cursor: pointer; }
.tf-tab.on { border-color: #1B1E3A; color: #1B1E3A; background: #EEF0FB; }
.tf-main { display: flex; flex-direction: column; gap: 12px; }
.tf-line { display: flex; align-items: center; gap: 22px; padding: 12px 24px; border-radius: 20px; background: #fff; border: 3px solid #E6E8F2; transition: opacity .35s, transform .35s; }
.tf-line .lab { width: 150px; flex: none; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #6B7090; }
.tf-line .sen { font-size: 40px; font-weight: 700; }
.tf-line.neg, .tf-line.q, .tf-line.ans { opacity: .12; transform: translateY(8px); }
.tf-line.on { opacity: 1; transform: none; }
.tf-line.neg.on { border-color: #D9463B; } .tf-line.q.on { border-color: #3C6FD8; } .tf-line.ans.on { border-color: #2E8A57; }
.tf-line.ans .sen { font-size: 32px; }
.tf-btns { display: flex; gap: 14px; margin-top: 6px; }
.tf .s-note { grid-column: 1 / -1; margin: 0; font-size: 23px; }
.tb { height: 58px; padding: 0 28px; border-radius: 16px; border: 0; background: #1B1E3A; color: #fff; font: inherit; font-size: 24px; font-weight: 700; cursor: pointer; }
.tb:hover { background: #3A322D; }
.tb.ghost { background: #ECEEF5; color: #1B1E3A; }
.tb.big { height: 84px; font-size: 32px; padding: 0 44px; background: #262B7F; }
.tb.t0 { background: #262B7F; } .tb.t1 { background: #3C6FD8; }

/* contractions */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { position: relative; height: 120px; border-radius: 22px; border: 4px solid #E6E8F2; background: #fff; font: inherit; cursor: pointer; overflow: hidden; }
.tile .full, .tile .short { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; font-weight: 800; transition: transform .45s cubic-bezier(.3,1.4,.5,1), opacity .3s; padding: 0 12px; }
.tile .short { color: #fff; background: #262B7F; transform: scaleX(.2); opacity: 0; font-size: 36px; }
.tile.on .full { transform: scaleX(.3); opacity: 0; }
.tile.on .short { transform: none; opacity: 1; }
.warn { font-size: 32px; margin-top: 26px; padding: 18px 26px; border-radius: 18px; background: #FCE6E3; color: #8E2A22; font-weight: 600; }

/* sort */
.sort { flex: 1; display: flex; flex-direction: column; gap: 22px; position: relative; }
.pool { display: flex; flex-wrap: wrap; gap: 12px; min-height: 64px; }
.chip { padding: 12px 22px; border-radius: 14px; border: 3px solid #1B1E3A; background: #fff; font: inherit; font-size: 28px; font-weight: 700; cursor: grab; touch-action: none; user-select: none; }
.chip.sel { background: #E7E8F7; border-color: #262B7F; transform: translateY(-4px); box-shadow: 0 8px 0 #E6E8F2; }
.chip.dragging { opacity: .25; }
.chip.ghost { position: absolute; z-index: 20; pointer-events: none; transform: rotate(-3deg) scale(1.05); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.chip.shake { animation: shake .4s; border-color: #D9463B; }
.chip.in { font-size: 22px; padding: 6px 12px; border-width: 2px; cursor: default; border-color: #2E8A57; background: #E4F4EA; color: #1E6B41; animation: pop .4s; }
.bins { display: grid; gap: 14px; flex: 1; }
.bins.n6 { grid-template-columns: repeat(6, 1fr); } .bins.n2 { grid-template-columns: repeat(2, 1fr); }
.bin { border: 4px dashed #D5D9E6; border-radius: 22px; padding: 14px; background: #F7F8FC; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; min-height: 220px; }
.bin > b { font-size: 40px; font-weight: 800; text-align: center; }
.bins.n2 .bin > b { font-size: 32px; }
.bin .got { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.bin.over { border-color: #262B7F; background: #ECEDF9; transform: scale(1.02); }
.bin.yes { border-color: #2E8A57; background: #E4F4EA; }
.bin.nope { border-color: #D9463B; background: #FCE6E3; }
.sort-score { position: absolute; right: 0; top: -92px; font-size: 32px; font-weight: 800; padding: 8px 20px; border-radius: 14px; background: #ECEEF5; }
.sort-score.done { background: #2E8A57; color: #fff; }
.after { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.after p { font-size: 28px; padding: 10px 20px; border-radius: 14px; background: #EEF0FB; }

/* monster */
.mon { flex: 1; display: grid; grid-template-columns: 440px 1fr; gap: 50px; align-items: center; }
.mon-art { background: #fff; border: 4px solid #E6E8F2; border-radius: 34px; padding: 20px; }
.mon-art svg { width: 100%; height: auto; display: block; }
.mon-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.mon-ctl label { display: flex; flex-direction: column; gap: 6px; font-size: 20px; font-weight: 700; color: #6B7090; }
.mon-ctl select { height: 60px; border-radius: 14px; border: 3px solid #DCDFEA; padding: 0 16px; font: inherit; font-size: 28px; font-weight: 700; background: #fff; color: #1B1E3A; }
.mon-btns { display: flex; gap: 14px; margin: 26px 0 18px; }
.mon-say { font-size: 36px; font-weight: 700; line-height: 1.35; min-height: 120px; padding: 20px 26px; border-radius: 20px; background: #EEF0FB; opacity: .15; filter: blur(8px); transition: opacity .3s, filter .3s; }
.mon-say.on { opacity: 1; filter: none; }
.sd-monster .s-note { margin-top: 16px; font-size: 24px; }

/* spinner */
.spin { flex: 1; display: grid; grid-template-columns: 560px 1fr; gap: 60px; align-items: center; }
.wheel-wrap { position: relative; width: 540px; height: 540px; }
.wheel { width: 100%; height: 100%; transition: transform 3.5s cubic-bezier(.15,.85,.25,1); filter: drop-shadow(0 18px 30px rgba(0,0,0,.12)); }
.pin { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 0; height: 0; border-left: 26px solid transparent; border-right: 26px solid transparent; border-top: 50px solid #1B1E3A; z-index: 2; }
.spin-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 130px; height: 130px; border-radius: 50%; border: 8px solid #fff; background: #1B1E3A; color: #fff; font: inherit; font-size: 30px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.spin-q { font-size: 66px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; opacity: .2; transition: opacity .4s, transform .4s; }
.spin-q.on { opacity: 1; animation: pop .5s; }

/* battle */
.bt { flex: 1; display: flex; flex-direction: column; gap: 22px; }
.bt-setup { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 34px; text-align: center; }
.bt-names { display: flex; align-items: center; gap: 26px; }
.bt-names input { width: 420px; height: 90px; border-radius: 22px; border: 4px solid #DCDFEA; text-align: center; font: inherit; font-size: 40px; font-weight: 800; }
.bt-names input:first-child { border-color: #262B7F; } .bt-names input:last-child { border-color: #3C6FD8; }
.vs { font-size: 36px; font-weight: 800; color: #A3A8BF; }
.bt-board { display: flex; align-items: center; justify-content: center; gap: 30px; }
.bt-team { display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 26px; border-radius: 20px; color: #fff; font-size: 30px; font-weight: 800; min-width: 360px; justify-content: space-between; }
.bt-team.t0 { background: #262B7F; } .bt-team.t1 { background: #3C6FD8; }
.bt-team b { background: rgba(255,255,255,.22); border-radius: 14px; min-width: 76px; height: 64px; display: grid; place-items: center; font-size: 44px; }
.bt-q { flex: 1; display: flex; flex-direction: column; }
.bt-n { font-size: 22px; font-weight: 800; color: #6B7090; text-transform: uppercase; letter-spacing: .06em; }
.bt-q p { font-size: 58px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 18px; }
.bt-timer { height: 12px; border-radius: 6px; background: #E6E8F2; overflow: hidden; margin-bottom: 26px; }
.bt-timer i { display: block; height: 100%; width: 100%; background: #2E8A57; transition: width .1s linear, background .3s; }
.bt-timer i.low { background: #D9463B; }
.bt-q .opt { cursor: default; font-size: 38px; }
.bt-q .opt:hover { transform: none; border-color: #DCDFEA; }
.bt-q .opt.ok:hover { border-color: #2E8A57; }
.bt-ctl { display: flex; justify-content: center; gap: 16px; }
.bt-ctl .tb { height: 76px; font-size: 28px; padding: 0 34px; }
.bt-win { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.bt-win .trophy { font-size: 150px; animation: pop .8s; }
.bt-win h3 { font-size: 84px; font-weight: 800; letter-spacing: -.04em; }

/* level page lessons */
.lesson-row .present { margin-left: 8px; }

.lvl-meta { font-size: 13px; margin-top: 4px; }

.card .b.long { font-size: 34px; }
.end h1 { margin: 0 0 22px; }

/* nav badges */
.nav a .grow { flex: 1; }
.nbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--absent); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.tb-ic { position: relative; display: inline-flex; }
.tb-ic .nbadge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }

.levels.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .levels.two-up { grid-template-columns: minmax(0, 1fr); } }
/* student pages */
.wait { padding: 34px 28px; text-align: center; }
.wait-ic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.wait-ic.no { background: var(--absent-soft); color: var(--absent); }
.wait-ic svg { width: 34px; height: 34px; }
.wait h2 { font-size: 22px; margin-bottom: 8px; }
.wait p { color: var(--ink-2); max-width: 46ch; margin: 0 auto; }
.wait-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.wait-steps span { font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; background: var(--hover); color: var(--ink-3); }
.wait-steps span.on { background: var(--present-soft); color: var(--present); }
.cta-mat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; margin-top: 20px; flex-wrap: wrap; }
.cta-mat b { display: block; }
.cta-mat span { font-size: 14px; }
.stack .cta-mat { margin-top: 0; }
.figures b .of { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.ml { padding: 13px 18px; }
.ml-top { display: flex; align-items: center; gap: 10px; }
.ml-top .grow { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-date { width: 52px; flex: none; font-size: 13px; color: var(--ink-3); }
.ml-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 62px; }
.ml-tasks span { font-size: 13px; padding: 4px 9px; border-radius: 8px; background: var(--hover); color: var(--ink-2); }
.ml-tasks span.full { background: var(--present-soft); color: var(--present); }
.ml-tasks span.low { background: var(--absent-soft); color: var(--absent); }
.ml-tasks span.none { opacity: .6; }
.me-row { background: var(--accent-soft); }
@media (max-width: 560px) { .ml-tasks { margin-left: 0; } }
/* chat */
.chat { display: flex; flex-direction: column; height: min(68dvh, 640px); overflow: hidden; }
.chat.in-sheet { height: min(62dvh, 560px); border: 1px solid var(--line); border-radius: 14px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.chat-empty { margin: auto; text-align: center; color: var(--ink-3); max-width: 34ch; }
.bub { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.bub.out { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-color: transparent; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.bub p { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.bub small { display: block; margin-top: 4px; font-size: 11.5px; opacity: .7; }
.chat-in { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.chat-in textarea.input { min-height: 44px; height: 44px; resize: none; padding: 11px 13px; }
.chat-in .btn { height: 44px; }
.tabs small.hot { background: var(--absent); color: #fff; border-radius: 8px; padding: 0 6px; font-weight: 700; }
@media (max-width: 860px) { .chat { height: calc(100dvh - 250px - env(safe-area-inset-bottom)); } }

.banner.alert { background: var(--absent-soft); text-decoration: none; color: inherit; }
.banner.alert > svg:first-child { width: 26px; height: 26px; color: var(--absent); flex: none; }
.acct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.acct .grow { flex: 1; min-width: 140px; }

/* team */
.utbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.utbl th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.utbl td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.utbl tr:last-child td { border-bottom: 0; }
.utbl td small { display: block; color: var(--ink-2); font-size: 13px; }
.utbl td.act { text-align: right; }
.rsel { height: 34px; width: auto; min-width: 130px; font-size: 13.5px; padding: 0 30px 0 10px; }
.cred { display: grid; gap: 8px; margin-top: 14px; }
.cred div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.cred span { color: var(--ink-2); font-size: 14px; }
.cred b { font-family: ui-monospace, Menlo, monospace; font-size: 14.5px; word-break: break-all; text-align: right; }

/* edit / save */
.editbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.editbar .grow { flex: 1; }
.editbar.on { background: var(--late-soft); border-color: transparent; font-weight: 600; position: sticky; top: 12px; z-index: 15; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--late); animation: blink 1.2s infinite; }
.is-locked .gr-cell input:disabled:not([placeholder="–"]) { background: var(--surface); border-style: solid; color: var(--ink); opacity: 1; }
.is-locked .att button:disabled { cursor: default; }
.is-locked .att button:disabled:not([aria-pressed="true"]) { opacity: .45; }
.is-locked .cell:disabled { cursor: default; }
@media (max-width: 860px) { .editbar.on { top: calc(env(safe-area-inset-top) + 60px); } }

/* ═════════ Chat v2 (Telegram-style) ═════════ */
.chat { position: relative; }
.chat-log { gap: 4px; padding: 14px 16px; background: #EFE9E1 radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%); }
.day { display: flex; justify-content: center; margin: 10px 0 6px; }
.day span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px; background: rgba(27,30,58,.28); color: #fff; }
.bub { max-width: min(78%, 460px); padding: 7px 10px 6px; border-radius: 14px; background: #fff; border: 0; box-shadow: 0 1px 1px rgba(0,0,0,.08); cursor: pointer; position: relative; transition: background .3s; }
.bub.in { border-bottom-left-radius: 4px; }
.bub.out { background: #FBDCCC; color: var(--ink); border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }
.bub p { font-size: 15px; }
.bub small { display: flex; justify-content: flex-end; gap: 4px; align-items: center; margin-top: 2px; font-size: 11px; color: var(--ink-3); opacity: 1; }
.bub small em { font-style: normal; font-weight: 700; color: var(--accent); margin-right: auto; }
.bub .tk { color: var(--ink-3); letter-spacing: -.25em; margin-right: .25em; }
.bub .tk.seen { color: #2E8AC7; }
.bub.flash { background: #E3E7FF !important; }
.quote { border-left: 3px solid var(--accent); background: rgba(38,43,127,.08); border-radius: 6px; padding: 4px 8px; margin-bottom: 5px; font-size: 13px; cursor: pointer; }
.quote b { display: block; color: var(--accent); font-size: 12.5px; }
.quote span { display: block; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.b-img { display: block; max-width: 100%; width: auto; height: auto; max-height: 340px; border-radius: 10px; margin: -2px -4px 4px; cursor: zoom-in; object-fit: cover; }
.k-image { padding: 4px 4px 6px; }
.k-image p, .k-image small { padding: 0 6px; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 2px 0; }
.v-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.bub.in .v-play { background: var(--accent); }
.v-play .pa, .voice.playing .v-play .pl { display: none; }
.voice.playing .v-play .pa { display: block; }
.v-play svg { width: 18px; height: 18px; }
.v-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(27,30,58,.15); overflow: hidden; }
.v-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.v-t { font-size: 12px; color: var(--ink-2); min-width: 32px; }
.b-file { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 4px 2px; min-width: 200px; }
.f-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.b-file b { display: block; font-size: 14px; word-break: break-all; }
.b-file small { display: block; color: var(--ink-3); font-size: 12px; margin: 0; justify-content: flex-start; }
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-bar .cb-ic { color: var(--accent); font-size: 18px; width: 22px; display: grid; place-items: center; }
.chat-bar .cb-ic svg { width: 18px; height: 18px; }
.chat-bar .grow { flex: 1; min-width: 0; border-left: 2px solid var(--accent); padding-left: 10px; }
.chat-bar b { display: block; font-size: 13px; color: var(--accent); }
.chat-bar .grow span { display: block; font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-rec { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-rec .grow { flex: 1; font-size: 14px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--absent); animation: blink 1s infinite; }
.chat-in { align-items: flex-end; gap: 6px; padding: 8px 10px; }
.chat-in .att { width: 44px; height: 44px; color: var(--ink-3); }
.chat-in .att svg { width: 22px; height: 22px; }
.chat-in textarea.input { border-radius: 22px; padding: 11px 16px; background: var(--surface-2); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.send-btn svg { width: 20px; height: 20px; }
.send-btn.mic { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.send-btn.mic:hover { color: var(--accent); }
.chat-menu { position: absolute; z-index: 10; min-width: 190px; background: var(--surface); border-radius: 12px; box-shadow: 0 14px 40px -10px rgba(0,0,0,.35); padding: 6px; display: flex; flex-direction: column; }
.chat-menu button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 500; }
.chat-menu button:hover { background: var(--hover); }
.chat-menu button.danger { color: var(--absent); }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox .ibtn { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; color: #fff; background: rgba(255,255,255,.12); }

/* ═════════ Writing: chart + AI feedback ═════════ */
.prompt .pq { font-weight: 600; }
.chart-box { margin: 16px 0 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.wchart { width: 100%; height: auto; display: block; font-family: var(--font); }
.wchart .ct { font-size: 15px; font-weight: 700; fill: #1B1E3A; }
.wchart .cl { font-size: 13px; fill: #5A5F7A; font-weight: 600; }
.wchart .cg { stroke: #ECEEF4; stroke-width: 1; }
.wchart .cy { font-size: 12px; fill: #8B90A8; text-anchor: end; }
.wchart .cx { font-size: 13px; fill: #3A3E5C; text-anchor: middle; font-weight: 600; }
.wchart .cv { font-size: 11.5px; fill: #5A5F7A; text-anchor: middle; font-weight: 700; }
.xp.is-done .xp-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fb-wrap { margin-top: 18px; }
.fb-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 38px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fb-loading b { font-size: 18px; }
.fb-loading .muted { max-width: 46ch; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fb-hero { display: grid; grid-template-columns: 230px 1fr; gap: 22px; padding: 24px; border-radius: 20px; background: linear-gradient(135deg, #1B1E4A, #262B7F); color: #fff; }
.fb-overall { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.ring.big { width: 136px; height: 136px; background: radial-gradient(closest-side, #20245E 79%, transparent 80%), conic-gradient(#D3262E calc(var(--p) * 1%), rgba(255,255,255,.12) 0); margin-bottom: 8px; }
.ring.big span { font-size: 44px; color: #fff; }
.fb-overall b { font-size: 16px; }
.fb-overall small { color: rgba(255,255,255,.6); font-size: 13px; }
.fb-crit { display: grid; gap: 14px; align-content: center; }
.fc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.fc-top .grow { flex: 1; font-weight: 600; font-size: 15px; }
.fc-k { display: inline-grid; place-items: center; min-width: 42px; height: 24px; padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.fc-b { font-size: 20px; }
.fc-b.hi { color: #7BE0A8; } .fc-b.mid { color: #D3262E; } .fc-b.lo { color: #FF9C8A; }
.fc-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.fc-bar i.hi { background: #4CC79E; } .fc-bar i.mid { background: #D3262E; } .fc-bar i.lo { background: #FF7A6E; }
.fb-tabs { margin: 18px 0 14px; }
.fb-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fbc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.fbc header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fbc header b { flex: 1; font-size: 15.5px; }
.fbc .fc-k { background: var(--accent-soft); color: var(--accent); }
.fbs { color: var(--ink-2); margin-bottom: 10px; }
.fbl { border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 14.5px; }
.fbl b { display: block; font-size: 13px; margin-bottom: 4px; }
.fbl ul { margin: 0; padding-left: 18px; }
.fbl li + li { margin-top: 3px; }
.fbl.good { background: var(--present-soft); } .fbl.good b { color: var(--present); }
.fbl.fix { background: var(--late-soft); } .fbl.fix b { color: var(--late); }
.fb-next, .fb-model { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.fb-next ol { margin: 8px 0 0; padding-left: 20px; }
.fb-next li + li { margin-top: 4px; }
.fb-model { background: var(--accent-soft); border-color: transparent; }
.fb-model p { margin-top: 6px; font-size: 16px; line-height: 1.6; font-style: italic; }
.corr { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.corr li { padding: 14px 18px; border-top: 1px solid var(--line); }
.corr li:first-child { border-top: 0; }
.cr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cr-line s { color: var(--absent); text-decoration-thickness: 2px; }
.cr-line b { color: var(--present); }
.cr-line .tag { margin-left: auto; }
.corr p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.fb-text { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; font-size: 16px; line-height: 1.8; }
mark.err { background: none; color: inherit; text-decoration: underline wavy var(--absent); text-underline-offset: 4px; cursor: pointer; }
.fb-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.fb-acts { margin-top: 14px; }
@media (max-width: 860px) {
  .xp.is-done .xp-body { grid-template-columns: minmax(0, 1fr); }
  .fb-hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .fb-cards { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .rail, .tabbar, .appbar, .xp-bar, .fb-tabs, .fb-acts, .wfoot, #toast { display: none !important; }
  .shell { display: block; } .page { padding: 0; max-width: none; }
  .fb-pane.hidden { display: block !important; }
  .fb-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  textarea.input.essay { min-height: 0; height: auto; border: 0; }
}

@media (max-width: 640px) { .col-md { display: none; } }

.fb-det { max-width: 560px; font-size: 13px; color: var(--ink-3); }
.fb-det code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); text-align: left; word-break: break-word; white-space: pre-wrap; }

/* writing results modal */
.wres { text-align: center; padding: 22px 4px 4px; }
.wres-ic { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; background: var(--present-soft); color: var(--present); display: grid; place-items: center; }
.wres-ic svg { width: 30px; height: 30px; stroke-width: 2.6; }
.wres h2 { font-size: 22px; }
.wres-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.wres-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; background: var(--surface-2); }
.wres-stats b { display: block; font-size: 24px; font-weight: 800; }
.wres-stats b.ok { color: var(--present); } .wres-stats b.no { color: var(--absent); }
.wres-stats span { font-size: 12.5px; color: var(--ink-2); }
.wres-q { font-weight: 600; margin-bottom: 12px; }
.wres-btns { display: grid; gap: 8px; }
.wres-btns .btn { height: 48px; width: 100%; font-size: 15px; }
.wr-pdf { background: #2E8A57; color: #fff; } .wr-pdf:hover { background: #267649; }
.wr-ai { background: linear-gradient(120deg, #262B7F, #9A3FB8); color: #fff; }
.wres-btns .btn svg { width: 18px; height: 18px; }

/* ═════════ Auth side: staircase ═════════ */
.auth-side { position: relative; overflow: hidden; background: linear-gradient(160deg, #F7F8FD 0%, #ECEDF9 55%, #E3E5F6 100%); justify-content: flex-start; gap: 34px; }
.auth-side::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -200px; top: -220px; background: radial-gradient(circle, rgba(38,43,127,.14), transparent 65%); pointer-events: none; }
.auth-side h1 { line-height: 1.02; }
.auth-side .hl { color: #262B7F; }
.stairs { display: flex; align-items: flex-end; gap: 10px; height: 230px; max-width: 520px; margin-top: auto; }
.st { position: relative; flex: 1; border-radius: 16px 16px 6px 6px; padding: 12px 12px 14px; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; transform-origin: bottom; animation: stUp .7s cubic-bezier(.2,.9,.25,1.15) both; box-shadow: 0 10px 24px -14px rgba(30,34,90,.45); }
.st .lv { font-size: 12px; font-weight: 800; letter-spacing: .04em; opacity: .75; }
.st b { font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.s1 { height: 34%; background: #E7E8F7; color: #8E3A1C; animation-delay: .05s; }
.s2 { height: 54%; background: #C7CAEE; color: #7A2F15; animation-delay: .17s; }
.s3 { height: 76%; background: #6E73C8; color: #fff; animation-delay: .29s; }
.s4 { height: 100%; background: #262B7F; color: #fff; animation-delay: .41s; }
.s3 .lv, .s4 .lv { opacity: .85; }
.goal { position: absolute; right: 10px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; background: #FFFFFF; color: #262B7F; display: grid; place-items: center; animation: goalPop .5s .9s cubic-bezier(.3,1.6,.5,1) both; }
.goal svg { width: 20px; height: 20px; }
@keyframes stUp { from { transform: scaleY(.15); opacity: 0; } }
@keyframes goalPop { from { transform: scale(0); } }
@media (prefers-reduced-motion: reduce) { .st, .goal { animation: none; } }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 520px; }
.feats li { display: flex; gap: 14px; align-items: flex-start; }
.feats .fi { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #262B7F; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px -6px rgba(30,34,90,.35); }
.feats .fi svg { width: 20px; height: 20px; }
.feats b { display: block; font-size: 15.5px; }
.feats div span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 880px) {
  .auth-side { background: linear-gradient(170deg, #F7F8FD, #ECEDF9); padding-bottom: 24px; gap: 18px; }
  .auth-side .feats { display: none; }
  .auth-side .stairs { position: absolute; right: 18px; bottom: 18px; width: 132px; height: 96px; gap: 5px; margin: 0; }
  .auth-side .st { padding: 0; border-radius: 8px 8px 3px 3px; box-shadow: none; }
  .auth-side .st .lv, .auth-side .st b { display: none; }
  .auth-side .goal { width: 24px; height: 24px; right: 50%; transform: translateX(50%); bottom: auto; top: -30px; animation: none; }
  .auth-side .goal svg { width: 14px; height: 14px; }
  .auth-side { min-height: 210px; }
  .auth-side::before { display: none; }
}
@media (min-width: 881px) and (max-height: 760px) { .stairs { height: 170px; } .feats { gap: 10px; } .auth-side { gap: 24px; } }

/* ═════════════════ ESA · Everest design system ═════════════════ */
:root { --navy: #262B7F; --navy-2: #1D2166; --navy-3: #3A40A0; --red: #D3262E; --topbar-h: 58px; }
body { background: #F3F4F9; }

/* Buttons */
.btn { height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 600; letter-spacing: .005em; gap: 8px; box-shadow: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .06s; }
.btn.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(29,33,102,.25), inset 0 1px 0 rgba(255,255,255,.08); }
.btn.btn-primary:hover { background: var(--navy-2); box-shadow: 0 4px 12px -4px rgba(29,33,102,.45); }
.btn.btn-primary:disabled { background: #9DA1C9; }
.btn-quiet { background: #fff; border: 1px solid #D5D8E5; color: var(--navy); }
.btn-quiet:hover { background: #F4F5FB; border-color: #B9BDD3; }
.btn-text { color: var(--navy); }
.btn-text:hover { background: #ECEEF8; color: var(--navy-2); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #F1C3C6; }
.btn-danger:hover { background: #FDECEC; border-color: #E9A3A7; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 7px; font-size: 13.5px; }
.btn-block { height: 46px; border-radius: 9px; font-size: 15.5px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(38,43,127,.25); }
.ibtn:hover { background: #ECEEF8; color: var(--navy); }
.seg button[aria-pressed="true"] { color: var(--navy); }
.toggles button[aria-pressed="true"], .pill[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(38,43,127,.14); }
.link { color: var(--navy); }
.tag-accent { background: #E9EAF8; color: var(--navy); }

/* Shell: navy topbar + white sidebar (CRM style) */
.shell { grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: var(--topbar-h) minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 18px 0 16px; background: var(--navy); color: #fff; box-shadow: 0 2px 10px -4px rgba(15,18,60,.5); }
.topbar .grow { flex: 1; }
.tb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.tb-brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); }
.tb-brand span { display: flex; flex-direction: column; line-height: 1.05; }
.tb-brand b { font-size: 19px; font-weight: 800; letter-spacing: .04em; }
.tb-brand small { font-size: 11.5px; opacity: .78; font-weight: 500; letter-spacing: .01em; }
.tb-ibtn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; text-decoration: none; }
.tb-ibtn:hover { background: rgba(255,255,255,.12); }
.tb-ibtn svg { width: 22px; height: 22px; }
.tb-ibtn .nbadge { position: absolute; top: 2px; right: 0; background: var(--red); box-shadow: 0 0 0 2px var(--navy); }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 22px; text-decoration: none; color: #fff; }
.tb-user:hover { background: rgba(255,255,255,.12); }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.tb-uname { display: flex; flex-direction: column; line-height: 1.15; }
.tb-uname b { font-size: 14.5px; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-uname small { font-size: 11.5px; opacity: .75; }
.rail { top: var(--topbar-h); height: calc(100dvh - var(--topbar-h)); padding: 14px 10px 14px; background: #fff; border-right: 1px solid #E3E5EE; }
.nav { gap: 2px; }
.nav a { height: 48px; padding: 0 12px; gap: 14px; border-radius: 10px; font-size: 15.5px; font-weight: 500; color: #2E3150; position: relative; }
.nav a svg { width: 24px; height: 24px; color: #3E4266; stroke-width: 1.7; }
.nav a:hover { background: #F2F3F9; color: var(--navy); }
.nav a[aria-current="page"] { background: #E9EAF6; color: var(--navy); font-weight: 600; }
.nav a[aria-current="page"] svg { color: var(--navy); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--navy); }
.nbadge { background: var(--red); }
.rail-sec { margin: 22px 12px 6px; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.rail-group { height: 38px; font-size: 14.5px; }
.rail-group[aria-current="page"] { background: #E9EAF6; color: var(--navy); }
.page { padding-top: 28px; }
.head h1 { color: #1B1E3A; }

/* Cards and lists polish */
.panel { border-color: #E3E5EE; box-shadow: 0 1px 2px rgba(27,30,58,.04); }
.figures { border-color: #E3E5EE; }
.figures b { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); }
.tabs a[aria-current="page"]::after { background: var(--navy); height: 3px; border-radius: 3px 3px 0 0; }
.gmark { border-radius: 10px; }
.meter i { background: var(--navy); }
.pod.first { border-color: var(--navy); box-shadow: 0 0 0 3px #E9EAF8; }
.pod.first .place { background: var(--red); color: #fff; }
.ring { background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--navy) calc(var(--p) * 1%), var(--hover) 0); }
.sync[data-state="saving"] i, .sync[data-state="demo"] i { background: #E58A1F; }

/* Per-group top students */
.gtop + .gtop { border-top: 1px solid #E3E5EE; }
.gtop-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px 4px; text-decoration: none; color: inherit; }
.gtop-h b { flex: 1; font-size: 14px; }
.gtop-h span { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--navy); }
.gtop-h svg { width: 16px; height: 16px; }
.gtop .rows > li + li { border-top: 0; }
.gtop .row { min-height: 48px; padding: 6px 18px; }
.medal { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; background: #ECEEF5; color: #5A5F7A; }
.medal.m1 { background: var(--red); color: #fff; } .medal.m2 { background: var(--navy); color: #fff; } .medal.m3 { background: #8C90D8; color: #fff; }

/* Requests */
.row.req .s + .s { font-size: 12.5px; }
.ap-who { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #F4F5FB; }
.ap-who b { display: block; } .ap-who span { font-size: 13.5px; color: var(--ink-2); }

/* Auth (Everest) */
.auth-side { background: linear-gradient(165deg, #F7F8FE 0%, #ECEEFA 55%, #E2E5F7 100%); }
.auth-side::before { background: radial-gradient(circle, rgba(38,43,127,.12), transparent 65%); }
.as-logo { width: 150px; height: auto; display: block; margin-bottom: 8px; }
.auth-side .hl { color: var(--red); }
.s1 { background: #E3E5F6; color: #2B2F6E; } .s2 { background: #BFC3EB; color: #20245E; } .s3 { background: #6E73C8; color: #fff; } .s4 { background: var(--navy); color: #fff; }
.goal { background: var(--red); color: #fff; }
.feats .fi { color: var(--navy); }
.auth-main { background: #fff; }
.auth-card { max-width: 400px; }
.ac-mark { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 6px 16px -8px rgba(29,33,102,.6); }
.auth-card .field + .field, .auth-card .pw-meter + .field { margin-top: 14px; }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 36px; border: 0; background: none; color: #8B90A8; border-radius: 8px; display: grid; place-items: center; }
.pw-eye:hover { color: var(--navy); background: #F2F3F9; }
.pw-eye.on { color: var(--navy); }
.pw-eye.on::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; align-items: center; }
.pw-meter i { height: 4px; border-radius: 2px; background: #E3E5EE; transition: background .2s; }
.pw-meter span { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pw-meter[data-s="0"] i:nth-child(-n+1), .pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: #E58A1F; }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: #3A9A63; }
.pw-meter[data-s="4"] i { background: #2E8A57; }
.pw-meter[data-s="0"] span, .pw-meter[data-s="1"] span { color: var(--red); }
.auth-row { display: flex; justify-content: space-between; margin-top: 10px; font-size: 14px; }
.auth-legal { margin-top: 18px; font-size: 12px; color: var(--ink-3); text-align: center; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto; }
  .topbar { display: none; }
  .appbar { background: var(--navy); color: #fff; border-bottom: 0 !important; backdrop-filter: none; }
  .appbar .tb-brand img { width: 30px; height: 30px; }
  .appbar .tb-brand b { font-size: 17px; }
  .appbar .back { color: #fff; }
  .appbar .title { color: #fff; }
  .appbar .ibtn:hover { background: rgba(255,255,255,.12); }
  .tabbar a[aria-current="page"] { color: var(--navy); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.2; }
  .as-logo { width: 120px; }
  .auth-main { background: #F3F4F9; }
}
.t-brand img { width: auto !important; height: 64px !important; }

/* ═════════ ESA layout v2: navy sidebar, white header (own style) ═════════ */
.shell { grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); }
.rail { grid-row: 1 / -1; grid-column: 1; top: 0; height: 100dvh; padding: 18px 14px 16px; background: linear-gradient(180deg, #262B7F 0%, #1E2268 100%); border-right: 0; color: #fff; }
.topbar { grid-column: 2; grid-row: 1; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); box-shadow: none; border-bottom: 1px solid #E3E5EE; padding: 0 28px; height: 64px; }
.main { grid-column: 2; grid-row: 2; }
.tb-title { font-size: 15px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.tb-ibtn { color: var(--ink-2); background: #F3F4FA; border: 1px solid #E3E5EE; }
.tb-ibtn:hover { background: #E9EAF6; color: var(--navy); }
.tb-ibtn .nbadge { box-shadow: 0 0 0 2px #fff; }
.tb-user { color: var(--ink); border: 1px solid #E3E5EE; background: #fff; }
.tb-user:hover { background: #F3F4FA; }
.tb-uname small { color: var(--ink-3); opacity: 1; }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 20px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.rail-brand img { width: 66px; height: 44px; flex: none; }
.rail-brand span { display: flex; flex-direction: column; line-height: 1.05; }
.rail-brand b { font-family: "Arial Black", Arial, Helvetica, sans-serif; font-weight: 900; font-size: 22px; letter-spacing: .02em; }
.rail-brand small { font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.rail .nav a { color: rgba(255,255,255,.78); height: 46px; font-weight: 500; }
.rail .nav a svg { color: rgba(255,255,255,.72); }
.rail .nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail .nav a[aria-current="page"] { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }
.rail .nav a[aria-current="page"] svg { color: var(--red); }
.rail .nav a[aria-current="page"]::before { display: none; }
.rail .nbadge { box-shadow: 0 0 0 2px #262B7F; }
.rail .nav a[aria-current="page"] .nbadge { box-shadow: none; }
.rail-sec { color: rgba(255,255,255,.5); }
.rail-sec button { color: rgba(255,255,255,.6); }
.rail-sec button:hover { background: rgba(255,255,255,.1); color: #fff; }
.rail-group { color: rgba(255,255,255,.88); }
.rail-group small { color: rgba(255,255,255,.5); }
.rail-group:hover { background: rgba(255,255,255,.08); }
.rail-group[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
.rail .faint { color: rgba(255,255,255,.5) !important; }
.rail-foot { border-top-color: rgba(255,255,255,.12); }
.rail .sync { color: rgba(255,255,255,.6); }
.as-logo { width: 190px; }
.ac-mark { width: 92px; height: auto; border-radius: 0; box-shadow: none; margin-bottom: 10px; }
@media (max-width: 860px) {
  .rail { display: none; }
  .topbar { display: none; }
  .main { grid-column: 1; grid-row: auto; }
  .appbar { background: linear-gradient(90deg, #262B7F, #1E2268); }
  .rail-brand.mob { border: 0; padding: 0 0 0 6px; margin: 0; flex: 1; }
  .rail-brand.mob img { width: 52px; height: 34px; }
  .rail-brand.mob b { font-size: 18px; }
  .rail-brand.mob small { font-size: 10px; }
  .as-logo { width: 150px; }
}
.cdi-brand img.cdi-logo { width: auto; height: 34px; } @media (max-width: 860px) { .cdi-brand img.cdi-logo { height: 28px; } }

/* ═════════ Auth: "Welcome to home of real achievers" wall ═════════ */
.auth-side.achievers {
  background-color: #233062;
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(180deg, rgba(0,0,0,.16) 0 1px, transparent 1px 22px),
    radial-gradient(120% 80% at 30% 20%, #2F3D78 0%, #233062 55%, #1A2450 100%);
  color: #fff; border-right: 0; justify-content: space-between; gap: 28px; padding: 44px 56px 40px;
}
.auth-side.achievers::before { content: ""; position: absolute; left: -80px; top: -60px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 60%); pointer-events: none; }
.ach-logo { align-self: flex-start; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6); }
.ach-logo img { width: 150px; height: auto; display: block; }
.ach { margin: 0; display: flex; flex-direction: column; align-items: flex-start; font-family: "Archivo Black", "Arial Black", Impact, sans-serif; font-weight: 400; line-height: .9; letter-spacing: .01em; text-transform: uppercase; max-width: none; }
.ach span { display: block; text-shadow: 6px 7px 0 rgba(8,12,40,.45); }
.ach .f { color: #fff; }
.ach .o { color: transparent; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }
.ach .sm { font-size: clamp(30px, 3.3vw, 50px); -webkit-text-stroke-width: 2.4px; }
.ach .md { font-size: clamp(46px, 5.2vw, 80px); }
.ach .xl { font-size: clamp(96px, 11vw, 176px); -webkit-text-stroke-width: 4px; margin: 4px 0 2px; line-height: .86; }
.ach .lg { font-size: clamp(46px, 5.4vw, 84px); }
.ach span { animation: achIn .7s cubic-bezier(.2,.9,.25,1) both; }
.ach span:nth-child(2) { animation-delay: .08s; } .ach span:nth-child(3) { animation-delay: .16s; } .ach span:nth-child(4) { animation-delay: .24s; }
@keyframes achIn { from { opacity: 0; transform: translateX(-24px); } }
@media (prefers-reduced-motion: reduce) { .ach span { animation: none; } }
.achievers .feats .fi { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.18); }
.achievers .feats b { color: #fff; }
.achievers .feats div span { color: rgba(255,255,255,.7); }
@media (min-width: 881px) and (max-height: 820px) { .ach .xl { font-size: clamp(80px, 9vw, 140px); } .achievers .feats { gap: 10px; } .achievers .feats li:nth-child(3) { display: none; } }
@media (max-width: 880px) {
  .auth-side.achievers { padding: calc(20px + env(safe-area-inset-top)) 20px 24px; gap: 16px; min-height: 0; }
  .ach-logo { padding: 7px 10px; border-radius: 12px; }
  .ach-logo img { width: 104px; }
  .ach .sm { font-size: 22px; -webkit-text-stroke-width: 1.6px; }
  .ach .md { font-size: 34px; }
  .ach .xl { font-size: 74px; -webkit-text-stroke-width: 2.6px; }
  .ach .lg { font-size: 36px; }
  .ach span { text-shadow: 3px 4px 0 rgba(8,12,40,.45); }
  .achievers .feats { display: none; }
}
@media (max-width: 880px) { .ac-mark { display: none; } }
/* crisp achievers lettering */
.ach { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: geometricPrecision; }
.ach .o { text-shadow: none !important; color: transparent; -webkit-text-stroke-color: #fff; filter: none; }
.ach .sm { -webkit-text-stroke-width: 2px; letter-spacing: .03em; }
.ach .xl { -webkit-text-stroke-width: 3.5px; letter-spacing: .02em; }
.ach .f { text-shadow: 3px 3px 0 #141B45 !important; }
@media (max-width: 880px) {
  .ach .sm { -webkit-text-stroke-width: 1.4px; }
  .ach .xl { -webkit-text-stroke-width: 2.4px; }
  .ach .f { text-shadow: 2px 2px 0 #141B45 !important; }
}
/* lighter sidebar + Montserrat brand */
.rail { background: linear-gradient(180deg, #3D49B2 0%, #3540A3 55%, #2F3994 100%); }
.rail .nav a { color: rgba(255,255,255,.9); }
.rail .nav a svg { color: rgba(255,255,255,.85); }
.rail .nav a:hover { background: rgba(255,255,255,.12); }
.rail .nbadge { box-shadow: 0 0 0 2px #3A45AC; }
.rail-sec { color: rgba(255,255,255,.62); }
.rail-group { color: #fff; }
.rail-group small, .rail .faint { color: rgba(255,255,255,.62) !important; }
.rail .sync { color: rgba(255,255,255,.72); }
.rail-brand { border-bottom-color: rgba(255,255,255,.18); }
.rail-brand b { font-family: "Montserrat", "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: 21px; letter-spacing: .09em; }
.rail-brand small { font-family: "Montserrat", "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 10.5px; letter-spacing: .26em; opacity: .85; margin-top: 5px; }
.appbar { background: linear-gradient(90deg, #3D49B2, #3540A3) !important; }
@media (max-width: 860px) { .rail-brand.mob b { font-size: 17px; letter-spacing: .08em; } .rail-brand.mob small { font-size: 9px; letter-spacing: .22em; } }

/* ═════════ Layout C: floating icon rail + blue header band ═════════ */
body { background: #EEF0F7; }
.shell { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: 70px minmax(0, 1fr); }
.rail { grid-row: 1 / -1; grid-column: 1; position: sticky; top: 14px; margin: 14px 0 14px 16px; height: calc(100dvh - 28px); width: 76px; padding: 12px 0; background: #fff; border: 1px solid #E1E4F0; border-radius: 22px; box-shadow: 0 12px 30px -18px rgba(29,33,102,.35); display: flex; flex-direction: column; align-items: center; overflow: visible; color: inherit; }
.rail-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 14px; }
.rail-logo img { width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 0 0 1px #E1E4F0; }
.rail .nav { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.rail .nav a { position: relative; width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 15px; color: #6A6F91; background: transparent; }
.rail .nav a svg { width: 25px; height: 25px; color: #6A6F91; stroke-width: 1.8; }
.rail .nav a:hover { background: #F0F2FA; }
.rail .nav a:hover svg { color: #262B7F; }
.rail .nav a[aria-current="page"] { background: #262B7F; box-shadow: 0 10px 20px -10px rgba(38,43,127,.8); }
.rail .nav a[aria-current="page"] svg { color: #fff; }
.rail .nav a .tip { position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); background: #1B1E3A; color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50; }
.rail .nav a:hover .tip, .rail .nav a:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }
.rail .nav a .nbadge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; box-shadow: 0 0 0 2px #fff; }
.rail .nav a[aria-current="page"] .nbadge { box-shadow: 0 0 0 2px #262B7F; }
.rail .nav a[aria-current="page"]::before { display: none; }
.rail-foot { margin-top: auto; border: 0; padding: 0; }
.rail .sync { padding: 0; } .rail .sync i { width: 9px; height: 9px; }
.topbar { grid-column: 2; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 34px 0 22px; height: 70px; position: sticky; }
.tb-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.tb-logo img { height: 40px; width: auto; }
.tb-logo span { display: flex; flex-direction: column; line-height: 1.1; padding-left: 12px; border-left: 1px solid #D5D9E8; }
.tb-logo b { font-family: "Montserrat", "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #262B7F; }
.tb-logo small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.topbar .tb-user { background: #fff; }
.page { padding-top: 6px; max-width: 1120px; }

/* the blue band: every page header */
.page .head { position: relative; overflow: hidden; background: #3D49B2; color: #fff; border-radius: 22px; padding: 28px 30px; margin-bottom: 22px; align-items: center; box-shadow: 0 18px 36px -24px rgba(38,43,127,.9); }
.page .head::before { content: ""; position: absolute; right: -60px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.page .head::after { content: ""; position: absolute; right: 140px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; background: rgba(211,38,46,.22); pointer-events: none; }
.page .head > * { position: relative; z-index: 1; }
.page .head h1 { color: #fff; }
.page .head .meta, .page .head .meta span { color: rgba(255,255,255,.82); }
.page .head .meta svg { color: rgba(255,255,255,.82); }
.page .head .tag, .page .head .tag-accent { background: rgba(255,255,255,.16); color: #fff; }
.page .head .btn.btn-primary { background: #fff; color: #262B7F; box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.page .head .btn.btn-primary:hover { background: #F0F2FB; }
.page .head .btn-quiet, .page .head .btn-text { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; }
.page .head .btn-quiet:hover, .page .head .btn-text:hover { background: rgba(255,255,255,.2); }
.page .head .btn-danger { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.page .head .btn-danger:hover { background: #D3262E; border-color: #D3262E; }
.page .head .input { background: rgba(255,255,255,.95); }
.page .head .skill-ic { background: rgba(255,255,255,.16) !important; color: #fff !important; }
.crumb { margin-bottom: 10px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .page { padding-top: 14px; }
  .page .head { padding: 22px 20px; border-radius: 18px; }
  .page .head::after { right: -40px; }
}

/* ═════════ Branches & roles UI ═════════ */
.steps-mini { display: grid; grid-template-columns: 30px 1fr 30px; grid-template-rows: auto auto; align-items: center; column-gap: 8px; row-gap: 6px; margin-bottom: 18px; max-width: 260px; }
.steps-mini span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #ECEEF6; color: #8B90A8; }
.steps-mini span.on { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px #E3E5F6; }
.steps-mini span.done { background: #2E8A57; color: #fff; }
.steps-mini i { height: 3px; border-radius: 2px; background: #E3E5EE; }
.steps-mini i.on { background: linear-gradient(90deg, #2E8A57, var(--navy)); }
.steps-mini b { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.steps-mini b:nth-of-type(1) { grid-column: 1 / 3; } .steps-mini b:nth-of-type(2) { grid-column: 3; justify-self: end; white-space: nowrap; }
.br-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.br-grid button { height: 46px; border-radius: 10px; border: 1.5px solid #D5D8E5; background: #fff; font-weight: 600; font-size: 14.5px; color: #2E3150; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .12s; }
.br-grid button:hover { border-color: var(--navy); color: var(--navy); }
.br-grid button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 8px 18px -10px rgba(38,43,127,.8); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.chips-row button { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #D5D8E5; background: #fff; font-weight: 600; font-size: 13.5px; color: #3E4266; }
.chips-row button:hover { border-color: var(--navy); color: var(--navy); }
.chips-row button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips-row button.warn { border-color: #F1C3C6; color: var(--red); }
.chips-row button.warn[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.g-meta { display: block; font-size: 12.5px; color: var(--navy); font-weight: 600; margin-top: 2px; }
.g-meta em { color: var(--red); font-style: normal; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tcard { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #E3E5EE; border-radius: 18px; padding: 18px; transition: transform .12s, box-shadow .12s, border-color .12s; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -20px rgba(38,43,127,.6); border-color: #C9CCEE; }
.tc-top { display: flex; gap: 12px; align-items: flex-start; }
.tc-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tc-top b { font-size: 16px; } .tc-top span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.tc-top .tag { align-self: flex-start; margin-top: 4px; gap: 4px; } .tc-top .tag svg { width: 14px; height: 14px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; } .avatar.xl { width: 64px; height: 64px; font-size: 24px; font-weight: 800; }
.tc-figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ECEEF5; }
.tc-figs b { display: block; font-size: 17px; color: var(--navy); } .tc-figs span { font-size: 11.5px; color: var(--ink-3); }
.role-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.rc { position: relative; text-align: left; border: 1px solid #E3E5EE; background: #fff; border-radius: 16px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, box-shadow .12s, transform .12s; }
.rc:hover { border-color: var(--navy); box-shadow: 0 14px 28px -20px rgba(38,43,127,.7); transform: translateY(-1px); }
.rc-ic { width: 40px; height: 40px; border-radius: 12px; background: #E9EAF8; color: var(--navy); display: grid; place-items: center; margin-bottom: 6px; }
.rc-ic svg { width: 22px; height: 22px; }
.rc b { font-size: 15.5px; } .rc span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.rc em { position: absolute; top: 14px; right: 14px; font-style: normal; font-weight: 800; color: var(--navy); background: #F1F2FA; border-radius: 10px; padding: 2px 9px; font-size: 13px; }
.rc::after { content: "+ Create"; position: absolute; right: 14px; bottom: 12px; font-size: 12.5px; font-weight: 700; color: var(--red); opacity: 0; transition: opacity .12s; }
.rc:hover::after { opacity: 1; }
.team-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.team-filters .input { width: auto; min-width: 170px; height: 40px; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.wait-to { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px auto 6px; padding: 10px 14px; border-radius: 12px; background: #F3F4FA; max-width: 420px; font-size: 14px; }
.wait-to span:first-child { color: var(--ink-2); }
.meta svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
@media (max-width: 760px) { .role-cards { grid-template-columns: 1fr; } .tgrid { grid-template-columns: 1fr; } }

/* person sheet + clickable rows */
.utbl tr.click { cursor: pointer; } .utbl tr.click:hover td { background: #F7F8FC; }
button.tcard { width: 100%; text-align: left; font: inherit; }
.tcard.admin { border-color: #C9CCEE; background: linear-gradient(180deg, #F7F8FE, #fff); }
.pp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pp-head h2 { font-size: 22px; margin-bottom: 6px; }
.pp-tags { display: flex; gap: 6px; flex-wrap: wrap; } .pp-tags .tag { gap: 4px; } .pp-tags svg { width: 14px; height: 14px; }
.pp-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pp-contact > a, .pp-contact > div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #F4F5FB; text-decoration: none; color: inherit; min-width: 0; }
.pp-contact > a:hover { background: #ECEEF8; }
.pp-contact span { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--navy); display: grid; place-items: center; flex: none; }
.pp-contact span svg { width: 18px; height: 18px; }
.pp-contact small { display: block; font-size: 12px; color: var(--ink-3); } .pp-contact b { font-size: 14px; overflow-wrap: anywhere; } .pp-contact > * > div { min-width: 0; }
.pp-sec { font-size: 15px; margin: 20px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.pp-groups { border: 1px solid #E3E5EE; border-radius: 14px; overflow: hidden; }
.pp-groups .row { gap: 10px; }
.sheet-foot .grow { flex: 1; }

/* ═════════ Timetable ═════════ */
.seg-onblue { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 3px; border-radius: 10px; display: inline-flex; }
.seg-onblue button { height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.seg-onblue button svg { width: 16px; height: 16px; }
.seg-onblue button[aria-pressed="true"] { background: #fff; color: #262B7F; }
.chips-row button small { opacity: .7; font-weight: 700; margin-left: 2px; }
.tt-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.tt-sum div { background: #fff; border: 1px solid #E3E5EE; border-radius: 14px; padding: 12px 16px; }
.tt-sum b { display: block; font-size: 22px; color: #262B7F; } .tt-sum span { font-size: 12.5px; color: var(--ink-3); }
.tt { background: #fff; border: 1px solid #E3E5EE; border-radius: 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(27,30,58,.04); }
.tt-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #ECEEF5; background: linear-gradient(180deg, #F7F8FE, #fff); }
.tt-title b { font-size: 18px; color: #1B1E3A; } .tt-title span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.tt-scroll { overflow-x: auto; }
.tt-grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: calc(110px + var(--cols) * 300px); table-layout: fixed; }
.tt-grid th, .tt-grid td { border-bottom: 1px solid #ECEEF5; vertical-align: top; }
.tt-grid td + td, .tt-grid th + th { border-left: 1px dashed #E3E5EE; }
.tt-grid thead th { padding: 12px 14px; text-align: left; background: #FBFBFE; position: sticky; top: 0; }
.tt-grid thead small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.tt-day { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; padding: 4px 10px; border-radius: 8px; background: #E9EAF8; color: #262B7F; }
.tt-day.even { background: #FDECEC; color: #B4232A; } .tt-day.other { background: #ECEEF5; color: #5A5F7A; }
.tt-time { width: 110px; padding: 14px; text-align: left; background: #FBFBFE; }
.tt-time b { display: block; font-size: 16px; color: #1B1E3A; } .tt-time small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.tt-time small::before { content: "→ "; }
.tt-grid td { padding: 10px; min-height: 90px; }
.tt-cell { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tt-free { display: block; height: 70px; border-radius: 12px; background: repeating-linear-gradient(135deg, transparent 0 8px, #F5F6FA 8px 16px); }
.ttc { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 10px 16px; border-radius: 12px; text-decoration: none; color: #1B1E3A; background: color-mix(in srgb, var(--lc) 9%, #fff); border: 1px solid color-mix(in srgb, var(--lc) 26%, #fff); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.ttc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--lc); }
.ttc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--lc) 80%, #000); }
.ttc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ttc-top b { font-size: 14.5px; color: var(--lc); filter: brightness(.82); }
.ttc-n { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--lc); border-radius: 8px; padding: 2px 7px; }
.ttc-n svg { width: 13px; height: 13px; }
.ttc-name { font-size: 12.5px; color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttc-t { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; }
.ttc-t svg { width: 15px; height: 15px; color: var(--lc); }
.ttc-bar { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--lc) 18%, #fff); overflow: hidden; margin-top: 3px; }
.ttc-bar i { display: block; height: 100%; background: var(--lc); border-radius: 3px; }
.ttc-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--ink-2); }
.ttc-foot b { color: #1B1E3A; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; border-top: 1px solid #ECEEF5; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.tt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tt-loose { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.day-presets { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.day-presets button { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #D5D8E5; background: #fff; font-weight: 700; font-size: 13px; color: #262B7F; }
.day-presets button:hover { border-color: #262B7F; background: #F3F4FB; }
@media (max-width: 760px) { .tt-sum { grid-template-columns: repeat(2, 1fr); } .tt-grid { min-width: calc(80px + var(--cols) * 230px); } .tt-time { width: 80px; padding: 10px; } .tt-cell { grid-template-columns: 1fr; } }

/* team cards as filters, presence */
.rc { cursor: pointer; padding-bottom: 46px; }
.rc.on { border-color: #262B7F; box-shadow: 0 0 0 3px #E3E5F6; background: linear-gradient(180deg, #F5F6FD, #fff); }
.rc::after { display: none; }
.rc-add { position: absolute; left: 16px; bottom: 12px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid #D5D8E5; background: #fff; color: #262B7F; font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.rc-add svg { width: 14px; height: 14px; }
.rc-add:hover { background: #262B7F; color: #fff; border-color: #262B7F; }
.team-filters .search.grow-s { flex: 1; min-width: 220px; }
.team-filters .search .input { width: 100%; min-width: 0; }
.seen { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin: 0 0 6px; }
.seen i { width: 8px; height: 8px; border-radius: 50%; background: #B9BDD0; }
.seen.on { color: #2E8A57; } .seen.on i { background: #2EAD63; box-shadow: 0 0 0 3px #D9F2E3; }
.head .seen { color: rgba(255,255,255,.8); } .head .seen.on { color: #B7F5CF; }
.seen-mini { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-top: 3px; }
.t .seen-mini { display: inline; margin-left: 6px; }
.seen-mini.on { color: #2E8A57; }
.av-dot { position: relative; }
.av-dot.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #2EAD63; box-shadow: 0 0 0 2px #fff; }
label.check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; margin-top: 12px; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: #262B7F; }

/* ═════════ Dashboard ═════════ */
.dbar-tools { background: #fff; border: 1px solid #E3E5EE; border-radius: 16px; padding: 10px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.br-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: #F3F4FA; border-radius: 12px; }
.br-tabs button { height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 13.5px; color: #4A4F72; }
.br-tabs button:hover { background: #fff; color: #262B7F; }
.br-tabs button[aria-pressed="true"] { background: #262B7F; color: #fff; box-shadow: 0 6px 14px -8px rgba(38,43,127,.9); }
.ftools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 2px; }
.dd { position: relative; }
.ftbtn { height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid #D5D8E5; background: #fff; font-weight: 700; font-size: 13.5px; color: #262B7F; display: inline-flex; align-items: center; gap: 6px; }
.ftbtn svg { width: 16px; height: 16px; } .ftbtn:hover { background: #F3F4FB; border-color: #B9BDD3; }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; max-height: 360px; overflow: auto; background: #fff; border: 1px solid #E3E5EE; border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(27,30,58,.35); padding: 6px; }
.dd-menu.open { display: block; }
.dd-h { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 8px 10px 4px; }
.dd-menu button { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px 9px 30px; border-radius: 8px; font-size: 14px; color: #2E3150; position: relative; }
.dd-menu button:hover { background: #F2F3F9; }
.dd-menu button.on { font-weight: 700; color: #262B7F; }
.dd-menu button.on::before { content: "✓"; position: absolute; left: 10px; color: #262B7F; font-weight: 800; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; background: #262B7F; color: #fff; font-size: 13px; font-weight: 600; }
.fchip svg { width: 14px; height: 14px; }
.fchip button { width: 24px; height: 24px; border: 0; border-radius: 6px; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.fchip button:hover { background: #D3262E; } .fchip button svg { width: 12px; height: 12px; }
.fchip.by { background: #E9EAF8; color: #262B7F; padding-right: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; background: #fff; border: 1px solid #E3E5EE; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 26px; color: #1B1E3A; line-height: 1.15; } .kpi > span:not(.k-ic) { font-size: 13px; color: var(--ink-2); }
.k-ic { width: 34px; height: 34px; border-radius: 10px; background: #EEF0FA; color: #262B7F; display: grid; place-items: center; margin-bottom: 6px; }
.k-ic svg { width: 18px; height: 18px; }
.kpi.hl { background: linear-gradient(160deg, #3D49B2, #2F3994); border-color: transparent; }
.kpi.hl b, .kpi.hl > span:not(.k-ic) { color: #fff; } .kpi.hl .k-ic { background: rgba(255,255,255,.16); color: #fff; }
.kpi .dbar { margin-top: 8px; }
.dbar { height: 6px; border-radius: 3px; background: #ECEEF5; overflow: hidden; min-width: 60px; }
.dbar i { display: block; height: 100%; border-radius: 3px; background: #3D49B2; }
.dbar.g i { background: #2E9E5B; }
.kpi.hl .dbar { background: rgba(255,255,255,.2); } .kpi.hl .dbar i { background: #fff; }
.panel.bd { margin-bottom: 16px; }
.bdt { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.bdt th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 18px; border-bottom: 1px solid #ECEEF5; }
.bdt td { padding: 12px 18px; border-bottom: 1px solid #F0F1F7; }
.bdt tr:last-child td { border-bottom: 0; }
.bdt .n { text-align: right; width: 90px; font-variant-numeric: tabular-nums; }
.bdt tr.click { cursor: pointer; } .bdt tr.click:hover td { background: #F7F8FD; }
.bd-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.bd-name > i { width: 12px; height: 12px; border-radius: 4px; }
.bd-ic { width: 30px; height: 30px; border-radius: 9px; background: #EEF0FA; color: #262B7F; display: grid; place-items: center; } .bd-ic svg { width: 16px; height: 16px; }
.bd-v { display: flex; align-items: center; gap: 10px; } .bd-v b { width: 44px; font-variant-numeric: tabular-nums; } .bd-v .dbar { flex: 1; max-width: 160px; }
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dgrid .panel { min-height: 100%; }
.dg-empty { padding: 4px 18px 18px; }
.more { display: block; padding: 10px 18px 14px; font-size: 13px; font-weight: 600; color: #262B7F; text-decoration: none; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .dgrid { grid-template-columns: 1fr; } .fchips { margin-left: 0; } .kpis { grid-template-columns: repeat(2, 1fr); } }

/* dashboard attendance panel */
.att-big { display: flex; align-items: center; gap: 18px; padding: 4px 18px 10px; }
.att-ring { width: 104px; height: 104px; border-radius: 50%; flex: none; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, #fff 76%, transparent 77%), conic-gradient(#2E9E5B calc(var(--p) * 1%), #ECEEF5 0); }
.att-ring b { font-size: 22px; line-height: 1; color: #1B1E3A; } .att-ring span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.att-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; font-size: 14px; }
.att-legend li { display: flex; align-items: center; gap: 8px; } .att-legend b { margin-left: auto; }
.att-legend i, .att-stack i { display: inline-block; }
.att-legend i { width: 10px; height: 10px; border-radius: 3px; }
i.p { background: #2E9E5B; } i.l { background: #E58A1F; } i.a { background: #D3262E; }
.att-stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 0 18px 12px; background: #ECEEF5; }
.att-stack i { height: 100%; }
.att-h { display: block; padding: 6px 18px 2px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.s.s-t { display: inline-flex; align-items: center; gap: 4px; color: #262B7F; font-weight: 600; }
.s.s-t svg { width: 13px; height: 13px; }

/* ═════════ Timetable v2: teacher columns ═════════ */
.tt2 { background: #fff; border: 1px solid #E3E5EE; border-radius: 18px; overflow: hidden; }
.tt2-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.tt2-grid th, .tt2-grid td { border-bottom: 1px solid #EEF0F6; }
.tt2-time { position: sticky; left: 0; z-index: 3; width: 74px; min-width: 74px; padding: 8px 10px; background: #F8F9FD; text-align: left; border-right: 1px solid #E3E5EE; }
.tt2-time b { display: block; font-size: 13px; color: #1B1E3A; } .tt2-time small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
thead .tt2-time { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); z-index: 4; }
.tt2-th { padding: 10px 10px 8px; text-align: left; background: #FBFBFE; border-left: 2px solid #E3E5EE; }
.tt2-th > a, .tt2-th > span { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.tt2-th > a:hover b { color: #262B7F; text-decoration: underline; }
.tt2-tn { display: flex; flex-direction: column; min-width: 0; }
.tt2-tn b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.tt2-tn small { font-size: 11px; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.dot-g { width: 7px; height: 7px; border-radius: 50%; background: #2E9E5B; display: inline-block; }
.tt2-d { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; padding: 5px 8px; text-align: center; }
.tt2-d.odd { color: #262B7F; background: #EEF0FA; border-left: 2px solid #E3E5EE; } .tt2-d.even { color: #B4232A; background: #FDF0F0; }
.tt2-grid td { width: 150px; min-width: 150px; max-width: 150px; padding: 5px; vertical-align: top; height: 64px; }
.tt2-grid td.c-odd { border-left: 2px solid #E3E5EE; } .tt2-grid td.c-even { border-left: 1px dashed #ECEEF5; }
.tt2-grid tbody tr:nth-child(even) td { background: #FCFCFE; }
.ttc2 { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 6px 8px 6px 10px; border-radius: 9px; text-decoration: none; color: #1B1E3A; background: color-mix(in srgb, var(--lc) 13%, #fff); border: 1px solid color-mix(in srgb, var(--lc) 30%, #fff); transition: transform .12s, box-shadow .12s; }
.ttc2 + .ttc2 { margin-top: 4px; }
.ttc2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lc); }
.ttc2:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--lc) 80%, #000); }
.ttc2 b { font-size: 12px; color: color-mix(in srgb, var(--lc) 75%, #000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttc2-n { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttc2-m { font-size: 10.5px; font-weight: 700; color: #3A3E5C; }
.ttc2-a { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ttc2-a i { display: block; height: 4px; border-radius: 2px; background: var(--lc); max-width: 70%; }
.ttc2-a::before { content: ""; position: absolute; }
.ttc2-a em { font-style: normal; font-size: 10.5px; font-weight: 800; margin-left: auto; }
.tt-loose .ttc2 + .ttc2 { margin-top: 0; }
@media (max-width: 760px) { .tt2-grid td { width: 128px; min-width: 128px; max-width: 128px; } }

.role-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .role-cards.two { grid-template-columns: 1fr; } }

/* account */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 0 18px 4px; }
.acc-grid .field { margin: 0; } .acc-grid .span2 { grid-column: 1 / -1; }
.ro { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 6px 0 14px; border-radius: 10px; background: #F4F5FA; border: 1px solid #E3E5EE; font-size: 15px; flex-wrap: wrap; }
.ro svg { width: 17px; height: 17px; color: #262B7F; }
.pw-ro .dots { letter-spacing: .2em; font-size: 18px; color: #3A3E5C; margin-right: auto; }
.acc-foot { padding: 14px 18px 18px; display: flex; justify-content: flex-end; }
.pw-box { margin: 0 18px 18px; padding: 16px; border-radius: 14px; background: #F7F8FD; border: 1px solid #E3E5EE; }
.pw-box .field + .field, .pw-box .pw-meter + .field { margin-top: 12px; }
@media (max-width: 600px) { .acc-grid { grid-template-columns: 1fr; } }
