/* Growth Accelerator Challenge — Diginess Growth visual system
   Matches Growth OS + the Growth Score assessment: DG blue, navy ink,
   orange for the one action that matters, green for progress. */
:root {
  --navy: #091839;
  --navy-2: #0f2148;
  --navy-3: #1a3258;
  --ink: #0f1d3a;
  --text2: #46526b;
  --text3: #68748e;
  --blue: #004aad;
  --blue-lt: #3d7bd6;
  --blue-pale: #e6f1fb;
  --blue-dk: #003580;
  --orange: #ff6600;
  --orange-hover: #e85b00;
  --orange-pale: #fff0e6;
  --green: #7ed957;
  --green-dk: #2f7d18;
  --green-pale: #eef9e8;
  --red: #c62828;
  --red-pale: #fdecea;
  --amber: #b77905;
  --amber-pale: #fff6dd;
  --bg: #f4f6fa;
  --card: #ffffff;
  --bg3: #f7f9fc;
  --border: #e7ebf2;
  --border2: #d2dae7;
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 264px;
  --shadow-sm: 0 1px 2px rgba(15, 29, 58, 0.05), 0 2px 8px rgba(0, 74, 173, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 29, 58, 0.05), 0 12px 32px rgba(0, 74, 173, 0.1);
  --shadow-lg: 0 8px 24px rgba(15, 29, 58, 0.08), 0 32px 80px rgba(0, 74, 173, 0.16);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 0.9em; }
.muted { color: var(--text3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--text3); }
.boot img { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.97); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  white-space: nowrap; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .nav-item:focus-visible, .chip:focus-visible, .opt:focus-visible { outline: 3px solid rgba(0, 74, 173, 0.35); outline-offset: 2px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(255, 102, 0, 0.25); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dk); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-quiet { background: transparent; color: var(--text2); padding: 8px 10px; }
.btn-quiet:hover { color: var(--blue); background: var(--blue-pale); }
.btn-wa { background: #1fae54; color: #fff; }
.btn-wa:hover { background: #178f44; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--text3); margin-top: 5px; }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border2); border-radius: 10px;
  background: #fff; font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { resize: vertical; min-height: 96px; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--red); font-size: 13.5px; margin: 4px 0 10px; min-height: 1em; }

/* ---------- auth / landing ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
  background: radial-gradient(1200px 600px at 10% -10%, #1b3d7a 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0b2150 70%, #0c2a63 100%);
  color: #fff; padding: 48px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(126, 217, 87, 0.18), transparent 60%), radial-gradient(circle at 70% 60%, rgba(255, 102, 0, 0.16), transparent 55%);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 46px; background: #fff; border-radius: 12px; padding: 4px; }
.brand .word { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand .word b { color: var(--blue-lt); font-weight: 800; }
.auth-hero .word b { color: #8fb8ff; }
.auth-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; margin: 0; }
.auth-hero h1 em { font-style: normal; color: var(--green); }
.auth-hero .lede { color: rgba(255, 255, 255, 0.78); font-size: 17px; max-width: 520px; margin: 0; }
.journey { display: grid; gap: 10px; max-width: 520px; position: relative; z-index: 1; }
.journey-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.journey-row .num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: rgba(255, 255, 255, 0.1); color: #fff; }
.journey-row strong { display: block; color: #fff; font-size: 15px; }
.journey-row span { color: rgba(255, 255, 255, 0.66); font-size: 13.5px; }
.host { display: flex; gap: 14px; align-items: center; margin-top: auto; position: relative; z-index: 1; }
.host img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.4); }
.host p { margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 13.5px; }
.host strong { color: #fff; }
.auth-panel { display: grid; place-items: center; padding: 40px 22px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; padding: 32px 30px; box-shadow: var(--shadow-lg); border-top: 3px solid var(--blue); }
.auth-card h2 { font-size: 26px; font-weight: 800; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text3); margin-top: 14px; }
.auth-switch button { background: none; border: 0; color: var(--blue); font-weight: 700; cursor: pointer; padding: 0; }
.demo-note { background: var(--amber-pale); border: 1px solid #f3dc9b; color: #6b4a00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.trust { text-align: center; font-size: 12.5px; color: var(--text3); margin-top: 12px; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 16px; }
.sidebar .brand img { background: none; padding: 0; width: 40px; height: 42px; }
.sidebar .brand .word { font-size: 16px; color: var(--ink); }
.sidebar .brand .word b { color: var(--blue); }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text2);
  text-decoration: none; font-weight: 600; font-size: 14px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--bg3); color: var(--ink); }
.nav-item.active { background: var(--blue-pale); color: var(--blue); }
.nav-item .day-dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--bg); color: var(--text2); flex: none; }
.nav-item.active .day-dot { background: var(--blue); color: #fff; }
.nav-item.done .day-dot { background: var(--green-pale); color: var(--green-dk); }
.nav-item.locked { color: #9aa4b8; cursor: not-allowed; }
.nav-item .end { margin-left: auto; display: inline-flex; }
.nav-item .end svg { width: 15px; height: 15px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.usage { font-size: 12px; color: var(--text3); padding: 6px 10px 10px; }
.meter { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width 0.4s; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 32px); background: rgba(244, 246, 250, 0.9);
  backdrop-filter: saturate(1.2) blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.topbar .crumb { font-weight: 700; color: var(--ink); font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #fff; border: 1px solid var(--border); color: var(--text2); white-space: nowrap; }
.pill.warn { background: var(--orange-pale); border-color: #ffd3b3; color: #a64200; }
.pill.ok { background: var(--green-pale); border-color: #cdeebc; color: var(--green-dk); }
.pill svg { width: 14px; height: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.content { padding: clamp(18px, 3vw, 32px); max-width: 1180px; width: 100%; margin: 0 auto; }
.demo-banner { background: var(--amber-pale); color: #6b4a00; font-size: 13px; text-align: center; padding: 7px 12px; border-bottom: 1px solid #f3dc9b; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h2, .card-title h3 { margin: 0; }
.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)); }
.stack { display: grid; gap: 16px; }
.stack > *, .grid > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 14px; }
.icon-circle { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-pale); color: var(--blue); flex: none; }
.icon-circle svg { width: 20px; height: 20px; }
.icon-circle.orange { background: var(--orange-pale); color: var(--orange); }
.icon-circle.green { background: var(--green-pale); color: var(--green-dk); }
.icon-circle.navy { background: var(--navy); color: #fff; }

/* hero banner */
.hero {
  border-radius: 18px; padding: clamp(22px, 3.4vw, 36px); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(900px 400px at 100% 0%, rgba(61, 123, 214, 0.45), transparent 60%), linear-gradient(135deg, var(--navy) 0%, #0c2659 100%);
}
.hero h1 { color: #fff; margin-bottom: 8px; }
.hero p { color: rgba(255, 255, 255, 0.8); max-width: 640px; }
.hero .eyebrow { color: var(--green); }
.hero .daynum { position: absolute; right: 22px; top: -18px; font-family: var(--display); font-weight: 800; font-size: 150px; color: rgba(255, 255, 255, 0.06); line-height: 1; pointer-events: none; }
.hero .row { margin-top: 14px; }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* progress ring */
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .val b { font-family: var(--display); font-size: 30px; line-height: 1; }
.ring .val span { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); font-weight: 700; }

/* day tiles */
.day-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.day-tile { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; min-height: 150px; box-shadow: var(--shadow-sm); transition: border-color 0.15s, transform 0.15s; }
.day-tile:hover { border-color: var(--blue); transform: translateY(-1px); }
.day-tile .top { display: flex; justify-content: space-between; align-items: center; }
.day-tile .n { font-family: var(--display); font-weight: 800; color: var(--blue); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.day-tile strong { font-size: 15px; line-height: 1.3; }
.day-tile .sub { font-size: 12.5px; color: var(--text3); margin-top: auto; }
.day-tile.done { border-color: #cdeebc; background: linear-gradient(180deg, #fff 0%, #f6fcf2 100%); }
.day-tile.current { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.12); }
.day-tile.locked { opacity: 0.6; pointer-events: none; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: var(--text3); }
.status svg { width: 13px; height: 13px; }
.status.done { background: var(--green-pale); color: var(--green-dk); }
.status.now { background: var(--orange-pale); color: #a64200; }
.status.saved { background: var(--blue-pale); color: var(--blue); }

/* lesson */
.lesson-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.video { position: relative; border-radius: 14px; overflow: hidden; background: var(--navy); aspect-ratio: 16 / 9; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; color: rgba(255, 255, 255, 0.85); gap: 10px; padding: 20px;
  background: radial-gradient(600px 300px at 80% 10%, rgba(61, 123, 214, 0.4), transparent 60%), linear-gradient(135deg, var(--navy), #0c2659); }
.video-empty .play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); }
.video-empty .play svg { width: 28px; height: 28px; }
.focus-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.focus-list li { display: flex; gap: 10px; align-items: flex-start; }
.focus-list li svg { width: 18px; height: 18px; color: var(--green-dk); flex: none; margin-top: 3px; }
.steps { display: grid; gap: 10px; }
.step { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.step summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-weight: 700; }
.step summary::-webkit-details-marker { display: none; }
.step summary .n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-pale); color: var(--blue); font-size: 13px; font-weight: 800; flex: none; }
.step summary .chev { margin-left: auto; color: var(--text3); transition: transform 0.2s; }
.step[open] summary .chev { transform: rotate(180deg); }
.step .body { padding: 0 16px 16px 56px; color: var(--text2); }
.step .body ul { margin: 6px 0 0; padding-left: 18px; }
.callout { border-radius: 12px; padding: 14px 16px; background: var(--blue-pale); color: var(--blue-dk); font-size: 14px; }
.callout.orange { background: var(--orange-pale); color: #8a3800; }
.callout.green { background: var(--green-pale); color: var(--green-dk); }
.callout strong { color: inherit; }
.shift { border-left: 0; border-radius: 12px; padding: 16px 18px; background: linear-gradient(135deg, var(--navy), #10306b); color: #fff; }
.shift .eyebrow { color: var(--green); margin-bottom: 4px; }
.shift p { margin: 0; font-family: var(--display); font-weight: 700; font-size: 17px; }

/* stage map (Day 1) */
.stage-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stage { border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 12px; }
.stage .k { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
.stage strong { display: block; font-family: var(--display); font-size: 15px; }
.stage p { margin: 4px 0 0; font-size: 12.5px; color: var(--text2); line-height: 1.45; }
.stage.fix { border-color: #ffd3b3; background: #fffaf6; }
.stage.build { border-color: #cfe0f6; background: #f8fbff; }
.stage.edge { border-color: #cdeebc; background: #f8fdf5; }

/* assistant cards */
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.agent { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.agent .who { display: flex; gap: 12px; align-items: center; }
.agent .who strong { display: block; font-size: 15px; line-height: 1.25; }
.agent .who span:not(.bot) { font-size: 12.5px; color: var(--text3); }
.agent p { font-size: 13.5px; color: var(--text2); margin: 0; }
.agent .row { margin-top: auto; }
.agent.locked { background: var(--bg3); border-style: dashed; box-shadow: none; }
.agent.locked .icon-circle { background: #e9edf4; color: #8a95ab; }
.agent .lock-tag { font-size: 11.5px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; }
.bot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 6px rgba(9, 24, 57, 0.12); }
.bot svg { width: 55%; height: 55%; display: block; }

/* assignment */
.assignment textarea.input { min-height: 110px; }
.posted { border: 1px solid #cdeebc; background: var(--green-pale); border-radius: 12px; padding: 14px 16px; }
.posted .q { white-space: pre-wrap; color: var(--ink); }

/* ---------- chat ---------- */
.chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.chat { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; height: calc(100vh - 150px - var(--banner, 0px)); height: calc(100dvh - 150px - var(--banner, 0px)); min-height: 460px; }
body.demo { --banner: 34px; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-head strong { display: block; line-height: 1.25; }
.chat-head span:not(.bot) { font-size: 12.5px; color: var(--text3); }
.chat-head .spacer { flex: 1; }
.msgs { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.msgs > * { flex-shrink: 0; }
.msg { max-width: 86%; }
.msg.ai { align-self: flex-start; display: flex; gap: 10px; }
.msg.ai .bot { width: 32px; height: 32px; border-radius: 10px; }
.msg.ai .bubble { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 12px 15px; }
.msg.me { align-self: flex-end; }
.msg.me .bubble { background: var(--blue); color: #fff; border-radius: 14px 4px 14px 14px; padding: 11px 15px; white-space: pre-wrap; }
.bubble > :last-child { margin-bottom: 0; }
.bubble p { margin: 0 0 0.7em; }
.bubble ul, .bubble ol { margin: 0.2em 0 0.8em; padding-left: 20px; }
.bubble li { margin: 0.2em 0; }
.bubble h1, .bubble h2, .bubble h3, .bubble h4 { font-size: 15.5px; margin: 0.9em 0 0.4em; }
.bubble table, .doc table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 0.6em 0 1em; display: block; overflow-x: auto; }
.bubble th, .bubble td, .doc th, .doc td { border: 1px solid var(--border2); padding: 6px 8px; text-align: left; vertical-align: top; }
.bubble th, .doc th { background: var(--bg); }
.bubble blockquote, .doc blockquote { margin: 0.5em 0; padding: 6px 12px; border-left: 3px solid var(--blue-lt); background: #fff; color: var(--text2); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.saved-card { align-self: stretch; border: 1px solid #cdeebc; border-radius: 14px; background: #fbfef9; overflow: hidden; }
.saved-card .head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--green-pale); color: var(--green-dk); font-weight: 800; font-size: 14px; }
.saved-card .head svg { width: 18px; height: 18px; }
.saved-card .head .spacer { flex: 1; }
.saved-card .doc { padding: 14px 18px; max-height: 420px; overflow: auto; font-size: 14px; }
.saving { align-self: flex-start; font-size: 13px; color: var(--blue); font-weight: 700; display: inline-flex; gap: 8px; align-items: center; background: var(--blue-pale); padding: 8px 12px; border-radius: 99px; }
.notice { align-self: center; font-size: 13px; color: var(--text2); background: var(--bg); border: 1px solid var(--border); padding: 8px 12px; border-radius: 10px; max-width: 92%; text-align: center; }
.notice.err { color: var(--red); background: var(--red-pale); border-color: #f5c6c2; }
.composer { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--border2); border-radius: 12px; padding: 11px 13px; max-height: 180px; min-height: 46px; line-height: 1.45; font-size: 15px; }
.composer textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.12); }
.icon-btn { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border2); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--text2); flex: none; }
.icon-btn:hover { color: var(--blue); border-color: var(--blue); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.send { background: var(--orange); border-color: var(--orange); color: #fff; }
.icon-btn.send:hover { background: var(--orange-hover); }
.icon-btn.rec { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.icon-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 10px; }
.chip { border: 1px solid var(--border2); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text2); font-weight: 600; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.knows { position: sticky; top: 76px; }
.knows h3 { font-size: 15px; }
.know { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.know:first-of-type { border-top: 0; }
.know .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--bg); color: var(--text3); }
.know .dot svg { width: 13px; height: 13px; }
.know.on .dot { background: var(--green-pale); color: var(--green-dk); }
.know strong { display: block; font-size: 13px; }
.know span { color: var(--text3); display: block; line-height: 1.4; }

/* ---------- documents (profile) ---------- */
.doc { line-height: 1.6; }
.doc h1 { font-size: 20px; }
.doc h2 { font-size: 17px; margin-top: 1.1em; }
.doc h3 { font-size: 15px; margin-top: 1em; }
.doc ul, .doc ol { padding-left: 20px; }
.profile-sec { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.profile-sec > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 16px 18px; }
.profile-sec > summary::-webkit-details-marker { display: none; }
.profile-sec > summary .t strong { display: block; }
.profile-sec > summary .t span { font-size: 13px; color: var(--text3); }
.profile-sec > summary .spacer { flex: 1; }
.profile-sec .doc { padding: 4px 22px 20px; border-top: 1px solid var(--border); }
.profile-sec .tools { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--bg3); flex-wrap: wrap; }

/* ---------- Growth Score ---------- */
.quiz { max-width: 720px; margin: 0 auto; }
.quiz-progress { height: 8px; background: #e6ebf3; border-radius: 99px; overflow: hidden; margin: 10px 0 22px; }
.quiz-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-lt)); transition: width 0.3s; }
.qtxt { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.3; margin: 6px 0 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border2); background: #fff; cursor: pointer; font-size: 15px; transition: border-color 0.15s, background 0.15s; }
.opt:hover { border-color: var(--blue-lt); }
.opt .l { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); font-weight: 800; color: var(--text2); flex: none; }
.opt.sel { border-color: var(--blue); background: var(--blue-pale); }
.opt.sel .l { background: var(--blue); color: #fff; }
.sec-badge { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 800; color: var(--blue); background: var(--blue-pale); padding: 5px 11px; border-radius: 99px; }
.areas { display: grid; gap: 10px; }
.area { display: grid; grid-template-columns: 170px 1fr 46px; gap: 12px; align-items: center; font-size: 13.5px; }
.area .nm { font-weight: 700; }
.bar { height: 10px; border-radius: 99px; background: #e6ebf3; overflow: hidden; position: relative; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar > i.before { background: #b9c6dc; }
.bar > i.after { background: var(--blue); height: 6px; top: 2px; }
.bar.low > i.after, .bar.low > i.solo { background: var(--red); }
.bar.mid > i.after, .bar.mid > i.solo { background: var(--amber); }
.bar.high > i.after, .bar.high > i.solo { background: var(--green-dk); }
.area .pc { font-weight: 800; text-align: right; }
.score-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; padding: 5px 11px; border-radius: 99px; }
.badge.danger { background: var(--red-pale); color: var(--red); }
.badge.warning { background: var(--amber-pale); color: var(--amber); }
.badge.good { background: var(--blue-pale); color: var(--blue); }
.badge.great { background: var(--green-pale); color: var(--green-dk); }
.recs { display: grid; gap: 10px; }
.rec { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; }
.rec .k { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
.rec strong { display: block; margin: 2px 0 4px; }
.rec p { margin: 0; font-size: 13.5px; color: var(--text2); }

/* ---------- graduation & masterclass ---------- */
.grad { text-align: center; padding: clamp(26px, 4vw, 44px); }
.grad .eyebrow { justify-content: center; }
.grad .trophy { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), #ff9a4d); color: #fff; box-shadow: 0 12px 30px rgba(255, 102, 0, 0.35); }
.grad .trophy svg { width: 38px; height: 38px; }
.mc { border-radius: 18px; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; background: linear-gradient(135deg, var(--navy) 0%, #0c2659 100%); color: #fff; }
.mc .copy { padding: clamp(22px, 3vw, 34px); }
.mc h2 { color: #fff; font-size: 24px; }
.mc p { color: rgba(255, 255, 255, 0.8); }
.mc ul { padding: 0; margin: 0 0 18px; list-style: none; display: grid; gap: 8px; }
.mc li { display: flex; gap: 10px; color: rgba(255, 255, 255, 0.9); font-size: 14.5px; }
.mc li svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 3px; }
.mc .photo { position: relative; min-height: 260px; background: #0c2659; }
.mc .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.mc .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0c2659 0%, transparent 35%); }
.mc .photo .cap { position: absolute; left: 18px; bottom: 16px; z-index: 1; font-size: 13px; color: #fff; background: rgba(9, 24, 57, 0.7); padding: 6px 10px; border-radius: 8px; }

/* ---------- blueprint (print) ---------- */
.bp { background: #fff; border-radius: 18px; box-shadow: var(--shadow-md); padding: clamp(22px, 3.5vw, 40px); }
.bp-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid var(--blue); padding-bottom: 16px; margin-bottom: 18px; }
.bp-head img { width: 54px; height: 56px; }
.bp h1 { font-size: 26px; margin: 0; }
.bp .kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bp .box { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; break-inside: avoid; }
.bp .box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); margin-bottom: 6px; }
.bp .box p, .bp .box li { font-size: 14px; }
.bp .box ol, .bp .box ul { margin: 0; padding-left: 18px; }
.bp .big { font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.35; }
.bp-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; color: var(--text3); flex-wrap: wrap; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--text3); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
table.leads { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 860px; }
table.leads th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); padding: 11px 12px; background: var(--bg3); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.leads td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.leads tr:last-child td { border-bottom: 0; }
table.leads tr.clickable { cursor: pointer; }
table.leads tr.clickable:hover td { background: #fafcff; }
.heat { display: inline-block; font-weight: 800; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; }
.heat.hot { background: var(--orange-pale); color: #a64200; }
.heat.warm { background: var(--amber-pale); color: var(--amber); }
.heat.cold { background: var(--bg); color: var(--text3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters .chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.drawer-bg { position: fixed; inset: 0; background: rgba(9, 24, 57, 0.45); z-index: 60; display: flex; justify-content: flex-end; }
.drawer { width: min(640px, 100%); background: var(--bg); height: 100%; overflow-y: auto; padding: 22px; box-shadow: var(--shadow-lg); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(9, 24, 57, 0.5); z-index: 70; display: grid; place-items: center; padding: 18px; }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: min(520px, 100%); box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 90; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- day complete celebration ---------- */
.cel-bg { opacity: 0; transition: opacity 0.2s; }
.cel-bg.in { opacity: 1; }
.cel { position: relative; text-align: center; width: min(480px, 100%); padding: 30px 26px 24px; transform: translateY(14px) scale(0.97); transition: transform 0.35s cubic-bezier(0.2, 1.3, 0.4, 1); }
.cel-bg.in .cel { transform: none; }
.cel h2 { font-size: 26px; margin: 2px 0 6px; }
.cel .eyebrow { justify-content: center; color: var(--orange); }
.cel-win { color: var(--text2); margin: 0 auto 4px; max-width: 380px; }
.cel-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text3); font-size: 24px; line-height: 1; cursor: pointer; }
.cel-x:hover { background: var(--bg3); color: var(--ink); }
.cel-medal { position: relative; width: 92px; height: 92px; margin: 2px auto 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 32% 28%, #ffb070 0%, var(--orange) 55%, #d94f00 100%); box-shadow: 0 0 0 8px var(--orange-pale), 0 14px 34px rgba(255, 102, 0, 0.38); animation: medal-pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 0.1s both; }
.cel-medal b { font-family: var(--display); font-size: 42px; font-weight: 800; line-height: 1; }
.cel-medal svg { width: 44px; height: 44px; }
.cel-medal .tick { position: absolute; right: -4px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green-dk); border: 3px solid #fff; animation: medal-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.55s both; }
.cel-medal .tick svg { width: 15px; height: 15px; stroke-width: 3; }
.cel-medal.soft { width: 72px; height: 72px; background: var(--green-pale); color: var(--green-dk); box-shadow: none; }
.cel-medal.soft svg { width: 34px; height: 34px; stroke-width: 2.5; }
.cel-track { display: flex; align-items: flex-start; margin: 18px 0 8px; }
.cel-step { display: grid; justify-items: center; gap: 5px; flex: none; }
.cel-step .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; background: #eef1f6; color: #8a95ab; border: 2px solid transparent; }
.cel-step .dot svg { width: 15px; height: 15px; }
.cel-step small { font-size: 11px; font-weight: 700; color: var(--text3); }
.cel-step.done .dot { background: var(--green-dk); color: #fff; }
.cel-step.done .dot svg { stroke-width: 3; }
.cel-step.just .dot { box-shadow: 0 0 0 5px var(--green-pale); animation: medal-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.45s both; }
.cel-step.next .dot { background: #fff; color: var(--orange); border-color: var(--orange); animation: unlock-pulse 1.8s ease-out 0.9s infinite; }
.cel-step.next small { color: var(--orange); }
.cel-line { flex: 1; height: 3px; border-radius: 3px; background: #e6ebf3; margin: 17px 4px 0; min-width: 8px; }
.cel-line.done { background: var(--green-dk); }
.cel-next { display: flex; gap: 12px; align-items: center; text-align: left; background: var(--orange-pale); border: 1px solid #ffd3b3; border-radius: 14px; padding: 14px 16px; margin: 16px 0 12px; }
.cel-next .eyebrow { justify-content: flex-start; margin: 0 0 2px; }
.cel-next strong { display: block; font-family: var(--display); font-size: 16px; line-height: 1.3; }
.cel-next span:not(.icon-circle) { font-size: 13px; color: var(--text2); }
.cel-next.green { background: var(--green-pale); border-color: #cdeebc; }
.cel-next.green .eyebrow { color: var(--green-dk); }
.cel-todo { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 8px; text-align: left; }
.cel-todo li { display: flex; gap: 10px; align-items: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.cel-todo li svg { width: 16px; height: 16px; color: var(--orange); flex: none; }
.cel-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cel-actions .btn { width: 100%; justify-content: center; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 71; }
.confetti i { position: absolute; top: -16px; left: var(--x); width: var(--w); height: calc(var(--w) * 0.45); background: var(--c); border-radius: 2px; opacity: 0; animation: confetti-fall var(--d) cubic-bezier(0.25, 0.6, 0.45, 1) var(--delay) forwards; }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx), 105vh, 0) rotate(var(--r)); }
}
@keyframes medal-pop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes unlock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.45); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(255, 102, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .cel, .cel-medal, .cel-medal .tick, .cel-step .dot { animation: none !important; transition: none !important; }
}
.day-tile .earned { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 800; color: var(--green-dk); margin-top: auto; }
.day-tile .earned svg { width: 14px; height: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .knows { display: none; }
  .day-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding-bottom: 36px; }
  .auth-hero .journey, .host { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform 0.22s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(9, 24, 57, 0.35); z-index: 40; }
  .topbar .menu-btn { display: grid; }
  .grid-3, .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-map { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lesson-grid { grid-template-columns: 1fr; }
  .mc { grid-template-columns: 1fr; }
  .mc .photo { min-height: 220px; order: -1; }
  .mc .photo::after { background: linear-gradient(0deg, #0c2659 0%, transparent 45%); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .day-tiles { grid-template-columns: 1fr 1fr; }
  .day-tile { min-height: 120px; }
  .area { grid-template-columns: 1fr 44px; }
  .area .bar { grid-column: 1 / -1; grid-row: 2; }
  .bp .kv { grid-template-columns: 1fr; }
  .chat { height: calc(100vh - 118px - var(--banner, 0px)); height: calc(100dvh - 118px - var(--banner, 0px)); min-height: 420px; border-radius: 12px; }
  body.demo { --banner: 56px; }
  .knows .btn { white-space: normal; }
  .msg { max-width: 94%; }
  .topbar .pill.hide-sm, .hide-sm { display: none; }
  .auth-card { padding: 26px 20px; }
  .hero .daynum { font-size: 110px; }
}

/* ---------- print (Blueprint) ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .no-print, .demo-banner, .toast { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .bp { box-shadow: none; padding: 0; border-radius: 0; }
  .bp .box { padding: 10px 12px; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
