/* Birebir koçluk — on the "Gri Koç Navigasyon" design system (light theme). Self-contained: tokens below
   mirror docs/tasarim-sistemi/varliklar/tokens.json and ai/app/public/app.css.
   Rules: one yellow (--brand) fill per screen, on the primary action only. Cards have no border or shadow;
   surfaces separate by tone. The dark coach surface is used only where the assistant speaks. Level colour
   only on progress (ring, bar, badge, trend line) and always next to the level's name. Status only through
   success / danger with a word and an icon. Montserrat 400/500/800/900. Sizes 12·14·16·18·24·36·48·60.
   Spacing 4·8·12·16·20·24·40·48. Radius 8·12·16·24·pill. */

@font-face { font-family: Montserrat; font-weight: 400; font-style: normal; font-display: swap; src: url("/kocluk/fonts/Montserrat-Regular.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 500; font-style: normal; font-display: swap; src: url("/kocluk/fonts/Montserrat-Medium.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 800; font-style: normal; font-display: swap; src: url("/kocluk/fonts/Montserrat-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 900; font-style: normal; font-display: swap; src: url("/kocluk/fonts/Montserrat-Black.woff2") format("woff2"); }

:root {
  --surface: #f6f6f6; --surface-raised: #ffffff; --surface-sunken: #e7e7e7;
  --ink: #282828; --ink-muted: #5d5d5d; --border: #e7e7e7;
  --brand: #ffd200; --on-brand: #282828; --coach-surface: #282828; --on-coach: #ffffff;
  --danger: #b8293f; --success: #11776a; --danger-surface: #fbeaed; --success-surface: #e3f2ef;
  --gold-400: #ffe10d; --gold-600: #d19a00;
  --gray-200: #d1d1d1; --gray-300: #b0b0b0; --gray-400: #888888; --gray-500: #6d6d6d; --gray-600: #5d5d5d;
  --gray-700: #4f4f4f; --gray-800: #454545; --gray-900: #3d3d3d; --gray-950: #282828;
  --level-pink: #ed79a2; --level-green: #75b843; --level-orange: #f58c03; --level-blue: #559ed7; --level-purple: #b919e0; --level-red: #e91c19;
  --level-accent: var(--ink); --on-level: var(--gray-950);
  --font: Montserrat, system-ui, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s10: 40px; --s12: 48px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 9999px;
  --gutter: 40px;
}
[data-level="pink"]   { --level-accent: var(--level-pink);   --on-level: var(--gray-950); }
[data-level="green"]  { --level-accent: var(--level-green);  --on-level: var(--gray-950); }
[data-level="orange"] { --level-accent: var(--level-orange); --on-level: var(--gray-950); }
[data-level="blue"]   { --level-accent: var(--level-blue);   --on-level: var(--gray-950); }
[data-level="purple"] { --level-accent: var(--level-purple); --on-level: #ffffff; }
[data-level="red"]    { --level-accent: var(--level-red);    --on-level: #ffffff; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; font: 400 16px/24px var(--font); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main:focus { outline: none; }
.ico { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 20; padding: 8px 16px; border-radius: var(--r-pill); background: var(--coach-surface); color: var(--on-coach); font: 800 14px/20px var(--font); }
.skip:focus { top: 8px; }

/* ---------- type ---------- */
.label { font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.label-ico, .memory-label { display: inline-flex; align-items: center; gap: 8px; }
.h1 { font: 900 48px/58px var(--font); letter-spacing: -0.025em; }
.h2 { font: 900 36px/43px var(--font); letter-spacing: -0.025em; }
.h3 { font: 800 24px/29px var(--font); }
.title { font: 800 18px/22px var(--font); }
.body-lg { font: 500 18px/27px var(--font); }
.body { font: 400 16px/24px var(--font); }
.body-sm { font: 500 14px/21px var(--font); }
.meta { font: 500 12px/18px var(--font); }
.muted { color: var(--ink-muted); }
.link { background: none; border: 0; padding: 0; font: 800 14px/20px var(--font); text-decoration: underline; text-underline-offset: 2px; color: var(--ink); align-self: flex-start; }
.link-plain { text-decoration: none; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 2px; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border: 0; border-radius: var(--r-pill); font: 800 14px/20px var(--font); text-decoration: none; white-space: nowrap; background: none; color: var(--ink); transition: background-color .15s, box-shadow .15s; }
.btn:disabled { background: var(--gray-200); color: var(--gray-600); box-shadow: none; }
.btn.is-busy { opacity: .7; }
.btn-lg { min-height: 56px; padding: 16px 24px; font-size: 16px; line-height: 24px; }
.btn-sm { min-height: 40px; padding: 8px 16px; }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover:not(:disabled) { background: var(--gold-400); }
.btn-brand:active:not(:disabled) { background: var(--gold-600); }
.btn-ink { background: var(--coach-surface); color: var(--on-coach); }
.btn-ink:hover:not(:disabled) { background: var(--gray-900); }
.btn-outline { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--gray-200); }
.btn-outline:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink-muted); }
.btn-tonal { background: var(--surface-sunken); border-radius: var(--r-md); }
.btn-tonal:hover:not(:disabled) { background: var(--gray-200); }
.btn-text { padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 2px; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-light { background: var(--on-coach); color: var(--ink); }
.btn-light:hover:not(:disabled) { background: var(--surface-sunken); }
.btn-dim { background: var(--gray-900); color: var(--on-coach); }
.btn-dim:hover:not(:disabled) { background: var(--gray-800); }
.btn-self { align-self: flex-start; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-raised); color: var(--ink); }
.icon-btn:hover { background: var(--surface-sunken); }
.pill-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 8px 16px 8px 12px; border-radius: var(--r-pill); background: var(--surface-raised); font: 800 14px/20px var(--font); text-decoration: none; }
.pill-back:hover { background: var(--surface-sunken); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 12px var(--gutter); background: var(--surface); }
.logo { flex: none; display: block; }
.logo img { height: 32px; width: auto; }
.top-home { padding: 8px 12px; border-radius: var(--r-pill); font: 800 14px/20px var(--font); text-decoration: none; color: var(--ink-muted); }
.top-home:hover { color: var(--ink); }
.role { display: flex; align-items: center; gap: 8px; min-width: 0; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-sunken); border-radius: var(--r-pill); }
.seg button { position: relative; min-height: 36px; padding: 8px 16px; border: 0; border-radius: var(--r-pill); background: none; font: 800 14px/20px var(--font); color: var(--ink-muted); white-space: nowrap; }
.seg button.is-active { background: var(--surface-raised); color: var(--ink); }
.select { min-height: 44px; max-width: 180px; padding: 8px 40px 8px 16px; border: 0; border-radius: var(--r-pill); background: var(--surface-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23282828' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 20px no-repeat; font: 800 14px/20px var(--font); appearance: none; -webkit-appearance: none; text-overflow: ellipsis; }

/* ---------- page + common blocks ---------- */
.page { width: 100%; max-width: 1360px; margin: 0 auto; padding: 8px var(--gutter) 48px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-narrow { max-width: 880px; }
.page-mid { max-width: 1040px; }
.hero { display: flex; flex-direction: column; gap: 8px; padding: 16px 0 8px; }
.hero .h1, .hero .h2 { text-wrap: balance; }
.hero .body-lg { max-width: 36em; }
.hero-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.card { background: var(--surface-raised); border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
a.card { text-decoration: none; color: var(--ink); }
.card-row { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.card-row-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; min-width: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tags, .day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { flex: none; display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface); font: 800 12px/18px var(--font); white-space: nowrap; }
.card .tag { background: var(--surface); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--level-accent); color: var(--on-level); font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; align-self: flex-start; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.avatar { flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-sunken); color: var(--ink); font: 800 14px/1 var(--font); object-fit: cover; }
.avatar-md { width: 44px; height: 44px; }
.avatar-xl { width: 144px; height: 144px; }
.bar { display: block; width: 100%; height: 8px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--level-accent); }
.ring { position: relative; flex: none; }
.ring-rail { stroke: var(--surface-sunken); }
.ring-fill { stroke: var(--level-accent); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font: 900 36px/43px var(--font); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.ring-text span { font: 500 12px/18px var(--font); color: var(--ink-muted); }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-muted); font: 800 12px/18px var(--font); white-space: nowrap; }
.delta.up { color: var(--success); background: var(--success-surface); }
.delta.down { color: var(--danger); background: var(--danger-surface); }
.word { display: inline-flex; align-items: center; gap: 4px; font: 800 12px/18px var(--font); white-space: nowrap; }
.word-success { color: var(--success); }
.word-danger { color: var(--danger); }
.word-muted { color: var(--ink-muted); }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 8px; border-radius: var(--r-pill); background: var(--danger-surface); color: var(--danger); font: 800 12px/18px var(--font); }
.status { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); font: 500 14px/21px var(--font); color: var(--ink); }
.status-danger { background: var(--danger-surface); }
.status-success { background: var(--success-surface); }
.status-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #ffffff; }
.status-danger .status-ico { background: var(--danger); }
.status-success .status-ico { background: var(--success); }
.status-body { flex: 1; min-width: 0; }
.status-title { font-weight: 800; }
.status-danger .status-title { color: var(--danger); }
.status-success .status-title { color: var(--success); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--ink-muted); font: 500 14px/21px var(--font); }
.empty img { width: 120px; height: auto; }
.skeleton { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-xl); background: var(--surface-raised); }
.skeleton i { display: block; height: 16px; border-radius: var(--r-sm); background: var(--surface-sunken); animation: breathe 1.4s ease-in-out infinite; }
.skeleton-page { margin-top: 16px; }
.slots .skeleton, .dialog .skeleton { padding: 0; }
@keyframes breathe { 50% { opacity: .45; } }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: bounce 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; width: min(480px, calc(100% - 32px)); pointer-events: none; }
.ticks { display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font: 500 14px/21px var(--font); }
.ticks li .ico { margin-top: 4px; color: var(--ink-muted); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 0; }
.row-top { align-items: flex-start; }
.row .tag { background: var(--surface-raised); }
.row .day-chips { margin-top: 4px; }
a.row:hover { background: var(--surface-sunken); }
.row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; font: 500 14px/21px var(--font); }
.row-text b { font-weight: 800; }
.row-go { flex: none; display: inline-flex; align-items: center; gap: 4px; font: 800 12px/18px var(--font); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font: 500 14px/21px var(--font); }
.table th { text-align: left; padding: 8px; font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.table td { padding: 12px 8px; border-top: 1px solid var(--border); }
.table .r { text-align: right; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.input { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: var(--r-md); background: var(--surface); font: 500 16px/24px var(--font); color: var(--ink); }
.input-lg { min-height: 64px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--surface-raised); font: 800 18px/27px var(--font); }
.input::placeholder { color: var(--gray-400); font-weight: 500; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23282828' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 12px center; background-size: 20px; background-repeat: no-repeat; }
.add-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px; border-radius: var(--r-lg); background: var(--surface); }
.add-form .input { background: var(--surface-raised); }
.add-form > div { grid-column: 1 / -1; }

/* ---------- dialog ---------- */
.dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 0; border-radius: var(--r-xl); background: var(--surface-raised); color: var(--ink); overflow: auto; }
.dialog-wide { width: min(640px, calc(100% - 32px)); }
.dialog::backdrop { background: rgb(40 40 40 / .56); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dialog-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dialog-head .icon-btn { background: var(--surface); }
.dialog-body { display: flex; flex-direction: column; gap: 20px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.dialog-actions > p { flex: 1 1 160px; }
.facts { display: grid; gap: 8px; }
.facts > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); }
.facts dt { font: 500 12px/18px var(--font); color: var(--ink-muted); }
.facts dd { font: 800 14px/21px var(--font); }
.slots { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.slot-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(56px, 1fr); gap: 8px; overflow-x: auto; padding: 4px; margin: -4px; }
.slot-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 0; border-radius: var(--r-md); background: var(--surface); font: 500 12px/18px var(--font); color: var(--ink-muted); }
.slot-day b { font: 800 14px/20px var(--font); color: var(--ink); }
.slot-day.is-active { background: var(--coach-surface); color: var(--gray-200); }
.slot-day.is-active b { color: var(--on-coach); }
.slot-day:disabled { opacity: .45; }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { min-height: 48px; padding: 12px 8px; border: 0; border-radius: var(--r-md); background: var(--surface); font: 800 14px/20px var(--font); font-variant-numeric: tabular-nums; }
.slot:hover:not(:disabled) { background: var(--surface-sunken); }
.slot.is-picked, .slot.is-picked:hover:not(:disabled) { background: var(--coach-surface); color: var(--on-coach); }
.slot:disabled { color: var(--gray-400); text-decoration: line-through; background: none; box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- landing ---------- */
.landing { gap: 40px; padding-top: 40px; }
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.door { display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--r-xl); background: var(--surface-raised); }
.door-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface); }
.door-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.door .btn { align-self: stretch; }
.landing-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px 24px; flex-wrap: wrap; }
.link-quiet { align-self: auto; padding: 12px 0; font: 500 12px/18px var(--font); color: var(--ink-muted); }
.link-quiet:hover:not(:disabled) { color: var(--ink); }

/* ---------- dashboards (coach, student) ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.dash-main > .hero { margin-bottom: -16px; }
.dash-side { min-width: 0; }
@media (min-width: 1000px) {
  .dash { grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 400px); }
  .dash-side { position: sticky; top: 68px; height: calc(100dvh - 68px - 24px); }
  .dash-side .assistant { height: 100%; }
}
.today { display: flex; flex-direction: column; gap: 12px; }
.session { flex-direction: row; align-items: center; gap: 20px; padding: 20px 24px; }
.session.is-current { box-shadow: inset 0 0 0 2px var(--ink); }
.session-time { flex: none; width: 96px; display: flex; flex-direction: column; gap: 4px; }
.session-time b { font: 900 24px/29px var(--font); letter-spacing: -0.025em; }
.session-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.session-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.session-cta { flex: none; display: flex; align-items: center; gap: 16px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 16px; }
.cal-day { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 8px; border-radius: var(--r-md); background: var(--surface); min-height: 160px; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-head { display: flex; flex-direction: column; gap: 0; padding: 0 4px; font: 500 12px/18px var(--font); color: var(--ink-muted); }
.cal-head b { font: 800 14px/20px var(--font); color: var(--ink); }
.cal-today { font: 800 12px/18px var(--font); color: var(--ink); }
.cal-list { display: flex; flex-direction: column; gap: 4px; }
.cal-none { padding: 4px; font: 500 12px/18px var(--font); color: var(--gray-400); }
.cal-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; padding: 8px; border: 0; border-radius: var(--r-sm); background: var(--surface-raised); text-align: left; font: 500 12px/18px var(--font); min-width: 0; }
.cal-chip:hover { box-shadow: inset 0 0 0 1px var(--gray-400); }
.cal-chip-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
.cal-chip b { font: 800 14px/20px var(--font); }
.cal-chip-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip-note { font: 800 12px/18px var(--font); }
.cal-chip.is-done { color: var(--ink-muted); }
.cal-chip.is-done .cal-chip-note, .cal-chip.is-done .ico { color: var(--success); }
.cal-chip.is-cancelled { color: var(--ink-muted); }
.cal-chip.is-cancelled b { text-decoration: line-through; }
.cal-chip.is-cancelled .cal-chip-note, .cal-chip.is-cancelled .ico { color: var(--danger); }
.cal-chip.is-current, .cal-chip.is-live { box-shadow: inset 0 0 0 2px var(--ink); }

.students { display: flex; flex-direction: column; gap: 12px; }
.student { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 24px; align-items: center; padding: 20px 24px; }
.student:hover { box-shadow: inset 0 0 0 1px var(--gray-300); }
.student-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.student-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.student-level { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.student-level .badge { align-self: center; }
.student-net { font: 500 14px/21px var(--font); white-space: nowrap; }
.student-net b { font: 900 18px/22px var(--font); }
.student-plan { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.student-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.student-plan-top b { font: 800 14px/21px var(--font); }
.student-flags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.student .tag { background: var(--surface); }
.student-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ---------- assistant (dark coach surface) ---------- */
.assistant { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-xl); background: var(--coach-surface); color: var(--on-coach); min-height: 420px; max-height: 720px; }
.assistant :focus-visible, .copilot :focus-visible { outline-color: var(--on-coach); }
.assistant .label, .copilot .label { color: var(--gray-300); }
.as-head, .cp-head { display: flex; align-items: center; gap: 12px; }
.as-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--gray-900); display: grid; place-items: center; }
.as-thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--gray-700) transparent; }
.as-msg { max-width: 100%; font: 500 16px/24px var(--font); overflow-wrap: anywhere; }
.as-bot { display: flex; flex-direction: column; gap: 12px; }
.as-bot b { color: var(--brand); font-weight: 800; }
.as-bot.is-error p { color: var(--gray-200); }
.as-bot.is-thinking { color: var(--gray-300); }
.as-me { align-self: flex-end; max-width: 88%; padding: 12px 16px; border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); background: var(--gray-900); font-size: 14px; line-height: 21px; }
.as-card, .as-confirm { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r-md); background: var(--gray-900); }
.as-list { display: flex; flex-direction: column; gap: 8px; }
.as-list li, .as-list a { display: flex; flex-direction: column; gap: 0; color: var(--on-coach); text-decoration: none; font: 500 12px/18px var(--font); }
.as-list li > span, .as-list a > span { color: var(--gray-200); }
.as-list b { color: var(--on-coach); font: 800 14px/21px var(--font); }
.as-list a:hover b { text-decoration: underline; text-underline-offset: 2px; }
.as-confirm { box-shadow: inset 0 0 0 1px var(--gray-700); }
.as-confirm-title { color: var(--on-coach) !important; font: 800 16px/24px var(--font); }
.as-lines { display: flex; flex-direction: column; gap: 4px; font: 500 14px/21px var(--font); color: var(--gray-200); }
.as-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.as-confirm.is-off { opacity: .7; }
.assistant .word-success, .copilot .word-success { padding: 4px 12px 4px 8px; border-radius: var(--r-pill); background: var(--success-surface); }
.assistant .word-danger, .copilot .word-danger { padding: 4px 12px 4px 8px; border-radius: var(--r-pill); background: var(--danger-surface); white-space: normal; }
.assistant .word-muted { color: var(--gray-300); }
.as-error { flex-basis: 100%; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-chip { padding: 8px 16px; border: 0; border-radius: var(--r-pill); background: var(--gray-900); color: var(--on-coach); font: 800 12px/18px var(--font); text-align: left; }
.as-chip:hover { background: var(--gray-800); }
.as-note { font: 500 12px/18px var(--font); color: var(--gray-200); }
.as-composer { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 20px; border-radius: var(--r-pill); background: var(--gray-900); }
.as-composer:focus-within { outline: 2px solid var(--on-coach); outline-offset: 2px; }
.as-input { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: 0; background: transparent; color: var(--on-coach); font: 500 16px/24px var(--font); }
.as-input::placeholder { color: var(--gray-300); }
.as-round { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--gray-800); color: var(--on-coach); }
.as-round[aria-pressed="true"] { background: var(--danger); animation: breathe 1.2s infinite; }
.as-send { background: var(--on-coach); color: var(--ink); }
.as-send:disabled { background: var(--gray-700); color: var(--gray-300); }

/* ---------- student file ---------- */
.file-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-top: 8px; }
.file-head { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.file-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-id .badge { align-self: center; }
.file-next { flex-direction: row; align-items: center; gap: 24px; flex-wrap: wrap; padding: 20px 24px; }
.file-next-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.netline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.netline > div { display: flex; flex-direction: column; }
.netline b { font: 900 24px/29px var(--font); letter-spacing: -0.025em; white-space: nowrap; }
.netline-arrow { color: var(--gray-400); }
.netline-left { padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-raised); color: var(--ink); font-weight: 800; }
.card .netline-left { background: var(--surface); }
.file-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.mini b { font: 900 24px/29px var(--font); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.mini-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.mini-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mini-list b { font: 800 16px/24px var(--font); letter-spacing: 0; }
.mini .bar { margin-top: 8px; background: var(--surface-sunken); }
.brief { display: flex; flex-direction: column; gap: 20px; }
.brief-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.brief-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.brief-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
.days { display: flex; flex-direction: column; gap: 20px; }
.day { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; }
.day-head { display: flex; flex-direction: column; padding-top: 12px; }
.day-head b { font: 800 14px/21px var(--font); }
.day-head.is-today b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--ink); }
.plan-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.plan-state { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--r-sm); box-shadow: inset 0 0 0 2px var(--gray-400); color: var(--on-coach); }
.plan-row.is-done .plan-state { background: var(--ink); box-shadow: none; }
.plan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-title { font: 800 14px/21px var(--font); }
.plan-row.is-done .plan-title { text-decoration: line-through; color: var(--ink-muted); }
.plan-side { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.plan-row .tag { background: var(--surface-raised); }
.trend-wrap { padding: 8px 0; }
.trend { width: 100%; height: auto; overflow: visible; }
.trend-grid { stroke: var(--border); stroke-width: 1; }
.trend-line { stroke: var(--level-accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-dot { fill: var(--surface-raised); stroke: var(--level-accent); stroke-width: 3; }
.trend-dot.is-last { fill: var(--level-accent); }
.trend-val { font: 800 14px/1 var(--font); fill: var(--ink); font-variant-numeric: tabular-nums; }
.trend-day { font: 500 12px/1 var(--font); fill: var(--ink-muted); font-variant-numeric: tabular-nums; }
.daybars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; }
.daybar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.daybar-col { width: 100%; height: 96px; display: flex; align-items: flex-end; border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.daybar-col i { display: block; width: 100%; min-height: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--level-accent); }
.daybar-lbl { font: 500 12px/18px var(--font); color: var(--ink-muted); }
.daybar.is-today .daybar-lbl { font-weight: 800; color: var(--ink); }
.memory { display: flex; flex-direction: column; gap: 20px; }
.memory-group { display: flex; flex-direction: column; gap: 8px; }
.memory-list { display: flex; flex-direction: column; gap: 8px; }
.memory-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); font: 500 14px/21px var(--font); }
.memory-list li.is-open { box-shadow: inset 0 0 0 2px var(--ink); }
.memory-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- room ---------- */
body[data-room="live"] { height: 100dvh; overflow: hidden; }
body[data-room="live"] main { min-height: 0; }
.room-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pre { padding-top: 16px; }
.pre-card { gap: 12px; }
.pre-when { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pre-when > div { display: flex; flex-direction: column; gap: 4px; }
.room { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 1640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.room-tabs { align-self: stretch; }
.room-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tab-badge { min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--r-pill); background: var(--coach-surface); color: var(--on-coach); font: 800 12px/20px var(--font); text-align: center; }
/* The call stage: the student's tile, live captions under it, the full transcript as a panel over both. */
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--r-xl); background: var(--surface-raised); overflow: hidden; }
.tile { position: relative; flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); }
.stage-top { grid-column: 4; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: breathe 1.6s infinite; }
.is-prova .live-dot i { background: var(--ink); animation: none; }
.timer { font: 800 18px/22px var(--font); }
.portrait { grid-row: 1 / span 2; position: relative; flex: none; display: grid; place-items: center; }
.portrait .avatar-xl { width: 56px; height: 56px; position: relative; }
.portrait-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); opacity: 0; }
.stage.is-speaking .portrait-ring { animation: ripple 1.6s ease-out infinite; }
.stage.is-speaking .portrait-ring-2 { animation-delay: .8s; }
.stage.is-speaking .portrait .avatar { outline: 2px solid var(--ink); outline-offset: 2px; }
@keyframes ripple { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.32); } }
.tile-id { grid-column: 2; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-id .h3 { font-size: 18px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mood { padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-raised); font: 800 12px/18px var(--font); white-space: nowrap; }
.tile-state { grid-column: 2; display: flex; align-items: center; gap: 8px; min-height: 18px; font: 800 12px/18px var(--font); color: var(--ink-muted); white-space: nowrap; }
.stage.is-speaking .tile-state, .stage.is-thinking .tile-state { color: var(--ink); }
.wave { flex: none; display: none; align-items: center; justify-content: center; gap: 4px; width: 36px; height: 16px; }
.stage.is-speaking .wave, .stage.is-thinking .wave { display: flex; }
.wave i { width: 4px; height: 4px; border-radius: var(--r-pill); background: var(--gray-300); }
.stage.is-speaking .wave i { background: var(--ink); animation: wave 1s ease-in-out infinite; }
.stage.is-thinking .wave i { background: var(--ink); animation: bounce 1.2s ease-in-out infinite; }
.wave i:nth-child(2), .wave i:nth-child(4) { animation-delay: .15s !important; }
.wave i:nth-child(3) { animation-delay: .3s !important; }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.self { display: none; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: var(--r-pill); background: var(--surface-raised); }
.avatar-self { width: 40px; height: 40px; background: var(--surface); }
.self-text { display: flex; flex-direction: column; min-width: 88px; }
.self-text b { font: 800 14px/20px var(--font); }
.self-state { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/18px var(--font); color: var(--ink-muted); white-space: nowrap; }
.self-state.is-muted { font-weight: 800; color: var(--danger); }
.meter { display: flex; align-items: flex-end; gap: 4px; height: 24px; }
.meter i { width: 4px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.meter i:nth-child(1) { height: 8px; } .meter i:nth-child(2) { height: 12px; } .meter i:nth-child(3) { height: 16px; }
.meter i:nth-child(4) { height: 20px; } .meter i:nth-child(5) { height: 24px; }
.meter i.is-on { background: var(--ink); }
.self.is-speaking .meter i { background: var(--ink); transform-origin: bottom; animation: meter 1s ease-in-out infinite; }
.self.is-speaking .meter i:nth-child(2) { animation-delay: .1s; } .self.is-speaking .meter i:nth-child(3) { animation-delay: .2s; }
.self.is-speaking .meter i:nth-child(4) { animation-delay: .3s; } .self.is-speaking .meter i:nth-child(5) { animation-delay: .4s; }
@keyframes meter { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
/* Captions: the last utterance large, the one before it readable, earlier ones fading out at the top. */
.caps-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 8px 4px; }
.caps { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 48px); mask-image: linear-gradient(to bottom, transparent, #000 48px); }
.cap { flex: none; display: flex; flex-direction: column; max-width: 920px; }
.cap-who { font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.cap p { font: 500 16px/24px var(--font); color: var(--ink-muted); overflow-wrap: anywhere; }
.cap:nth-last-child(-n+2) p { color: var(--ink); }
.cap:last-child p { font-size: 18px; line-height: 27px; }
.cap.is-pending p { opacity: .6; }
.interim { flex: none; display: flex; align-items: center; gap: 8px; min-height: 24px; font: 500 14px/24px var(--font); color: var(--ink-muted); }
.script { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--surface-raised); }
.script-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 20px; }
.script-head .icon-btn { background: var(--surface); }
.script-head .icon-btn:hover { background: var(--surface-sunken); }
.transcript { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 20px 20px; }
.transcript:focus-visible { outline-offset: -4px; }
.said { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.said-who { display: flex; align-items: baseline; gap: 8px; font: 500 12px/18px var(--font); color: var(--ink-muted); }
.said-who b { font-weight: 800; color: var(--ink); }
.said p { font: 500 16px/24px var(--font); overflow-wrap: anywhere; }
.said-them p { padding: 12px 16px; border-radius: var(--r-sm) var(--r-lg) var(--r-lg) var(--r-lg); background: var(--surface); }
.said.is-pending p { opacity: .6; }
.said.is-failed p, .cap.is-failed p { padding-left: 12px; box-shadow: inset 2px 0 0 var(--danger); }
.said-error { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; font: 500 12px/18px var(--font); color: var(--danger); }
.said-error .link { font-size: 12px; line-height: 18px; color: var(--danger); align-self: auto; }
/* The dock: the typed line (asked for with "Yaz", or the only way without voice) and the call bar. */
.dock { flex: none; display: flex; flex-direction: column; gap: 8px; min-width: 0; container-type: inline-size; }
.voice-note { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-md); background: var(--surface-raised); font: 500 12px/18px var(--font); color: var(--ink-muted); }
.line-form { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 20px; border-radius: var(--r-pill); background: var(--surface-raised); }
.line-form:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.line-input { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: 0; background: transparent; font: 500 16px/24px var(--font); }
.line-input::placeholder { color: var(--gray-500); }
.round-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--coach-surface); color: var(--on-coach); }
.room.no-mic .round-btn { background: var(--brand); color: var(--on-brand); }
.callbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-xl); background: var(--surface-raised); }
/* The one yellow control of the room: the open microphone. Muted, it is a status (word and icon), not an action colour. */
.mic { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; min-width: 184px; padding: 0 24px 0 20px; border: 0; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font: 800 14px/20px var(--font); white-space: nowrap; transition: background-color .15s; }
.mic:hover:not(:disabled) { background: var(--gold-400); }
.mic[aria-pressed="true"], .mic[aria-pressed="true"]:hover:not(:disabled) { background: var(--danger-surface); color: var(--danger); }
.mic:disabled { background: var(--gray-200); color: var(--gray-600); }
.cb { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; padding: 0; border: 0; background: none; font: 800 12px/18px var(--font); color: var(--ink); white-space: nowrap; }
.cb-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); transition: background-color .15s; }
.cb:hover .cb-ico { background: var(--surface-sunken); }
.cb[aria-pressed="true"] .cb-ico { background: var(--surface-sunken); box-shadow: inset 0 0 0 2px var(--ink); }
.cb:focus-visible { outline: none; }
.cb:focus-visible .cb-ico { outline: 2px solid var(--ink); outline-offset: 2px; }
.cb-short { display: none; }
@container (max-width: 859px) {
  .callbar { gap: 4px; padding: 8px; justify-content: space-between; }
  .callbar .grow { display: none; }
  .mic { width: 56px; min-width: 56px; padding: 0; }
  .cb { min-width: 44px; }
  .mic-word, .cb-text, .cb-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cb-short { display: inline; }
  .cb-wide { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
  .cb-end { min-height: 44px; padding: 8px 16px; }
}
@container (max-width: 559px) {
  .cb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.veil { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: rgb(246 246 246 / .94); font: 800 18px/22px var(--font); }

.copilot { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--coach-surface); color: var(--on-coach); overflow: hidden; }
.cp-head { padding: 16px 20px; box-shadow: inset 0 -1px 0 var(--gray-900); flex-wrap: wrap; row-gap: 8px; }
.cp-status { flex: 1 0 100%; display: flex; align-items: center; gap: 4px; min-height: 18px; overflow: hidden; font: 500 12px/18px var(--font); color: var(--gray-200); white-space: nowrap; }
.cp-status i { flex: none; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: var(--gray-400); }
.cp-status[data-state="busy"] i { background: var(--brand); animation: breathe 1.2s infinite; }
.cp-status[data-state="fresh"] i { background: var(--on-coach); }
.cp-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; padding: 20px; scrollbar-width: thin; scrollbar-color: var(--gray-700) transparent; }
.cp-progress { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cp-pips { display: flex; gap: 4px; }
.cp-pips i { width: 12px; height: 4px; border-radius: var(--r-pill); background: var(--gray-600); transition: background-color .3s; }
.cp-pips i.is-done { background: var(--on-coach); }
.cp-pips i.is-active { background: var(--brand); }
.cp-head-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cp-head-text b { font: 800 16px/24px var(--font); }
.cp-private { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font: 800 12px/18px var(--font); color: var(--brand); }
.cp-sec { display: flex; flex-direction: column; gap: 12px; }
.cp-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.cp-count { font: 800 12px/18px var(--font); color: var(--gray-200); }
.cp-empty { font: 500 14px/21px var(--font); color: var(--gray-300); }
.hints { display: flex; flex-direction: column; gap: 8px; }
.hint { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: var(--r-md); background: var(--gray-900); }
.hint-kind { display: inline-flex; align-items: center; gap: 4px; font: 800 12px/18px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray-200); }
.hint-uyari .hint-kind { color: var(--brand); }
.hint p { font: 500 16px/24px var(--font); }
.chip-status { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 4px 12px 4px 8px; border-radius: var(--r-pill); font: 800 12px/18px var(--font); white-space: nowrap; }
.chip-success { background: var(--success-surface); color: var(--success); }
.chip-danger { background: var(--danger-surface); color: var(--danger); }
.acts { display: flex; flex-direction: column; gap: 8px; }
.act { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r-lg); background: var(--gray-900); }
.act.is-new { animation: slide-in .32s ease-out both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.act[data-status="proposed"] { box-shadow: inset 0 0 0 1px var(--gray-600); }
.act-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act-amount { padding: 4px 12px; border-radius: var(--r-pill); background: var(--gray-800); font: 800 12px/18px var(--font); white-space: nowrap; }
.act-title { font: 800 18px/22px var(--font); }
.act-detail { font: 500 14px/21px var(--font); color: var(--gray-200); }
.act-days { display: flex; flex-wrap: wrap; gap: 4px; }
.act-day { min-width: 40px; padding: 4px 8px; border: 0; border-radius: var(--r-sm); background: var(--gray-800); color: var(--on-coach); font: 800 12px/18px var(--font); text-align: center; }
.act-day-btn[aria-pressed="false"] { background: none; box-shadow: inset 0 0 0 1px var(--gray-600); color: var(--gray-300); }
.act-day-btn[aria-pressed="true"] { background: var(--on-coach); color: var(--ink); }
.act-quote { font: 500 12px/18px var(--font); color: var(--gray-300); }
.act-error { display: flex; align-items: center; gap: 4px; align-self: flex-start; padding: 4px 12px 4px 8px; border-radius: var(--r-md); background: var(--danger-surface); color: var(--danger); font: 800 12px/18px var(--font); }
.act-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.copilot .btn-text { color: var(--gray-200); }
.act-done { display: flex; flex-direction: column; gap: 8px; }
.act-meta { font: 500 12px/18px var(--font); color: var(--gray-200); }
.act-meta:empty { display: none; }
.act-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--on-coach); font: 800 12px/18px var(--font); text-underline-offset: 2px; }
.act[data-status="dismissed"] { padding: 8px 16px; background: none; box-shadow: inset 0 0 0 1px var(--gray-800); }
.act-off { display: flex; align-items: center; gap: 8px; font: 500 12px/18px var(--font); color: var(--gray-300); }
.act-edit { display: flex; flex-direction: column; gap: 12px; }
.cp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font: 500 12px/18px var(--font); color: var(--gray-200); }
.cp-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cp-input { width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: var(--gray-800); color: var(--on-coach); font: 500 16px/24px var(--font); }
.route { display: flex; flex-direction: column; }
.route li { position: relative; }
.route { gap: 4px; }
.route li + li::before { content: ""; position: absolute; left: 19px; top: -24px; width: 2px; height: 28px; background: var(--gray-700); }
.is-active > .route-step { padding-top: 8px; padding-bottom: 8px; }
.route li.is-done + li::before { background: var(--gray-300); }
.route-step { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 4px 8px; border: 0; border-radius: var(--r-md); background: none; color: var(--on-coach); text-align: left; }
.route-step:hover { background: var(--gray-900); }
.route-node { position: relative; z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--coach-surface); box-shadow: inset 0 0 0 2px var(--gray-500); color: var(--ink); }
.route-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.route-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 800 14px/24px var(--font); }
.route-sub { font: 500 12px/18px var(--font); color: var(--gray-300); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-now { padding: 0 8px; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font: 800 12px/18px var(--font); }
.is-active > .route-step { background: var(--gray-900); }
.is-active .route-node { box-shadow: inset 0 0 0 2px var(--brand); }
.is-active .route-node::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.is-active .route-sub { color: var(--on-coach); font-size: 14px; line-height: 21px; white-space: normal; }
.is-done .route-node { background: var(--on-coach); box-shadow: none; }
.is-done .route-title > span:first-child { text-decoration: line-through; color: var(--gray-300); }
.share-bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--gray-600); overflow: hidden; }
.share-bar i { display: block; width: 0; height: 100%; background: var(--on-coach); transition: width .3s; }
.share-bar-light { background: var(--surface-sunken); }
.share-bar-light i { background: var(--ink); }
.copilot .meta { color: var(--gray-200); }

@media (max-width: 1099px) {
  body[data-room="live"] .top-home { display: none; }
}
@media (max-width: 899px) {
  .room[data-tab="talk"] .copilot { display: none; }
  .room[data-tab="copilot"] .stage { display: none; }
}
/* From 900 px the call and the coach's panel sit side by side; the call bar stays under the call. */
@media (min-width: 900px) {
  .room { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage copilot" "dock copilot"; gap: 12px 16px; }
  .room-tabs { display: none; }
  .stage { grid-area: stage; }
  .dock { grid-area: dock; }
  .copilot { grid-area: copilot; }
  .self { display: flex; grid-column: 3; grid-row: 1 / span 2; }
  .caps-wrap { padding: 0 12px 4px; }
  .cap p { font-size: 18px; line-height: 27px; }
  .cap:last-child p { font-size: 24px; line-height: 32px; }
}
@media (min-width: 1100px) {
  .room { gap: 16px 24px; padding: 0 var(--gutter) 24px; }
  .stage { gap: 16px; padding: 16px; }
}
/* Room to spare: the student's tile becomes the hero of the stage, the coach's own tile sits in its corner. */
@media (min-width: 1100px) and (min-height: 700px), (min-width: 600px) and (min-height: 900px) {
  .tile { flex: 5 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
  .stage-top { position: absolute; left: 20px; top: 16px; flex-direction: row; align-items: center; gap: 12px; }
  .self { display: flex; position: absolute; right: 16px; bottom: 16px; }
  .portrait { padding: 12px; }
  .portrait .avatar-xl { width: 120px; height: 120px; }
  .portrait-ring { inset: 12px; }
  .tile-id { align-items: center; gap: 8px; }
  .tile-id .h3 { font-size: 24px; line-height: 29px; white-space: normal; }
  .tile-tags { justify-content: center; }
  .tile-tags .badge { align-self: center; }
  .tile-state { font-size: 14px; line-height: 20px; min-height: 20px; }
  .caps-wrap { flex: 4 1 0; }
}
@media (min-width: 1100px) and (min-height: 860px), (min-width: 600px) and (min-height: 1000px) {
  .portrait .avatar-xl { width: 144px; height: 144px; }
}
@media (min-width: 1100px) and (max-width: 1339px) {
  .room { grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
}
@media (min-width: 1600px) {
  .room { grid-template-columns: minmax(0, 1fr) 440px; }
}

/* ---------- summary ---------- */
.sum-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 8px; }
.sum-top > div:first-child { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sum-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.next-planned { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface-raised); font: 500 14px/20px var(--font); }
.next-planned b { font-weight: 800; white-space: nowrap; }
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.score { display: flex; align-items: center; gap: 24px; }
.score .ring-fill { stroke: var(--ink); }
.score-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step-scores { display: flex; flex-direction: column; gap: 8px; }
.step-scores li { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); }
.step-score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: 500 14px/21px var(--font); }
.step-score-top b { font-weight: 800; }
.step-score-top .meta { flex: none; white-space: nowrap; }
.pips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pips i { height: 4px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.pips i.is-on { background: var(--ink); }
.share { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.for-student { box-shadow: inset 0 0 0 2px var(--surface-sunken); }
.coach-note { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-sm); background: var(--coach-surface); color: var(--on-coach); }
.coach-note-who { display: inline-flex; align-items: center; gap: 8px; }
.coach-note .label { color: var(--gray-300); }
.coach-note p { font: 500 16px/24px var(--font); }
.coach-note b { color: var(--brand); }

/* ---------- prova ---------- */
.scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scenario { position: relative; flex-direction: row; align-items: flex-start; gap: 16px; padding: 20px; cursor: pointer; }
.scenario:hover { box-shadow: inset 0 0 0 1px var(--gray-300); }
.scenario:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.scenario:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.scenario-radio { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--gray-400); color: transparent; }
.scenario:has(input:checked) .scenario-radio { background: var(--ink); box-shadow: none; color: var(--on-coach); }
.scenario-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.scenario-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.scenario-meta .meta:not(.muted) { font-weight: 800; }
.difficulty { display: inline-flex; align-items: flex-end; gap: 4px; height: 16px; }
.difficulty i { width: 4px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.difficulty i:nth-child(1) { height: 8px; } .difficulty i:nth-child(2) { height: 12px; } .difficulty i:nth-child(3) { height: 16px; }
.difficulty i.is-on { background: var(--ink); }
.prova-cta { display: flex; justify-content: flex-end; }

/* ---------- student panel ---------- */
.next { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.next-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.next-text .h3 { margin-top: 4px; }
.next-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.next > div[hidden] + *, .next > .status { flex-basis: 100%; }
.next > div:last-child:not(.next-actions) { flex-basis: 100%; }
.countdown { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font: 800 12px/18px var(--font); }
.todo-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.todo { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--r-md); background: var(--surface-raised); min-width: 0; }
.todo-flat { background: var(--surface); padding: 12px 16px; }
.todo-list-flat { gap: 8px; }
.todo.is-saving { opacity: .7; }
.todo-box { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; box-shadow: inset 0 0 0 2px var(--gray-500); color: var(--surface-raised); }
.todo-box::before { content: ""; position: absolute; width: 44px; height: 44px; }
.todo-box { position: relative; }
.todo.is-done .todo-box { background: var(--ink); box-shadow: none; }
.todo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.todo-title { font: 800 16px/24px var(--font); }
.todo-flat .todo-title { font-size: 14px; line-height: 21px; }
.todo.is-done .todo-title { text-decoration: line-through; color: var(--ink-muted); }
.todo-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 8px; max-width: 320px; }
.todo-side { flex: none; display: flex; align-items: center; gap: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface); }
.todo-flat .stepper { background: var(--surface-raised); }
.stepper button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-raised); }
.todo-flat .stepper button { background: var(--surface); }
.stepper button:disabled { color: var(--gray-300); }
.stepper span { min-width: 32px; text-align: center; font: 800 14px/20px var(--font); }
.sum-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sum-card { gap: 8px; padding: 20px; }
.sum-card:hover { box-shadow: inset 0 0 0 1px var(--gray-300); }
.sum-card .row-go { margin-top: 4px; }

/* ---------- onboarding ---------- */
.ob { max-width: 640px; gap: 40px; padding-top: 8px; }
.ob-top { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; }
.ob-top .meta { text-align: right; }
.ob-bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; }
.ob-bar i { display: block; height: 100%; width: 0; border-radius: var(--r-pill); background: var(--ink); transition: width .3s ease; }
.ob-form { display: flex; flex-direction: column; gap: 24px; animation: step-in .28s ease-out both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ob-head { display: flex; flex-direction: column; gap: 12px; }
.ob-head h1 { text-wrap: balance; }
.ob-head h1:focus { outline: none; }
.ob-form > .btn { align-self: flex-start; }
.ob-inter { padding-top: 24px; }
.ob-inter > .badge { align-self: flex-start; }
.ob-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: var(--r-lg); background: var(--surface-raised); }
.choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 16px 20px; border: 0; border-radius: var(--r-lg); background: var(--surface-raised); text-align: left; transition: box-shadow .15s; }
.choice:hover { box-shadow: inset 0 0 0 1px var(--gray-400); }
.choice.is-picked { box-shadow: inset 0 0 0 2px var(--ink); }
.choice-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice b { font: 800 18px/22px var(--font); }
.choice > .ico { color: var(--gray-400); }
.consent { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px 20px; border-radius: var(--r-lg); background: var(--surface-raised); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 24px; height: 24px; left: 20px; top: 16px; margin: 0; }
.consent-box { width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--r-sm); box-shadow: inset 0 0 0 2px var(--gray-500); color: transparent; }
.consent input:checked + .consent-box { background: var(--ink); box-shadow: none; color: var(--on-coach); }
.consent input:focus-visible + .consent-box { outline: 2px solid var(--ink); outline-offset: 2px; }
.ob-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.done-card { flex-direction: row; align-items: center; gap: 20px; }
.done-card > div { display: flex; flex-direction: column; gap: 4px; }
.done-ico { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface); }

/* ---------- responsive ---------- */
@media (max-width: 1099px) {
  .file-grid, .sum-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  :root { --gutter: 16px; }
  .top { gap: 8px; min-height: 60px; }
  .top-home { display: none; }
  .logo img { height: 28px; }
  .role { flex: 1; justify-content: flex-end; }
  .h1 { font-size: 36px; line-height: 43px; }
  .h2 { font-size: 24px; line-height: 29px; letter-spacing: 0; font-weight: 800; }
  .doors { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .landing { gap: 24px; padding-top: 16px; }
  .card { padding: 20px; }
  .file-top { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .assistant { max-height: 640px; }
}
@media (max-width: 699px) {
  .select { max-width: 132px; padding-left: 12px; padding-right: 40px; background-position: right 8px center; }
  .seg button { padding: 8px 12px; }
  .session { flex-wrap: wrap; gap: 12px 16px; padding: 16px; }
  .session-time { width: auto; flex-direction: row; align-items: baseline; gap: 8px; flex-basis: 100%; }
  .session-who { flex-basis: 100%; }
  .session-cta { flex: 1 1 100%; justify-content: space-between; }
  .cal { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .cal-day { flex-direction: row; align-items: flex-start; min-height: 0; padding: 12px; gap: 12px; }
  .cal-head { flex: none; width: 56px; padding: 0; }
  .cal-list { flex: 1; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cal-chip { width: auto; min-width: 88px; }
  .student { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .student-level, .student-meta { justify-content: flex-start; }
  .two, .brief-groups, .scenarios, .sum-cards, .choices-2 { grid-template-columns: minmax(0, 1fr); }
  .minis { grid-template-columns: minmax(0, 1fr); }
  .day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .day-head { flex-direction: row; align-items: baseline; gap: 8px; padding-top: 0; }
  .add-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-form .field-wide { grid-column: 1 / -1; }
  .plan-row { flex-wrap: wrap; }
  .plan-side { flex-basis: 100%; justify-content: flex-start; padding-left: 40px; }
  .todo { flex-wrap: wrap; }
  .todo-side { flex-basis: 100%; padding-left: 40px; }
  .todo-side:has(> .tag:only-child) { display: none; }
  .table th, .table td { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
  .score { flex-direction: column; align-items: flex-start; }
  .next-actions { width: 100%; }
  .sum-cta { width: 100%; }
  .sum-cta .btn, .prova-cta .btn, .ob-form > .btn, .ob-submit .btn { flex: 1 1 auto; align-self: stretch; }
  .ob { gap: 24px; }
  .memory-list li { flex-direction: column; gap: 8px; }
  .memory-meta { flex-direction: row; align-items: center; gap: 12px; }
  .dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
