/*
  1221 Advisors: site styles.
  Warm, grounded, earthy. Light cards on green-gray; copper for the primary action.
  Fonts are served by this site (no Google Fonts at run time). License: OFL-1.1,
  see ../fonts/OFL-Barlow.txt and ../fonts/OFL-Barlow-Condensed.txt.
*/

/* ---------- Fonts: Barlow (body 400, helper 300), Barlow Condensed (headings 700-900) ---------- */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/barlow-latin-ext-300-normal.a93ef98ad9cb.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/barlow-latin-300-normal.de218f435ec7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-latin-ext-400-normal.30fe91f5bb42.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.81419bf5abb5.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-ext-700-normal.a4fc62d81f8b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-700-normal.e1180918b873.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-ext-800-normal.9a3d1f9c9f3b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-800-normal.b1b7dd5dbcea.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-ext-900-normal.515cad90e1ce.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-900-normal.84379775da4a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Brand palette (assessment_platform_build_plan.md, Section 16) ---------- */

:root {
  --near-black: #141110;   /* text, darkest accent */
  --dark-brown: #4d3d30;
  --shadow-red: #6b2d23;
  --copper: #b07840;       /* primary accent, buttons */
  --copper-hover: #9a6835;
  --green-gray: #4e5a48;   /* page background */
  --sage: #5b7553;
  --deep-sage: #3e5438;
  --light-sand: #e0d2b4;
  --card: #faf8f5;
  --card-border: #e8e0d4;
  --field-border: #8c7b68; /* 4:1 against white, for form fields */
  --error: #b91c1c;
  --error-bg: #fef2f2;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--green-gray);
  color: var(--near-black);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--near-black);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: 2.125rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.75rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: var(--shadow-red);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--near-black);
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95em;
}

/* Visible copper focus outline for keyboard users, everywhere. */
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */

.page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 0.5rem;
}

.card {
  width: 100%;
  max-width: 35rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem 1.5rem 2.25rem;
  box-shadow:
    0 1px 2px rgba(20, 17, 16, 0.08),
    0 16px 40px rgba(20, 17, 16, 0.22);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 15rem;
  margin: 0 auto 1.25rem;
}

.brand-logo--small {
  max-width: 10rem;
  margin-bottom: 1rem;
}

.holding {
  max-width: 38rem;
  text-align: center;
}

.holding h1 {
  margin-bottom: 1rem;
}

h1 {
  text-wrap: balance;
}

.lead {
  font-size: 1.1875rem;
  margin-bottom: 0.75rem;
}

.helper {
  font-weight: 300;
  color: var(--dark-brown);
  font-size: 1rem;
}

.holding .helper {
  max-width: 30rem;
  margin: 0 auto;
}

.site-footer {
  text-align: center;
  padding: 1rem 1rem 1.5rem;
  color: var(--light-sand);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 40rem) {
  .page {
    padding: 3rem 2rem 1rem;
  }

  .card {
    padding: 3rem 3.5rem 3.25rem;
  }

  .brand-logo {
    max-width: 17rem;
    margin-bottom: 1.5rem;
  }

  .brand-logo--small {
    max-width: 11rem;
  }

  h1 {
    font-size: 2.625rem;
  }

  .auth h1 {
    font-size: 2.25rem;
  }
}

/* ---------- Sign-in and two-factor screens ---------- */

.auth {
  max-width: 30rem;
}

.form-fields > div,
form > div:not(.actions):not(.form-fields) {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
select {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  font: inherit;
  color: var(--near-black);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--copper);
  vertical-align: middle;
}

.helptext {
  display: block;
  margin-top: 0.375rem;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--dark-brown);
}

.errorlist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid #f3c4c4;
  border-radius: 0.5rem;
}

.alert {
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  background: #fff;
}

.alert-warning,
.alert-danger {
  color: var(--error);
  background: var(--error-bg);
  border-color: #f3c4c4;
}

/* The QR code to scan with the authenticator app. */
img.bg-white {
  display: block;
  width: 13rem;
  height: 13rem;
  margin: 0 auto;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
}

.codes {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.codes li {
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.375rem;
  text-align: center;
  font-size: 1.0625rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--card-border);
  margin: 1.75rem 0 1.25rem;
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem; /* large text: white on copper passes contrast at this size */
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}

.btn-primary:hover {
  background: var(--copper-hover);
  border-color: var(--copper-hover);
  color: #fff;
}

.btn-secondary,
.btn-info {
  background: transparent;
  border-color: var(--dark-brown);
  color: var(--near-black);
}

.btn-secondary:hover,
.btn-info:hover {
  background: var(--card-border);
  color: var(--near-black);
}

.btn-danger {
  background: var(--shadow-red);
  border-color: var(--shadow-red);
  color: #fff;
}

.btn-danger:hover {
  background: var(--near-black);
  border-color: var(--near-black);
  color: #fff;
}

.btn-link {
  background: none;
  border-color: transparent;
  color: var(--shadow-red);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.btn-link:hover {
  color: var(--near-black);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  min-height: 2.75rem;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.float-right {
  float: right;
}

.signout {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  text-align: right;
}

.signout .btn-link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  min-height: 2.75rem;
}

@media (max-width: 26rem) {
  .actions .btn-primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  }
}

/* ---------- The respondent's screens (T2-4 Stage 3) ----------
   Mobile first: one column, options as full-width tap targets at least 3rem tall,
   text at 17px or more, nothing to zoom. Copper marks what is chosen and what has
   focus. Without :has(), every option's text box shows (nothing is ever hidden
   from someone who can't see it appear). */

.r-logo {
  display: block;
  width: 6rem;
  height: auto;
  margin: 0 auto 1rem;
}

.r-page {
  align-items: flex-start;
  padding-top: 0.75rem;
}

.r-card {
  max-width: 42rem;
  padding: 1.5rem 1.25rem 1.75rem;
}

.welcome {
  max-width: 40rem;
}

.welcome h1 {
  text-align: center;
}

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

.progress {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  color: var(--deep-sage);
}

.progress strong {
  font-weight: 700;
}

.between,
.seam,
.part-opening {
  margin: 0 0 1.25rem;
}

.between p,
.helper p {
  margin-bottom: 0.5rem;
}

.part-title,
.seam-title,
.review-title {
  font-size: 1.75rem;
}

.scenario {
  margin: 0 0 1.25rem;
  padding: 1rem 1.125rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--sage);
  border-radius: 0.5rem;
}

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

fieldset.question {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.stem {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.stem p {
  margin-bottom: 0.625rem;
}

.stem-intake {
  font-weight: 400;
}

.question .helper {
  margin: -0.25rem 0 0.875rem;
  font-style: italic;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
}

.option:has(> .choice input:checked) {
  border-color: var(--copper);
  box-shadow: 0 0 0 1px var(--copper);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0.875rem;
  min-height: 3rem;
  cursor: pointer;
}

.choice input[type="radio"] {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.125rem 0 0;
  accent-color: var(--copper);
}

.choice-text {
  flex: 1;
}

.apart {
  height: 0.5rem;
  border-top: 1px dashed var(--card-border);
  margin-top: 0.5rem;
}

.more {
  margin: 0 0.875rem 0.875rem 3rem;
}

@supports selector(:has(*)) {
  .option > .more {
    display: none;
  }

  .option:has(> .choice input:checked) > .more {
    display: block;
  }
}

.more-label {
  font-weight: 300;
  color: var(--dark-brown);
}

textarea {
  display: block;
  width: 100%;
  min-height: 5rem;
  padding: 0.625rem 0.875rem;
  font: inherit;
  color: var(--near-black);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
  resize: vertical;
}

fieldset.area {
  border: 0;
  padding: 0;
  min-width: 0;
}

.area-stem {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.option-decline,
.btn-decline {
  font-family: var(--font-body);
}

.option-decline {
  background: transparent;
  border-style: dashed;
}

.decline-wrap {
  margin: 0.25rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--card-border);
}

.btn-decline {
  min-height: 3rem;
  padding: 0.5rem 1.125rem;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0;
  background: transparent;
  border: 1px dashed var(--dark-brown);
  color: var(--near-black);
}

.btn-decline:hover {
  background: var(--card-border);
}

.btn-decline.is-chosen {
  border: 2px solid var(--copper);
  background: #fff;
}

.r-nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.r-nav .btn-primary {
  min-width: 8rem;
}

@media (max-width: 26rem) {
  .r-nav {
    flex-direction: column;
  }

  .r-nav .btn {
    width: 100%;
  }
}

.r-error {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid #f3c4c4;
  border-radius: 0.5rem;
}

.r-change {
  text-align: center;
  margin: 0 1rem 0.5rem;
}

.r-change a {
  color: var(--light-sand);
}

.r-change a:hover {
  color: #fff;
}

/* The intake's lines */

.number-lines {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.number-line label {
  margin-bottom: 0.25rem;
}

input.number {
  display: block;
  width: 7rem;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 1.125rem;
  color: var(--near-black);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
}

.options-inline {
  flex-direction: row;
  flex-wrap: wrap;
}

.options-inline .option {
  flex: 1 1 7rem;
}

.yes-no-lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

fieldset.yes-no-line {
  margin: 0;
  padding: 0 0 0.875rem;
  border: 0;
  border-bottom: 1px solid var(--card-border);
  min-width: 0;
}

.yes-no-text {
  margin-bottom: 0.5rem;
}

.month-year {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.month-year-field {
  flex: 1 1 9rem;
}

.field {
  margin-bottom: 1.25rem;
}

.picker input[type="datetime-local"] {
  display: block;
  width: 100%;
  max-width: 18rem;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
}

/* The review screen */

.gaps {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  color: var(--near-black);
  background: var(--error-bg);
  border: 1px solid #f3c4c4;
  border-radius: 0.5rem;
}

.gaps p {
  margin-bottom: 0.5rem;
  color: var(--error);
}

.gaps ul {
  margin: 0;
  padding-left: 1.25rem;
}

.review-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.review-item {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--card-border);
}

.review-item.is-gap {
  border-left: 4px solid var(--error);
  padding-left: 0.75rem;
}

.review-question summary {
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.review-question summary:focus-visible {
  outline-offset: 2px;
}

.review-rows {
  margin: 0;
}

.review-rows dt {
  font-weight: 300;
  color: var(--dark-brown);
  font-size: 1rem;
}

.review-rows dt p {
  margin-bottom: 0.25rem;
}

.review-rows dt.review-heading {
  margin-bottom: 0.25rem;
}

.review-rows dd {
  margin: 0 0 0.625rem;
  font-weight: 400;
}

.review-text,
.review-area {
  display: block;
  font-weight: 300;
}

.not-answered {
  color: var(--error);
}

.review-action {
  margin: 0;
}

.notice {
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--copper);
  border-radius: 0.5rem;
}

@media (min-width: 40rem) {
  .r-card {
    padding: 2.25rem 2.75rem 2.5rem;
  }

  .r-logo {
    width: 7rem;
  }
}

/* A hidden Next first in a question's form: the Enter key moves on (review B5) */
.default-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* The review screen's numbers: the change request and the gap list name each question by the same one (review B4) */
.review-n {
  display: block;
  font-weight: 700;
  color: var(--copper);
  margin-bottom: 0.25rem;
}


/* A part's (or a grid row's) own "I'd rather not say" looks like the item's plain button (W8: "a plainer button set
   apart below the options"), and works as a choice in its list, so it never sends the rest of the screen (review B6). */
.option-decline {
  display: inline-block;
  border: 1px dashed var(--dark-brown);
  border-radius: 0.5rem;
}

.option-decline .choice {
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.125rem;
}

.option-decline .choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option-decline:has(input:checked) {
  border: 2px solid var(--copper);
  background: #fff;
}

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

/* the chosen decline marked on its words too, for browsers without :has() (review 3b L3) */
.option-decline input[type="radio"]:checked + .choice-text {
  font-weight: 700;
  color: var(--shadow-red);
}

.option-decline input[type="radio"]:checked + .choice-text::before {
  content: "\2713\00a0";
  color: var(--copper);
}

.option-decline input[type="radio"]:focus-visible + .choice-text {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* The formats added at T2-4 Stage 3b: pick any, boxes, grids, the running total, pieces, most and least */



.choice input[type="checkbox"] {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.125rem 0 0;
  accent-color: var(--copper);
}

.choice-note {
  display: block;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--dark-brown);
}

.scale-n {
  display: inline-block;
  min-width: 1.25rem;
  font-weight: 700;
}

fieldset.grid-row,
fieldset.piece {
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border: 0;
  border-bottom: 1px solid var(--card-border);
  min-width: 0;
}

.row-text {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.options-row {
  flex-direction: row;
  flex-wrap: wrap;
}

.options-row .option {
  flex: 1 1 9rem;
}

.options-scale .option {
  flex: 1 1 3.5rem;
}

.options-row .more {
  margin: 0 0.875rem 0.875rem;
}

.row-note,
.row-add {
  margin-top: 0.75rem;
}

.row-note input,
.row-add input,
.options-row .more input {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--near-black);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
}

.row-add .btn,
.piece .btn,
.piece-add .btn {
  margin-top: 0.5rem;
}

.row-remove {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-weight: 300;
}

.number-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.number-wrap input.number {
  display: inline-block;
}

input.number-wide {
  width: 10rem;
}

/* Q12's "__ hours __ minutes" stays on one line at phone width */
.number-wrap.hm {
  flex-wrap: nowrap;
}

.number-wrap.hm input.number {
  width: 4.5rem;
  margin-top: 0;
}

.unit-word {
  font-size: 1.125rem;
}

.options-alone {
  margin-top: 0.25rem;
}

.box-row {
  margin-bottom: 1rem;
}

.box textarea,
.box-row textarea {
  margin-bottom: 0.75rem;
}

.locked-text {
  padding: 0.75rem 0.875rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.total {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.total-line {
  margin-bottom: 0.875rem;
}

.piece-n {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--copper);
  margin-bottom: 0.25rem;
}

.list-header {
  margin-top: 1rem;
}

.ml-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ml-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
}

.ml-letter {
  flex: none;
  font-weight: 800;
  color: var(--copper);
  min-width: 1.25rem;
}

.ml-stem {
  font-weight: 700;
  margin: 0 0 0.5rem;
}

fieldset.ml-pick {
  margin-bottom: 1.25rem;
}

.options-letters .option {
  flex: 1 1 3.5rem;
  text-align: center;
}

.options-letters .choice {
  justify-content: center;
}

.review-picks {
  margin: 0;
  padding-left: 1.25rem;
}

/* A numbered scale on a grid's row (D15-010): the points in one row, each label under its number */
.options-row.options-scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.6rem, 1fr));
  gap: 0.375rem;
}

.options-scale .choice {
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  text-align: center;
}

.options-scale .choice-text {
  font-size: 0.8125rem;
  line-height: 1.2;
}

.options-scale .scale-n {
  display: block;
  font-size: 1rem;
  min-width: 0;
}

.options-scale .option-decline {
  grid-column: 1 / -1;
}

/* every point of a scale in one row, never six and a seventh on its own (D15-010's 0 to 6) */
.options-row.options-scale.options-n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.options-row.options-scale.options-n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.options-row.options-scale.options-n7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }

.options-scale.options-n7 .choice {
  padding-left: 0.125rem;
  padding-right: 0.125rem;
}

.options-scale.options-n7 .choice-text {
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

/* A most-and-least pick: the letters in one row of equal boxes, never three and a stretched fourth */
.options.options-letters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr));
  gap: 0.5rem;
}

.options-letters .choice {
  gap: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Tap targets at least 44 px tall on a touch screen (session P's review, finding 11: the review screen's Change links
   were about 56 x 20 px and "I need to change an answer" about 198 x 20 px; its re-check: only on touch screens, and
   the gap list's and the kept-answer notice's links too). The words are unchanged; only the area a finger can hit
   grows. A mouse sees the page as before. */
@media (pointer: coarse) {
  .review-action a,
  .r-change a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .gaps li a {
    display: inline-block;
    padding: 0.7rem 0;
  }
}

/* Session P, P2: pick all that apply, then put them in order with a line (L16; decision 6: drag plus up and down
   buttons); the None button beside a number box (L26); "I'll ask and come back" on a part (L24). */
.order {
  margin-top: 1rem;
}

.order-heading {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.order-list {
  counter-reset: rank;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.25rem 0.375rem 0.25rem 0.25rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
}

.order-item.is-ranked {
  border-color: var(--copper);
  box-shadow: 0 0 0 1px var(--copper);
}

.order-item.is-dragging {
  opacity: 0.85;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.18);
}

.order-handle {
  flex: none;
  width: 1.75rem;
  align-self: stretch;
  min-height: 2.75rem;
  cursor: grab;
  touch-action: none;
  background: radial-gradient(circle, var(--dark-brown) 1.5px, transparent 1.6px) center / 0.5rem 0.5rem;
  opacity: 0.55;
}

.order-handle:active {
  cursor: grabbing;
}

.order-n {
  flex: none;
  min-width: 1.5rem;
  font-weight: 700;
  color: var(--copper);
}

.order-item.is-ranked .order-n::before {
  counter-increment: rank;
  content: counter(rank) ".";
}

.order-text {
  flex: 1;
}

.order-buttons {
  flex: none;
  display: flex;
  gap: 0.25rem;
}

.order-btn {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--near-black);
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 0.375rem;
  cursor: pointer;
}

.order-btn:hover {
  background: var(--card-border);
}

.order-btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.order-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark-brown);
}

.order-line::before,
.order-line::after {
  content: "";
  flex: 1;
  border-top: 2px solid var(--dark-brown);
}

.order-line-words {
  flex: none;
  max-width: 80%;
  text-align: center;
}

.ask-wrap {
  margin: 0.5rem 0 0.25rem;
}

.ask-wrap .choice {
  background: transparent;
  border: 1px dashed var(--dark-brown);
  border-radius: 0.5rem;
}

.review-below {
  margin: 0.5rem 0 0.25rem;
  font-weight: 600;
}

.waiting-list {
  padding-left: 1.25rem;
}

.waiting-list li {
  margin-bottom: 0.75rem;
}

.waiting-q {
  display: block;
}

/* The note box under every question (session P, P3): folded under its line, calm until opened. */
.note-box {
  margin: 0.75rem 0 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--card-border);
}

.note-box summary {
  cursor: pointer;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  font-weight: 300;
  color: var(--dark-brown);
}

.note-box summary:focus-visible {
  outline-offset: 2px;
}

.note-box textarea {
  margin-top: 0.25rem;
}

.review-note {
  margin: 0.5rem 0 0;
  overflow-wrap: anywhere;
}

.review-note-label {
  font-weight: 600;
}
