/* BizReady — premium SaaS dashboard styling
   Navy primary, white/light-grey surfaces, teal progress, yellow highlights. */

:root {
  /* BizReady 2.0 — blue / white / yellow, Gen-Z energy, still legible */
  --blue: #0F2A66;
  --blue-600: #1B3D86;
  --blue-700: #091D4A;
  --blue-800: #061633;
  --blue-50: #EDF1FA;
  --sun: #FFC93C;
  --sun-soft: #FFF4CB;
  --cream: #FFFBF0;

  --navy-950: #07122C;
  --navy-900: #0A1733;
  --navy-800: #15224A;
  --navy-700: #23325F;
  --navy-600: #3A4877;
  --ink: #0A1733;
  --muted: #5B6683;
  --muted-2: #8A93AD;
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --line: #E6E9F5;
  --line-strong: #D3D9EC;

  /* legacy names intentionally mapped to blue so older components reskin */
  --teal: #0F2A66;
  --teal-600: #091D4A;
  --teal-50: #EDF1FA;
  --yellow: #FFC93C;
  --yellow-50: #FFF4CB;
  --green: #0E9F6E;
  --red: #D64545;
  --red-50: #FDECEC;

  --shadow-sm: 0 1px 0 rgba(10, 23, 51, .03);
  --shadow: 0 18px 40px -26px rgba(27, 77, 255, .45);
  --shadow-lg: 0 28px 60px -30px rgba(10, 23, 51, .35);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: var(--display); color: var(--navy-900); margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 750; }
h4 { font-size: 14px; font-weight: 750; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--teal-600); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
::selection { background: #CCF0EB; color: var(--navy-900); }
:focus-visible { outline: 3px solid rgba(18, 181, 165, .38); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- shell */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50;
  display: flex; flex-direction: column;
  background: linear-gradient(178deg, #0A2342 0%, #0B2848 55%, #0A2038 100%);
  color: #DCE7F2; padding: 22px 16px 16px;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::after {
  content: ""; position: absolute; right: -80px; top: 20%; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(18, 181, 165, .16), transparent 65%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; position: relative; z-index: 1; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, #16C7B6, #0E9C8F);
  display: grid; place-items: center; color: #062B2A; font-family: var(--display);
  font-weight: 900; font-size: 20px; box-shadow: 0 6px 18px -6px rgba(18, 181, 165, .65);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--display); font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.brand-sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7FA2C4; margin-top: 3px; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: #6E8FB0; margin: 14px 12px 8px; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: #C6D6E6; font-size: 13.5px; font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.nav a svg { color: #8FB0CE; transition: color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 650; }
.nav a.active svg { color: #2BD7C6; }
.nav a.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--teal);
}
.nav .nav-count { margin-left: auto; font-size: 10.5px; background: rgba(18, 181, 165, .2); color: #6FE9DD; padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { margin-top: auto; position: relative; z-index: 1; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 13px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .07); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1B4770; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.side-user .who { min-width: 0; }
.side-user .who b { display: block; font-size: 12.5px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 11px; color: #8FADCA; }
.icon-btn { background: transparent; border: 0; color: #9DB6CE; padding: 7px; border-radius: 8px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-note { font-size: 10.5px; color: #7B96B0; padding: 12px 6px 0; display: flex; gap: 6px; align-items: center; }

.main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 34px;
  background: rgba(243, 246, 249, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.topbar .crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.topbar .crumb b { color: var(--navy-800); font-weight: 650; }
.topbar .spacer { flex: 1; }
.top-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 6px 13px; font-size: 12px; font-weight: 550; color: var(--navy-800); }
.top-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.top-chip.gold { background: var(--yellow-50); border-color: #F3E2A8; color: #775A08; }
.top-chip.gold .dot { background: #D9A400; }
.menu-btn { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--navy-800); }
.view { padding: 30px 34px 64px; max-width: 1460px; width: 100%; }
.backdrop { display: none; }

/* ---------------------------------------------------------------- bits */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 10px 17px; font-size: 13.5px; font-weight: 650;
  border: 1px solid transparent; transition: transform .06s, background .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap; line-height: 1.3;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-900); color: #fff; box-shadow: 0 6px 16px -8px rgba(10, 35, 66, .6); }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-teal { background: var(--teal); color: #04302C; box-shadow: 0 6px 16px -8px rgba(18, 181, 165, .7); }
.btn-teal:hover { background: #16C7B6; color: #04302C; }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--navy-800); }
.btn-outline:hover { border-color: #A9BCCD; background: #FBFCFE; color: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--navy-700); }
.btn-ghost:hover { background: #EAF0F6; color: var(--navy-900); }
.btn-soft { background: var(--teal-50); color: #08665D; border-color: #C8ECE7; }
.btn-soft:hover { background: #D9F4EF; }
.btn-danger { background: var(--red-50); color: #A32B2B; border-color: #F6CFCF; }
.btn-danger:hover { background: #FBDDDD; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-arrow { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-size: 12.5px; color: var(--navy-700); white-space: nowrap; }
.link-arrow:hover { gap: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.card-pad-sm { padding: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head p { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; max-width: 620px; }
.eyebrow { font-size: 10.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-600); margin-bottom: 8px; }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 30px; padding: 4px 10px; font-size: 11.5px; font-weight: 650; background: #EDF2F7; color: #48607A; white-space: nowrap; }
.chip-teal { background: var(--teal-50); color: #08756B; }
.chip-yellow { background: var(--yellow-50); color: #7A5B06; border: 1px solid #F6E6B4; }
.chip-navy { background: #E9EFF6; color: var(--navy-700); }
.chip-red { background: var(--red-50); color: #A32B2B; }
.chip-green { background: #E6F7F0; color: #08724F; }
.chip-grey { background: #F0F3F7; color: #607187; }
.chip-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.bar { height: 7px; border-radius: 10px; background: #E9EFF5; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 10px; background: var(--teal); transition: width .5s ease; }
.bar.navy > span { background: var(--navy-700); }
.bar.yellow > span { background: #E7B62A; }
.bar.slim { height: 5px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto-220 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.auto-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.auto-300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 650; color: var(--navy-900); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 18px 0; }
.icon-tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: #EDF3F8; color: var(--navy-700); }
.icon-tile.teal { background: var(--teal-50); color: #0B8276; }
.icon-tile.yellow { background: var(--yellow-50); color: #9A7308; }
.icon-tile.navy { background: #E9EFF6; color: var(--navy-800); }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: var(--surface); }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 54px 58px;
  background: radial-gradient(1100px 620px at 82% 6%, #174B78 0%, transparent 55%), linear-gradient(155deg, #071A2F 0%, #0A2342 52%, #0C2B4E 100%);
  display: flex; flex-direction: column;
}
.auth-art::before {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07); right: -190px; top: -150px;
}
.auth-art::after {
  content: ""; position: absolute; width: 760px; height: 760px; border-radius: 50%;
  border: 1px solid rgba(18, 181, 165, .14); right: -290px; top: -250px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .brand-name { font-size: 22px; }
.auth-copy { position: relative; z-index: 2; margin: auto 0; max-width: 520px; padding: 50px 0; }
.auth-copy h1 { color: #fff; font-size: clamp(32px, 3.5vw, 50px); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.auth-copy h1 em { font-style: normal; color: #4AD9CA; }
.auth-copy .lead { color: #B9CCDD; font-size: 15.5px; line-height: 1.7; margin: 20px 0 30px; max-width: 440px; }
.auth-flow { display: flex; flex-direction: column; gap: 13px; }
.auth-flow li { list-style: none; display: flex; align-items: center; gap: 13px; font-size: 13.5px; color: #CFDDEA; }
.auth-flow .num { width: 27px; height: 27px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #7FDBD2; background: rgba(18, 181, 165, .08); }
.auth-foot { color: #7895B1; font-size: 11.5px; position: relative; z-index: 2; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 404px; }
.auth-card h2 { font-size: 26px; font-weight: 800; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin: 8px 0 24px; }
.auth-toggle { display: flex; background: #F0F4F8; border-radius: 11px; padding: 3px; margin-bottom: 22px; }
.auth-toggle button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.auth-toggle button.on { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.demo-box { margin-top: 22px; padding: 14px; background: #F8FAFC; border: 1px dashed var(--line-strong); border-radius: 12px; }
.demo-box .row { justify-content: space-between; }
.demo-btn { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; color: var(--navy-700); }
.demo-btn:hover { border-color: var(--teal); color: var(--teal-600); }
.auth-error { background: var(--red-50); color: #9B2C2C; border: 1px solid #F3CACA; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 650; color: var(--navy-800); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  padding: 10px 12px; font-size: 13.5px; color: var(--ink); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 181, 165, .12); outline: none; }
.textarea { resize: vertical; min-height: 94px; line-height: 1.55; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--teal-600); }
.form-note { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- hero/dashboard */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 30px 34px;
  background: radial-gradient(900px 420px at 92% -10%, #1B527F 0%, transparent 58%), linear-gradient(130deg, #0A2342, #0C2C50 65%, #0D3358);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.hero::after {
  content: ""; position: absolute; right: -70px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(18, 181, 165, .2); box-shadow: 0 0 0 40px rgba(18, 181, 165, .03), 0 0 0 90px rgba(255, 255, 255, .02);
  pointer-events: none;
}
.hero .eyebrow { color: #7CE3D8; }
.hero h1 { color: #fff; font-size: clamp(25px, 2.6vw, 33px); margin-bottom: 8px; }
.hero p { color: #B9CDDF; font-size: 13.5px; max-width: 560px; margin: 0 0 18px; }
.hero .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero .ghost-link { color: #C9DBEA; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.hero .ghost-link:hover { color: #fff; }
.hero-ring { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; padding-right: 8px; }
.hero-ring .ring-label { font-size: 11px; color: #9FBBD4; letter-spacing: .06em; text-transform: uppercase; }

.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-track { stroke: rgba(255, 255, 255, .14); }
.ring.light .ring-track { stroke: #E8EEF4; }
.ring .ring-val { stroke: #2BD7C6; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring.light .ring-val { stroke: var(--teal); }
.ring .ring-txt { position: absolute; text-align: center; line-height: 1.05; }
.ring .ring-txt b { display: block; font-family: var(--display); font-size: 25px; font-weight: 800; color: #fff; }
.ring .ring-txt span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #9FBBD4; }
.ring.light .ring-txt b { color: var(--navy-900); }
.ring.light .ring-txt span { color: var(--muted); }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 17px 18px; box-shadow: var(--shadow-sm); }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--navy-900); letter-spacing: -.03em; margin-top: 7px; line-height: 1; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .s { font-size: 11.5px; color: var(--muted); margin-top: 7px; }

.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow-sm); }
.jstep { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 12px; min-width: 0; }
.jstep:hover { background: #F8FAFD; }
.jstep .jdot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 750; flex: none; background: #EFF4F8; color: #7A8FA5; }
.jstep.done .jdot { background: var(--teal); color: #053B36; }
.jstep.current .jdot { background: var(--navy-900); color: #fff; box-shadow: 0 0 0 4px rgba(10, 35, 66, .1); }
.jstep .jt { min-width: 0; }
.jstep .jt b { display: block; font-size: 11.5px; font-weight: 650; color: var(--navy-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jstep .jt span { display: block; font-size: 10px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jstep.current .jt b { color: var(--navy-900); }

.action-item { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.action-item:last-child { border-bottom: 0; padding-bottom: 0; }
.action-item .num { width: 25px; height: 25px; border-radius: 8px; background: var(--teal-50); color: #08756B; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; margin-top: 1px; }
.action-item .txt { flex: 1; min-width: 0; }
.action-item b { display: block; font-size: 12.8px; color: var(--navy-900); font-weight: 650; line-height: 1.35; }
.action-item span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.action-item .go { color: #A9B8C7; margin-top: 3px; }

.comp-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comp-row:last-child { border-bottom: 0; }
.comp-row .swatch { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 750; background: #EEF3F8; color: #5B7288; flex: none; }
.comp-row .nm { flex: 1; min-width: 0; font-size: 12.5px; color: var(--navy-900); font-weight: 550; }
.comp-row .sc { width: 42px; text-align: right; font-size: 12px; font-weight: 700; color: var(--navy-800); }
.comp-row .bar { width: 84px; flex: none; }

.ai-teaser { background: linear-gradient(150deg, #0C2B4D, #123C64); color: #fff; border: 0; position: relative; overflow: hidden; }
.ai-teaser::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(18, 181, 165, .25), transparent 70%); }
.ai-teaser h3 { color: #fff; }
.ai-teaser p { color: #B7CBDE; font-size: 12.5px; }

/* ---------------------------------------------------------------- checkup */
.profile-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 13px; overflow: hidden; border: 1px solid var(--line); }
.profile-summary div { background: #fff; padding: 13px 16px; }
.profile-summary .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.profile-summary .v { font-size: 13px; color: var(--navy-900); font-weight: 600; margin-top: 3px; }
.diag-intro { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 26px; align-items: center; }
.diag-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diag-cat { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.diag-cat .num { font-size: 9.5px; font-weight: 750; color: var(--teal-600); background: var(--teal-50); border-radius: 5px; padding: 2px 5px; }

.runner { max-width: 780px; margin: 0 auto; }
.runner-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.runner-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.runner-meta b { color: var(--navy-900); }
.qcard { padding: 30px 32px; }
.qcard .topic { margin-bottom: 10px; }
.qcard h2 { font-size: 20px; line-height: 1.4; margin-bottom: 22px; letter-spacing: -.01em; }
.options { display: grid; gap: 9px; }
.option {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 13px 15px;
  font-size: 13.5px; color: var(--ink); line-height: 1.45; transition: border .12s, background .12s, box-shadow .12s;
}
.option:hover { border-color: #A8C3D8; background: #FBFCFE; }
.option .letter { width: 24px; height: 24px; border-radius: 7px; background: #F0F4F8; color: #5B7288; display: grid; place-items: center; font-size: 11px; font-weight: 750; flex: none; }
.option.sel { border-color: var(--teal); background: #F3FCFA; box-shadow: 0 0 0 3px rgba(18, 181, 165, .1); }
.option.sel .letter { background: var(--teal); color: #04302C; }
.option.correct { border-color: #9FDCC4; background: #F0FBF6; }
.option.correct .letter { background: var(--green); color: #fff; }
.option.wrong { border-color: #F0BDBD; background: #FEF6F6; }
.option.wrong .letter { background: var(--red); color: #fff; }
.option.review { cursor: default; }
.qnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.answer-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.answer-dot { width: 8px; height: 8px; border-radius: 50%; background: #DCE5EE; }
.answer-dot.done { background: var(--teal); }
.answer-dot.cur { background: var(--navy-800); box-shadow: 0 0 0 3px rgba(10, 35, 66, .12); }

.result-hero { display: flex; gap: 26px; align-items: center; padding: 28px 30px; }
.result-hero .copy { flex: 1; }
.result-hero h2 { font-size: 23px; margin-bottom: 8px; }
.result-hero p { color: var(--muted); font-size: 13px; }
.score-badge { text-align: center; min-width: 118px; }
.score-badge .num { font-family: var(--display); font-size: 40px; font-weight: 800; color: var(--navy-900); letter-spacing: -.04em; line-height: 1; }
.score-badge .num small { font-size: 15px; color: var(--muted); }
.score-badge .lbl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.priority-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.priority-card.top { border-color: #F0D99A; background: linear-gradient(180deg, #FFFCF3, #fff); }
.priority-card .rank { font-size: 10px; font-weight: 750; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }
.priority-card h4 { margin: 5px 0 6px; font-size: 13.5px; }
.priority-card p { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.band-list { display: grid; gap: 11px; }
.band { display: grid; grid-template-columns: 150px 1fr 46px; gap: 12px; align-items: center; }
.band .nm { font-size: 12.5px; font-weight: 550; color: var(--navy-800); }
.band .vl { font-size: 12px; font-weight: 700; color: var(--navy-900); text-align: right; }

/* ---------------------------------------------------------------- learn */
.comp-card { position: relative; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 19px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.comp-card.available:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #C9DBE9; }
.comp-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comp-card .idx { width: 34px; height: 34px; border-radius: 10px; background: #EDF3F8; color: var(--navy-700); display: grid; place-items: center; font-size: 11.5px; font-weight: 750; }
.comp-card h3 { font-size: 15px; line-height: 1.3; }
.comp-card p { font-size: 12.3px; color: var(--muted); margin: 0; line-height: 1.5; }
.comp-card .topics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.comp-card .topics span { font-size: 10.3px; color: #6D8197; background: #F5F8FB; padding: 3px 7px; border-radius: 6px; }
.comp-card .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.comp-card .foot .meta { font-size: 11px; color: var(--muted-2); }
.ribbon { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 750; color: #8A6A0A; background: var(--yellow-50); border: 1px solid #F6E6B4; padding: 3px 7px; border-radius: 5px; }

.module-hero { padding: 30px 32px; border-radius: 20px; background: linear-gradient(130deg, #0B2848, #10395F); color: #fff; position: relative; overflow: hidden; }
.module-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(18, 181, 165, .25); }
.module-hero h1 { color: #fff; font-size: clamp(24px, 2.4vw, 31px); margin: 8px 0 10px; }
.module-hero p { color: #BDD0E1; max-width: 720px; font-size: 13.5px; }
.module-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.module-hero .chip { background: rgba(255, 255, 255, .1); color: #DCEBF7; border: 1px solid rgba(255, 255, 255, .12); }
.checkpoint-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.checkpoint { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; display: flex; gap: 10px; align-items: flex-start; }
.checkpoint.done { border-color: #BFE9DB; background: #F6FDFA; }
.checkpoint .tick { width: 21px; height: 21px; border-radius: 50%; background: #EEF3F8; color: #8DA0B3; display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 800; }
.checkpoint.done .tick { background: var(--teal); color: #04302C; }
.checkpoint b { display: block; font-size: 12px; color: var(--navy-900); }
.checkpoint span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.lesson { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; margin-bottom: 10px; }
.lesson summary { list-style: none; cursor: pointer; padding: 17px 20px; display: flex; align-items: center; gap: 14px; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary:hover { background: #FBFCFE; }
.lesson .lnum { width: 30px; height: 30px; border-radius: 9px; background: #EEF3F8; color: var(--navy-700); display: grid; place-items: center; font-size: 11.5px; font-weight: 750; flex: none; }
.lesson.done .lnum { background: var(--teal-50); color: #08756B; }
.lesson .lsum { flex: 1; min-width: 0; }
.lesson .lsum b { display: block; font-size: 14px; font-family: var(--display); color: var(--navy-900); font-weight: 750; }
.lesson .lsum span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lesson .lmeta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-2); }
.lesson .chev { transition: transform .2s; color: #91A4B7; }
.lesson[open] .chev { transform: rotate(180deg); }
.lesson-body { padding: 4px 22px 24px 64px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 20px; }
.lesson-body .prose p { font-size: 13.8px; line-height: 1.72; color: #2B3F55; margin-bottom: 12px; }
.example-box { background: #F6FAFD; border: 1px solid #DDE9F2; border-left: 3px solid var(--navy-600); border-radius: 10px; padding: 15px 17px; margin: 16px 0; }
.example-box .lbl { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy-600); font-weight: 750; margin-bottom: 6px; }
.example-box h4 { margin-bottom: 5px; font-size: 13px; }
.example-box p { margin: 0; font-size: 12.6px; color: #3C526A; line-height: 1.65; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.pair-box { border-radius: 11px; padding: 14px 16px; border: 1px solid var(--line); }
.pair-box.do { background: #F5FCF9; border-color: #CDEDE0; }
.pair-box.dont { background: #FEF8F6; border-color: #F3D9D2; }
.pair-box.why { background: #F8FAFC; border-color: var(--line); }
.pair-box.mistakes { background: #FFFBEF; border-color: #F2E5BB; }
.pair-box h5 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font); font-weight: 750; margin-bottom: 7px; }
.pair-box.do h5 { color: #087A55; }
.pair-box.dont h5 { color: #B33A2F; }
.pair-box.why h5 { color: var(--navy-700); }
.pair-box.mistakes h5 { color: #9A7308; }
.pair-box ul { margin: 0; padding-left: 16px; }
.pair-box li { font-size: 12.2px; line-height: 1.55; color: #40556B; margin-bottom: 4px; }
.pair-box li:last-child { margin-bottom: 0; }
.exercise-box { border: 1px dashed #B9CEDF; border-radius: 12px; padding: 16px 18px; background: #FBFDFF; margin: 16px 0 4px; }
.exercise-box h4 { font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.exercise-box ol { margin: 8px 0 0; padding-left: 18px; }
.exercise-box li { font-size: 12.2px; color: #465C72; line-height: 1.55; margin-bottom: 3px; }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.template-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.template-row:last-child { border-bottom: 0; }
.template-row .fname { font-size: 12.3px; font-weight: 600; color: var(--navy-900); }
.template-row .fmeta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.template-row .dl { margin-left: auto; }
.file-icon { width: 34px; height: 38px; border-radius: 6px; background: #EEF4F9; border: 1px solid #DDE8F1; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #59748B; letter-spacing: .04em; }

/* ---------------------------------------------------------------- test hub */
.assessment-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; }
.assessment-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--teal); opacity: .8; }
.assessment-card.yellow::before { background: var(--yellow); }
.assessment-card.navy::before { background: var(--navy-600); }
.assessment-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assessment-card h3 { font-size: 16px; }
.assessment-card p { font-size: 12.5px; color: var(--muted); margin: 0; }
.assessment-card .meta-row { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.assessment-card .meta-row b { color: var(--navy-800); }
.assessment-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.verdict { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 16px; border: 1px solid #BFE9DB; background: linear-gradient(100deg, #F2FCF8, #fff); }
.verdict.fail { border-color: #F3D2C8; background: linear-gradient(100deg, #FFF8F5, #fff); }
.verdict .vicon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.verdict.fail .vicon { background: #DD6B55; }
.verdict h3 { font-size: 16px; }
.verdict p { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.feedback-list { display: grid; gap: 10px; }
.feedback { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.feedback.ok { border-left: 3px solid var(--green); }
.feedback.no { border-left: 3px solid var(--red); }
.feedback .fq { font-size: 12.8px; font-weight: 600; color: var(--navy-900); }
.feedback .fa { font-size: 11.8px; margin-top: 5px; color: var(--muted); }
.feedback .fa b { color: var(--navy-800); }
.feedback .fe { font-size: 11.8px; margin-top: 6px; color: #46607A; background: #F7FAFC; padding: 8px 10px; border-radius: 7px; }

/* ---------------------------------------------------------------- progress */
.level-card { background: linear-gradient(140deg, #0B2848, #10395F); color: #fff; border-radius: 18px; padding: 24px; position: relative; overflow: hidden; }
.level-card h3 { color: #fff; }
.level-card p { color: #B7CBDD; font-size: 12.5px; }
.level-scale { display: flex; gap: 5px; margin: 16px 0 8px; }
.level-scale span { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.level-scale span.on { background: var(--teal); }
.level-labels { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: #87A5C0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 0 12px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: #334A61; }
.table tr:last-child td { border-bottom: 0; }
.table td b { color: var(--navy-900); font-weight: 650; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .bar { width: 64px; flex: none; }
.table .comp-name { min-width: 170px; }
.mastery-pill { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: #EFF4F8; color: #5B7288; white-space: nowrap; }
.mastery-pill.optimising { background: #E2F8F2; color: #08745A; }
.mastery-pill.structured { background: #E7F0FA; color: #245C8D; }
.mastery-pill.developing { background: #FFF5D9; color: #8A6608; }
.mastery-pill.beginner { background: #FDF0EA; color: #A85A36; }
.mastery-pill.not-assessed { background: #F2F5F8; color: #8A9AAB; }

.checklist { display: grid; gap: 0; }
.checklist-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist-row:last-child { border-bottom: 0; }
.checklist-row .tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #F0F4F8; color: #9AABBC; font-size: 10px; }
.checklist-row.done .tick { background: var(--teal); color: #04302C; }
.checklist-row .txt { flex: 1; font-size: 12.5px; color: var(--navy-800); }
.checklist-row .txt span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.checklist-row .st { font-size: 10.5px; font-weight: 700; color: var(--muted-2); }

.plan-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.plan-item:last-child { border-bottom: 0; }
.plan-check { width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid #BCCBD9; background: #fff; flex: none; display: grid; place-items: center; color: transparent; margin-top: 1px; padding: 0; }
.plan-check:hover { border-color: var(--teal); }
.plan-item.done .plan-check { background: var(--teal); border-color: var(--teal); color: #04302C; }
.plan-item .pt { flex: 1; min-width: 0; }
.plan-item .pt b { display: block; font-size: 12.8px; color: var(--navy-900); font-weight: 600; }
.plan-item.done .pt b { color: #7D8FA1; text-decoration: line-through; }
.plan-item .pt p { font-size: 11.8px; color: var(--muted); margin: 3px 0 0; line-height: 1.5; }
.plan-item .pt .due { font-size: 10.5px; color: var(--muted-2); margin-top: 5px; display: inline-flex; gap: 4px; align-items: center; }
.plan-del { background: none; border: 0; color: #B4C2CF; padding: 3px; border-radius: 6px; }
.plan-del:hover { color: var(--red); background: var(--red-50); }
.inline-form { display: grid; grid-template-columns: minmax(0, 1.6fr) 150px auto; gap: 8px; margin-top: 14px; }

/* ---------------------------------------------------------------- coach */
.coach-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 172px); min-height: 520px; overflow: hidden; }
.chat-head { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-head .avatar-bot { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(150deg, #0E2E52, #17507C); color: #6FE9DD; display: grid; place-items: center; flex: none; }
.chat-head b { font-family: var(--display); font-size: 14.5px; color: var(--navy-900); display: block; }
.chat-head span { font-size: 11px; color: var(--muted); }
.chat-modes { display: flex; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #FBFCFE; flex-wrap: wrap; align-items: center; }
.chat-demo { padding: 12px 18px 0; }
.mode-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 30px; padding: 6px 12px; font-size: 11.5px; font-weight: 650; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.mode-btn.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.mode-hint { font-size: 10.5px; color: var(--muted-2); margin-left: auto; }
.chat-body { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.bubble { max-width: 84%; display: flex; gap: 9px; align-items: flex-start; }
.bubble .bsym { width: 27px; height: 27px; border-radius: 8px; background: #EAF1F7; color: var(--navy-700); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; margin-top: 2px; }
.bubble .bcontent { background: #F4F7FA; border: 1px solid #E7EDF4; border-radius: 4px 14px 14px 14px; padding: 13px 16px; font-size: 13px; line-height: 1.65; color: #263B50; overflow-wrap: anywhere; }
.bubble .bcontent p { margin: 0 0 9px; }
.bubble .bcontent p:last-child { margin-bottom: 0; }
.bubble .bcontent strong { color: var(--navy-900); font-weight: 700; }
.bubble .bcontent ul { margin: 4px 0 9px; padding-left: 17px; }
.bubble .bcontent li { margin-bottom: 3px; }
.bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble.user .bsym { background: var(--navy-900); color: #fff; }
.bubble.user .bcontent { background: var(--navy-900); border-color: var(--navy-900); color: #EAF2FA; border-radius: 14px 4px 14px 14px; }
.bubble.user .bcontent strong { color: #fff; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #93A6B8; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.chat-compose { border-top: 1px solid var(--line); padding: 13px 16px; background: #fff; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { flex: 1; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; resize: none; min-height: 44px; max-height: 120px; font-size: 13px; line-height: 1.5; }
.compose-row textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(18, 181, 165, .1); }
.compose-row .send { width: 42px; height: 42px; border-radius: 11px; border: 0; background: var(--teal); color: #04302C; display: grid; place-items: center; flex: none; }
.compose-row .send:hover { background: #16C7B6; }
.compose-meta { font-size: 10px; color: var(--muted-2); margin-top: 7px; display: flex; justify-content: space-between; gap: 10px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.suggestion { border: 1px solid var(--line); background: #FBFCFE; border-radius: 20px; padding: 5px 10px; font-size: 11px; color: var(--navy-700); }
.suggestion:hover { border-color: var(--teal); color: var(--teal-600); }
.demo-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--yellow-50); border: 1px solid #F3E2A8; border-radius: 11px; padding: 11px 13px; font-size: 11.5px; color: #755A0A; line-height: 1.5; }
.demo-banner b { font-weight: 750; }
.demo-banner svg { color: #B0880B; flex: none; margin-top: 1px; }
.coach-side .card + .card { margin-top: 14px; }
.coach-side h3 { font-size: 13.5px; margin-bottom: 8px; }
.history-item { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 7px; }
.history-item:last-child { margin-bottom: 0; }
.history-item:hover { border-color: #B9CEDF; }
.history-item.on { border-color: var(--teal); background: var(--teal-50); }
.history-item b { display: block; font-size: 11.5px; color: var(--navy-900); font-weight: 650; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item span { display: block; font-size: 9.8px; color: var(--muted); margin-top: 2px; }
.coach-side p { font-size: 11.8px; color: var(--muted); line-height: 1.55; }
.coach-side ul { margin: 0; padding-left: 16px; }
.coach-side li { font-size: 11.8px; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }

/* ---------------------------------------------------------------- admin */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { padding: 10px 15px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--navy-900); }
.tab.on { color: var(--navy-900); border-bottom-color: var(--teal); }
.q-row { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 9px; background: #fff; }
.q-row .qt { font-size: 12.8px; font-weight: 600; color: var(--navy-900); line-height: 1.45; }
.q-row .qm { font-size: 10.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.q-row .qa { font-size: 11.5px; color: #3E6B57; background: #F3FBF7; padding: 4px 8px; border-radius: 6px; margin-top: 7px; display: inline-block; }
.q-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.review-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; background: #fff; }
.review-card.pending { border-color: #F0D99A; }
.answer-block { background: #F8FAFC; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; margin-bottom: 8px; }
.answer-block .k { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.answer-block .v { font-size: 12.3px; color: #344B62; line-height: 1.55; }
.rubric-grid { display: grid; grid-template-columns: 1fr 120px; gap: 8px 12px; align-items: center; margin-top: 10px; }
.rubric-grid label { font-size: 12px; color: var(--navy-800); }
.rubric-grid label span { display: block; font-size: 10.5px; color: var(--muted); }
.admin-question-form { background: #F8FAFC; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.option-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.option-edit input[type="radio"] { accent-color: var(--teal-600); }
.content-editor { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
.lesson-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lesson-list button { display: block; width: 100%; text-align: left; padding: 12px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--navy-800); }
.lesson-list button:last-child { border-bottom: 0; }
.lesson-list button.on { background: var(--teal-50); color: #08665D; font-weight: 650; }
.lesson-list button span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- toast */
#toast { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast-item { background: var(--navy-950); color: #fff; border-radius: 11px; padding: 11px 16px; font-size: 12.5px; box-shadow: var(--shadow-lg); max-width: 380px; animation: toast-in .18s ease; display: flex; gap: 8px; align-items: center; }
.toast-item.err { background: #7F2A2A; }
.toast-item.ok { background: #0A4B3B; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- misc */
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.empty .icon { width: 46px; height: 46px; border-radius: 50%; background: #F0F4F8; display: grid; place-items: center; margin: 0 auto 10px; color: #8EA3B7; }
.loading { padding: 60px 20px; display: flex; justify-content: center; color: var(--muted); font-size: 13px; gap: 10px; align-items: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #DCE6EF; border-top-color: var(--teal); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.roadmap-note { background: #F8FAFC; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; font-size: 12px; color: var(--muted); line-height: 1.6; display: flex; gap: 10px; align-items: flex-start; }
.roadmap-note svg { color: var(--navy-600); margin-top: 1px; }
.badge-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.big-number { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--navy-900); letter-spacing: -.03em; }
.quote { border-left: 3px solid var(--yellow); padding: 3px 0 3px 14px; color: #40556B; font-size: 12.8px; font-style: italic; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1220px) {
  .split { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .coach-layout { grid-template-columns: minmax(0, 1fr) 265px; }
  .view { padding: 26px 26px 60px; }
  .topbar { padding: 0 26px; }
}
@media (max-width: 1080px) {
  .journey { grid-template-columns: repeat(3, 1fr); row-gap: 4px; }
  .split { grid-template-columns: 1fr; }
  .coach-layout { grid-template-columns: 1fr; }
  .coach-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .coach-side .card + .card { margin-top: 0; }
  .chat-card { height: 60vh; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(6, 20, 35, .45); z-index: 40; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: 30px 22px; min-height: 100vh; background: linear-gradient(180deg, #F7FAFD, #fff); }
  .auth-mobile-brand { display: flex; margin-bottom: 26px; }
  .view { padding: 22px 20px 70px; }
  .topbar { padding: 0 20px; height: 62px; }
  .hero { padding: 24px; flex-direction: column; align-items: flex-start; }
  .hero-ring { flex-direction: row; gap: 14px; padding: 0; }
  .profile-summary { grid-template-columns: 1fr 1fr; }
  .checkpoint-grid { grid-template-columns: 1fr 1fr; }
  .diag-intro { grid-template-columns: 1fr; }
  .lesson-body { padding-left: 22px; }
}
@media (min-width: 961px) { .auth-mobile-brand { display: none; } }
@media (max-width: 720px) {
  h1 { font-size: 25px; }
  .top-chip.hide-sm { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .journey { grid-template-columns: 1fr 1fr; }
  .jstep .jt span { display: none; }
  .comp-row .bar { width: 56px; }
  .pair-grid { grid-template-columns: 1fr; }
  .band { grid-template-columns: 110px 1fr 38px; }
  .result-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .qcard { padding: 22px 20px; }
  .checkpoint-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .content-editor { grid-template-columns: 1fr; }
  .coach-side { grid-template-columns: 1fr; }
  .coach-page .section-head p { display: none; }
  .coach-page .section-head { margin-bottom: 4px; }
  .chat-card { height: calc(100dvh - 240px); min-height: 420px; }
  .chat-demo { display: none; }
  .chat-body { padding: 16px; }
  .bubble { max-width: 94%; }
  .mode-hint { display: none; }
  .topbar .crumb { font-size: 12px; }
  .crumb-root { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lesson summary { padding: 14px; gap: 10px; }
  .lesson .lmeta span.min { display: none; }
}
@media (max-width: 520px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .jstep { padding: 8px 10px; }
  .profile-summary { grid-template-columns: 1fr; }
  .view { padding: 18px 14px 70px; }
  .topbar { padding: 0 14px; }
  .auth-panel { padding: 24px 16px; }
  .qcard h2 { font-size: 17px; }
  .reader-meta { display: none; }
}

/* Five owner-facing business aspects (Progress) */
.aspect-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.aspect-grid .stat { padding: 15px 16px; }
@media (max-width: 1180px) { .aspect-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .aspect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .aspect-grid { grid-template-columns: 1fr; } }

/* Admin content editor */
.module-pick { display: grid; gap: 4px; text-align: left; width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; position: relative; }
.module-pick b { font-size: 12.5px; color: var(--navy-900); line-height: 1.3; }
.module-pick span { font-size: 11px; color: var(--muted); }
.module-pick em { font-style: normal; font-size: 9.5px; padding: 2px 7px; flex: none; }
.module-pick.on { border-color: var(--navy-700); box-shadow: 0 0 0 2px rgba(10,35,66,.08); background: #F7FAFD; }
.preview-pane { margin-top: 14px; padding: 14px 16px; background: #F7FAFD; border: 1px dashed var(--line-strong); border-radius: 12px; }
.admin-split { display: grid; gap: 16px; grid-template-columns: 290px minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .admin-split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .tabs { flex-wrap: wrap; overflow: visible; gap: 0; }
  .tab { padding: 9px 11px; font-size: 12px; }
}
@media (max-width: 520px) {
  #toast { left: 14px; right: 14px; align-items: stretch; }
  .toast-item { max-width: none; }
}

/* Progress: score trend */
.trend-svg { display: block; width: 100%; height: auto; margin-top: 10px; }
.trend-grid { stroke: var(--line); stroke-width: 1; }
.trend-high, .trend-mid { stroke-width: 1; stroke-dasharray: 4 4; }
.trend-high { stroke: rgba(15, 42, 102, .32); }
.trend-mid { stroke: rgba(255, 201, 60, .85); }
.trend-label { font-size: 8.5px; font-weight: 650; fill: var(--muted-2); }
.trend-label.end { text-anchor: end; }
.trend-line { fill: none; stroke: var(--blue-600); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { stroke: #fff; stroke-width: 2; }
.trend-dot.pass { fill: var(--green); }
.trend-dot.fail { fill: var(--red); }
.trend-legend { margin-top: 6px; font-size: 10.5px; color: var(--muted); align-items: center; }
.trend-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.trend-legend .dot.pass { background: var(--green); }
.trend-legend .dot.fail { background: var(--red); }

/* Printable one-page business improvement plan */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff !important; }
  body { color: #0A1733; font-family: Inter, "Segoe UI", sans-serif; }
  .app { display: block; min-height: 0; }
  .sidebar, .topbar, #toast, .menu-btn, .backdrop { display: none !important; }
  .main { margin-left: 0; }
  .view { padding: 0; max-width: none; }
  .view > *:not(#print-plan) { display: none !important; }
  #print-plan { display: block !important; position: static; width: 100%; padding: 0; margin: 0; font-size: 10pt; }
  .print-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #0F2A66; padding-bottom: 7px; margin-bottom: 12px; font-size: 9pt; }
  .print-brand { font-weight: 800; font-size: 13pt; color: #0F2A66; letter-spacing: -.02em; }
  .print-brand span { display: block; font-size: 6.8pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5B6683; margin-top: 1px; }
  #print-plan h1 { font-size: 22pt; margin: 0 0 3px; color: #0A1733; letter-spacing: -.03em; }
  .print-meta { margin: 0 0 10px; font-size: 10pt; color: #23325F; }
  .print-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 1px solid #D3D9EC; border-radius: 6px; padding: 7px 10px; margin: 10px 0 14px; }
  .print-summary div { border-left: 2px solid #FFC93C; padding-left: 8px; }
  .print-summary b { display: block; font-size: 15pt; color: #0F2A66; line-height: 1.1; }
  .print-summary span { font-size: 8pt; color: #5B6683; }
  #print-plan h2 { font-size: 11pt; margin: 12px 0 4px; color: #0F2A66; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
  .print-table th { text-align: left; border-bottom: 1.5px solid #0F2A66; padding: 3px 4px; color: #0F2A66; }
  .print-table td { border-bottom: 1px solid #E6E9F5; padding: 3px 4px; }
  .print-list, .print-plan-list { margin: 3px 0 8px 17px; padding: 0; font-size: 9pt; line-height: 1.45; }
  .print-plan-list { list-style: none; margin-left: 0; }
  .print-note { font-size: 8pt; color: #5B6683; margin: 2px 0 8px; }
  .print-foot { font-size: 7.4pt; color: #5B6683; border-top: 1px solid #E6E9F5; padding-top: 6px; margin-top: 12px; }
  .card, .section, .split { break-inside: avoid; }
}

.loading-skeleton { padding: 34px clamp(18px, 4vw, 56px); max-width: 980px; margin: 0 auto; }
.skeleton { background: linear-gradient(90deg, rgba(220,227,241,.55), rgba(245,247,252,.95), rgba(220,227,241,.55)); background-size: 220% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; border-radius: 14px; }
.skeleton-title { width: min(420px, 70%); height: 34px; margin-bottom: 24px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skeleton-card { height: 132px; }
.skeleton-wide { height: 220px; margin-top: 20px; }
@keyframes skeleton-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
