/* Copyright (c) 2026 SSA Network Ltd (https://ssanetwork.co.uk). All rights reserved. Proprietary and confidential: see LICENSE. */
/* StraightPass — asphalt & signal green */
:root {
  --green: #16A75C;
  --green-700: #0F7F45;
  --green-50: #E8F6EE;
  --asphalt: #16191D;
  --asphalt-2: #1F242A;
  --asphalt-3: #2B3138;
  --ink: #15181C;
  --text: #2A3036;
  --muted: #69717A;
  --line: #E3E6E9;
  --paper: #F5F6F4;
  --card: #FFFFFF;
  --amber: #E8A317;
  --amber-50: #FDF4E1;
  --red: #D6453D;
  --red-50: #FBEAE9;
  --blue: #2C6FD1;
  --blue-50: #E8F0FB;
  --grey-50: #EEF0F2;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 24, 28, .05), 0 4px 16px rgba(20, 24, 28, .05);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--body); color: var(--text); background: var(--paper); }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
pre.code { background: var(--grey-50); padding: .75rem; border-radius: 8px; overflow: auto; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(22, 167, 92, .45); outline-offset: 2px; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--asphalt); color: #C9CED3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background-image: linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%); }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; text-decoration: none; color: #fff; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: var(--display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.brand small { font-size: .74rem; color: #8C949C; margin-top: 3px; }
.nav { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav-heading { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #6E767F; padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: #C9CED3; text-decoration: none; font-weight: 500; font-size: .93rem; position: relative; }
.nav a:hover { background: var(--asphalt-2); color: #fff; }
.nav a.active { background: var(--asphalt-3); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.nav a.active .ico { color: var(--green); }
.nav .count { margin-left: auto; font-style: normal; background: var(--green); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding: 14px 20px 18px; border-top: 1px solid var(--asphalt-3); font-size: .82rem; }
.sidebar-foot a { color: #8C949C; text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 244, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 28px; min-height: 60px; }
.topbar-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search input { width: 220px; padding: 8px 12px 8px 34px; border-radius: 99px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2369717A' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center; font: inherit; font-size: .9rem; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: #cfd4d8; color: var(--ink); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--paper); }
.menu-btn { display: none; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 99px; border: 1px solid var(--line); background: #fff; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 99px; background: var(--asphalt); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar.green { background: var(--green); }
.uname { font-weight: 600; font-size: .9rem; }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); min-width: 230px; padding: 6px; z-index: 30; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); }
.usermenu .menu a, .usermenu .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--grey-50); }
.content { padding: 24px 28px 40px; max-width: 1400px; width: 100%; }
.foot { padding: 18px 28px; color: var(--muted); font-size: .8rem; margin-top: auto; }
.foot .powered, .auth-powered a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot .powered:hover, .auth-powered a:hover { color: var(--green-700); text-decoration: underline; }
.auth-powered { text-align: center; font-size: .8rem; margin: 14px 0 0; }
.scrim { display: none; }

/* Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 9px; border: 1px solid transparent; font: 600 .9rem/1.2 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-dark { background: var(--asphalt); color: #fff; }
.btn-wa { background: #25D366; color: #08361C; border-color: #25D366; }
.btn-wa:hover { background: #1EBE5A; color: #08361C; }
.wa-link { display: inline-flex; align-items: center; gap: 4px; color: #128C4A; font-weight: 600; text-decoration: none; }
.wa-link:hover { color: #0B6B37; text-decoration: underline; }
.wa-link .ico { width: 15px; height: 15px; }
.btn-dark:hover { background: var(--asphalt-3); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9ced3; color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: #F0C9C6; }
.btn-danger:hover { background: var(--red-50); color: var(--red); }
.btn-sm { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--green-700); font: inherit; cursor: pointer; text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .actions, .card-head > a { margin-left: auto; font-size: .86rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 14px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: #cdd3d8; color: inherit; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.stat .value { font-family: var(--display); font-size: 1.85rem; font-weight: 800; color: var(--ink); line-height: 1.1; margin-top: 6px; }
.stat .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.stat.accent { background: var(--asphalt); color: #C9CED3; border-color: var(--asphalt); }
.stat.accent .value { color: #fff; }
.stat.accent .label, .stat.accent .sub { color: #9AA2AA; }
.stat.accent::after { content: ''; position: absolute; right: -20px; bottom: -20px; width: 90px; height: 90px; border-radius: 50%; border: 10px solid rgba(22,167,92,.35); }
.stat.warn .value { color: #B4500F; }

/* Quick actions */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFA; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFA; }
td.actions { text-align: right; white-space: nowrap; }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 20px; }
.card.flush table th:last-child, .card.flush table td:last-child { padding-right: 20px; }
.person { display: flex; align-items: center; gap: 10px; }
.person a { font-weight: 600; color: var(--ink); text-decoration: none; }
.person a:hover { color: var(--green-700); }
.person small { display: block; color: var(--muted); font-size: .8rem; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--ink); }
.list .meta { color: var(--muted); font-size: .83rem; }
.time-chip { font-family: var(--display); font-weight: 700; background: var(--asphalt); color: #fff; border-radius: 8px; padding: 6px 8px; text-align: center; min-width: 62px; line-height: 1.1; font-size: .95rem; }
.time-chip small { display: block; font-family: var(--body); font-weight: 500; font-size: .7rem; color: #9AA2AA; }
.date-chip { background: var(--green-50); color: var(--green-700); border-radius: 8px; padding: 6px 8px; text-align: center; min-width: 52px; line-height: 1.05; font-weight: 700; }
.date-chip small { display: block; font-size: .68rem; text-transform: uppercase; font-weight: 600; }

/* Badges */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.badge-green { background: var(--green-50); color: var(--green-700); }
.badge-amber { background: var(--amber-50); color: #9A6406; }
.badge-red { background: var(--red-50); color: #B0342D; }
.badge-blue { background: var(--blue-50); color: #1F5AB0; }
.badge-grey { background: var(--grey-50); color: #59616A; }

/* Alerts */
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alert-success { background: var(--green-50); border-color: #BFE5CF; color: #0C6537; }
.alert-error { background: var(--red-50); border-color: #F2C8C5; color: #8E2A24; }
.alert-warning { background: var(--amber-50); border-color: #F2DDAD; color: #7A5006; }
.alert-info { background: var(--blue-50); border-color: #C6D8F3; color: #1D4E96; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-weight: 600; font-size: .86rem; color: var(--ink); }
.field > span em { font-weight: 400; color: var(--muted); font-style: normal; }
.field small { color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=url], input:not([type]), select, textarea {
  font: inherit; font-size: .93rem; padding: 9px 11px; border: 1px solid #D5DADE; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(22,167,92,.18); outline-offset: 0; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }
.form-card { max-width: 860px; }
.form-section { padding-top: 6px; }
.form-section + .form-section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.form-section h3 { margin-bottom: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 150px; }
.filters input, .filters select { padding: 7px 10px; font-size: .88rem; }
.hp { position: absolute; left: -5000px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-color: var(--green); }

/* Profile header */
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.profile-head h1 { margin: 0; }
.profile-head .meta { color: var(--muted); font-size: .9rem; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 8px 14px; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

/* Progress */
.progress { height: 8px; background: var(--grey-50); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.progress.lg { height: 12px; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--grey-50) 0); flex: none; }
.ring::before { content: ''; grid-area: 1/1; width: 92px; height: 92px; border-radius: 50%; background: #fff; }
.ring b { grid-area: 1/1; font-family: var(--display); font-size: 1.6rem; color: var(--ink); z-index: 1; }
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.skill-row:last-child { border-bottom: 0; }
.levels { display: flex; gap: 4px; }
.levels i { flex: 1; height: 8px; border-radius: 3px; background: var(--grey-50); }
.levels i.on { background: var(--green); }
.lvl-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.lvl-picker label { cursor: pointer; }
.lvl-picker input { position: absolute; opacity: 0; }
.lvl-picker span { display: inline-grid; place-items: center; min-width: 34px; height: 32px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; background: #fff; }
.lvl-picker input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.lvl-picker input:focus-visible + span { outline: 3px solid rgba(22,167,92,.4); }
.skill-grid th.rot { writing-mode: vertical-rl; transform: rotate(180deg); height: 150px; text-transform: none; letter-spacing: 0; font-size: .76rem; font-weight: 500; padding: 8px 4px; vertical-align: bottom; }
.lv { display: inline-block; width: 24px; height: 24px; border-radius: 6px; text-align: center; line-height: 24px; font-size: .74rem; font-weight: 700; }
.lv-0 { background: var(--grey-50); color: #9aa2aa; }
.lv-1 { background: #FDECEA; color: #A23A33; }
.lv-2 { background: #FDF0DD; color: #95600D; }
.lv-3 { background: #FBF6D2; color: #7C6B08; }
.lv-4 { background: #DFF3E7; color: #1A7A47; }
.lv-5 { background: var(--green); color: #fff; }

/* Calendar */
.cal { display: grid; grid-template-columns: 56px repeat(7, minmax(120px, 1fr)); min-width: 920px; position: relative; }
.cal-head { position: sticky; top: 0; background: #FAFBFA; border-bottom: 1px solid var(--line); padding: 8px; font-weight: 600; font-size: .85rem; text-align: center; z-index: 2; }
.cal-head.today { color: var(--green-700); }
.cal-head small { display: block; color: var(--muted); font-weight: 500; }
.cal-times { border-right: 1px solid var(--line); }
.cal-times div { height: 52px; font-size: .72rem; color: var(--muted); text-align: right; padding: 2px 6px 0 0; }
.cal-day { position: relative; border-right: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 51px, var(--line) 51px, var(--line) 52px); }
.cal-day.today { background-color: #FBFDFB; }
.cal-avail { position: absolute; left: 0; right: 0; background: rgba(22,167,92,.06); border-left: 3px solid rgba(22,167,92,.3); }
.cal-break { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(232,163,23,.28) 0 4px, rgba(255,241,207,.6) 4px 9px); border-left: 3px solid #E8A317; font-size: .68rem; font-weight: 700; color: #8A5A00; padding: 1px 6px; overflow: hidden; }
.cal-ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 7px; font-size: .78rem; line-height: 1.25; overflow: hidden; text-decoration: none; color: #fff; background: var(--asphalt); border-left: 4px solid var(--green); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.cal-ev:hover { color: #fff; filter: brightness(1.15); }
.cal-ev b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.st-requested { background: #FFF6E3; color: #6E4A06; border-left-color: var(--amber); border: 1px dashed var(--amber); border-left-width: 4px; }
.cal-ev.st-completed { background: #2F3A33; }
.cal-ev.st-cancelled, .cal-ev.st-no_show { background: var(--grey-50); color: #7a828a; text-decoration: line-through; border-left-color: #c3c8cd; box-shadow: none; }
.cal-ev.test { border-left-color: var(--red); background: #3A2523; }
.cal-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.agenda-day { margin-bottom: 14px; }
.agenda-day h3 { font-size: .9rem; color: var(--muted); margin: 0 0 6px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar rect { fill: var(--green); transition: fill .15s; }
.chart .bar:hover rect { fill: var(--green-700); }
.chart .val { font-size: 11px; fill: var(--ink); text-anchor: middle; font-weight: 600; font-family: var(--body); }
.chart .lbl { font-size: 11px; fill: var(--muted); text-anchor: middle; font-family: var(--body); }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; cursor: pointer; display: block; }
.slot:hover { border-color: var(--green); }
.slot input { position: absolute; opacity: 0; }
.slot:has(input:checked) { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 2px rgba(22,167,92,.25); }
.slot b { display: block; color: var(--ink); }
.slot small { color: var(--muted); }

/* Journal */
.journal-entry { border-left: 3px solid var(--green); padding: 2px 0 2px 16px; margin-bottom: 22px; }
.journal-entry h3 { margin-bottom: 4px; }
.journal-entry .jgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; margin-top: 10px; }
.journal-entry .jgrid div b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.prewrap { white-space: pre-line; }

/* Messages */
.msg-list a { display: block; text-decoration: none; color: inherit; }
.msg-unread .title { color: var(--ink); }
.msg-unread .title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: 1px; }
.msg-body { white-space: pre-line; background: #FAFBFA; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* Empty */
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty-state { text-align: center; padding: 60px 20px; max-width: 520px; margin: 0 auto; }
.big-code { font-family: var(--display); font-size: 4rem; font-weight: 800; color: var(--green); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; color: var(--muted); font-size: .86rem; }
.announce { border-left: 4px solid var(--amber); background: var(--amber-50); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.announce b { color: var(--ink); }

/* Auth */
.auth-body { background: var(--paper); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--asphalt); color: #fff; padding: 40px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.auth-side .road { position: absolute; left: 50%; bottom: -10%; width: 60%; height: 120%; transform: translateX(-50%) perspective(400px) rotateX(55deg); background: #22272D; transform-origin: bottom; }
.auth-side .road::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 8px; transform: translateX(-50%); background: repeating-linear-gradient(to bottom, #fff 0 40px, transparent 40px 80px); opacity: .8; }
.auth-side .brand { position: relative; z-index: 1; padding: 0; }
.auth-pitch { position: relative; z-index: 1; margin-top: auto; max-width: 420px; }
.auth-pitch h2 { color: #fff; font-size: 2.2rem; font-weight: 800; }
.auth-pitch p { color: #B7BEC5; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 30px; }

/* Print */
@media print {
  .sidebar, .topbar, .foot, .no-print, .page-head .actions { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Responsive */
@media (max-width: 1100px) {
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 32px; }
  .search { display: none; }
  .cols-half { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 22px 20px; min-height: 0; }
  .auth-side .road, .auth-pitch { display: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .uname { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .value { font-size: 1.45rem; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .skill-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
  .auth-card { padding: 22px; border-radius: 16px; }
  /* Stack table rows as cards on phones */
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--line); padding: 10px 16px; }
  table.stack-sm td { border: 0; padding: 3px 0 !important; }
  table.stack-sm td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: .8rem; }
  table.stack-sm td.actions { text-align: left; padding-top: 8px !important; }
}
details > summary { cursor: pointer; padding: 6px 0; list-style-position: inside; }
details > summary b { color: var(--ink); }
details .list { margin-top: 4px; }
.list .ico { width: 14px; height: 14px; vertical-align: -2px; }
.cal-nav select { width: auto; padding: 7px 10px; font-size: .88rem; }
a.slot { text-decoration: none; color: inherit; }
.skill-grid th.rot { height: 200px; }
.stat > * { position: relative; z-index: 1; }
.stat.accent::after { width: 70px; height: 70px; right: -26px; bottom: -26px; border-width: 8px; z-index: 0; }
.sidebar { min-height: 100vh; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-rows: auto 1fr; }
  .auth-main { align-items: start; padding-top: 24px; }
}
.chart rect.s-lesson { fill: var(--green); }
.chart rect.s-practice { fill: #8FD3AE; }
.legend i.sw-s-lesson { background: var(--green); }
.legend i.sw-s-practice { background: #8FD3AE; }
.chart.line .stroke { fill: none; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart.line .area { fill: rgba(22,167,92,.10); }
.chart.line .pt circle { fill: #fff; stroke: var(--green); stroke-width: 2.5; }
.chart.line .pt:hover circle { fill: var(--green); }
.milestones { list-style: none; margin: 0; padding: 0; position: relative; }
.milestones li { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.milestones li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.milestones li:last-child::before { display: none; }
.milestones .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; z-index: 1; }
.milestones li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.milestones li.done::before { background: var(--green); }
.milestones li.next .dot { border-color: var(--green); box-shadow: 0 0 0 4px rgba(22,167,92,.15); }
.milestones .dot .ico { width: 14px; height: 14px; }
.milestones b { display: block; color: var(--ink); }
.milestones small { color: var(--muted); }
.cat-row { margin-bottom: 12px; }
.cat-row .top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 5px; }
.cat-row .top b { color: var(--ink); }
.mobile-only { display: none; }
@media (max-width: 1100px) { .mobile-only { display: block; margin-bottom: 16px; } .desktop-only { display: none; } }
#qr svg { display: block; }
/* Route recording & replay */
.recorder { text-align: center; }
.rec-head { display: flex; gap: 10px; align-items: center; justify-content: center; margin-bottom: 14px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #C3C8CD; flex: none; }
.recorder.is-recording .rec-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(214,69,61,.2); }
.rec-dot.blink { background: var(--green) !important; }
.rec-status { font-weight: 600; color: var(--ink); }
.rec-status.warn { color: #9A6406; }
.rec-status.on { color: var(--green-700); }
.rec-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.rec-stats div { background: var(--paper); border-radius: 10px; padding: 10px 6px; }
.rec-stats small { display: block; color: var(--muted); font-size: .72rem; }
.rec-stats b { font-family: var(--display); font-size: 1.35rem; color: var(--ink); }
.rec-btn { width: 100%; max-width: 420px; padding: 18px; font-size: 1.15rem; border-radius: 14px; }
.rec-tips { text-align: left; max-width: 520px; margin: 18px auto 0; padding-left: 18px; line-height: 1.6; }
.rp-map-wrap { position: relative; }
.rp-map { height: 460px; background: #E8ECE9; }
.rp-callout { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(0,0,0,.18); font-weight: 600; border-left: 5px solid var(--blue); }
.rp-callout.k-good { border-left-color: var(--green); }
.rp-callout.k-improve { border-left-color: var(--red); }
.rp-controls { display: flex; gap: 12px; align-items: center; padding: 14px 16px 6px; flex-wrap: wrap; }
.rp-controls input[type=range] { flex: 1; min-width: 160px; accent-color: var(--green); }
.rp-speeds { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.rp-speeds button { border: 0; background: #fff; padding: 8px 11px; font: 600 .85rem var(--body); cursor: pointer; color: var(--muted); }
.rp-speeds button.on { background: var(--asphalt); color: #fff; }
.rp-readout { display: flex; gap: 18px; padding: 4px 16px 16px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.rp-readout b { color: var(--ink); font-variant-numeric: tabular-nums; }
.note-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--blue); }
.note-dot.k-good { background: var(--green); }
.note-dot.k-improve { background: var(--red); }
.route-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .rp-map { height: 340px; } .rec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[hidden] { display: none !important; }
/* Knowledge base */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.kb-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.kb-card:hover { border-color: var(--green); color: inherit; transform: translateY(-1px); }
.kb-card h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.kb-card p { color: var(--muted); font-size: .88rem; margin: 0 0 12px; flex: 1; }
.kb-card-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kb-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--green-700); }
.kb-card-foot { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.kb-card-foot .ico { width: 13px; height: 13px; vertical-align: -2px; }
.kb-article { padding: 26px 30px; }
.kb-article h1 { margin-top: 8px; font-size: 1.9rem; }
.kb-lede { font-size: 1.05rem; color: var(--muted); }
.kb-body { font-size: 1rem; line-height: 1.65; }
.kb-body h2 { margin-top: 1.6em; font-size: 1.25rem; }
.kb-body ul, .kb-body ol { padding-left: 22px; }
.kb-body li { margin-bottom: 5px; }
.kb-figure { margin: 18px 0 22px; padding: 14px; background: #FAFBFA; border: 1px solid var(--line); border-radius: 14px; }
.kb-figure svg { width: 100%; height: auto; display: block; }
.kb-table { width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0 18px; font-size: .92rem; }
.kb-table th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink); }
.kb-table td { vertical-align: top; }
.kb-tip { background: var(--green-50); border-left: 4px solid var(--green); border-radius: 10px; padding: 12px 14px; margin: 16px 0; font-size: .95rem; }
.kb-sources { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; }
.kb-sources ul { padding-left: 18px; font-size: .9rem; }
.kb-learner-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .kb-article { padding: 18px 16px; } .kb-article h1 { font-size: 1.5rem; } .kb-table { font-size: .85rem; } }
@media print { .kb-figure { break-inside: avoid; } }
/* Lesson board */
.lb { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 150px); min-height: 520px; }
.lb-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lb-head h1 { margin: 0; font-size: 1.4rem; }
.lb-head p { margin: 2px 0 0; }
.lb-title { flex: 1 1 220px; min-width: 160px; font-family: var(--display); font-weight: 700; font-size: 1.05rem !important; }
.lb-top select { width: auto; max-width: 220px; padding: 7px 10px; font-size: .88rem; }
.lb-share { font-size: .86rem; white-space: nowrap; }
.lb-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.lb-speed { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.lb-speed input { width: 86px; accent-color: var(--green); }
.lb-toggle[aria-pressed="true"] { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.lb-work { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px; }
.lb-ro .lb-work { grid-template-columns: minmax(0, 1fr); }
.lb-tray { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.lb-tab { border: 0; background: transparent; border-radius: 7px; padding: 5px 8px; font: 700 .76rem var(--body); color: var(--muted); cursor: pointer; }
.lb-tab[aria-selected="true"] { background: var(--grey-50); color: var(--ink); }
.lb-pieces { padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow-y: auto; align-content: start; }
.lb-piece { border: 1px solid var(--line); border-radius: 10px; background: #F7F8F6; padding: 6px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: grab; touch-action: none; user-select: none; font-size: .7rem; font-weight: 600; text-align: center; }
.lb-piece:hover, .lb-piece:focus-visible { border-color: var(--green); }
.lb-piece svg { width: 54px; height: 42px; display: block; pointer-events: none; }
.lb-tip { margin-top: auto; padding: 10px; font-size: .74rem; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.45; }
.lb-stage { position: relative; min-height: 0; background: var(--asphalt); border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#board { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.lb-selbar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.lb-name { font-weight: 800; font-family: var(--display); margin-right: 4px; }
.lb-selbar label { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.lb-selbar input[type=number] { width: 62px; padding: 5px 6px; }
.lb-selbar input[type=text] { width: 220px; max-width: 46vw; padding: 5px 8px; }
.lb-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; padding: 5px 6px 5px 12px; border-radius: 99px; font-weight: 700; font-size: .82rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); display: flex; gap: 8px; align-items: center; white-space: nowrap; max-width: calc(100% - 20px); }
.lb-toast { position: absolute; top: 10px; right: 10px; background: #fff; border: 1px solid var(--line); padding: 7px 11px; border-radius: 9px; font-size: .8rem; font-weight: 600; max-width: 70%; }
.lb-tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 8px; padding: 5px 9px; font-size: .75rem; font-weight: 700; }
.lb-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.lb-example { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); background: #FAFBFA; }
.lb-example:hover { border-color: var(--green); color: var(--ink); }
.lb-example small { color: var(--muted); }
.lb-group { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
.lb-group:first-of-type { margin-top: 4px; }
.lb-hint .btn[aria-pressed="true"] { background: #FFD43B; color: #1B1F24; }
.lb-ex-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; margin-bottom: 6px; }
@media (max-width: 900px) {
  .lb { height: auto; }
  .lb-work { grid-template-columns: minmax(0, 1fr); }
  .lb-stage { aspect-ratio: 5 / 3; }
  .lb-tray { order: 2; max-height: 170px; }
  .lb-pieces { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76px; overflow-x: auto; overflow-y: hidden; }
  .lb-tip { display: none; }
  .lb-ctl { margin-left: 0; }
}

/* ---------- Lesson guides (beside the board) ---------- */
.lb-with-guide .lb-work { grid-template-columns: 200px minmax(0, 1fr) minmax(320px, 380px); }
.lb-ro.lb-with-guide .lb-work { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.lb-guide-closed .lb-work { grid-template-columns: 200px minmax(0, 1fr); }
.lb-ro.lb-guide-closed .lb-work { grid-template-columns: minmax(0, 1fr); }
.lb-guide-closed .lb-guide { display: none; }
.lb-guide { background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.lb-tag-wrong { background: #FBEAE9 !important; color: #A3271F !important; }
.lb-note-hl rect { animation: lbPulse .9s ease-in-out 3; }
@keyframes lbPulse { 50% { stroke-width: 9; } }
.lg { padding: 16px 16px 20px; font-size: .9rem; }
.lg-none { padding: 18px; color: var(--muted); font-size: .9rem; margin: 0; }
.lg-head { display: grid; gap: 6px; margin-bottom: 12px; }
.lg-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); }
.lg-head h2 { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.lg-head p { margin: 0; color: var(--text); }
.lg-rules { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: .74rem; }
.lg-rules span { color: var(--muted); font-weight: 600; margin-right: 2px; }
.lg-rules a { border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; font-weight: 600; text-decoration: none; background: var(--grey-50); color: var(--ink); }
.lg-rules a:hover { border-color: var(--green); }
.lg-view { display: inline-flex; background: var(--grey-50); border-radius: 9px; padding: 3px; gap: 2px; justify-self: start; margin-top: 2px; }
.lg-view button { border: 0; background: none; font: 600 .78rem var(--body); padding: 6px 10px; border-radius: 7px; color: var(--muted); cursor: pointer; }
.lg-view button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lg-as-learner .lg-staff, .lg-as-learner .lg-record { display: none; }
.lg-part { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 7px; background: var(--card); }
.lg-part summary { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; gap: 9px; align-items: center; font-weight: 650; color: var(--ink); }
.lg-part summary::-webkit-details-marker { display: none; }
.lg-part summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 700; }
.lg-part[open] summary::after { content: '–'; }
.lg-part summary:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 11px; }
.lg-n { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--grey-50); color: var(--muted); display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.lg-in { padding: 0 12px 12px 43px; }
.lg-in p { margin: 0 0 .6em; }
.lg-in ul, .lg-in ol { margin: 0 0 .4em; padding-left: 18px; }
.lg-in li { margin: 3px 0; }
.lg-in h4 { font-size: .82rem; margin: 10px 0 3px; color: var(--ink); }
.lg-lead { color: var(--muted); font-size: .84rem; }
.lg-staff { border-color: var(--amber); background: var(--amber-50); }
.lg-staff .lg-n { background: var(--amber); color: #fff; }
.lg-only { font-size: .78rem; font-weight: 700; color: #8A5D00; }
.lg-tech, .lg-steps { list-style: none; padding: 0 !important; display: grid; gap: 6px; counter-reset: t; }
.lg-tech li { counter-increment: t; display: grid; grid-template-columns: 24px 1fr; gap: 2px 8px; margin: 0; }
.lg-tech li::before { content: counter(t); grid-row: span 2; width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 .78rem var(--display); }
.lg-tech b { color: var(--ink); }
.lg-steps li { margin: 0; }
.lg-steps button b { color: var(--ink); font-weight: 650; }
.lg-steps button ul { margin: 3px 0 0; padding-left: 16px; font-size: .84rem; color: var(--text); }
.lg-steps button ul li { margin: 1px 0; }
.lg-steps button { width: 100%; display: grid; grid-template-columns: 26px 1fr; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 7px 9px; font: inherit; color: var(--text); cursor: pointer; }
.lg-steps button:hover, .lg-steps button:focus-visible { border-color: var(--green); outline: none; }
.lg-k { width: 26px; height: 26px; border-radius: 7px; background: #FFF7D1; border: 2px solid var(--amber); color: #3A2F05; display: grid; place-items: center; font: 800 .8rem var(--display); }
.lg-ex { border-left: 3px solid var(--green); padding: 2px 0 2px 10px; margin-bottom: 9px; }
.lg-ex b { color: var(--ink); }
.lg-ex p { margin: 2px 0 0; }
.lg-mis { display: grid; gap: 7px; }
.lg-mis div { border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.lg-mis p { margin: 0; padding: 7px 10px; font-size: .86rem; }
.lg-mis .bad { background: var(--red-50); color: #8E2A23; }
.lg-mis .bad::before { content: 'Mistake: '; font-weight: 700; }
.lg-mis .good { background: var(--green-50); color: #0B5C33; }
.lg-mis .good::before { content: 'Fix: '; font-weight: 700; }
.lg-safe li::marker { color: var(--red); }
.lg-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-actions [aria-pressed="true"] { background: var(--red-50); border-color: var(--red); color: #8E2A23; }
.lg-wrong { margin-top: 8px !important; background: var(--red-50); color: #8E2A23; border-radius: 8px; padding: 7px 10px; font-size: .85rem; }
.lg-levels { list-style: none; padding: 0 !important; display: grid; gap: 4px; margin-top: 8px !important; }
.lg-levels li { display: grid; gap: 1px; padding: 6px 9px; border-radius: 8px; background: var(--grey-50); font-size: .82rem; margin: 0; }
.lg-levels li.now { background: var(--green-50); outline: 2px solid var(--green); }
.lg-levels b { color: var(--ink); }
.lg-record { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 6px; font-size: .84rem; }
.lg-record div { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-record select { width: auto; padding: 6px 8px; font-size: .85rem; }
.lg-links { display: grid; gap: 6px; }
.lg-links a { display: grid; border: 1px solid #E8C77A; background: var(--card); border-radius: 8px; padding: 6px 9px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .85rem; }
.lg-links small { color: #8A5D00; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.lg-quiz { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.lg-quiz h3 { font-size: 1rem; margin: 0 0 6px; }
.lg-q { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; }
.lg-q > p:first-child { font-weight: 650; color: var(--ink); margin: 0 0 6px; }
.lg-q button { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 9px; margin: 4px 0; font: 500 .86rem var(--body); color: var(--text); cursor: pointer; }
.lg-q button:hover { border-color: var(--green); }
.lg-q.done button { cursor: default; }
.lg-q button.right { border-color: var(--green); background: var(--green-50); color: #0B5C33; font-weight: 600; }
.lg-q button.wrong { border-color: var(--red); background: var(--red-50); color: #8E2A23; }
.lg-why { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.lg-score { font-weight: 700; color: var(--ink); margin: 4px 0 0; }
.lb-new { font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--blue-50); color: var(--blue); border-radius: 99px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
.lb-example .lb-guided { font-size: .72rem; color: var(--green-700); font-weight: 700; margin-top: 4px; }
@media (max-width: 1100px) {
  .lb { height: auto; }
  .lb-with-guide .lb-work, .lb-ro.lb-with-guide .lb-work { grid-template-columns: minmax(0, 1fr); }
  .lb-with-guide .lb-stage { aspect-ratio: 5 / 3; }
  .lb-with-guide .lb-tray { order: 2; max-height: 170px; }
  .lb-with-guide .lb-pieces { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76px; overflow-x: auto; overflow-y: hidden; }
  .lb-with-guide .lb-tip { display: none; }
  .lb-guide { order: 3; overflow: visible; }
}
@media (max-width: 600px) { .lg-in { padding-left: 12px; } .lg { padding: 14px 12px 16px; } }

/* ---------- Working hours ---------- */
.wh { padding: 0; overflow: hidden; }
.wh-head { padding: 18px 20px 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wh-head h2 { margin: 0; }
.wh-scale { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 4px 20px 0; }
.wh-scale > div { position: relative; height: 16px; }
.wh-scale i { position: absolute; font-style: normal; font-size: .7rem; color: var(--muted); transform: translateX(-50%); }
.wh-day { display: grid; grid-template-columns: 170px minmax(0, 1fr); grid-template-areas: "toggle body" ". bar"; gap: 8px 16px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: center; }
.wh-toggle { grid-area: toggle; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.wh-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wh-switch { width: 38px; height: 22px; border-radius: 99px; background: #C9CFCB; position: relative; flex: none; transition: background .15s; }
.wh-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.wh-toggle input:checked + .wh-switch { background: var(--green); }
.wh-toggle input:checked + .wh-switch::after { transform: translateX(16px); }
.wh-toggle input:focus-visible + .wh-switch { outline: 2px solid var(--green); outline-offset: 2px; }
.wh-body { grid-area: body; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; min-width: 0; }
.wh-hours { display: flex; align-items: center; gap: 8px; }
.wh-hours input, .wh-break input { width: 132px; }
.wh-breaks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wh-break { display: flex; align-items: center; gap: 6px; background: #FFF6E3; border: 1px solid #F1D9A6; border-radius: 10px; padding: 4px 4px 4px 8px; }
.wh-break select { width: auto; }
.wh-break.bad { border-color: var(--red); background: #FDECEA; }
.wh-cup { width: 14px; height: 14px; border-radius: 3px; background: repeating-linear-gradient(135deg, #E8A317 0 3px, #FBE3AE 3px 6px); flex: none; }
.wh-bar { grid-area: bar; position: relative; height: 10px; border-radius: 99px; background: #EEF1EE; overflow: hidden; }
.wh-work { position: absolute; top: 0; bottom: 0; background: var(--green); border-radius: 99px; }
.wh-brk { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #E8A317 0 3px, #FFF1CF 3px 6px); }
.wh-brk.bad { background: var(--red); }
.wh-offlabel { display: none; }
.wh-day.off .wh-body, .wh-day.off .wh-bar { display: none; }
.wh-day.off .wh-offlabel { display: block; grid-area: body; color: var(--muted); }
.wh-day.off .wh-toggle b { color: var(--muted); font-weight: 600; }
.wh-day.has-error { background: #FFF8F7; }
.wh-error { width: 100%; margin: 0; color: var(--red); font-size: .85rem; font-weight: 600; }
.wh-foot { padding: 14px 20px; border-top: 1px solid var(--line); margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wh-foot p { margin: 0; max-width: 520px; }
@media (max-width: 700px) {
  .wh-day { grid-template-columns: minmax(0, 1fr); grid-template-areas: "toggle" "body" "bar"; }
  .wh-day.off { grid-template-areas: "toggle"; }
  .wh-day.off .wh-offlabel { display: none; }
  .wh-scale { display: none; }
  .wh-hours input, .wh-break input { width: 124px; }
}

.cal-sync { margin-top: 18px; }
.cal-sync-head { display: flex; gap: 14px; align-items: flex-start; }
.cal-sync-head h2 { margin: 0 0 4px; }
.cal-sync-head p { margin: 0; max-width: 640px; }
.cal-sync-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; flex: none; }
.cal-sync-link { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.cal-sync-link input { flex: 1 1 320px; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; background: #F6F8F6; }
.cal-sync-steps { margin: 16px 0 10px; padding-left: 20px; display: grid; gap: 6px; max-width: 760px; }
.cal-sync-notes { margin: 0; padding: 10px 14px 10px 30px; background: #F6F8F6; border-radius: 10px; color: var(--muted); display: grid; gap: 4px; max-width: 760px; }
.cal-sync-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Theory learning ---------- */
.progress.good > span { background: var(--green); }
.progress.mid > span { background: var(--amber); }
.progress.low > span { background: var(--red); }
.tr-panel { display: flex; gap: 18px; align-items: flex-start; background: var(--asphalt); color: #C9CED3; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 18px; }
.tr-light { background: #0B0D0F; border-radius: 12px; padding: 8px 7px; display: grid; gap: 6px; flex: none; }
.tr-light i { width: 18px; height: 18px; border-radius: 50%; display: block; background: #2A2F35; }
.tr-red .tr-light .r { background: #E5483F; box-shadow: 0 0 12px #E5483F; }
.tr-amber .tr-light .a { background: #F2A900; box-shadow: 0 0 12px #F2A900; }
.tr-green .tr-light .g { background: #22C36E; box-shadow: 0 0 12px #22C36E; }
.tr-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: #8E979F; font-weight: 700; }
.tr-level { font-family: var(--display); font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; }
.tr-red .tr-level { color: #FF8A82; } .tr-amber .tr-level { color: #FFC94D; } .tr-green .tr-level { color: #5BE29B; }
.tr-meta { font-size: .85rem; margin-top: 2px; }
.tr-todo { margin: 10px 0 0; padding-left: 18px; font-size: .85rem; display: grid; gap: 2px; }
.tr-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 99px; white-space: nowrap; }
.tr-badge i, .tr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tr-badge.tr-red { background: var(--red-50); color: #A1302A; } .tr-badge.tr-red i { background: var(--red); }
.tr-badge.tr-amber { background: var(--amber-50); color: #8A5A00; } .tr-badge.tr-amber i { background: var(--amber); }
.tr-badge.tr-green { background: var(--green-50); color: var(--green-700); } .tr-badge.tr-green i { background: var(--green); }
.tr-dot.r { background: var(--red); } .tr-dot.a { background: var(--amber); } .tr-dot.g { background: var(--green); }
.progress.tr-bar-red > span { background: var(--red); } .progress.tr-bar-amber > span { background: var(--amber); } .progress.tr-bar-green > span { background: var(--green); }

.th-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.th-action { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.th-action:hover { border-color: var(--green); transform: translateY(-1px); color: var(--ink); }
form.th-action { padding: 0; } form.th-action button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; width: 100%; box-sizing: border-box; }
form.th-action button:focus-visible { outline: 2px solid var(--green); border-radius: var(--radius-lg); }
.th-action small { color: var(--muted); font-size: .8rem; }
.th-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.th-cat .top { display: flex; align-items: center; gap: 10px; }
.th-cat .top > span { margin-left: auto; }
.th-cat .top a { color: inherit; }
.th-off { opacity: .5; }
.th-links { padding-left: 18px; display: grid; gap: 4px; }
.th-big { font-family: var(--display); font-size: 2.2rem; font-weight: 800; margin: 0; color: var(--ink); }
.th-toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.th-toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .9rem; }
.th-toc a:hover { background: var(--grey-50); } .th-toc .on a { background: var(--green-50); color: var(--green-700); font-weight: 700; }
.th-mini { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .9rem; }
.th-dash { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); flex-wrap: wrap; }
.th-dash:hover { border-color: var(--green); color: var(--ink); }
.th-dash small { display: block; color: var(--muted); font-size: .82rem; }
.th-dash-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; }
.th-dash .grow { flex: 1; min-width: 180px; }

.th-setup fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.th-setup legend { font-weight: 700; margin-bottom: 8px; }
.th-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.th-mode { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.th-mode:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.th-mode small { display: block; color: var(--muted); font-size: .8rem; }
.th-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }

.th-run { max-width: 860px; margin: 0 auto; }
.th-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.th-timer { font-family: var(--display); font-weight: 800; font-size: 1.4rem; background: var(--asphalt); color: #fff; padding: 4px 14px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.th-timer.low { background: var(--red); }
.th-score { font-weight: 700; color: var(--green-700); }
.th-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.th-dot { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: .75rem; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0; }
.th-dot.done { background: #E3E8EC; color: var(--ink); }
.th-dot.right { background: var(--green-50); border-color: #9AD8B5; color: var(--green-700); }
.th-dot.wrong { background: var(--red-50); border-color: #F0B1AD; color: #A1302A; }
.th-dot.flag { box-shadow: inset 0 -3px 0 var(--amber); }
.th-dot.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.th-q { padding: 22px; }
.th-qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.th-qtext { font-size: 1.25rem; line-height: 1.4; margin: 0 0 16px; }
.th-opts { display: grid; gap: 8px; }
.th-opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.th-opt:hover:not(:disabled) { border-color: var(--green); }
.th-opt:disabled { cursor: default; }
.th-letter { width: 28px; height: 28px; border-radius: 8px; background: var(--grey-50); display: grid; place-items: center; font-weight: 800; flex: none; }
.th-opt.chosen { border-color: var(--ink); background: #F3F5F7; }
.th-opt.chosen .th-letter { background: var(--ink); color: #fff; }
.th-opt.right { border-color: var(--green); background: var(--green-50); }
.th-opt.right .th-letter { background: var(--green); color: #fff; }
.th-opt.wrong { border-color: var(--red); background: var(--red-50); }
.th-opt.wrong .th-letter { background: var(--red); color: #fff; }
.th-explain { margin-top: 14px; border-radius: 12px; padding: 12px 14px; }
.th-explain p { margin: 4px 0 0; }
.th-explain.ok { background: var(--green-50); color: var(--green-700); }
.th-explain.bad { background: var(--amber-50); color: #6E4800; }
.th-explain.ok p, .th-explain.bad p { color: var(--text); }
.th-nav { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.th-nav #th-next { margin-left: auto; }
.th-finish { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#th-finish-form.ready button { background: var(--green); }
.th-reviewbox { margin-top: 14px; }
.th-reviewbox .th-dot { width: 34px; }

.th-result { display: flex; align-items: center; gap: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 18px; box-shadow: var(--shadow); flex-wrap: wrap; }
.th-result h2 { margin: 0; } .th-result p { margin: 4px 0 0; color: var(--muted); }
.th-result-score { font-family: var(--display); font-size: 1.6rem; color: var(--muted); }
.th-result-score b { font-size: 3rem; color: var(--ink); }
.th-result.pass { border-color: #9AD8B5; background: linear-gradient(90deg, var(--green-50), var(--card) 60%); }
.th-result.pass .th-result-score b { color: var(--green-700); }
.th-result.fail { border-color: #F0B1AD; background: linear-gradient(90deg, var(--red-50), var(--card) 60%); }
.th-review { padding-left: 22px; display: grid; gap: 16px; }
.th-review > li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.th-review > li.bad::marker { color: var(--red); font-weight: 800; }
.th-rq { font-weight: 600; margin: 0 0 6px; }
.th-ropts { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 3px; font-size: .9rem; }
.th-ropts li { padding: 4px 10px; border-radius: 8px; }
.th-ropts li.right { background: var(--green-50); color: var(--green-700); font-weight: 600; }
.th-ropts li.wrong { background: var(--red-50); color: #A1302A; }
.th-why { font-size: .9rem; margin: 6px 0; }
.th-hard { padding-left: 18px; display: grid; gap: 6px; }

.th-switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 3px 12px 3px 3px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.th-switch span { width: 30px; height: 18px; border-radius: 99px; background: #C9CFCB; position: relative; }
.th-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.th-switch.on { color: var(--green-700); border-color: #9AD8B5; }
.th-switch.on span { background: var(--green); }
.th-switch.on span::after { transform: translateX(12px); }
.th-optedit { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.th-optedit input[name="options[]"] { flex: 1; }
.th-radio { display: flex; align-items: center; gap: 4px; font-weight: 800; width: 48px; }

.hp-run { max-width: 980px; margin: 0 auto; }
.hp-stage { position: relative; background: #000; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; cursor: crosshair; user-select: none; touch-action: manipulation; }
.hp-stage video { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.hp-stage.pulse::after { content: ""; position: absolute; inset: 0; border: 4px solid #FFD43B; border-radius: var(--radius-lg); animation: hp-pulse .4s ease-out forwards; pointer-events: none; }
@keyframes hp-pulse { from { opacity: 1; } to { opacity: 0; } }
.hp-over { position: absolute; inset: 0; background: rgba(11,13,15,.82); color: #fff; display: grid; place-items: center; text-align: center; padding: 20px; cursor: default; }
.hp-over h2 { color: #fff; margin: 0 0 6px; } .hp-over p { color: #C9CED3; max-width: 460px; margin: 0 auto 14px; }
.hp-flags { display: flex; gap: 2px; min-height: 26px; color: #E5483F; font-size: 1.2rem; }
.hp-feedback { margin-top: 14px; }
.hp-line { position: relative; height: 30px; background: var(--grey-50); border-radius: 8px; margin-top: 10px; overflow: hidden; }
.hp-band { position: absolute; top: 0; bottom: 0; }
.hp-band.b5 { background: #0F7F45; } .hp-band.b4 { background: #16A75C; } .hp-band.b3 { background: #4CC487; } .hp-band.b2 { background: #8FDCB2; } .hp-band.b1 { background: #C8EFD9; }
.hp-click { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: #E5483F; }
.hp-click::before { content: "⚑"; position: absolute; top: -2px; left: 3px; font-size: .8rem; color: #E5483F; font-style: normal; }
@media (max-width: 700px) {
  .tr-panel { padding: 14px; gap: 12px; }
  .tr-level { font-size: 1.2rem; }
  .th-qtext { font-size: 1.08rem; }
  .th-q { padding: 16px; }
  .th-nav .btn { flex: 1 1 auto; }
  .th-cat .top { flex-wrap: wrap; }
}

/* Instructor type picker */
.it-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.it-type { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.it-type:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.it-type small { display: block; color: var(--muted); font-size: .82rem; }

/* ===== Instructor Academy ===== */
.ac-kicker { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green-700); margin-bottom: 4px; }
.ac-kicker a { color: inherit; }
.ac-tabs { align-items: center; }
.ac-search { margin-left: auto; padding: 4px 0 6px 8px; }
.ac-search input { padding: 6px 10px; font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; width: 210px; }
.ac-subtabs { margin-top: -6px; }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ac-chips a, .ac-chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.ac-chips a.on { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.ac-chip:hover { border-color: var(--green); color: var(--green-700); }
.ac-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 16px; }
.ac-step { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.ac-step span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-weight: 700; font-size: .8rem; background: #fff; }
.ac-step + .ac-step::before { content: ''; width: 18px; height: 2px; background: var(--line); margin-right: 2px; }
.ac-step.done { color: var(--ink); } .ac-step.done span { background: var(--green); border-color: var(--green); color: #fff; }
.ac-step.now { color: var(--ink); } .ac-step.now span { border-color: var(--green); color: var(--green-700); }
.ac-path-note { flex-basis: 100%; color: var(--muted); }
.stat .value small { font-size: .55em; color: var(--muted); font-weight: 600; }
.ac-courses { display: grid; gap: 10px; }
.ac-course { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; text-decoration: none; color: inherit; border: 1px solid var(--line); }
.ac-course:hover { border-color: var(--green); background: var(--green-50); }
.ac-course-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; flex: none; }
.ac-course-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ac-course-body b { color: var(--ink); }
.ac-course-body small { color: var(--muted); font-size: .78rem; }
.ac-catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ac-ccard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.ac-ccard:hover { border-color: var(--green); transform: translateY(-1px); }
.ac-ccard h2 { margin: 4px 0 0; }
.ac-ccard p { margin: 0; flex: 1; }
.ac-ccard-top { display: flex; align-items: center; gap: 8px; }
.ac-ccard-foot { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ac-cprog { display: flex; flex-direction: column; gap: 8px; }
.ac-lessons { list-style: none; margin: 0; padding: 0; }
.ac-lessons li a { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.ac-lessons li:last-child a { border-bottom: 0; }
.ac-lessons li a:hover { background: var(--paper); }
.ac-ls { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 800; flex: none; color: #fff; }
.completed .ac-ls { background: var(--green); border-color: var(--green); }
.started .ac-ls { border-color: var(--green); color: var(--green); }
.ac-radar-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.ac-radar { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.ac-radar .ring { fill: none; stroke: var(--line); }
.ac-radar .spoke { stroke: var(--line); }
.ac-radar .lbl { font-size: 13px; font-weight: 700; }
.ac-radar .area.a { fill: rgba(22, 167, 92, .2); stroke: var(--green); stroke-width: 2.5; }
.ac-radar .area.b { fill: rgba(105, 113, 122, .12); stroke: #9AA1A8; stroke-width: 1.5; stroke-dasharray: 5 4; }
.ac-radar .dot { fill: var(--green-700); }
.ac-legend { list-style: none; padding: 0; margin: 0 0 8px; } .ac-legend li { display: flex; gap: 8px; align-items: center; } .ac-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ac-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ac-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 6px; border-radius: 10px; background: var(--paper); color: #B4BAC0; }
.ac-badge small { font-size: .72rem; line-height: 1.25; color: var(--muted); }
.ac-badge .ico { width: 26px; height: 26px; }
.ac-badge.got { background: var(--amber-50); color: var(--amber); } .ac-badge.got small { color: var(--ink); font-weight: 600; }
.ac-quick { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.ac-quick a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.ac-quick a:hover { background: var(--paper); color: var(--green-700); }

/* Lesson layout: sidebar | content | tools */
.ac-lesson { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.ac-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.ac-side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; }
.ac-side-box summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; margin-bottom: 6px; }
.ac-side-box summary::-webkit-details-marker { display: none; }
.ac-side-mod { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px; }
.ac-side ul { list-style: none; margin: 0; padding: 0; }
.ac-side li a { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 7px; font-size: .84rem; color: var(--text); text-decoration: none; line-height: 1.3; }
.ac-side li a:hover { background: var(--paper); }
.ac-side li.current a { background: var(--green-50); color: var(--ink); font-weight: 700; }
.ac-side .ac-ls { width: 18px; height: 18px; font-size: .65rem; margin-top: 1px; }
.ac-main { padding: 26px 30px; min-width: 0; }
.ac-main h1 { font-size: 1.9rem; }
.ac-crumb { margin-bottom: 8px; }
.ac-objectives { background: var(--green-50); border-radius: 12px; padding: 14px 18px; margin: 10px 0 20px; }
.ac-objectives ul { margin: 6px 0 0; padding-left: 20px; }
.ac-body { max-width: 72ch; }
.ac-body h2 { margin-top: 1.6em; }
.ac-body table, .ac-table { width: 100%; border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 10px 0 18px; font-size: .92rem; }
.ac-table th, .ac-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.ac-table tr:last-child td { border-bottom: 0; }
.ac-official { border-left: 4px solid var(--blue); background: var(--blue-50); padding: 12px 16px; border-radius: 0 12px 12px 0; margin-bottom: 18px; }
.ac-official span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); }
.ac-official p { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 4px 0; }
.ac-official small { color: var(--muted); }
.ac-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.ac-good, .ac-poor { border-radius: 12px; padding: 12px 16px; }
.ac-good { background: var(--green-50); } .ac-poor { background: var(--red-50); }
.ac-good h3 { color: var(--green-700); } .ac-poor h3 { color: var(--red); }
.ac-good ul, .ac-poor ul { margin: 0; padding-left: 18px; }
.ac-scenario { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.ac-scenario p { margin: 4px 0 0; }
.ac-dialogue { background: var(--paper); border-radius: 12px; padding: 14px 18px; }
.ac-dialogue p { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--line); }
.ac-dialogue p.i { border-color: var(--green); } .ac-dialogue p.p { border-color: var(--blue); }
.ac-selfcheck, .ac-callout { background: var(--amber-50); border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.ac-callout.warn { background: var(--red-50); }
.ac-selfcheck p { margin: 4px 0 0; }
.ac-figure svg { width: 100%; height: auto; }
.ac-figure img { width: 100%; border-radius: 10px; }
.ac-attach { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
.ac-check { display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--asphalt); color: #E6E9EC; border-radius: 14px; padding: 16px 20px; margin: 24px 0 10px; }
.ac-check b { color: #fff; font-family: var(--display); font-size: 1.1rem; } .ac-check p { margin: 2px 0 0; color: #B9C0C6; }
.ac-verified { margin-top: 14px; }
.ac-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.ac-panel { display: flex; flex-direction: column; gap: 0; position: sticky; top: 76px; }
.ac-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; }
.ac-tools [aria-pressed="true"] { background: var(--amber-50); border-color: var(--amber); color: var(--ink); }
.ac-notes { width: 100%; resize: vertical; min-height: 120px; font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.ac-refs { list-style: none; margin: 0; padding: 0; font-size: .86rem; } .ac-refs li { padding: 5px 0; border-bottom: 1px solid var(--line); } .ac-refs li:last-child { border: 0; }
.ac-coachbox h3 { display: flex; gap: 6px; align-items: center; }
.ac-planlink { display: inline-block; margin: 6px 0; font-weight: 600; }

/* Quizzes */
.ac-quiz { max-width: 860px; margin: 0 auto; }
.ac-quiz-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.ac-timer { font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: var(--ink); background: var(--paper); border-radius: 12px; padding: 6px 14px; font-variant-numeric: tabular-nums; }
.ac-timer.low { color: var(--red); background: var(--red-50); }
.ac-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0; }
.ac-dots button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.ac-dots button.answered { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.ac-dots button.on { outline: 2px solid var(--ink); outline-offset: 1px; color: var(--ink); }
.ac-q-text { font-size: 1.25rem; margin: 6px 0 16px; outline: none; }
.ac-opts { display: flex; flex-direction: column; gap: 8px; }
.ac-tf { flex-direction: row; } .ac-tf .ac-opt { flex: 1; justify-content: center; }
.ac-opt { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.ac-opt:hover { border-color: #C8CDD2; }
.ac-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ac-opt:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.ac-opt:has(input:focus-visible) { outline: 3px solid rgba(22, 167, 92, .45); }
.ac-letter { width: 28px; height: 28px; border-radius: 8px; background: var(--paper); display: grid; place-items: center; font-weight: 700; flex: none; }
.ac-opt.right { border-color: var(--green); background: var(--green-50); } .ac-opt.wrong { border-color: var(--red); background: var(--red-50); }
.ac-seq { list-style: none; padding: 0; margin: 0; counter-reset: s; display: flex; flex-direction: column; gap: 6px; }
.ac-seq li { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); counter-increment: s; }
.ac-seq li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.ac-seq-review li.right { color: var(--green-700); } .ac-seq-review li.wrong { color: var(--red); }
.ac-match { display: flex; flex-direction: column; gap: 8px; }
.ac-match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ac-match-row.right { border-color: var(--green); background: var(--green-50); } .ac-match-row.wrong { border-color: var(--red); background: var(--red-50); }
.ac-reflect { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.ac-points { background: var(--paper); border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.ac-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; }
.ac-feedback.good { background: var(--green-50); } .ac-feedback.bad { background: var(--red-50); } .ac-feedback.warn, .ac-feedback.note { background: var(--amber-50); }
.ac-feedback ul { margin: 6px 0 0; }
.ac-q-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.ac-finish { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.ac-score { display: flex; gap: 20px; align-items: center; border-left: 6px solid var(--line); }
.ac-score.pass { border-left-color: var(--green); } .ac-score.fail { border-left-color: var(--red); }
.ac-score-big { font-family: var(--display); font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1; }
.ac-score-big small { font-size: .45em; color: var(--muted); }
.ac-score p { margin: 4px 0 0; }
.ac-review h3 { margin: 6px 0 12px; }
.ac-why { background: var(--paper); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; font-size: .92rem; }
.ac-mockcta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.cat-row .top form { margin-left: auto; }

/* Mock standards check */
.ac-scform { max-width: 920px; }
.ac-sccat .card-head h2 { margin: 0; }
.ac-lp { border-top: 4px solid var(--blue); } .ac-rm { border-top: 4px solid var(--red); } .ac-tl { border-top: 4px solid var(--green); }
.ac-subtotal { font-weight: 800; font-family: var(--display); }
.ac-scrow { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 12px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.ac-scrow legend { float: left; padding: 0; flex: 1; font-size: .93rem; }
.ac-scores { display: flex; gap: 6px; flex: none; }
.ac-scores label { cursor: pointer; position: relative; }
.ac-scores input { position: absolute; opacity: 0; }
.ac-scores span { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; background: var(--card); }
.ac-scores input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.ac-scores input:focus-visible + span { outline: 3px solid rgba(22, 167, 92, .45); }
.ac-scbar { position: sticky; bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; box-shadow: 0 6px 24px rgba(20, 24, 28, .12); z-index: 5; }
.ac-scbar .btn { margin-left: auto; }
.ac-scline { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ac-scline:last-child { border: 0; }
.ac-pill { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; flex: none; color: #fff; }
.ac-pill.s0 { background: var(--red); } .ac-pill.s1 { background: var(--amber); } .ac-pill.s2 { background: var(--blue); } .ac-pill.s3 { background: var(--green); }
.ac-bad { color: var(--red); } .ac-good-t { color: var(--green-700); }

/* Plans, library, editor */
.ac-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ac-plan { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.ac-plan:hover { border-color: var(--green); background: var(--green-50); }
.ac-plan .badge { align-self: flex-start; }
.ac-plandoc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.ac-plan-main { padding: 24px 28px; }
.ac-plansec { border-bottom: 1px solid var(--line); padding: 4px 0 12px; margin-bottom: 12px; }
.ac-plansec:last-child { border: 0; }
.ac-plansec ul, .ac-plansec ol { margin: 0; padding-left: 20px; }
.ac-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ac-tile { padding: 0; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.ac-tile:hover { border-color: var(--green); }
.ac-thumb { aspect-ratio: 16 / 10; background: #F8FAF8; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); max-width: 100%; }
.ac-thumb svg, .ac-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ac-thumb.big { aspect-ratio: auto; }
.ac-play { width: 54px; height: 54px; border-radius: 50%; background: var(--asphalt); color: #fff; display: grid; place-items: center; }
.ac-tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.ac-bigfig svg, .ac-bigfig img { width: 100%; height: auto; border-radius: 10px; }
.ac-video, .ac-embed iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; border: 0; display: block; }
.ac-transcript { margin-top: 14px; } .ac-transcript summary { cursor: pointer; font-weight: 600; }
.ac-chapters { padding-left: 0; list-style: none; } .ac-chapters li { padding: 4px 0; font-size: .9rem; }
.ac-editor { display: flex; flex-direction: column; gap: 0; }
.ac-ed-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; position: sticky; top: 64px; z-index: 4; }
.ac-tool { padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.ac-tool.on { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.ac-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.ac-swatch.on { outline: 3px solid var(--ink); outline-offset: 1px; }
.ac-ed-sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.ac-ed-stage { padding: 8px; }
.ac-ed-stage canvas { width: 100%; height: auto; display: block; border-radius: 8px; touch-action: none; cursor: crosshair; background: #fff; }
.ac-ed-save .form-actions { align-items: center; }

/* Training, CPD, coach, admin */
.ac-hourform .check { padding-bottom: 10px; }
.ac-certs { display: grid; gap: 10px; }
.ac-cert { display: flex; gap: 14px; align-items: center; }
.ac-cert-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--amber-50); color: var(--amber); display: grid; place-items: center; }
.ac-update-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ac-sources li .meta { font-size: .78rem; }
.ac-status { border-left: 6px solid var(--amber); }
.ac-checklist { list-style: none; padding: 0; margin: 8px 0 12px; }
.ac-checklist li { padding: 4px 0 4px 28px; position: relative; }
.ac-checklist li::before { content: '✗'; position: absolute; left: 4px; color: var(--red); font-weight: 800; }
.ac-checklist li.ok::before { content: '✓'; color: var(--green); }
.ac-coach { max-width: 900px; }
.ac-chat { max-height: 58vh; min-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; margin-bottom: 12px; }
.ac-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; background: var(--paper); }
.ac-msg > b { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.ac-msg.me { align-self: flex-end; background: var(--green-50); }
.ac-msg p:last-child { margin-bottom: 0; } .ac-msg h4 { margin: 10px 0 4px; } .ac-msg ul { margin: 4px 0 8px; padding-left: 20px; }
.ac-prompts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ac-ask { display: flex; gap: 8px; align-items: flex-end; }
.ac-ask textarea { flex: 1; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }
.ac-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ac-inline input:not([type=checkbox]), .ac-inline select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .86rem; }
.ac-admmod { border-bottom: 1px solid var(--line); padding: 10px 0; }
.ac-admmod ul { margin: 6px 0; padding-left: 18px; }
.ac-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.ac-source.changed { border-left: 6px solid var(--amber); }
@media (max-width: 1180px) {
  .ac-lesson { grid-template-columns: minmax(0, 1fr) 260px; }
  .ac-side { grid-column: 1 / -1; position: static; max-height: none; }
  .ac-side-box:not([open]) { padding-bottom: 6px; }
}
@media (max-width: 860px) {
  .ac-lesson, .ac-plandoc { grid-template-columns: minmax(0, 1fr); }
  .ac-panel { position: static; }
  .ac-main { padding: 18px 16px; }
  .ac-radar-wrap, .ac-cols { grid-template-columns: minmax(0, 1fr); }
  .ac-search { margin-left: 0; } .ac-search input { width: 160px; }
  .ac-scrow { flex-direction: column; align-items: flex-start; }
  .ac-check { flex-direction: column; align-items: flex-start; }
  .ac-match-row { grid-template-columns: minmax(0, 1fr); }
  .ac-plan-main { padding: 16px; }
}

/* ===== Admin → Email templates ===== */
.em-swatches { display: flex; gap: 6px; margin: 8px 0 6px; }
.em-swatches i { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); display: block; }
.em-cat .card-head h2 { margin: 0; }
.em-subj { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.em-off td { opacity: .6; }
.em-editor { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
.em-form { display: flex; flex-direction: column; gap: 14px; }
.em-form .form-section { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 12px; }
.em-form .form-section h3 { margin: 0; }
.em-form textarea { font: inherit; }
.em-switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.em-switch input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; }
.em-switch span { display: flex; flex-direction: column; } .em-switch small { color: var(--muted); }
.em-vars > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.em-var { font: 600 .78rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); }
.em-var:hover { border-color: var(--green); color: var(--green-700); }
.em-original summary { cursor: pointer; color: var(--muted); }
.em-original dl { margin: 8px 0 0; display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; } .em-original dt { color: var(--muted); } .em-original dd { margin: 0; }
.em-last { border-top: 1px solid var(--line); padding-top: 10px; } .em-last div { color: var(--muted); }
.em-preview { position: sticky; top: 76px; padding: 14px; background: #EEF0F2; }
.em-pv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.em-pv-tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.em-pv-tabs button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; font: 600 .82rem var(--body); color: var(--muted); cursor: pointer; }
.em-pv-tabs button.on { background: var(--asphalt); color: #fff; }
.em-inbox { background: var(--card); border-radius: 10px 10px 0 0; padding: 10px 14px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.em-from { font-size: .78rem; color: var(--muted); } .em-inbox b { color: var(--ink); }
.em-frame-wrap { background: var(--card); border-radius: 0 0 10px 10px; display: flex; justify-content: center; overflow: hidden; }
.em-frame-wrap iframe { width: 100%; height: 520px; border: 0; display: block; transition: width .2s; background: #fff; }
.em-text { background: var(--card); margin: 0; padding: 16px; border-radius: 0 0 10px 10px; white-space: pre-wrap; font-size: .85rem; min-height: 300px; }
.em-app { background: var(--card); padding: 16px; border-radius: 0 0 10px 10px; }
.em-notif { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.em-notif p { margin: 2px 0; font-size: .9rem; white-space: pre-line; } .em-notif small { color: var(--muted); }
.em-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-top: 6px; flex: none; }
.em-sample { margin: 10px 2px 0; }
.em-pick select { margin-left: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; max-width: 230px; }
.em-logo-now { padding: 16px; border-radius: 10px; margin-bottom: 8px; } .em-logo-now img { max-height: 60px; display: block; }
.em-colours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.em-colour { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.em-colour input[type=color] { width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.em-colour span { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; gap: 3px; min-width: 0; }
.em-colour span input { font: .82rem ui-monospace, monospace; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
@media (max-width: 1100px) { .em-editor { grid-template-columns: minmax(0, 1fr); } .em-preview { position: static; } }
@media (max-width: 640px) { .em-colours { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Academy additions: Lesson Flow on plans, role-play cards; learner pathway stages ---------- */
.ac-flow7 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: fl; }
.ac-flow7 li { counter-increment: fl; display: grid; grid-template-columns: 24px 1fr auto; gap: 0 8px; align-items: baseline; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ac-flow7 li::before { content: counter(fl); grid-row: span 2; width: 22px; height: 22px; border-radius: 6px; background: var(--green); color: #fff; display: grid; place-items: center; font: 700 .78rem var(--body); }
.ac-flow7 b { color: var(--ink); font-size: .88rem; } .ac-flow7 span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.ac-flow7 p { grid-column: 2 / 4; margin: 2px 0 0; font-size: .82rem; color: var(--text); }
.ac-rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ac-rp { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ac-rp p { margin: 0 0 6px; }
.ac-rp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.ac-rp-head h2 { margin: 0; font-size: 1.15rem; } .ac-rp-head p { margin: 0; }
.ac-rp-n { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--amber-50); color: #8A5A00; display: grid; place-items: center; font: 800 1rem var(--display); }
.ac-rp-play { background: var(--amber-50); border-radius: 10px; padding: 8px 12px; margin: 4px 0 8px; }
.ac-rp-play summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.ac-rp-play ul, .ac-rp-comps { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.lp-stage-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; }
.lp-stage-head h2 { margin: 0; }
.lp-stage-n { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); }
.lp-stage-prog { display: grid; gap: 4px; min-width: 180px; } .lp-stage-prog small { color: var(--muted); }
.lb-example.lp-done { border-color: var(--green); background: var(--green-50); }
.lp-tick { color: var(--green-700); font-weight: 800; }

/* ---------- Live instructor tracking ---------- */
.trk { display: grid; gap: 14px; max-width: 760px; }
.trk-map { height: 220px; border-radius: 12px; border: 1px solid var(--line); margin: 10px 0 6px; z-index: 0; }
.trk-map-lg { height: min(58vh, 460px); margin: 0; }
.trk-mapwrap { position: relative; }
.trk-badge { position: absolute; right: 10px; top: 10px; z-index: 500; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-size: .78rem; font-weight: 600; color: var(--ink); }
.trk-badge.warn { background: var(--amber-50); border-color: var(--amber); color: #8A5A00; }
.trk-big { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }
.trk-panel { display: grid; gap: 10px; }
.trk-panel[hidden] { display: none; }
.trk-tip { background: var(--grey-50); border-radius: 10px; padding: 10px 12px; font-size: .86rem; }
.trk-error { color: var(--red); font-weight: 600; }
.trk-live { background: var(--green); color: #fff; border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.trk-live b { font-family: var(--display); font-size: 1.1rem; letter-spacing: .03em; }
.trk-live span { font-size: .86rem; opacity: .92; }
.trk-live.near { background: var(--blue); }
.trk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; margin-right: 8px; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) { .trk-dot { animation: trkpulse 1.6s infinite; } @keyframes trkpulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } } }
.trk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trk-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.trk-stats small { display: block; color: var(--muted); font-size: .74rem; }
.trk-stats strong { font: 800 1.5rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.trk-stats em { display: block; font-style: normal; font-size: .72rem; color: var(--muted); }
.trk-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.trk-checks li { display: flex; gap: 8px; align-items: baseline; }
.trk-checks li[hidden] { display: none; }
.trk-checks .s { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--green); transform: translateY(-1px); }
.trk-checks .s.w { background: var(--amber); } .trk-checks .s.x { background: var(--red); } .trk-checks .s.g { background: var(--line); }
.trk-ended { text-align: center; justify-items: center; }
.trk-ok { width: 54px; height: 54px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; }
.trk-sheet { position: fixed; inset: 0; z-index: 2000; background: rgba(10,12,14,.55); display: grid; align-items: end; justify-items: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.trk-sheet[hidden] { display: none; }
.trk-sheet-in { background: var(--card); border-radius: 18px; padding: 20px; width: 100%; max-width: 480px; display: grid; gap: 8px; }
.trk-sheet-in h2 { margin: 0 0 4px; } .trk-sheet-in p { margin: 0; }
.trk-arrival { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.trk-h { font: 800 .86rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--green-700); }
.trk-h.warn { color: #8A5A00; } .trk-h.muted { color: var(--muted); }
.trk-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: baseline; font-size: .9rem; }
.trk-row b { font: 800 1.2rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.trk-row small { color: var(--muted); }
.trk-pin, .trk-car { background: none; border: 0; }
.trk-h3 { font-size: .95rem; margin: 18px 0 8px; }
.trk-checks-form { display: grid; gap: 6px; }
.trk-toast { position: fixed; z-index: 3000; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.trk-toast b { font-size: 1rem; } .trk-toast span { font-size: .88rem; opacity: .88; }
.trk-toast.warn { background: #6B4C0B; }
.trk-toast-act { display: flex; gap: 8px; margin-top: 4px; }
.trk-toast .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
@media (max-width: 640px) { .trk-toast { left: 16px; right: 16px; width: auto; top: max(12px, env(safe-area-inset-top, 0px)); bottom: auto; } }
@media (prefers-reduced-motion: no-preference) { .trk-toast { animation: trkin .3s ease; } @keyframes trkin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } } }
.trk-onway { display: inline-flex; align-items: center; gap: 6px; white-space: normal; max-width: 100%; text-align: left; }
.trk-cron { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trk-cron:last-of-type { border-bottom: 0; }
.trk-cron p { margin: 0; }
.trk-cmd { display: block; font-size: .76rem; background: var(--grey-50); border-radius: 8px; padding: 6px 8px; word-break: break-all; user-select: all; }
.announce { position: relative; }
.announce:has(.announce-x) { padding-right: 44px; }
.announce-x { position: absolute; top: 6px; right: 6px; margin: 0; }
.announce-x button { border: 0; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.announce-x button:hover { background: rgba(0,0,0,.06); color: var(--ink); }

/* Test routes */
.tr-map { height: 460px; border-radius: 14px; overflow: hidden; }
.tr-map.tall { height: 560px; }
@media (max-width: 760px) { .tr-map, .tr-map.tall { height: 340px; } }
.tr-list li { align-items: center; }
.tr-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--grey-50); color: var(--muted); flex: 0 0 36px; }
.tr-badge.has { background: var(--green-50); color: var(--green-700); }
.tr-swatch { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 14px; margin-top: 4px; }
.tr-centre-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1B1F24; color: #FFD43B; font: 800 11px/1 Inter, Arial, sans-serif; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tr-arrow span { display: block; color: #0F7F45; font-size: 14px; line-height: 18px; text-align: center; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.tr-hl { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.filters .grow { flex: 1 1 220px; }

/* Help & support */
.help-fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 12px; border: 0; border-radius: 99px; background: var(--asphalt); color: #fff; font: 700 .9rem var(--body); box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer; }
.help-fab:hover { background: var(--green-700); }
.help-fab .ico { width: 20px; height: 20px; }
body:has(#board) .help-fab, body:has(.trk) .help-fab { padding: 10px; }
body:has(#board) .help-fab span, body:has(.trk) .help-fab span { display: none; }
.help-dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: auto; }
.help-dlg::backdrop { background: rgba(16,20,24,.55); }
.help-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.help-head h2 { margin: 0; font-size: 1.3rem; }
.help-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.help-body { padding: 8px 22px 4px; display: grid; gap: 12px; }
.help-cats { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.help-cats legend { font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.help-cat { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.help-cat:hover { border-color: var(--green); }
.help-cat:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.help-cat input { margin-top: 4px; accent-color: var(--green); }
.help-cat b { display: block; font-size: .92rem; }
.help-cat small { color: var(--muted); font-size: .8rem; }
.help-cat.private:has(input:checked) { border-color: #6B4FB5; background: #F3EFFB; }
.help-private { display: flex; gap: 10px; align-items: flex-start; background: #F3EFFB; border: 1px solid #D9CEF0; color: #3E2A73; border-radius: 12px; padding: 10px 12px; font-size: .86rem; }
.help-private .ico { flex: 0 0 18px; margin-top: 2px; }
.help-err { margin: 0; color: var(--red, #C0392B); font-weight: 600; font-size: .88rem; }
.help-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px 20px; border-top: 1px solid var(--line); margin-top: 8px; }
.help-done { padding: 24px 22px 26px; text-align: center; }
.help-done h3 { margin: 10px 0 6px; }
.help-ok { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green-50); color: var(--green-700); }
.help-ok .ico { width: 28px; height: 28px; }
.sp-unread .title, tr.sp-unread b { font-weight: 800; }
.sp-thread { display: grid; gap: 12px; }
.sp-msg { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.sp-msg.staff { background: var(--green-50); border-color: #CDEBD9; }
.sp-msg.internal { background: #FFF8E1; border-color: #F2DE9B; border-style: dashed; }
.sp-msg header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.sp-msg header .avatar { width: 28px; height: 28px; font-size: .72rem; }
.sp-body { white-space: normal; line-height: 1.55; overflow-wrap: anywhere; }
.sp-file { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: .86rem; }
.sp-img { display: block; max-width: 100%; max-height: 320px; margin-top: 8px; border-radius: 10px; border: 1px solid var(--line); }
@media print { .help-fab { display: none; } }

/* Lesson board: View menu */
.lb-view { position: relative; }
.lb-view > summary { list-style: none; cursor: pointer; }
.lb-view > summary::-webkit-details-marker { display: none; }
.lb-view[open] > summary { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.lb-view-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 12px; display: grid; gap: 6px; }
.lb-view-menu .check { font-size: .86rem; }
.lb-view-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); margin-top: 4px; }
.lb-view-key { margin: 4px 0 0; font-size: .74rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.lb-view-key span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; opacity: .6; margin-right: -4px; }

/* Lesson board: 3D view */
.lb-3d-btn b { color: var(--green-700); }
.lb-3d-btn[aria-pressed="true"] b { color: #FFD43B; }
.lb3d { position: absolute; inset: 0; z-index: 20; background: #BFE0F5; }
.lb3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.lb3d-bar { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.lb3d-cams, .lb3d-close { pointer-events: auto; }
.lb3d-cams { display: inline-flex; background: rgba(15,18,22,.78); border-radius: 99px; padding: 3px; gap: 2px; }
.lb3d-cams button { border: 0; background: transparent; color: #E9EEEA; font: 700 .8rem var(--body); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.lb3d-cams button[aria-pressed="true"] { background: #fff; color: #1B1F24; }
.lb3d-close { border: 0; background: rgba(15,18,22,.78); color: #fff; font: 700 .8rem var(--body); padding: 7px 12px; border-radius: 99px; cursor: pointer; }
.lb3d-msg { position: absolute; inset: 0; display: grid; place-items: center; color: #1B1F24; font-weight: 700; background: rgba(255,255,255,.6); }
.lb3d-msg[hidden] { display: none; }
.lb3d-hud { position: absolute; inset: 0; pointer-events: none; }
.lb3d-dash { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30%; }
.lb3d-mirror { position: absolute; border: 3px solid #0B0D10; background: rgba(0,0,0,.15); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.lb3d-mirror span { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font: 700 .62rem var(--body); color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.lb3d-mirror-rear { top: 52px; left: 50%; width: 26%; height: 15%; transform: translateX(-50%); border-radius: 14px; }
.lb3d-mirror-l, .lb3d-mirror-r { top: 52%; width: 15%; height: 15%; border-radius: 10px 10px 18px 18px; }
.lb3d-mirror-l { left: 10px; }
.lb3d-mirror-r { right: 10px; }

/* ---- Calendar quick-book: month grid, drag ghost, popover ---- */
.cal-day[data-day] { cursor: crosshair; touch-action: pan-y; }
.cal-ghost { position: absolute; left: 4px; right: 4px; border-radius: 8px; background: rgba(22,167,92,.18); border: 2px dashed var(--green); color: var(--green-700); font-size: .72rem; font-weight: 700; padding: 3px 6px; pointer-events: none; z-index: 3; min-height: 10px; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 700px; }
.mcal-head { padding: 8px; font-weight: 600; font-size: .82rem; text-align: center; border-bottom: 1px solid var(--line); background: #FAFBFA; color: var(--muted); }
.mcal-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: background .12s; }
.mcal-day:nth-child(7n+1) { border-left: 0; }
.mcal-day:hover, .mcal-day:focus-visible { background: #F3FAF5; outline: none; box-shadow: inset 0 0 0 2px rgba(22,167,92,.35); }
.mcal-day.out { background: #FAFAFA; color: #A3A9AF; }
.mcal-day.out .mcal-num { color: #B4B9BE; }
.mcal-day.off .mcal-num { color: #A3A9AF; }
.mcal-day.off { background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgba(0,0,0,.025) 9px 10px); }
.mcal-day.today .mcal-num { color: var(--green-700); }
.mcal-day.today .mcal-num small { background: var(--green); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .64rem; margin-left: 6px; font-weight: 700; }
.mcal-num { font-weight: 700; font-size: .88rem; margin-bottom: 2px; }
.mcal-ev { display: block; font-size: .72rem; line-height: 1.2; padding: 3px 6px; border-radius: 6px; background: var(--asphalt); color: #fff; text-decoration: none; border-left: 3px solid var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal-ev:hover { color: #fff; filter: brightness(1.15); }
.mcal-ev.st-requested { background: #FFF6E3; color: #6E4A06; border: 1px dashed var(--amber); border-left-width: 3px; }
.mcal-ev.st-completed { background: #2F3A33; }
.mcal-ev.st-cancelled, .mcal-ev.st-no_show { background: var(--grey-50); color: #7a828a; text-decoration: line-through; border-left-color: #c3c8cd; }
.mcal-ev.test { background: #3A2523; border-left-color: var(--red); }
.mcal-more { font-size: .72rem; color: var(--green-700); font-weight: 600; text-decoration: none; }
.qb { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(20,24,28,.18), 0 2px 8px rgba(20,24,28,.08); padding: 14px 16px 16px; animation: qb-in .14s ease-out; }
@keyframes qb-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.qb-form { display: grid; gap: 10px; }
.qb-head { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; }
.qb-x { border: 0; background: var(--grey-50); width: 28px; height: 28px; border-radius: 999px; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--muted); }
.qb-x:hover { background: var(--line); color: var(--ink); }
.qb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qb-lens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qb-lens button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; color: var(--ink); transition: all .12s; }
.qb-lens button:hover { border-color: var(--green); }
.qb-lens button[aria-checked="true"] { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(22,167,92,.3); }
.qb-other { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 999px; padding: 3px 10px 3px 12px; }
.qb-other input { width: 58px; padding: 3px 6px; font-size: .84rem; border-radius: 8px; }
.qb-other.on { border-style: solid; border-color: var(--green); color: var(--green-700); }
.qb-note { margin: 0; font-size: .8rem; color: #8A5A00; background: #FFF6E3; border-radius: 8px; padding: 7px 10px; }
.qb-clash { font-size: .84rem; }
.qb-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.qb-ends { margin-left: auto; }
.wh-lengths { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 16px 0 6px; border-top: 1px solid var(--line); margin-top: 14px; }
.wh-lengths h3 { margin: 0 0 3px; font-size: .95rem; }
.wh-lengths > div:first-child { flex: 1 1 260px; }
.wh-lengths-pick { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 320px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: .86rem; font-weight: 600; transition: all .12s; }
.chip-check input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(22,167,92,.3); }
@media (max-width: 640px) { .qb { left: 8px !important; right: 8px; width: auto; bottom: 8px; top: auto !important; } .cal-day[data-day] { cursor: pointer; } }
@media (max-width: 640px) {
  .mcal { min-width: 0; }
  .mcal-day { min-height: 64px; padding: 4px 3px 6px; gap: 2px; }
  .mcal-num { font-size: .8rem; }
  .mcal-ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; border-left-width: 0; }
  .mcal-ev.st-requested { height: 6px; border-width: 1px; }
  .mcal-more { font-size: .62rem; }
}
.cal-break-auto { left: 4px; right: 4px; border-radius: 0 0 6px 6px; text-decoration: none; z-index: 1; border-left-width: 4px; }
.cal-break-auto:hover { filter: brightness(.97); color: #6E4A00; }
.cal-ghost.has-break::after { content: 'break'; position: absolute; left: -2px; right: -2px; top: 100%; height: var(--brk, 0); background: repeating-linear-gradient(135deg, rgba(232,163,23,.35) 0 4px, rgba(255,241,207,.5) 4px 9px); border: 2px dashed var(--amber); border-top: 0; border-radius: 0 0 8px 8px; font-size: .62rem; color: #8A5A00; padding: 0 6px; overflow: hidden; }
.wh-cfg { flex: 1 1 360px; display: grid; gap: 12px; }
.wh-cfg-row { display: flex; gap: 14px; flex-wrap: wrap; }
.wh-cfg-row .field { flex: 1 1 150px; }
.wh-cfg-row select, .wh-cfg-row input { width: 100%; }
/* Open slots (instructor publishes, learners book) */
.cal-open { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 4px 20px 4px 6px; font-size: .72rem; line-height: 1.25; background: #EAF8EF; border: 1.5px dashed var(--green); color: var(--green-700); overflow: hidden; z-index: 2; }
.cal-open b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-open span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-open-x { position: absolute; top: 2px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 999px; background: transparent; color: var(--green-700); font-size: 1rem; line-height: 1; cursor: pointer; }
.cal-open-x:hover { background: var(--green); color: #fff; }
.mcal-ev.open { background: #EAF8EF; color: var(--green-700); border: 1.5px dashed var(--green); border-left-width: 1.5px; }
.qb-mode { display: flex; background: var(--grey-50); border-radius: 999px; padding: 3px; }
.qb-mode button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .84rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.qb-mode button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.qb-slot-only { display: grid; gap: 8px; }
.wh-modes { gap: 8px; }
.wh-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.wh-mode:has(input:checked) { border-color: var(--green); background: #F3FAF5; }
.wh-mode input { margin-top: 3px; accent-color: var(--green); }
.wh-mode b { display: block; font-size: .9rem; }
.wh-mode small { color: var(--muted); font-size: .8rem; }
.slot-note { display: block; color: var(--green-700); }
