:root{--bg:#07101f;--panel:#0d192c;--panel2:#111f35;--line:#22324b;--text:#eef5ff;--muted:#9fb0c8;--accent:#7c5cff;--accent2:#2ed3d0;--good:#40d69a;--bad:#ff6f85;--warn:#ffc766;--max:1180px}*{box-sizing:border-box}html{color-scheme:dark}body{margin:0;background:radial-gradient(circle at 85% 0,#172048 0,transparent 35%),var(--bg);font:15px/1.65 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text)}a{color:#c9d4ff;text-decoration:none}a:hover{color:white}.topbar{height:68px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - var(--max))/2));background:rgba(7,16,31,.88);backdrop-filter:blur(14px);position:sticky;top:0;z-index:10}.brand{font-size:19px;font-weight:800;color:white}.brand span{color:var(--accent2)}nav{display:flex;align-items:center;gap:18px}nav a{font-size:14px}nav a.active{color:white}.user-chip{border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:var(--muted);font-size:13px}.shell{width:min(var(--max),calc(100% - 40px));margin:0 auto;min-height:calc(100vh - 130px);padding:42px 0 70px}.footer{text-align:center;border-top:1px solid var(--line);padding:24px;color:#71829b;font-size:13px}.hero{display:grid;grid-template-columns:1.5fr .7fr;gap:50px;align-items:center;padding:70px 0}.hero h1,.page-head h1{font-size:clamp(36px,5vw,64px);line-height:1.03;letter-spacing:-.04em;margin:10px 0 18px}.hero p,.lead,.page-head>p{font-size:18px;color:var(--muted);max-width:760px}.hero-card{background:linear-gradient(145deg,#172443,#0d182c);border:1px solid #2d3e62;padding:30px;border-radius:24px;box-shadow:0 24px 80px rgba(0,0,0,.25)}.hero-card ol{font-size:22px;line-height:1.8}.hero-actions{display:flex;gap:12px;margin-top:28px}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--accent2)}.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:11px;padding:12px 18px;background:linear-gradient(135deg,var(--accent),#5d7cff);color:white!important;font-weight:750;cursor:pointer;box-shadow:0 8px 24px rgba(93,92,255,.22)}.button:hover{filter:brightness(1.08)}.button.ghost{background:transparent;border:1px solid #40516f;box-shadow:none}.button.small{padding:8px 12px;font-size:13px}.button.full{width:100%}.button:disabled{opacity:.45;cursor:not-allowed}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.card{background:linear-gradient(180deg,rgba(17,31,53,.92),rgba(11,24,43,.92));border:1px solid var(--line);border-radius:17px;padding:24px;box-shadow:0 16px 44px rgba(0,0,0,.12)}.card h2,.card h3{margin-top:0}.muted,small{color:var(--muted)}.auth-wrap{max-width:520px;margin:45px auto}.form{display:grid;gap:16px}.form label{display:grid;gap:7px;font-weight:650}.form input,.form select,.form textarea,input,select,textarea{width:100%;border:1px solid #31425f;background:#081426;color:var(--text);border-radius:10px;padding:11px 12px;font:inherit;outline:none}.form input:focus,.form select:focus,.form textarea:focus,input:focus,select:focus,textarea:focus{border-color:#726cff;box-shadow:0 0 0 3px rgba(124,92,255,.12)}.flash{border-radius:12px;padding:12px 15px;margin-bottom:18px}.flash.success{background:rgba(64,214,154,.12);border:1px solid rgba(64,214,154,.3);color:#a7f3d0}.flash.error{background:rgba(255,111,133,.11);border:1px solid rgba(255,111,133,.3);color:#ffc1cb}.page-head{padding:18px 0 30px}.page-head h1{font-size:clamp(34px,4vw,54px)}.page-head.split{display:flex;justify-content:space-between;gap:30px;align-items:center}.score-ring{width:150px;height:150px;border-radius:50%;display:grid;place-items:center;text-align:center;background:radial-gradient(closest-side,var(--bg) 78%,transparent 80%),conic-gradient(var(--accent2) calc(var(--p)*1%),#26344b 0)}.score-ring strong{display:block;font-size:30px;line-height:1}.score-ring span{display:block;color:var(--muted);font-size:11px;margin-top:5px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:10px 0 34px}.stats>div{border:1px solid var(--line);border-radius:14px;padding:18px;background:rgba(13,25,44,.75)}.stats strong{display:block;font-size:26px}.stats span{color:var(--muted);font-size:12px}.next-card{display:flex;justify-content:space-between;gap:25px;align-items:center;margin-bottom:40px}.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.chips span{border:1px solid #314461;background:#0a1729;padding:5px 9px;border-radius:999px;color:#bed0e6;font-size:11px}.section-title{display:flex;justify-content:space-between;align-items:end;margin:35px 0 15px}.section-title h2{margin:4px 0}.competency-list{display:grid;gap:8px}.track-title{margin:22px 0 5px;color:#aabbd4;font-size:13px;text-transform:uppercase;letter-spacing:.12em}.competency{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:13px;background:rgba(11,24,43,.75)}.competency.locked{opacity:.52}.status-dot{width:10px;height:10px;border-radius:50%;background:#60708a}.competency.mastered .status-dot{background:var(--good)}.competency.learning .status-dot,.competency.practicing .status-dot{background:var(--accent2)}.competency.remediation .status-dot{background:var(--warn)}.grow{flex:1}.grow strong,.grow small{display:block}.mini-progress{width:120px;height:6px;background:#1e2b40;border-radius:99px;overflow:hidden}.mini-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2))}.back{display:block;margin-bottom:14px;color:var(--muted)}.generate-card{display:flex;align-items:center;justify-content:space-between;gap:24px}.locked-box{border-color:#554a31}.lesson-content{max-width:860px}.lesson-intro{margin-bottom:32px}.lesson-section{padding:15px 0 25px;border-bottom:1px solid var(--line)}.lesson-section h3{font-size:25px}.callout,.example{border-left:3px solid var(--accent2);padding:10px 18px;background:rgba(46,211,208,.06);border-radius:0 10px 10px 0}.example{border-left-color:var(--accent);margin-top:14px}.steps li{margin-bottom:8px}.prompt-block{white-space:pre-wrap;background:#050d19;border:1px solid #263956;border-radius:12px;padding:18px;color:#d6e0ff}.exercise-card,.evaluation{margin-top:32px;max-width:900px}.evaluation-score{display:flex;align-items:baseline;gap:15px}.evaluation-score strong{font-size:50px}.coach-layout{display:grid;grid-template-columns:260px 1fr;gap:18px}.coach-sidebar{display:grid;align-content:start;gap:8px}.thread-link{border:1px solid var(--line);border-radius:11px;padding:11px;background:#0b1729}.thread-link.active{border-color:#725fff;background:#151c39}.thread-link strong,.thread-link small{display:block}.coach-main{min-height:620px;display:flex;flex-direction:column}.messages{flex:1;display:grid;align-content:start;gap:15px}.message{max-width:82%;padding:13px 15px;border-radius:14px;background:#0a1729;border:1px solid var(--line)}.message.user{margin-left:auto;background:#211f4a}.message span{font-size:11px;color:var(--accent2);font-weight:800}.message p{margin:4px 0}.coach-empty{max-width:500px;margin:auto;text-align:center;color:var(--muted)}.coach-form{border-top:1px solid var(--line);padding-top:16px;display:grid;grid-template-columns:180px 1fr auto;gap:10px;align-items:end}.coach-form textarea{resize:vertical}.admin-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}.table-wrap{overflow:auto}.table-wrap.card{padding:0}table{border-collapse:collapse;width:100%;min-width:760px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:13px 14px;vertical-align:middle}th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#91a2ba}tr:last-child td{border-bottom:0}.mini-input{width:90px}.price h2{font-size:42px}.price h2 small{font-size:14px;font-weight:500}@media(max-width:820px){.shell{width:min(100% - 24px,var(--max));padding-top:25px}.topbar{padding:0 12px}.topbar nav a:not(.button),.user-chip{display:none}.hero{grid-template-columns:1fr;padding:35px 0}.grid.two,.grid.three,.admin-nav{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.page-head.split,.next-card{align-items:flex-start;flex-direction:column}.score-ring{width:120px;height:120px}.mini-progress{display:none}.coach-layout{grid-template-columns:1fr}.coach-sidebar{grid-template-columns:1fr 1fr}.coach-main{min-height:520px}.coach-form{grid-template-columns:1fr}.message{max-width:95%}}

/* =========================================================
   Contrast & readability refinement — Phase 2.1
   Keeps the dark premium identity while separating interactive
   surfaces from the page background more clearly.
   ========================================================= */
:root{
  --bg:#050d18;
  --panel:#10213a;
  --panel2:#142945;
  --line:#354d6d;
  --text:#f4f8ff;
  --muted:#b9c7da;
}

body{
  background:
    radial-gradient(circle at 85% 0,#1a2754 0,transparent 34%),
    var(--bg);
}

.card{
  background:linear-gradient(180deg,rgba(20,41,69,.97),rgba(14,31,53,.97));
  border-color:#365273;
  box-shadow:0 18px 52px rgba(0,0,0,.22);
}

.hero-card{
  background:linear-gradient(145deg,#1b3153,#112440);
  border-color:#466387;
}

/* Form controls: clearly distinct from the surrounding card/page. */
.form input,
.form select,
.form textarea,
input,
select,
textarea{
  background:#18304f;
  border:1px solid #58779e;
  color:#ffffff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}

.form input:hover,
.form select:hover,
.form textarea:hover,
input:hover,
select:hover,
textarea:hover{
  border-color:#7191ba;
  background:#1b3658;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
input:focus,
select:focus,
textarea:focus{
  background:#1c385d;
  border-color:#9a8cff;
  box-shadow:0 0 0 3px rgba(124,92,255,.26),inset 0 1px 0 rgba(255,255,255,.05);
}

input::placeholder,
textarea::placeholder{
  color:#a8b8cd;
  opacity:1;
}

select option{
  background:#142945;
  color:#f4f8ff;
}

/* Browser autofill should stay readable in the dark theme. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color:#ffffff;
  -webkit-box-shadow:0 0 0 1000px #18304f inset;
  caret-color:#ffffff;
  transition:background-color 9999s ease-out 0s;
}

.form label{
  color:#f3f7ff;
  font-weight:700;
}

.muted,
small{
  color:#b9c7da;
}

a{
  color:#d7e0ff;
}

.back{
  color:#b5c5db;
}

.user-chip{
  color:#c2d0e3;
  border-color:#3c5576;
}

.button.ghost{
  border-color:#587297;
  background:rgba(24,48,79,.45);
}

.button.ghost:hover{
  background:#1b3658;
}

.stats>div,
.competency,
.thread-link,
.message{
  background:rgba(18,38,64,.92);
  border-color:#354f70;
}

.thread-link.active{
  background:#25275a;
  border-color:#8d79ff;
}

.chips span{
  background:#142a47;
  border-color:#446181;
  color:#d4e2f3;
}

.prompt-block{
  background:#0c192a;
  border-color:#3c587b;
  color:#e5ecff;
}

.callout,.example{
  background:rgba(46,211,208,.09);
}

/* Make table rows and admin controls easier to scan. */
tbody tr:nth-child(even){
  background:rgba(19,39,65,.42);
}

th{
  color:#b1bfd2;
}

/* Strong keyboard focus indication across interactive elements. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:2px solid #b3a7ff;
  outline-offset:2px;
}

/* =========================================================
   Contrast refinement — Phase 2.2
   Locked items remain visually distinct without reducing
   text opacity. Secondary text is brighter for readability.
   ========================================================= */
:root{
  --muted:#cbd7e6;
}

/* Never fade an entire locked row: this was reducing all text contrast. */
.competency.locked{
  opacity:1;
  background:linear-gradient(180deg,#10233b,#0e1f35);
  border-color:#3b5575;
}

.competency.locked:hover{
  background:linear-gradient(180deg,#132a47,#10233b);
  border-color:#4d6b90;
}

/* Primary competency titles should stay clearly legible in every state. */
.competency .grow strong{
  color:#f7faff;
  font-weight:750;
}

/* Secondary metadata remains subordinate, but readable. */
.competency .grow small{
  color:#c7d4e5;
  font-weight:500;
}

.competency b{
  color:#f4f8ff;
}

.competency.locked .grow strong{
  color:#e8eef8;
}

.competency.locked .grow small{
  color:#bdcbe0;
}

.competency.locked b{
  color:#d9e3f1;
}

.competency.locked .status-dot{
  background:#7890ad;
  box-shadow:0 0 0 3px rgba(120,144,173,.12);
}

.track-title{
  color:#c8d7eb;
  font-weight:800;
}

.muted,
small,
.stats span,
.score-ring span,
.coach-empty,
.back{
  color:#c7d4e5;
}

/* Make card paragraph text less grey. */
.card p,
.next-card p,
.lesson-section p{
  color:#e1e9f4;
}

/* Increase progress-track visibility even at 0%. */
.mini-progress{
  background:#263b57;
  border:1px solid #314b6b;
}

/* Dashboard section headings need stronger visual hierarchy. */
.section-title h2,
.track-title,
.page-head h1{
  text-shadow:0 1px 0 rgba(0,0,0,.15);
}

/* =========================================================
   Progress visibility refinement — Phase 2.3
   Empty progress tracks are intentionally lighter than cards.
   ========================================================= */
.mini-progress{
  width:180px;
  height:8px;
  background:#58708f;
  border:1px solid #6f89aa;
  border-radius:999px;
  overflow:hidden;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.20),
    0 0 0 1px rgba(0,0,0,.08);
}

.mini-progress span{
  display:block;
  height:100%;
  min-width:0;
  background:linear-gradient(90deg,#8d73ff,#31ded8);
  box-shadow:0 0 8px rgba(46,211,208,.28);
}

/* Keep the track clearly visible even when progress is exactly 0%. */
.competency .mini-progress{
  opacity:1;
}

/* =========================================================
   Phase 3 — AI Media Studio
   ========================================================= */
.credit-card{min-width:190px;border:1px solid #496887;background:linear-gradient(180deg,#19304c,#12253d);border-radius:18px;padding:18px 22px;text-align:center;box-shadow:0 14px 36px rgba(0,0,0,.16)}
.credit-card strong{display:block;font-size:34px;line-height:1.05;color:#fff}.credit-card span,.credit-card small,.credit-card a{display:block;color:#d7e6f7}.credit-card a{margin-top:7px;color:#8ff2ed}
.studio-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,.7fr);gap:20px;margin-bottom:22px}.provider-list{display:grid;gap:9px;margin:14px 0 22px}.provider-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid #38506d;border-radius:11px;background:#13243a}.provider-row strong,.provider-row small{display:block}.provider-row small{color:#b9cce2}
.status-pill{display:inline-flex;align-items:center;justify-content:center;border:1px solid #536b88;background:#1a304c;border-radius:999px;padding:4px 9px;font-size:10px;font-weight:850;letter-spacing:.06em;color:#e9f2ff;white-space:nowrap}.status-pill.ready,.status-pill.completed{border-color:#3a9274;background:#123e35;color:#aef7d7}.status-pill.configured,.status-pill.processing,.status-pill.submitted,.status-pill.queued{border-color:#7667d9;background:#282356;color:#ddd7ff}.status-pill.planned{border-color:#58677b;background:#202b3a;color:#d2ddea}.status-pill.failed,.status-pill.cancelled,.status-pill.blocked{border-color:#a94f61;background:#4a202b;color:#ffd0d8}
.phase-note{margin-top:22px}.phase-note strong{font-size:18px}.phase-note p{margin-bottom:0}.studio-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 32px;border-color:#3f5b7e;background:linear-gradient(120deg,#152a44,#111e39)}.studio-banner h2{margin:3px 0 5px}.studio-banner p{margin:0;max-width:720px}
.creation-list{display:grid;gap:16px}.creation-job.selected{border-color:#7169ff;box-shadow:0 0 0 2px rgba(113,105,255,.14)}.creation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.creation-head h3{margin:4px 0}.creation-job>p{max-width:920px}.creation-meta{display:flex;flex-wrap:wrap;gap:12px;color:#c7d8eb;font-size:12px;margin:12px 0 8px}.creation-meta span{border:1px solid #3d536e;background:#102139;border-radius:999px;padding:4px 8px}.media-progress{height:10px;background:#57708f;border:1px solid #7590b2;border-radius:999px;overflow:hidden}.media-progress span{display:block;height:100%;background:linear-gradient(90deg,#8d73ff,#31ded8)}.media-output{margin-top:16px;border:1px solid #36506d;border-radius:14px;overflow:hidden;background:#050b13}.media-output video{display:block;width:100%;max-height:560px;background:#000}.admin-nav{grid-template-columns:repeat(4,1fr)}
@media(max-width:980px){.studio-grid{grid-template-columns:1fr}.admin-nav{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.studio-banner{align-items:flex-start;flex-direction:column}.credit-card{width:100%}.creation-head{align-items:flex-start;flex-direction:column}.admin-nav{grid-template-columns:1fr}}

/* Phase 3.1 — Runway live */
.studio-cost-note{border:1px solid #526f92;background:#172d48;color:#e9f2ff;border-radius:12px;padding:12px 14px;line-height:1.55}
.studio-cost-note strong{color:#8ff2ed}


/* =========================================================
   Phase 3.1.3 — Runway prompt guard & AI compression
   ========================================================= */
.prompt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.prompt-counter{display:inline-flex;align-items:center;justify-content:center;min-width:92px;border:1px solid #496581;background:#132943;color:#dbe8f7;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:800;letter-spacing:.02em}
.prompt-counter.safe{border-color:#49708c;color:#dcecff}
.prompt-counter.warning{border-color:#b88732;background:#4a3515;color:#ffe1a2}
.prompt-counter.over{border-color:#b95165;background:#4c202b;color:#ffd1da}
.prompt-limit-message,.prompt-compress-status{display:block;margin-top:3px;color:#c9d7e8;font-weight:500}
.prompt-limit-message.warning{color:#ffd58d}
.prompt-limit-message.over{color:#ffb4c1;font-weight:700}
.prompt-compress-status.success{color:#aef7d7}
.prompt-compress-status.error{color:#ffb4c1}
#compress-media-prompt:disabled{opacity:.55}
@media(max-width:560px){.prompt-toolbar{align-items:stretch;flex-direction:column}.prompt-counter{align-self:flex-start}#compress-media-prompt{width:100%}}

/* Phase 4: access tiers + paid membership */
.tier-selector,.tier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 22px}.tier-choice,.tier-card{position:relative;border:1px solid #4a6582;border-radius:16px;padding:16px;background:#18334f}.tier-choice{cursor:pointer;display:flex;flex-direction:column;gap:6px}.tier-choice input{position:absolute;right:14px;top:14px;width:auto}.tier-choice strong,.tier-card h2{color:#f8fbff}.tier-choice span,.tier-card p,.tier-card li{color:#d4e2f0}.tier-choice.training,.tier-card.training{background:#163d45;border-color:#4f8b91}.tier-choice.economy,.tier-card.economy{background:#2f3218;border-color:#8f934a}.tier-choice.premium,.tier-card.premium{background:#30214c;border-color:#7757aa}.tier-choice:has(input:checked){outline:2px solid #9abfff;box-shadow:0 0 0 4px rgba(92,139,255,.12)}.tier-choice.locked{opacity:.72;cursor:not-allowed}.tier-choice em{font-style:normal;color:#ffd9a3;font-size:12px;font-weight:700}.tier-badge{min-width:160px;border-radius:16px;padding:16px 18px;border:1px solid #56728e;background:#17334f;text-align:center}.tier-badge strong{display:block;font-size:21px;color:#fff}.tier-badge span{display:block;margin-top:4px;color:#d8e7f5}.tier-badge.training{background:#163d45;border-color:#4f8b91}.tier-badge.premium{background:#30214c;border-color:#7757aa}.upgrade-strip{margin:0 0 20px;padding:13px 16px;border-radius:12px;background:#4a3515;border:1px solid #c18a3a;color:#fff1cd}.upgrade-strip a{color:#fff;font-weight:800;text-decoration:underline}.prompt-guard{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:9px 12px;border:1px solid #55718f;border-radius:10px;background:#18334f;color:#f3f8ff}.prompt-guard.warning{border-color:#d29b3f;background:#4b3515}.prompt-guard.over{border-color:#d85a73;background:#4d202b}.admin-note{padding:12px 14px;border:1px solid #55718f;border-radius:12px;background:#18334f;color:#dce8f4}.paypal-state{display:grid;gap:8px}.paypal-state code{word-break:break-all}.tier-chip{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.tier-chip.training{background:#1e5961;color:#dffcff}.tier-chip.economy{background:#575a24;color:#fff9b8}.tier-chip.premium{background:#513a7a;color:#eee4ff}
@media(max-width:800px){.tier-selector,.tier-grid{grid-template-columns:1fr}.tier-badge{min-width:0}}

.cancel-membership-form{margin-top:16px;display:flex;justify-content:flex-end}
