* { box-sizing: border-box; margin: 0; padding: 0; }

button, input, select, textarea { font: inherit; }

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --text: #f2f3f5;
  --muted: #a2a8b4;
  --accent: #e0457b;
  --accent-hover: #c8386a;
  --track: #2c313c;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

/* ---- Titles: Jost, thin, all caps ---- */
.brand h1,
.zone-title {
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 200;
  text-transform: uppercase;
}

.brand h1 {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

/* ---- Logo mark: CSS ENM triangle with a centre dot ---- */
.logo-mark {
  position: relative;
  width: 2.1rem;
  height: 1.9rem;
  flex: none;
}

.logo-mark__tri {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: conic-gradient(from 0deg at 50% 66%,
    #dc2626, #16a34a 120deg, #2563eb 240deg, #dc2626 360deg);
}

.logo-mark__dot {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 0.44rem;
  height: 0.44rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 2px #fff;
}

/* ---- Quiz ---- */
.prompt {
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.progress {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

#question-text {
  font-size: 1.15rem;
  line-height: 1.4;
  min-height: 3.2em;
}

#likert {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.25rem 0 0.5rem;
}

.likert-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--track);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.likert-option:hover {
  border-color: var(--accent);
}

.likert-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(224, 69, 123, 0.12);
}

.likert-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.likert-option input {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  flex: none;
  margin: 0;
  border: 2px solid #6b7280;
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 0.12s ease;
}

.likert-option input:hover {
  border-color: #8b93a1;
}

.likert-option input::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b7280; /* grey center, unchecked */
  transform: scale(0);
  transition: transform 0.12s ease;
}

.likert-option input:checked {
  border-color: var(--accent);
}

.likert-option input:checked::before {
  background: #dc2626; /* red center, checked */
  transform: scale(1);
}

.validation {
  color: var(--accent);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: 0.4rem;
}

.actions-row {
  flex-direction: row;
}

.actions-row .btn {
  flex: 1;
}

.actions-row #back {
  flex: 0 0 30%;
}

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.resume-prompt .resume-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ---- Computing screen ---- */
.computing-text {
  font-weight: 600;
  text-align: center;
  margin: 1.5rem 0 1.25rem;
}

.computing-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  /* Gradient is anchored to the full bar; the mask shrinks to reveal it,
     so the colours stay put rather than compressing as the bar fills. */
  background: linear-gradient(
    to right,
    rgb(37, 99, 235),
    rgb(220, 38, 38),
    rgb(22, 163, 74)
  );
}

.computing-bar__mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--track);
}

/* ---- Results: retake prompt ---- */
.divider {
  border: 0;
  border-top: 1px solid var(--track);
  margin: 1.5rem 0 1.25rem;
}

.retake-prompt {
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ---- Buttons ---- */
.btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  margin-top: 0.5rem;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--track);
}
.btn-secondary:hover { background: var(--track); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn:disabled:hover { background: transparent; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.actions .btn { margin-top: 0; }

.share-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: 0.6rem;
}

/* ---- Chart ---- */
.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0.5rem auto 1.5rem;
}

#triangle {
  display: block;
  width: 100%;
  height: auto;
}

.vtx {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.vtx-kinky   { top: 0; left: 50%; transform: translate(-50%, -4px); }
.vtx-poly    { bottom: 0; left: 0; transform: translateY(4px); }
.vtx-swinger { bottom: 0; right: 0; transform: translateY(4px); }

/* ---- Result ---- */
.result { text-align: center; }

.zone-title {
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.zone-desc {
  color: var(--muted);
}

/* ---- Shared footer ---- */
.site-footer {
  width: 100%;
  max-width: 460px;
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---- Content pages (About, Feedback) ---- */
.prose p {
  margin-bottom: 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose .signature {
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.back-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---- FAQ ---- */
.faq-item + .faq-item {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--track);
}

.faq-q {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.faq-a {
  color: var(--muted);
}

.faq-a p {
  margin-bottom: 0.75rem;
}
.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-a a {
  color: var(--text);
}

/* ---- Feedback form ---- */
.field {
  display: block;
  margin-bottom: 1.1rem;
}

.field > span {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--track);
  border-radius: 10px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

/* Netlify honeypot — visually hidden, still in the DOM for bots to trip on. */
.hp-field {
  position: absolute;
  left: -9999px;
}

/* ---- a11y helper ---- */
.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;
}

@media (max-width: 480px) {
  .card { padding: 1.5rem; }
  body { padding: 1rem 0.5rem; }
}
