/* Leadership Coach Agent — visual refresh (CSS only).
   Palette: teal + brass (the original demo's brand feel), with one
   harmonious supporting accent per view: coach teal, tools amber,
   check-in rose, lessons violet, pricing brass/gold. Dark text on
   light tints throughout; no copy, prices, IDs or behaviour changed. */
:root {
  --ink: #1a1a2e;
  --muted: #5b5b6b;
  --brand: #0d9488;            /* teal */
  --brand-dark: #0f766e;
  --brand-deep: #115e59;
  --brass: #b45309;
  --brass-bright: #d97706;
  --gold: #f59e0b;
  --violet: #7c3aed;
  --rose: #e11d48;
  --emerald: #059669;
  --bg: #f6f6f9;
  --card: #ffffff;
  --line: #e4e4ec;
  --good: #15803d;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* soft warm wash: pale teal fading into pale brass */
  background: linear-gradient(180deg, #e9f8f4 0%, #fdf9ec 55%, #f6f6f9 100%);
  background-attachment: fixed;
  color: var(--ink);
}
.hidden { display: none !important; }
.screen { min-height: 100vh; }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.lede { color: var(--muted); margin: 0 0 1.2rem; line-height: 1.55; }
.fine { font-size: .82rem; color: var(--muted); }
.error { color: #b91c1c; font-size: .9rem; }
.hint { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }

/* ---------- auth / hero ---------- */
#auth-screen {
  background:
    radial-gradient(700px 320px at 85% -5%, rgba(245, 158, 11, .28), transparent 60%),
    radial-gradient(600px 300px at 5% 0%, rgba(13, 148, 136, .25), transparent 60%),
    linear-gradient(160deg, #0f766e 0%, #115e59 45%, #134e4a 100%);
  padding: 1rem 0 2rem;
}
.auth-card {
  max-width: 460px; margin: 6vh auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 2rem; box-shadow: 0 18px 45px rgba(17, 94, 89, .28);
  border-top: 5px solid var(--brass-bright);
}
.auth-card h1 {
  background: linear-gradient(90deg, #0f766e, #0d9488 55%, #b45309);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.explainer { margin: 0 0 1.4rem; }
.explainer video { width: 100%; border-radius: 12px; background: #000; display: block; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.explainer .fine { text-align: center; margin-top: .5rem; }
.tagline { color: var(--muted); margin: 0 0 1.4rem; line-height: 1.55; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; }
.tab { flex: 1; padding: .6rem; border: 1px solid var(--line); background: #fafafc; border-radius: 8px; cursor: pointer; font-size: .95rem; transition: background .15s, color .15s; }
.tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.tab.active { background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff; border-color: var(--brand-dark); box-shadow: 0 3px 10px rgba(13, 148, 136, .35); }
.field { margin-bottom: 1rem; }
.field label, .tool-card label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], textarea, select { width: 100%; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; font-family: inherit; background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
.plan-pick label { display: block; font-weight: 400; padding: .35rem 0; }
.plan-pick input[type=radio] { accent-color: var(--brand); }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .6rem 1rem; font-size: .95rem; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.btn.primary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 45%, #0f766e 100%);
  color: #fff; border-color: #0f766e;
  box-shadow: 0 4px 14px rgba(13, 148, 136, .35);
  font-weight: 600;
}
.btn.primary:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
  box-shadow: 0 6px 18px rgba(13, 148, 136, .45);
}
.btn.small { padding: .35rem .7rem; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

/* ---------- app shell ---------- */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.2rem;
  background: linear-gradient(90deg, #115e59 0%, #0f766e 60%, #0d9488 100%);
  border-bottom: 3px solid var(--brass-bright);
  color: #fff;
  box-shadow: 0 2px 12px rgba(17, 94, 89, .25);
}
.brand { font-weight: 700; font-size: 1.15rem; color: #fff; letter-spacing: -.01em; }
.user-chip { display: flex; align-items: center; gap: .7rem; font-size: .9rem; }
.user-chip .btn { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.45); }
.user-chip .btn:hover { background: rgba(255,255,255,.26); }
.banner { padding: .7rem 1.2rem; font-size: .9rem; background: linear-gradient(90deg, #fef3c7, #fde68a); color: var(--warn-ink); border-bottom: 1px solid #fcd34d; }
.banner.live { background: linear-gradient(90deg, #d1fae5, #a7f3d0); color: #065f46; border-bottom-color: #6ee7b7; }
nav { display: flex; gap: .4rem; padding: .7rem 1.2rem 0; flex-wrap: wrap; }
.nav-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem 1rem; cursor: pointer; font-size: .92rem; transition: all .15s; }
.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.08); }
/* each nav pill takes its view's accent when active */
.nav-btn[data-view="coach"].active   { background: linear-gradient(135deg, #14b8a6, #0f766e); border-color: #0f766e; color: #fff; box-shadow: 0 3px 10px rgba(13,148,136,.35); }
.nav-btn[data-view="tools"].active   { background: linear-gradient(135deg, #f59e0b, #b45309); border-color: #b45309; color: #fff; box-shadow: 0 3px 10px rgba(180,83,9,.35); }
.nav-btn[data-view="checkin"].active{ background: linear-gradient(135deg, #fb7185, #e11d48); border-color: #e11d48; color: #fff; box-shadow: 0 3px 10px rgba(225,29,72,.35); }
.nav-btn[data-view="lessons"].active{ background: linear-gradient(135deg, #a78bfa, #7c3aed); border-color: #7c3aed; color: #fff; box-shadow: 0 3px 10px rgba(124,58,237,.35); }
.nav-btn[data-view="pricing"].active{ background: linear-gradient(135deg, #0d9488, #b45309); border-color: #0f766e; color: #fff; box-shadow: 0 3px 10px rgba(13,148,136,.35); }
main { padding: 1.2rem; max-width: 1100px; margin: 0 auto; }
.view { margin-top: .4rem; }

/* per-view tinted panels + coloured headings (decorative bar, no added copy) */
#view-coach   { background: linear-gradient(180deg, #e6f7f3, rgba(230,247,243,0)); border-radius: 16px; padding: 1rem; }
#view-tools   { background: linear-gradient(180deg, #fdf3e0, rgba(253,243,224,0)); border-radius: 16px; padding: 1rem; }
#view-checkin { background: linear-gradient(180deg, #fdeef1, rgba(253,238,241,0)); border-radius: 16px; padding: 1rem; }
#view-lessons { background: linear-gradient(180deg, #f0eafd, rgba(240,234,253,0)); border-radius: 16px; padding: 1rem; }
#view-pricing { background: linear-gradient(180deg, #fdf6dd, rgba(253,246,221,0)); border-radius: 16px; padding: 1rem; }
.view h2 { position: relative; padding-bottom: .45rem; }
.view h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 999px; margin-top: .35rem; background: linear-gradient(90deg, #0d9488, #14b8a6); }
#view-tools h2   { color: #92400e; }
#view-tools h2::after   { background: linear-gradient(90deg, #d97706, #f59e0b); }
#view-checkin h2 { color: #9f1239; }
#view-checkin h2::after { background: linear-gradient(90deg, #e11d48, #fb7185); }
#view-lessons h2 { color: #5b21b6; }
#view-lessons h2::after { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
#view-pricing h2 { color: #92400e; }
#view-pricing h2::after { background: linear-gradient(90deg, #b45309, #f59e0b); }

/* ---------- coach ---------- */
.modes { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mode-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .55rem .95rem; cursor: pointer; font-weight: 600; transition: all .15s; }
.mode-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.08); }
/* mode pills: one accent each */
.mode-btn[data-mode="coach"].active   { background: linear-gradient(135deg, #14b8a6, #0f766e); border-color: #0f766e; color: #fff; box-shadow: 0 3px 10px rgba(13,148,136,.35); }
.mode-btn[data-mode="rehearse"].active{ background: linear-gradient(135deg, #f59e0b, #b45309); border-color: #b45309; color: #fff; box-shadow: 0 3px 10px rgba(180,83,9,.35); }
.mode-btn[data-mode="ai"].active      { background: linear-gradient(135deg, #a78bfa, #7c3aed); border-color: #7c3aed; color: #fff; box-shadow: 0 3px 10px rgba(124,58,237,.35); }
.mode-btn[data-mode="career"].active  { background: linear-gradient(135deg, #fb7185, #e11d48); border-color: #e11d48; color: #fff; box-shadow: 0 3px 10px rgba(225,29,72,.35); }
.chat-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; }
.convs { background: var(--card); border: 1px solid #c9ece6; border-top: 4px solid var(--brand); border-radius: 12px; padding: .8rem; height: fit-content; box-shadow: 0 4px 14px rgba(13,148,136,.08); }
.convs ul { list-style: none; padding: 0; margin: .8rem 0 0; }
.convs li { padding: .55rem .6rem; border-radius: 8px; cursor: pointer; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convs li:hover { background: #e6f7f3; }
.convs li.active { background: linear-gradient(90deg, #ccfbf1, #e6f7f3); font-weight: 600; color: var(--brand-deep); }
.chat { background: var(--card); border: 1px solid #c9ece6; border-top: 4px solid var(--brand); border-radius: 12px; display: flex; flex-direction: column; min-height: 480px; box-shadow: 0 4px 14px rgba(13,148,136,.08); }
.messages { flex: 1; padding: 1rem; overflow-y: auto; max-height: 60vh; }
.msg { margin-bottom: 1rem; max-width: 85%; padding: .7rem .9rem; border-radius: 12px; line-height: 1.5; white-space: pre-wrap; font-size: .95rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.msg.user { background: linear-gradient(135deg, #14b8a6, #0d9488); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg.assistant { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-bottom-left-radius: 4px; }
.msg .tag { display: block; font-size: .75rem; color: var(--muted); margin-top: .4rem; }
.msg.user .tag { color: rgba(255,255,255,.85); }
.chat-form { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.source-note { font-size: .8rem; color: var(--muted); padding: 0 .9rem .7rem; margin: 0; }

/* ---------- tools ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; box-shadow: 0 4px 14px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
.tool-card:nth-child(1) { border-top: 4px solid var(--brand); }
.tool-card:nth-child(1) h3 { color: var(--brand-deep); }
.tool-card:nth-child(2) { border-top: 4px solid var(--brass-bright); }
.tool-card:nth-child(2) h3 { color: var(--brass); }
.tool-card:nth-child(3) { border-top: 4px solid var(--violet); }
.tool-card:nth-child(3) h3 { color: #5b21b6; }
.tool-card label { margin-top: .8rem; }
.tool-card .btn { margin-top: 1rem; }
.output { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 8px; padding: .8rem; white-space: pre-wrap; font-size: .9rem; margin-top: 1rem; font-family: inherit; line-height: 1.5; }
.history { list-style: none; padding: 0; }
.history li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .6rem; font-size: .9rem; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.history li .meta { color: var(--muted); font-size: .8rem; }

/* ---------- check-in ---------- */
#checkin-form .q { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .7rem; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
#checkin-form .q p { margin: 0 0 .5rem; }
#checkin-form .scale { display: flex; gap: 1rem; flex-wrap: wrap; }
#checkin-form .scale label { font-weight: 400; font-size: .9rem; }
#checkin-form .scale input[type=radio] { accent-color: var(--rose); }
.result { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--rose); border-radius: 12px; padding: 1.1rem; margin: 1rem 0; box-shadow: 0 4px 14px rgba(225,29,72,.08); }
.result .score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin-top: .8rem; }
.result .score { background: #f8f8fb; border-radius: 8px; padding: .7rem; text-align: center; }
.result .score b { display: block; font-size: 1.3rem; }
.result .bars { margin: .8rem 0; }
.result .bar-row { margin-bottom: .7rem; }
.result .bar-row label { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 700; margin-bottom: .3rem; }
.result .bar { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.result .bar i { display: block; height: 100%; border-radius: 999px; }
/* bar colours follow the fixed dimension order Clarity, Feedback, Delegation, Growth */
.result .bar-row:nth-child(1) .bar i { background: linear-gradient(90deg, #14b8a6, #0f766e); }
.result .bar-row:nth-child(1) label { color: var(--brand-deep); }
.result .bar-row:nth-child(2) .bar i { background: linear-gradient(90deg, #f59e0b, #b45309); }
.result .bar-row:nth-child(2) label { color: var(--brass); }
.result .bar-row:nth-child(3) .bar i { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.result .bar-row:nth-child(3) label { color: #5b21b6; }
.result .bar-row:nth-child(4) .bar i { background: linear-gradient(90deg, #34d399, #059669); }
.result .bar-row:nth-child(4) label { color: #065f46; }

/* ---------- lessons ---------- */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.lesson { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; box-shadow: 0 4px 14px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; }
.lesson:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
.lesson .cat { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; }
.lesson p { color: var(--muted); line-height: 1.55; font-size: .94rem; }
.lesson .takeaway { color: var(--ink); font-weight: 600; }
.lesson.done { border-color: var(--good); box-shadow: 0 4px 14px rgba(21,128,61,.12); }
.lesson.done .cat { background: #dcfce7; color: var(--good); }
.lesson .btn { margin-top: .6rem; }
/* Category colour-coding by fixed lesson order in lib/lessons.js:
   AI = 1, 3, 6, 9, 11 (teal) · Leadership = 2, 4, 5, 7, 8, 10, 12 (brass).
   If the lesson order ever changes, update these selectors. */
.lesson:nth-child(1), .lesson:nth-child(3), .lesson:nth-child(6),
.lesson:nth-child(9), .lesson:nth-child(11) { border-top: 4px solid var(--brand); }
.lesson:nth-child(1) .cat, .lesson:nth-child(3) .cat, .lesson:nth-child(6) .cat,
.lesson:nth-child(9) .cat, .lesson:nth-child(11) .cat { background: #ccfbf1; color: var(--brand-deep); }
.lesson:nth-child(1) h3, .lesson:nth-child(3) h3, .lesson:nth-child(6) h3,
.lesson:nth-child(9) h3, .lesson:nth-child(11) h3 { color: var(--brand-deep); }
.lesson:nth-child(2), .lesson:nth-child(4), .lesson:nth-child(5),
.lesson:nth-child(7), .lesson:nth-child(8), .lesson:nth-child(10),
.lesson:nth-child(12) { border-top: 4px solid var(--brass-bright); }
.lesson:nth-child(2) .cat, .lesson:nth-child(4) .cat, .lesson:nth-child(5) .cat,
.lesson:nth-child(7) .cat, .lesson:nth-child(8) .cat, .lesson:nth-child(10) .cat,
.lesson:nth-child(12) .cat { background: #fef3c7; color: var(--brass); }
.lesson:nth-child(2) h3, .lesson:nth-child(4) h3, .lesson:nth-child(5) h3,
.lesson:nth-child(7) h3, .lesson:nth-child(8) h3, .lesson:nth-child(10) h3,
.lesson:nth-child(12) h3 { color: var(--brass); }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; box-shadow: 0 4px 14px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; }
.plan:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
.plan:nth-child(1) { border-top: 4px solid var(--brand); }
.plan:nth-child(3) { border-top: 4px solid var(--violet); }
.plan.featured {
  border: 2px solid var(--brass-bright);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
  box-shadow: 0 10px 28px rgba(180, 83, 9, .22);
  transform: scale(1.03);
}
.plan.featured:hover { transform: scale(1.03) translateY(-2px); }
.plan.featured h3 { color: var(--brass); }
.plan.featured .price { color: var(--brass); }
.plan .price { font-size: 1.7rem; font-weight: 700; margin: .4rem 0; }
.plan ul { padding-left: 1.1rem; color: var(--muted); line-height: 1.7; font-size: .93rem; }
.plan .btn { margin-top: 1rem; width: 100%; }
.plan .soon { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6rem; }

@media (max-width: 720px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .convs ul { display: flex; gap: .4rem; overflow-x: auto; }
  .convs li { white-space: nowrap; }
  .auth-card { margin: 4vh 1rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .plan.featured { transform: none; }
  .plan.featured:hover { transform: translateY(-2px); }
  #view-coach, #view-tools, #view-checkin, #view-lessons, #view-pricing { padding: .7rem; }
}
