/* Question of the day + free question archive (/question-of-the-day/, /questions/, /questions/<slug>/).
   Colours only via the variables in app.css, so light and dark mode both work. Classes are prefixed qd-. */

.qd-narrow { max-width: 820px; }
.qd-hero { padding: 56px 0 28px; background: radial-gradient(900px 420px at 85% -20%, var(--accent-soft) 0%, transparent 65%); }
.qd-hero-sm { padding-top: 36px; }
.qd-hero h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; margin-top: 12px; }
.qd-hero-sm h1 { font-size: clamp(28px, 4vw, 38px); }
.qd-hero .lead { font-size: 18px; color: var(--text-2); margin: 14px 0 0; max-width: 640px; }
.qd-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.qd-grad { background: linear-gradient(90deg, var(--primary), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (forced-colors: active) { .qd-grad { color: CanvasText; background: none; } }
.qd-hero .crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.qd-hero .crumbs a { color: var(--primary); }
.qd-streak { display: inline-flex; gap: 6px; align-items: center; margin: 18px 0 0; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--flame); background: var(--card); border: 1px solid var(--line); }
.qd-streak[hidden] { display: none; }

.qd-body { padding-top: 8px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 20px; }
.qd-more { padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.qd-more h2 { font-size: 24px; }
.qd-more p { margin: 0; }
.qd-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* the question card */
.qd-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.qd-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qd-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap;
  padding: 4px 11px 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.qd-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--primary)); flex: none; }
.qd-date { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; color: var(--muted); }
.qd-stem { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text); }
.qd-labs-wrap { overflow-x: auto; }
.qd-labs { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qd-labs caption { text-align: left; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.qd-labs th, .qd-labs td { padding: 9px 14px; border-top: 1px solid var(--line); text-align: left; font-weight: 500; color: var(--text-2); }
.qd-labs tr:first-child th, .qd-labs tr:first-child td { border-top: 0; }
.qd-labs td { font-family: "IBM Plex Mono", ui-monospace, monospace; text-align: right; color: var(--text); white-space: nowrap; }
.qd-prompt { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }

.qd-choices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qd-choice { width: 100%; min-height: 52px; display: flex; align-items: flex-start; gap: 13px; text-align: left; font: inherit; font-size: 16px; line-height: 1.45;
  color: var(--text); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; cursor: pointer;
  transition: border-color .12s, background-color .12s; }
.qd-choice:hover:not(:disabled) { border-color: var(--primary); background: var(--accent-soft); }
.qd-choice:disabled { cursor: default; color: var(--text); }
.qd-ltr { flex: none; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-size: 14px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); }
.qd-ctext { flex: 1; padding-top: 2px; min-width: 0; overflow-wrap: anywhere; }
.qd-mk { flex: none; margin-left: auto; padding-top: 2px; font-weight: 800; }
.qd-card.is-answered .qd-choice:not(.is-correct):not(.is-wrong) { opacity: .6; }
.qd-choice.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.qd-choice.is-correct .qd-ltr { background: var(--ok); color: var(--card); border-color: transparent; }
.qd-choice.is-correct .qd-mk { color: var(--ok); }
.qd-choice.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.qd-choice.is-wrong .qd-ltr { background: var(--bad); color: var(--card); border-color: transparent; }
.qd-choice.is-wrong .qd-mk { color: var(--bad); }
.qd-show { align-self: flex-start; font-size: 15px; min-height: 44px; }
.qd-card.is-answered .qd-show { display: none; }
.qd-live:empty { display: none; }
.qd-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.qd-reveal { display: flex; flex-direction: column; gap: 14px; }
.qd-reveal[hidden] { display: none; }
.qd-verdict { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.qd-verdict:not(.ok):not(.no) { display: none; }
.qd-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--card); }
.qd-vs { color: var(--text-2); font-size: 15px; }
.qd-verdict.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.qd-verdict.ok .qd-dot { background: var(--ok); } .qd-verdict.ok .qd-vt { color: var(--ok); }
.qd-verdict.no { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.qd-verdict.no .qd-dot { background: var(--bad); } .qd-verdict.no .qd-vt { color: var(--bad); }
.qd-expl { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.qd-expl h3 { font-size: 16px; }
.qd-expl p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-2); }
.qd-expl .qd-answer { color: var(--text); }
.qd-expl .qd-answer strong { color: var(--ok); }
.qd-obj { background: var(--accent-soft); color: var(--accent-soft-text) !important; border-radius: 10px; padding: 11px 13px; font-size: 15px !important; }
.qd-cta { border-radius: 16px; padding: 18px 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  display: flex; gap: 16px 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.qd-cta-copy { flex: 1 1 300px; min-width: 0; }
.qd-cta-copy p { margin: 0; font-size: 15px; color: var(--text-2); }
.qd-cta-copy .qd-cta-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.qd-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.qd-next { margin: 0; text-align: center; color: var(--muted); font-size: 15px; }
.qd-next b { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; color: var(--text); }

/* Buttondown form */
.qd-signup { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.qd-signup-label { font-weight: 700; }
.qd-signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qd-signup-row input { flex: 1 1 220px; width: auto; }
.qd-signup p { margin: 0; }

/* system filter chips */
.qd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.qd-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--text-2); background: var(--card); border: 1px solid var(--line-strong); }
.qd-chip:hover { border-color: var(--primary); color: var(--primary); }
.qd-chip[aria-current] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.qd-chip-n { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; opacity: .8; }

/* list of past questions */
.qd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qd-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; min-height: 56px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); }
.qd-item:hover { border-color: var(--primary); color: var(--text); }
.qd-item-stem { font-size: 15px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* fixed width keeps the stems aligned */
.qd-item-date { min-width: 6ch; text-align: right; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); white-space: nowrap; }
.qd-empty { text-align: center; }
.qd-empty p { margin: 0 0 12px; color: var(--text-2); }

@media (max-width: 640px) {
  .qd-hero { padding: 36px 0 20px; }
  .qd-card { padding: 18px; border-radius: 16px; gap: 14px; }
  .qd-stem { font-size: 16px; }
  .qd-choice { font-size: 15px; padding: 11px 12px; gap: 11px; }
  .qd-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .qd-item .qd-tag { grid-column: 1; justify-self: start; }
  .qd-item-date { grid-column: 2; grid-row: 1; }
  .qd-item-stem { grid-column: 1 / -1; }
  .qd-expl, .qd-cta, .qd-signup { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .qd-choice { transition: none; } }
