/* Your attention pattern. Colours come from colours.css, an exact copy of brand/colours.css
   (Cloudflare only publishes this folder). Fonts: Marcellus for headlines and questions,
   DM Sans for everything else, both self-hosted in fonts/. */
@import url("colours.css");

@font-face {
  font-family: "Marcellus";
  src: url("fonts/Marcellus-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --head: "Marcellus", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --line: rgba(37, 42, 52, 0.18); /* Ink, faint */
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
}

.wrap {
  max-width: 36rem;
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}

h1, h2 { font-family: var(--head); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); color: var(--blue); }
h1:focus, h2:focus, .thanks:focus { outline: none; }
p { margin: 0 0 1rem; }


/* Intro */
.eyebrow { font-size: .875rem; letter-spacing: .04em; margin-bottom: .6rem; }
#intro-headline { margin-bottom: 1.25rem; }
.lines { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.lines li { padding: .45rem 0; border-top: 1px solid var(--line); }
.lines li:last-child { border-bottom: 1px solid var(--line); }

/* Buttons */
button, .primary, .secondary { font: inherit; }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 999px; border: 1.5px solid var(--blue);
  font-weight: 500; text-decoration: none; cursor: pointer; text-align: center;
}
.primary { background: var(--blue); color: var(--paper); }
.secondary { background: transparent; color: var(--blue); }
.primary:hover { background: var(--ink); border-color: var(--ink); }
.secondary:hover { background: var(--lavender); color: var(--ink); }
.primary:disabled { background: transparent; color: var(--ink); border-color: var(--line); cursor: not-allowed; }

.link {
  background: none; border: 0; padding: .6rem 0; min-height: 44px;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link:hover { color: var(--blue); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.primary:focus-visible { outline-color: var(--ink); }

/* Questions */
.progress-text { font-size: .875rem; margin-bottom: .4rem; }
progress {
  display: block; width: 100%; height: 4px; margin: 0 0 1.75rem;
  border: 0; border-radius: 4px; background: var(--line); color: var(--blue);
  -webkit-appearance: none; appearance: none;
}
progress::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 4px; transition: width .3s ease; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 4px; }

.question { color: var(--ink); font-size: clamp(1.35rem, 5vw, 1.7rem); margin-bottom: 1.5rem; }

.answers { display: grid; gap: .65rem; }
.answer {
  width: 100%; min-height: 56px; padding: .85rem 1rem;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  text-align: left; line-height: 1.4; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.answer:hover { border-color: var(--blue); }
.answer.selected { background: var(--blue); border-color: var(--blue); color: var(--paper); }

.error { min-height: 1.5em; margin: .75rem 0 0; font-weight: 600; }
.error:empty { min-height: 0; margin: 0; }
#btn-back { margin-top: .5rem; }

/* Result */
#r-heading { margin-bottom: .75rem; }
.second { font-family: var(--head); font-size: 1.15rem; margin-bottom: 1rem; }
.lead { font-size: 1.125rem; }
.snapshot { font-size: .9375rem; opacity: .85; }

.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.buttons > * { flex: 1 1 13rem; }

.practice {
  background: var(--lavender); border-radius: var(--radius);
  padding: 1.1rem 1.1rem .25rem; margin: 0 0 1rem;
}
.practice h2 { font-size: 1.25rem; margin-bottom: .5rem; }

.share { margin: .5rem 0 1rem; }
.status { font-size: .9375rem; margin: 0; min-height: 1.4em; }
.restart { display: block; margin-top: 1.5rem; }

/* Research card */
.card {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1rem; margin: 1.5rem 0 0;
}
.card h2 { font-size: 1.3rem; margin-bottom: .75rem; color: var(--blue); }
.card p { font-size: .9375rem; }
.choice { border: 0; padding: 0; margin: 1.25rem 0 0; }
.choice legend { font-weight: 600; padding: 0; margin-bottom: .35rem; }
.opt, .check { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; padding: .55rem 0; cursor: pointer; }
.opt input, .check input { width: 20px; height: 20px; margin: .15rem 0 0; flex: none; accent-color: var(--blue); }
.field { margin-top: 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px; padding: .6rem .7rem; resize: vertical;
}
.hint { font-size: .875rem; margin: .35rem 0 0; }
.card .check { margin-top: .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.actions > * { flex: 1 1 10rem; }
.thanks { margin-top: 1.5rem; font-weight: 600; }

.offscreen { position: fixed; left: -9999px; top: 0; }

/* Quiet motion, only when allowed */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter .28s ease-out both; }
  @keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Brand glyphs (brand/glyphs, 200×90): decorative */
.glyph { display: block; width: 120px; height: auto; margin: 0 0 1rem; }
/* Result name above the heading */
.eyebrow.name { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: .8125rem; margin-bottom: .5rem; }
/* Research card, folded */
.card .more { margin-top: .25rem; }
.card #rc-more > p:first-child:focus { outline: none; }
