/* ─────────────────────── MOX brand layer ───────────────────────
   Shared by the PM dashboard and the respondent form. Same system as
   the website questionnaire: Charcoal ground, Oxide atmosphere,
   Vermillion accent, Linen type.
---------------------------------------------------------------------- */

:root {
  --charcoal:   #121212;
  --surface:    #1b1815;
  --surface-2:  #221e1a;
  --surface-3:  #2a2521;
  --line:       #332d27;
  --line-soft:  #2a2521;

  --linen:      #f1eade;
  --stone:      #a2988a;
  --stone-deep: #8a8174;   /* lifted from #6f675c so small text clears 4.5:1 */

  --vermillion:        #b91800;
  --vermillion-bright: #de2c0f;
  --vermillion-soft:   rgba(185, 24, 0, .14);
  --oxide:      #460400;

  --ok:         #6fbf8a;
  --ok-soft:    rgba(111, 191, 138, .13);
  --warn:       #e0a640;
  --warn-soft:  rgba(224, 166, 64, .13);

  --font-head:   "Space Grotesk", "Arial Black", sans-serif;
  --font-body:   "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  --font-accent: "Fraunces", Georgia, serif;

  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --edge: inset 0 1px 0 rgba(241, 234, 222, .045);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--charcoal);
  color: var(--linen);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--vermillion); color: var(--linen); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ───────────── buttons ───────────── */

.btn {
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px; letter-spacing: .01em;
  border: none; border-radius: 99px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 22px; white-space: nowrap; text-decoration: none;
  transition: transform .25s var(--ease-out), background .25s var(--ease-soft), color .25s var(--ease-soft), border-color .25s var(--ease-soft);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--vermillion); color: var(--linen); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 24px -12px rgba(185,24,0,.55); }
.btn-primary:hover:not(:disabled) { background: var(--vermillion-bright); }
.btn-ghost { background: transparent; color: var(--stone); border: 1.5px solid var(--line); padding: 9.5px 20px; }
.btn-ghost:hover:not(:disabled) { border-color: var(--linen); color: var(--linen); }
.btn-quiet { background: var(--surface-2); color: var(--linen); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: transparent; color: var(--vermillion-bright); border: 1.5px solid #5a1608; padding: 9.5px 20px; }
.btn-danger:hover:not(:disabled) { background: var(--vermillion-soft); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-ghost.btn-sm, .btn-danger.btn-sm { padding: 5.5px 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-arrow { display: inline-block; transition: transform .3s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.link-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 13.5px; font-weight: 500; color: var(--stone);
  text-decoration: underline; text-underline-offset: 4px;
  transition: color .2s;
}
.link-btn:hover { color: var(--vermillion-bright); }

.btn:focus-visible, .link-btn:focus-visible, .chip:focus-visible, .opt-card:focus-visible,
.seg-btn:focus-visible, a:focus-visible, .check:focus-within {
  outline: 2px solid var(--vermillion-bright); outline-offset: 3px;
}

/* ───────────── fields ───────────── */

.field {
  display: block; width: 100%;
  font-size: 16px; color: var(--linen);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; outline: none;
  transition: border-color .2s var(--ease-soft), background .2s;
}
.field::placeholder { color: var(--stone-deep); }
.field:hover { border-color: #4a4139; }
.field:focus { border-color: var(--vermillion-bright); background: var(--surface-2); }
textarea.field { resize: vertical; min-height: 96px; line-height: 1.55; }
select.field { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a2988a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
select.field option { background: var(--surface); }

.label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--stone); margin-bottom: 8px;
}
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--stone-deep); }

/* ───────────── selection controls ───────────── */

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 15px; font-weight: 500; color: var(--stone);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 99px;
  padding: 9px 18px; cursor: pointer; text-align: left;
  transition: transform .2s var(--ease-out), background .2s, border-color .2s, color .2s, opacity .2s;
}
.chip:hover:not(:disabled) { border-color: var(--vermillion-bright); color: var(--linen); }
.chip.is-on { background: var(--linen); border-color: var(--linen); color: var(--charcoal); }
.chip:disabled { opacity: .35; cursor: not-allowed; }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.opt-card {
  display: flex; align-items: center; gap: 12px; text-align: left;
  font-size: 15px; font-weight: 500; color: var(--stone);
  background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; box-shadow: var(--edge);
  transition: transform .25s var(--ease-out), border-color .25s, background .25s, color .25s;
}
.opt-card:hover { border-color: #6b1a0a; color: var(--linen); transform: translateY(-2px); }
.opt-card.is-on { background: var(--vermillion-soft); border-color: var(--vermillion); color: var(--linen); }
.opt-dot {
  flex: 0 0 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--stone-deep); display: grid; place-items: center;
  transition: border-color .2s, background .2s;
}
.opt-card.is-on .opt-dot { border-color: var(--vermillion-bright); background: var(--vermillion-bright); box-shadow: inset 0 0 0 3px var(--surface-2); }

.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg-btn {
  min-width: 52px; padding: 10px 14px; cursor: pointer;
  background: var(--surface); border: none; border-right: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--stone);
  transition: background .2s, color .2s;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { color: var(--linen); background: var(--surface-2); }
.seg-btn.is-on { background: var(--vermillion); color: var(--linen); }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; border-radius: 12px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 7px;
  border: 1.5px solid var(--stone-deep); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.check-box::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--linen); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked + .check-box { background: var(--vermillion); border-color: var(--vermillion); }
.check input:checked + .check-box::after { opacity: 1; }

/* ───────────── status pills ───────────── */

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--stone);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live, .pill-submitted { color: var(--ok); border-color: rgba(111,191,138,.35); background: var(--ok-soft); }
.pill-draft, .pill-added, .pill-invited { color: var(--stone); }
.pill-in_progress, .pill-opened { color: var(--warn); border-color: rgba(224,166,64,.35); background: var(--warn-soft); }
.pill-closed { color: var(--stone-deep); }
.pill-theme { color: var(--ok); border-color: rgba(111,191,138,.35); background: var(--ok-soft); }
.pill-difference { color: var(--vermillion-bright); border-color: #5a1608; background: var(--vermillion-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
