/* Virtual Coach · Customer Success demo.
   Structure and components follow the original coach; the palette is a high-tech one:
   deep ink navy, electric indigo, violet and a mint signal colour. Logical properties
   throughout, so the same sheet serves Hebrew (RTL) and English (LTR). */
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/heebo-hebrew-wght-normal.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/heebo-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --primary: #0d1230; --primary-light: #3346d3; --violet: #6d5efc; --mint: #2dd4bf; --cyan: #06b6d4;
  --accent: #6d5efc; --bg: #f3f5fc; --card: #ffffff; --text: #0d1230; --muted: #59618a; --line: #e2e6f3;
  --ok: #0f9d58; --ok-bg: #e5f6ec; --err: #c62845; --err-bg: #fdebee; --warn: #b26a00; --warn-bg: #fff4dd;
  --friendly: #e08a00; --structured: #0891b2; --academic: #7c3aed;
  --radius: 14px; --shadow: 0 2px 14px rgba(13, 18, 48, .09);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Heebo", system-ui, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; min-height: 100vh; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.3; }

header.top { background: linear-gradient(120deg, #0a0e27 0%, #1a2468 52%, #4f3fd9 100%); color: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; position: sticky; inset-block-start: 0; z-index: 50; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; color: #fff; text-align: start; padding: 2px; }
.brand-mark { flex: none; inline-size: 34px; block-size: 34px; border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); display: grid; place-items: center; }
.brand-mark svg { inline-size: 20px; block-size: 20px; }
.brand h1 { font-size: 1.1rem; font-weight: 700; }
.brand .sub { font-size: .76rem; opacity: .82; display: block; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { padding: 6px 13px; border-radius: 20px; font-size: .8rem; font-weight: 600; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); color: #fff; transition: .2s; }
.pill:hover { background: rgba(255, 255, 255, .24); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; opacity: .9; }
.status i { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(45, 212, 191, .25); }
.status.off i { background: #f5b942; box-shadow: none; }
.switch { display: flex; gap: 4px; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .32); border-radius: 24px; padding: 4px 5px; }
.switch button { border: none; background: transparent; color: #fff; font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 18px; opacity: .78; transition: .2s; }
.switch button:hover { opacity: 1; background: rgba(255, 255, 255, .15); }
.switch button.on { background: #fff; color: var(--primary); opacity: 1; }
@media (max-width: 640px) { header.top { padding: 9px 12px; position: static; } .brand h1 { font-size: .95rem; } .brand .sub { display: none; } }

main { max-width: 960px; margin: 0 auto; padding: 24px 16px 96px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-block-end: 18px; }
.card > h3 { color: var(--primary); font-size: 1.2rem; margin-block-end: 12px; padding-block-end: 8px; border-block-end: 2px solid #eef1fa; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* welcome */
.hero { background: linear-gradient(135deg, #0d1230 0%, #1d2a78 60%, #5546e0 100%); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px; margin-block-end: 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h2 { font-size: 1.65rem; font-weight: 800; margin-block-end: 8px; }
.hero p { max-inline-size: 64ch; opacity: .92; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-block-start: 22px; }
.action { text-align: start; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .26); border-radius: 12px; padding: 16px; color: #fff; display: grid; gap: 4px; transition: .2s; }
.action:hover { background: rgba(255, 255, 255, .18); transform: translateY(-3px); }
.action .ic { inline-size: 38px; block-size: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; margin-block-end: 6px; }
.action .ic svg { inline-size: 22px; block-size: 22px; }
.action strong { font-size: 1.05rem; }
.action span { font-size: .87rem; opacity: .9; }
.inside { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.inside-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.num { inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.inside-item h4 { font-size: .98rem; }
.inside-item p { grid-column: 2; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.styles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-block-start: 14px; }
.style-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 20px 18px; text-align: start; background: #fbfcff; transition: .2s; display: grid; gap: 6px; }
.style-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.style-card h3 { font-size: 1.08rem; }
.style-card p { font-size: .86rem; color: var(--muted); }
.style-card.friendly { border-color: var(--friendly); } .style-card.friendly h3 { color: var(--friendly); }
.style-card.structured { border-color: var(--structured); } .style-card.structured h3 { color: var(--structured); }
.style-card.academic { border-color: var(--academic); } .style-card.academic h3 { color: var(--academic); }
.style-card.on { box-shadow: 0 0 0 3px rgba(109, 94, 252, .25); background: #fff; }
.sample { margin-block-start: 18px; border: 1px dashed #c9cff0; border-radius: 12px; padding: 16px; background: #f8f9ff; }
.sample > .label { font-weight: 700; font-size: .9rem; margin-block-end: 8px; }
.start-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-block-start: 14px; }

/* units */
.units-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-block-end: 16px; }
.unit-btn { flex: 1; min-inline-size: 150px; padding: 10px 12px; border-radius: 10px; border: 2px solid #dbe0f2; background: #fff; font-size: .86rem; font-weight: 600; transition: .2s; text-align: center; }
.unit-btn:hover { border-color: var(--primary-light); }
.unit-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs { display: flex; gap: 6px; margin-block-end: 16px; border-block-end: 2px solid var(--line); }
.tab { border: 0; background: none; padding: 9px 16px; font-weight: 600; color: var(--muted); border-block-end: 3px solid transparent; margin-block-end: -2px; }
.tab.on { color: var(--primary-light); border-block-end-color: var(--violet); }
.core-list { list-style: none; margin: 8px 0; }
.core-list li { padding-block: 7px; padding-inline: 26px 6px; position: relative; }
.core-list li::before { content: ""; position: absolute; inset-inline-start: 6px; inset-block-start: 17px; inline-size: 8px; block-size: 8px; border-radius: 2px; background: var(--violet); transform: rotate(45deg); }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.example-box { background: #ecf8fb; border-radius: 10px; padding: 13px 15px; font-size: .92rem; border-inline-start: 4px solid var(--structured); }
.story-block { background: #fff6e6; border-inline-start: 4px solid var(--friendly); border-radius: 10px; padding: 15px 18px; margin: 12px 0; }
.story-block .who, .challenge-box .who { font-weight: 700; display: block; margin-block-end: 4px; font-size: .82rem; letter-spacing: .02em; }
.story-block .who { color: var(--friendly); }
.challenge-box { background: #f4efff; border-inline-start: 4px solid var(--academic); border-radius: 10px; padding: 15px 18px; margin: 12px 0; }
.challenge-box .who { color: var(--academic); }
.note-box { background: #f1f3fb; border-radius: 10px; padding: 10px 14px; font-size: .82rem; color: var(--muted); }
.nav-row { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 20px; flex-wrap: wrap; }

/* quiz */
.quiz-q { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-block-end: 14px; }
.qtext { font-weight: 600; margin-block-end: 10px; }
.lvl { font-size: .7rem; padding: 2px 9px; border-radius: 12px; margin-inline-start: 8px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.lvl.e { background: var(--ok-bg); color: var(--ok); } .lvl.m { background: var(--warn-bg); color: var(--warn); } .lvl.h { background: var(--err-bg); color: var(--err); }
.opt { display: block; inline-size: 100%; text-align: start; padding: 10px 14px; margin: 6px 0; border-radius: 9px; border: 1.5px solid #dbe0f2; background: #fbfcff; font-size: .93rem; transition: .15s; }
.opt:not(:disabled):hover { border-color: var(--primary-light); background: #eef1ff; }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); font-weight: 600; }
.opt.wrong { border-color: var(--err); background: var(--err-bg); }
.opt.sel { border-color: var(--violet); background: #efedff; font-weight: 600; }
.explain { margin-block-start: 10px; padding: 10px 14px; border-radius: 9px; background: #eef1ff; font-size: .9rem; }
.explain b { margin-inline-end: 6px; }
textarea { inline-size: 100%; border: 1.5px solid #cfd5ee; border-radius: 10px; padding: 11px 13px; font-size: .95rem; resize: vertical; line-height: 1.6; background: #fff; }
.task { background: #f8f9ff; border-radius: 10px; padding: 12px 15px; margin-block-end: 12px; font-size: .96rem; }
.fb { margin-block-start: 14px; border-radius: 12px; background: #f3f1ff; border-inline-start: 4px solid var(--violet); padding: 16px 18px; display: grid; gap: 10px; }
.fb h4 { font-size: .86rem; color: var(--primary-light); }
.fb ul { list-style: none; display: grid; gap: 4px; }
.fb li { padding-inline-start: 18px; position: relative; }
.fb li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: .7em; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--violet); }
.fb .good li::before { background: var(--ok); }
.fb .quote { background: #fff; border-radius: 9px; padding: 10px 13px; font-size: .95rem; }
.scoreline { font-weight: 800; font-size: 1.05rem; }
.err-box { background: var(--warn-bg); color: var(--warn); border-radius: 9px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; margin-block-start: 10px; }

/* buttons */
.btn { display: inline-block; border: none; border-radius: 10px; padding: 11px 24px; background: var(--primary); color: #fff; font-weight: 600; font-size: .95rem; transition: .2s; }
.btn:hover { background: #1c2a7a; }
.btn.ghost { background: #fff; color: var(--primary); border: 2px solid var(--primary); padding: 9px 22px; }
.btn.accent { background: linear-gradient(120deg, var(--primary-light), var(--violet)); }
.btn.accent:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; }

/* chat and simulation */
.sim-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 16px 0; }
.sim-case { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 18px; text-align: start; transition: .2s; display: grid; gap: 6px; }
.sim-case:hover { border-color: var(--violet); transform: translateY(-3px); }
.sim-case h4 { color: var(--primary); }
.sim-case .role { font-size: .8rem; color: var(--muted); }
.sim-case p { font-size: .87rem; }
.tag { justify-self: start; display: inline-block; font-size: .72rem; font-weight: 600; background: #efedff; color: var(--violet); border-radius: 10px; padding: 2px 10px; }
.rubric { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.rubric div { background: #f8f9ff; border-radius: 10px; padding: 10px 13px; font-size: .86rem; }
.rubric b { display: block; color: var(--primary-light); }
.chat-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; margin-block-end: 18px; }
.chat-head { background: var(--primary); color: #fff; padding: 12px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.who-line { display: flex; align-items: center; gap: 10px; }
.avatar { flex: none; inline-size: 38px; block-size: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--cyan)); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.who-line small { display: block; font-weight: 400; opacity: .8; font-size: .76rem; }
.mood { font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 10px; background: rgba(255,255,255,.14); }
.mood.open { background: rgba(45, 212, 191, .28); } .mood.guarded { background: rgba(245, 185, 66, .32); }
.chat-msgs { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #f6f8fe; min-block-size: 240px; max-block-size: 54vh; }
.msg { max-inline-size: 82%; padding: 11px 15px; border-radius: 14px; font-size: .95rem; white-space: pre-wrap; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-end-start-radius: 4px; }
.msg.user { background: var(--primary-light); color: #fff; align-self: flex-end; border-end-end-radius: 4px; }
.msg.sysinfo { background: #fff9e8; border: 1px solid #f0dfa5; align-self: center; font-size: .85rem; max-inline-size: 96%; }
.msg.note { background: #e9f7f4; border: 1px solid #b9e5db; align-self: center; font-size: .85rem; max-inline-size: 96%; }
.msg .src { display: block; margin-block-start: 8px; font-size: .75rem; color: var(--muted); border-block-start: 1px dashed var(--line); padding-block-start: 6px; }
.decision-bar { padding: 10px 12px; border-block-start: 1px dashed var(--line); background: #fbfbff; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .86rem; }
.decision-bar button { border: 1.5px solid var(--violet); background: #fff; color: var(--violet); border-radius: 9px; padding: 6px 14px; font-weight: 600; font-size: .86rem; }
.decision-bar button:hover { background: var(--violet); color: #fff; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-block-start: 1px solid var(--line); background: #fff; }
.chat-input textarea { flex: 1; resize: none; block-size: 54px; }
.chat-input button { border: none; border-radius: 10px; padding: 0 22px; background: var(--primary); color: #fff; font-weight: 600; }
.chat-input button:disabled { opacity: .5; }
.crit { display: grid; gap: 8px; }
.crit-row { display: grid; grid-template-columns: minmax(130px, auto) auto 1fr; gap: 10px; align-items: baseline; background: #fff; border-radius: 9px; padding: 9px 12px; }
@media (max-width: 640px) { .crit-row { grid-template-columns: 1fr auto; } .crit-row p { grid-column: 1 / -1; } }
.crit-row b { font-size: .9rem; }
.crit-row p { font-size: .9rem; }
.chip { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.chip.strong, .chip.good { background: var(--ok-bg); color: var(--ok); } .chip.partial, .chip.mid { background: var(--warn-bg); color: var(--warn); } .chip.missing, .chip.bad { background: var(--err-bg); color: var(--err); }
.chip.none { background: #eef0f8; color: var(--muted); }
.after { background: var(--primary); color: #fff; border-radius: 12px; padding: 16px 18px; }
.after h4 { color: #b9c1ff; font-size: .82rem; margin-block-end: 6px; }
.after p { font-size: 1.05rem; line-height: 1.55; }

/* floating coach */
.fab { position: fixed; inset-block-end: 22px; inset-inline-start: 22px; z-index: 60; border: 0; border-radius: 28px; padding: 13px 22px; background: linear-gradient(120deg, var(--primary-light), var(--violet)); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(51, 70, 211, .38); }
.overlay { position: fixed; inset: 0; background: rgba(9, 12, 34, .55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); inline-size: min(720px, 100%); max-block-size: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { inline-size: min(880px, 100%); }
.modal-body { padding: 22px; overflow-y: auto; }

/* test and report */
.timer { font-weight: 800; font-variant-numeric: tabular-nums; }
.result { font-size: 1.6rem; font-weight: 800; }
table { inline-size: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9rem; }
th { background: var(--primary); color: #fff; padding: 8px 10px; text-align: start; }
td { padding: 8px 10px; border-block-end: 1px solid var(--line); }
tr:nth-child(even) td { background: #f8f9fe; }
.table-wrap { overflow-x: auto; }
.rsec { font-weight: 700; margin-block: 18px 6px; color: var(--primary-light); }
.rec { background: #f8f9ff; border-inline-start: 4px solid var(--violet); border-radius: 9px; padding: 9px 13px; margin-block: 6px; font-size: .92rem; }
.foot { text-align: center; padding: 18px 16px 90px; font-size: .8rem; color: var(--muted); display: grid; gap: 4px; }
.foot b { color: var(--text); }
@media print { header.top, .fab, .foot, main, .no-print { display: none !important; } .overlay { position: static; background: none; padding: 0; } .modal { box-shadow: none; max-block-size: none; inline-size: 100%; } .modal-body { overflow: visible; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
