/* styles.css
 *
 * All brand colours come from CSS variables set at runtime by themes.js, so the
 * UI re-skins instantly with no reload. Stance accent tints are fixed category
 * colours kept distinct from the brand primary, except coach, which carries the
 * theme primary as the "home" stance.
 *
 * No em-dashes or en-dashes anywhere, by project rule.
 */

/* Self-hosted Aileron. The tool renders cleanly via the fallback stack if the
   webfont fails to load. */
@font-face {
  font-family: 'Aileron';
  src: url('/assets/fonts/aileron-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('/assets/fonts/aileron-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Sensible defaults; themes.js overrides these. */
  --primary: #0000FF;
  --accent: #00C4CC;
  --tint: #CBFAF5;
  --gradient: linear-gradient(120deg, #0000FF 0%, #00C4CC 100%);
  --ink: #000000;
  --muted: #B4B4B4;
  --muted-strong: #6b6b75;
  --card: #FFFFFF;
  --page-bg: #f6f7fb;
  --hairline: #e6e8f0;
  --on-gradient: #FFFFFF;
  --coach-fg: #0000FF;
  --coach-bg: #CBFAF5;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 20, 40, 0.08);
  --font-body: 'Aileron', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.5em 0;
}

/* ---------- header ---------- */
.site-header {
  background: var(--gradient);
  color: var(--on-gradient);
}
.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--on-gradient);
}
.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}
.brand-logo-text {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
  color: var(--on-gradient);
}
.header-titles {
  flex: 1 1 auto;
  min-width: 180px;
}
.product-name {
  font-weight: 800;
  font-size: 17px;
}
.subtitle {
  font-size: 13.5px;
  opacity: 0.92;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-pill {
  background: rgba(255, 255, 255, 0.2);
  color: var(--on-gradient);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-gradient);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.28); }
.theme-toggle-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--on-gradient);
}

/* ---------- layout ---------- */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.screen-title { font-size: 26px; }
.lede {
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 14px;
}
.privacy {
  font-size: 14px;
  color: var(--muted-strong);
  background: var(--tint);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 22px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  border-radius: 10px;
  padding: 11px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gradient);
  color: var(--on-gradient);
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-ghost:hover { background: var(--page-bg); }
.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-escalate {
  background: #fbecec;
  color: #b23b3b;
  border-color: #f1d3d3;
  font-weight: 700;
}
.btn-escalate:hover { background: #f7dede; }

/* ---------- wizard ---------- */
.stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.step-dot {
  height: 6px;
  flex: 1 1 auto;
  border-radius: 999px;
  background: var(--hairline);
}
.step-dot.done { background: var(--accent); }
.step-dot.current { background: var(--primary); }

.level-tag-row { margin-bottom: 14px; }
.level-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  background: var(--tint);
  border-radius: 999px;
  padding: 4px 12px;
}
.question {
  font-size: 22px;
  margin-bottom: 8px;
}
.help {
  color: var(--muted-strong);
  font-size: 15px;
  margin: 0 0 20px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.option-btn {
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.05s ease;
}
.option-btn:hover {
  border-color: var(--primary);
  background: var(--tint);
}
.option-btn:active { transform: translateY(1px); }

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}

/* ---------- result ---------- */
:root { --stance-fg: var(--coach-fg); --stance-bg: var(--coach-bg); }
/* Outcome accent colours, kept distinct. The joint "home" win (combined)
   carries the theme primary. */
[data-stance="leadership"] { --stance-fg: #2f6f8f; --stance-bg: #e7f1f6; }
[data-stance="coaching"]   { --stance-fg: #6a4fab; --stance-bg: #efeafa; }
[data-stance="combined"]   { --stance-fg: var(--coach-fg); --stance-bg: var(--coach-bg); }
[data-stance="workshop"]   { --stance-fg: #b06f10; --stance-bg: #fbf2e2; }
[data-stance="ai"]         { --stance-fg: #2f8f87; --stance-bg: #e6f5f3; }
[data-stance="scoping"]    { --stance-fg: #b23b3b; --stance-bg: #fbecec; }

.result-head { margin-bottom: 14px; }
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.stance-pill {
  font-size: 13px;
  font-weight: 800;
  color: var(--stance-fg);
  background: var(--stance-bg);
  border-radius: 999px;
  padding: 4px 14px;
}
.competency-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-strong);
  background: var(--page-bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 12px;
}
#resultLevelTag {
  color: var(--stance-fg);
  background: transparent;
  border: 1px solid var(--stance-fg);
}
.result-stance {
  font-size: 28px;
  color: var(--stance-fg);
}
.result-body {
  font-size: 17px;
  margin: 0 0 20px;
}
.good-box {
  background: var(--stance-bg);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 22px;
}
.good-label {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--stance-fg);
  margin-bottom: 4px;
}
.good-text { margin: 0; font-size: 16px; }

.panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}
.panel-title {
  font-size: 14.5px;
  margin-bottom: 10px;
}
.panel-list {
  margin: 0;
  padding-left: 18px;
}
.panel-list li {
  font-size: 14.5px;
  margin-bottom: 8px;
}
.panel-list li:last-child { margin-bottom: 0; }

.cta-row {
  margin: 4px 0 24px;
}
.btn-cta { font-size: 16px; padding: 13px 22px; }

.recap {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  margin-bottom: 18px;
}
.recap-list {
  margin: 0;
  padding-left: 18px;
}
.recap-list li {
  margin-bottom: 10px;
}
.recap-q {
  display: block;
  font-size: 14px;
  color: var(--muted-strong);
}
.recap-a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.result-actions {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}

.error-screen .lede { color: var(--muted-strong); }

/* ---------- footer ---------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--hairline);
  background: var(--card);
}
.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted-strong);
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .panels { grid-template-columns: 1fr; }
  .header-titles { order: 3; flex-basis: 100%; }
  .card { padding: 20px; }
  .screen-title { font-size: 22px; }
  .result-stance { font-size: 24px; }
}
