.qcard {
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface, rgba(255,255,255,.06));
  border: 1px solid var(--border-light, var(--border));
}
.qcard--answered {
  pointer-events: none;
}

.qcard__q + .qcard__q {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light, var(--border));
}

.qcard__header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
  margin-bottom: 4px;
}
.qcard__text {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}

.qcard__hint {
  font-size: 11px;
  color: var(--muted, var(--text));
  margin-bottom: 6px;
}
.qcard__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qcard__opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  /* 36px minimum tap target — chips wrap so a taller button keeps rows
     comfortably tappable on mobile while preserving the chip-pill density. */
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  /* Don't let the browser's default mouse-focus ring linger on the
     last clicked option — visually inconsistent with un-clicked
     options. Keyboard-focus uses :focus-visible below for a11y. */
  outline: none;
  /* Press feedback on touch — a brief opacity dip on active is the
     low-cost equivalent of a scale transform without triggering layout. */
  -webkit-tap-highlight-color: transparent;
}
.qcard__opt:active:not(:disabled) {
  opacity: .75;
}
.qcard__opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.qcard__opt:hover:not(:disabled) {
  background: var(--surface2, rgba(128,128,128,.1));
}
.qcard__opt--on {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.qcard__opt--on:hover:not(:disabled) {
  background: var(--accent-hover, var(--accent));
}
.qcard__opt:disabled {
  cursor: default;
  opacity: .6;
}
.qcard__opt--dim {
  opacity: .35;
  border-color: transparent;
}

/* Pick-one vs pick-many glyph. Box = multi (checkbox), circle = single
   (radio).
   Unselected: outline ring in currentColor (= --text on the transparent
     chip) at 65% opacity.
   Selected marks sit INSIDE the accent-filled chip, so they must be drawn
   in the chip's on-accent foreground (currentColor = the chip's text
   color), never in var(--accent) — accent-on-accent renders an invisible
   glyph in every theme:
   Selected radio: ring + center dot via radial-gradient, both currentColor.
   Selected checkbox: currentColor-filled rounded square with the checkmark
     stroked in var(--accent) so it contrasts against that fill (reads as a
     cut-out of the chip background). */
.qcard__mark {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  background: transparent;
  opacity: .65;
  /* position: relative needed for the ::after checkmark pseudo-element */
  position: relative;
}
.qcard__mark--box {
  border-radius: 4px;
}
.qcard__mark--radio {
  border-radius: 50%;
}

/* Selected radio: ring + center dot in the chip's on-accent foreground */
.qcard__opt--on .qcard__mark--radio {
  background: radial-gradient(
    circle,
    currentColor 0%,
    currentColor 38%,
    transparent 40%
  );
  border-color: currentColor;
  opacity: 1;
}

/* Selected checkbox: on-accent fill + accent checkmark */
.qcard__opt--on .qcard__mark--box {
  background: currentColor;
  border-color: currentColor;
  opacity: 1;
}
.qcard__opt--on .qcard__mark--box::after {
  content: '';
  position: absolute;
  /* Checkmark drawn as a rotated L: left stroke + right stroke. Stroked in
     var(--accent) — the box behind it is currentColor-filled (on-accent
     foreground), so the accent stroke is the contrasting color here, and it
     visually matches the chip's accent background showing through. */
  left: 2px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: 1.5px solid var(--accent);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  transform-origin: center;
}

.qcard__input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2, rgba(128,128,128,.1));
  color: var(--text);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.qcard__input:focus {
  border-color: var(--accent);
}

.qcard__submit {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}
.qcard__submit:hover:not(:disabled) {
  background: var(--accent-hover, var(--accent));
}
.qcard__submit:disabled {
  opacity: .4;
  cursor: default;
}
