/* style.css — Mindwise
 * Material Design 3, hand-implemented with CSS custom properties (design tokens).
 * NO gradients, NO glow, NO glassmorphism — calm and credible on purpose.
 * Seed color: warm sand / terracotta #B05E3B (see PRD §6.2).
 */

:root {
  /* ---- M3 color roles (our tokens) ---- */
  --md-sys-color-primary:            #B05E3B;
  --md-sys-color-on-primary:         #FFFFFF;
  --md-sys-color-primary-container:  #FFDBCB;
  --md-sys-color-on-primary-container:#3E1600;
  --md-sys-color-surface:           #FFFBFF;
  --md-sys-color-surface-variant:   #F2DDD5;
  --md-sys-color-on-surface:        #201A17;
  --md-sys-color-on-surface-variant:#52443D;
  --md-sys-color-outline:           #857068;
  --md-sys-color-outline-variant:   #D7C2B8;
  --md-sys-color-error:             #B3261E;
  --md-sys-color-on-error:          #FFFFFF;
  --md-sys-color-error-container:    #F9DEDC;
  --md-sys-color-on-error-container:#410E0B;

  /* ---- M3 shape (rounded, not pill-everything) ---- */
  --md-shape-s:  8px;
  --md-shape-m:  12px;
  --md-shape-l:  20px;
  --md-shape-xl: 28px;

  /* ---- type (system font stack = no web-font loading) ---- */
  --md-font: "Roboto", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--md-font);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- Surfaces / elevation (subtle, no glow) ---- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.credit {
  font-size: 12px; 
  color: var(--md-sys-color-on-surface-variant); 
  margin: 6px 0 0; 
}


.topbar {
  text-align: center;
  padding: 32px 0 8px;
}
.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--md-sys-color-primary);
}
.tagline { color: var(--md-sys-color-on-surface-variant); margin: 4px 0 0; }

/* ---- Disclaimer banner ---- */
.disclaimer {
  background: var(--md-sys-color-surface-variant);
  border-radius: var(--md-shape-m);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--md-sys-color-on-surface-variant);
  margin: 20px 0 28px;
}
.disclaimer strong { color: var(--md-sys-color-on-surface); }

/* ---- Instrument cards (home) ---- */
.grid { display: grid; gap: 16px; }
.card {
  display: block;
  text-decoration: none;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-l);
  padding: 20px;
  color: inherit;
  transition: background .15s, border-color .15s;
}
.card:hover { background: var(--md-sys-color-surface-variant); border-color: var(--md-sys-color-primary); }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p  { margin: 0; color: var(--md-sys-color-on-surface-variant); font-size: 14px; }

/* ---- Question screen ---- */
.progress { height: 6px; background: var(--md-sys-color-surface-variant); border-radius: 99px; overflow: hidden; margin: 8px 0 24px; }
.progress > i { display: block; height: 100%; background: var(--md-sys-color-primary); width: 0; transition: width .25s; }

.q-prompt { font-size: 15px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 4px; }
.q-text { font-size: 20px; font-weight: 500; margin: 0 0 22px; }

.options { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-m);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--md-sys-color-surface);
  font-size: 15px;
}
.opt:hover { border-color: var(--md-sys-color-primary); }
.opt.selected { background: var(--md-sys-color-primary-container); border-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary-container); }

.nav-row { display: flex; justify-content: space-between; margin-top: 24px; }

/* ---- Buttons (M3 filled / text) ---- */
.btn {
  font-family: var(--md-font);
  font-size: 15px; font-weight: 600;
  border: none; border-radius: var(--md-shape-m);
  padding: 12px 22px; cursor: pointer;
}
.btn-primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-text { background: transparent; color: var(--md-sys-color-primary); }
.btn-text:disabled { opacity: .3; cursor: not-allowed; }

/* ---- Result screen ---- */
.result-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.score-chip {
  display: inline-block;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: 99px; padding: 6px 16px; font-weight: 600; margin: 8px 0 16px;
}
.band-box {
  background: var(--md-sys-color-surface-variant);
  border-radius: var(--md-shape-l);
  padding: 18px 20px; margin: 12px 0;
}
.band-box h4 { margin: 0 0 6px; font-size: 17px; }

/* ---- Crisis block (serious, uses error colors) ---- */
.crisis {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border-radius: var(--md-shape-l);
  padding: 18px 20px; margin: 18px 0;
}
.crisis h4 { margin: 0 0 8px; }
.crisis ul { margin: 6px 0 0; padding-left: 18px; }

.source { font-size: 12.5px; color: var(--md-sys-color-on-surface-variant); margin-top: 14px; }

footer {
  text-align: center; font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  margin-top: 40px; padding-top: 18px;
}

.hidden { display: none; }
