/* ============================================================
   Trinity of Management -- design tokens
   Paper background, ink text, three category accents echoing
   the P / M / FM triad the whole app is built around.
   ============================================================ */
:root {
  --paper: #FAF7F0;
  --paper-raised: #FFFFFF;
  --ink: #1C1C1C;
  --ink-soft: #6B6255;
  --line: #E3DCCB;

  /* Sirolli Institute brand greens, pulled from the logo */
  --brand-forest: #214828;
  --brand-sage: #83b887;

  --c-product: #214828;    /* forest green, from logo */
  --c-marketing: #A6672E;  /* warm clay, complements the greens */
  --c-finance: #3D5A6C;    /* slate blue-grey, complements the greens */

  --serif: 'Lora', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 64px 0 80px;
}

.screen[hidden] { display: none; }

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 22px;
  max-width: 15ch;
}

.lede {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 46ch;
  margin: 0 0 18px;
}

.lede em {
  font-style: italic;
}

.fine-print {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 22px;
}

/* ---------- intro triad preview ---------- */
.triad-preview {
  display: flex;
  gap: 10px;
  margin: 30px 0 38px;
}
.triad-item {
  flex: 1;
  border-top: 3px solid var(--accent);
  padding-top: 10px;
}
.triad-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- intro form ---------- */
.intro-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 380px;
}
.intro-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 14px;
}
.intro-form input {
  font-family: var(--sans);
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
}
.intro-form input:focus {
  outline: 2px solid var(--c-product);
  outline-offset: 1px;
}

.btn-primary {
  margin-top: 26px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--paper);
  background: var(--brand-forest);
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: #163419; }
.btn-primary:focus-visible { outline: 2px solid var(--brand-sage); outline-offset: 2px; }

/* ---------- brand header ---------- */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}
.brand-header img {
  height: 88px;
  width: auto;
}

.btn-text {
  margin-top: 30px;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 0;
}
.btn-text:disabled { opacity: 0; pointer-events: none; }
.btn-text:hover:not(:disabled) { color: var(--ink); }
.btn-text:focus-visible { outline: 2px solid var(--c-product); outline-offset: 2px; }

/* ---------- progress ---------- */
.progress-track {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.progress-seg {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress-seg[data-cat="P"] { --seg-color: var(--c-product); }
.progress-seg[data-cat="M"] { --seg-color: var(--c-marketing); }
.progress-seg[data-cat="FM"] { --seg-color: var(--c-finance); }
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--seg-color);
  transition: width 0.3s ease;
}
.q-count {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 40px;
}

/* ---------- question card ---------- */
.q-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.q-text {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.45;
  margin: 0 0 34px;
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opt-btn {
  text-align: left;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.opt-btn:hover { border-color: var(--ink); }
.opt-btn:focus-visible { outline: 2px solid var(--c-product); outline-offset: 2px; }
.opt-btn.opt-idk { color: var(--ink-soft); }
.opt-btn.selected { border-color: var(--ink); background: #F2EEE2; }

/* ---------- results ---------- */
.simplex-wrap {
  margin: 30px 0 20px;
  display: flex;
  justify-content: center;
}
#simplex { width: 100%; max-width: 400px; height: auto; }

.score-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.score-row {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 12px;
}
.score-row .cat-name {
  font-size: 14px;
  font-weight: 600;
}
.score-row .bar-track {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.score-row .bar-fill {
  height: 100%;
  border-radius: 4px;
}
.score-row .cat-score {
  font-size: 14px;
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .wrap { padding-top: 44px; }
  h1 { font-size: 32px; }
  .q-text { font-size: 22px; }
}

/* ---------- submitting / quote rotator ---------- */
.submitting-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--brand-forest);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 26px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submitting-inner .lede {
  margin-bottom: 40px;
  color: var(--ink-soft);
}

.quote-rotator {
  margin: 0;
  max-width: 44ch;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 12px;
  transition: opacity 0.4s ease;
}

.quote-attr {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-forest);
  margin: 0;
  transition: opacity 0.4s ease;
  min-height: 1em; /* keeps layout stable when a theme line has no attribution */
}

.quote-text.fading, .quote-attr.fading {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--line); }
  .quote-text, .quote-attr { transition: none; }
}

/* ---------- persistent top bar ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.top-bar-logo {
  display: inline-block;
  line-height: 0;
}
.top-bar-logo img {
  height: 68px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.top-bar-logo:hover img { opacity: 1; }
.top-bar-logo:focus-visible {
  outline: 2px solid var(--brand-sage);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.lang-switcher select {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
}
.lang-switcher select:focus-visible {
  outline: 2px solid var(--brand-sage);
  outline-offset: 2px;
}

.btn-retake {
  margin-top: 8px;
  display: block;
}

