.dwq, .dwq-host { color: var(--dw-ink, #313131); font-family: inherit; line-height: 1.55; box-sizing: border-box; }
.dwq *, .dwq-host * { box-sizing: border-box; }
.dwq { background: var(--dw-card, #fff); border: 1px solid var(--dw-line, #e3e8ee); border-radius: 24px; padding: clamp(20px, 4vw, 40px); margin: 24px auto; max-width: 960px; }
.dwq h2 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.25; margin: 10px 0 18px; }
.dwq h3 { margin-top: 32px; }
.dwq p { margin: 12px 0; }
.dwq .dwq-kicker { color: var(--dw-accent-ink, #12719c); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.dwq button, .dwq select, .dwq-host button { font: inherit; font-weight: 700; min-height: 48px; padding: 11px 18px; border: 1px solid var(--dw-line, #e3e8ee); border-radius: 12px; background: var(--dw-card, #fff); color: var(--dw-ink, #313131); cursor: pointer; }
.dwq button:hover:not(:disabled), .dwq-host button:hover:not(:disabled) { border-color: var(--dw-accent, #2f9fd0); background: var(--dw-soft, #f4f8fb); }
.dwq button:focus-visible, .dwq select:focus-visible, .dwq input:focus-visible, .dwq textarea:focus-visible, .dwq-host button:focus-visible { outline: 3px solid var(--dw-accent-ink, #12719c); outline-offset: 3px; }
.dwq button:disabled, .dwq-host button:disabled { cursor: default; opacity: .55; }
.dwq .dwq-primary { background: var(--dw-accent-ink, #12719c); color: #fff; border-color: transparent; }
.dwq .dwq-primary:hover:not(:disabled) { background: #0c5678; color: #fff; }
.dwq .dwq-actions, .dwq .dwq-topic-actions, .dwq-host .dwq-host-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dwq .dwq-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.dwq .dwq-settings label { font-weight: 700; }
.dwq select { display: block; width: 100%; margin-top: 8px; }
.dwq .dwq-topics { border: 1px solid var(--dw-line, #e3e8ee); border-radius: 16px; margin: 24px 0 0; padding: 16px; min-width: 0; }
.dwq legend { font-weight: 800; padding: 0 8px; }
.dwq .dwq-topic-actions { margin: 0 0 14px; }
.dwq .dwq-topic-actions button { padding: 6px 14px; font-size: .9rem; }
.dwq .dwq-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; }
.dwq .dwq-topic-grid label { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; }
.dwq input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--dw-accent-ink, #12719c); }
.dwq small, .dwq .dwq-help, .dwq .dwq-availability { color: var(--dw-muted, #6b7280); }
.dwq .dwq-help { font-size: .87rem; }
.dwq .dwq-status { font-size: .95rem; }
.dwq .dwq-status:empty { display: none; }
.dwq .dwq-progress { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.dwq progress { display: block; width: 100%; height: 9px; margin: 16px 0 28px; border: 0; border-radius: 8px; accent-color: var(--dw-accent-ink, #12719c); }
.dwq progress::-webkit-progress-bar { background: var(--dw-soft, #f4f8fb); border-radius: 8px; }
.dwq progress::-webkit-progress-value { background: var(--dw-accent-ink, #12719c); border-radius: 8px; }
.dwq .dwq-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dwq .dwq-choices button { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px 12px; text-align: left; min-height: 76px; font-weight: 600; }
.dwq .dwq-choice-state { grid-column: 2; font-weight: 800; font-size: .85rem; }
.dwq .dwq-number { display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 8px; width: 30px; height: 30px; flex-shrink: 0; font-size: .8rem; }
.dwq .dwq-choices button:disabled { opacity: 1; }
.dwq .dwq-choices .dwq-correct { background: #e9f7ef; border: 2px solid #237747; color: #14532d; }
.dwq .dwq-choices .dwq-wrong { background: #fff0ee; border: 2px solid #b33b32; color: #8b2721; }
.dwq .dwq-feedback:not(:empty) { background: var(--dw-soft, #f4f8fb); border-radius: 12px; padding: 4px 18px; margin-top: 18px; }
.dwq .dwq-verdict { font-size: 1.2rem; }
.dwq .dwq-review { padding-left: 24px; }
.dwq .dwq-review li { border-top: 1px solid var(--dw-line, #e3e8ee); margin-top: 20px; padding-top: 12px; }
.dwq .dwq-review h4 { margin: 6px 0; font-size: 1rem; }
.dwq .dwq-share { width: 100%; min-height: 120px; padding: 12px; font: inherit; }
.dwq [hidden], .dwq-host [hidden] { display: none !important; }
.dwq-host { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: clamp(20px, 5vw, 64px); background: var(--dw-card, #fff); border: 0; overflow-y: auto; }
.dwq-host::backdrop { background: #172733cc; }
.dwq-host .dwq-host-top { display: flex; justify-content: space-between; gap: 20px; align-items: center; font-weight: 700; }
.dwq-host h2 { font-size: clamp(1.7rem, 4vw, 3.5rem); line-height: 1.2; max-width: 1200px; margin: 28px 0; }
.dwq-host .dwq-host-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 50px; padding-left: 30px; font-size: clamp(1.15rem, 2.3vw, 2rem); list-style-type: upper-alpha; }
.dwq-host .dwq-host-answer { background: var(--dw-soft, #f4f8fb); border-radius: 18px; padding: 12px 24px; margin-top: 28px; font-size: clamp(1.1rem, 1.8vw, 1.7rem); }
.dwq-host .dwq-host-answer p { margin: 8px 0; }
.dwq-host .dwq-host-help { color: var(--dw-muted, #6b7280); }
.dwq.dwq-print { font-family: Arial, sans-serif; color: #111; }
.dwq .dwq-print-round { margin-top: 32px; }
.dwq .dwq-print-round li { margin-bottom: 16px; break-inside: avoid; }
.dwq .dwq-print-round li p { margin: 4px 0; font-size: .9rem; }
.dwq .dwq-print-key { border-top: 2px solid #111; margin-top: 40px; padding-top: 20px; }
@media (max-width: 640px) {
  .dwq .dwq-settings, .dwq .dwq-topic-grid, .dwq .dwq-choices { grid-template-columns: 1fr; }
  .dwq .dwq-actions > button { flex: 1 1 100%; }
  .dwq .dwq-progress { font-size: .9rem; }
  .dwq-host .dwq-host-choices { grid-template-columns: 1fr; gap: 12px; }
  .dwq-host .dwq-host-top { align-items: flex-start; font-size: .9rem; }
  .dwq-host .dwq-host-top button { font-size: .85rem; }
}
@media print {
  .dwq.dwq-print { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; font-size: 10pt; line-height: 1.35; }
  .dwq .dwq-print-toolbar { display: none; }
  .dwq .dwq-print-round { break-before: page; margin: 0; }
  .dwq .dwq-print-round:first-of-type { break-before: auto; }
  .dwq .dwq-print-round li { margin-bottom: 9pt; }
  .dwq .dwq-print-round li p { font-size: 9pt; }
  .dwq .dwq-print-key { break-before: page; border: 0; padding: 0; margin: 0; }
  .dwq .dwq-print-key p { break-inside: avoid; }
  .dwq .dwq-print-key h3 { break-after: avoid; }
  .dwq h1 { font-size: 20pt; }
  .dwq h2 { font-size: 16pt; }
}
