/* Presentation only: no document, answer, permission or consultation state changes. */
:root { color-scheme: light; }
.top-controls { display: flex; align-items: center; justify-content: flex-end; gap: 22px; flex-wrap: wrap; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 13px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper); color: var(--ink); cursor: pointer;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--teal); }
.theme-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }

@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --navy: #c0ddea; --deep: #09131b; --teal: #8bd9c3;
    --ink: #e0e9ed; --muted: #a9bdc7; --paper: #0d1821;
    --line: #334955; --gold: #d1ae78; --white: #162630;
    --shadow: 0 8px 30px #00000018;
  }
  [data-theme="dark"] .top,
  [data-theme="dark"] .topic-list,
  [data-theme="dark"] .report,
  [data-theme="dark"] .skip { background: var(--white); }
  [data-theme="dark"] .monogram { background: #173d51; color: #fff; }
  [data-theme="dark"] .pill { background: #293d49; color: #d2e0e8; }
  [data-theme="dark"] .pill.green { background: #20483a; color: #b0e8c9; }
  [data-theme="dark"] .notice { background: #213641; color: #d3e4eb; border-left-color: #78a7ba; }
  [data-theme="dark"] .notice.warning { background: #3b3020; color: #f4dbab; border-left-color: #d7af62; }
  [data-theme="dark"] .notice.success { background: #1c3b30; color: #c7ecd6; border-left-color: #74ba92; }
  [data-theme="dark"] .button { background: #8bd9c3; color: #102c26; }
  [data-theme="dark"] .button:hover { background: #ace9d8; }
  [data-theme="dark"] .button.secondary { background: var(--white); color: var(--teal); border-color: #547970; }
  [data-theme="dark"] .button.secondary:hover { background: #223f38; }
  [data-theme="dark"] .topic-row:hover { background: #20343e; }
  [data-theme="dark"] .topic-code { background: #233e3b; }
  [data-theme="dark"] .topic-nav .active,
  [data-theme="dark"] .why { background: #1b3633; }
  [data-theme="dark"] #id_choice label:has(input:checked) { background: #1b3633; }
  [data-theme="dark"] input:not([type=radio]):not([type=checkbox]):not([type=hidden]),
  [data-theme="dark"] textarea,
  [data-theme="dark"] select { background: #0f1e28; border-color: #56707e; }
  [data-theme="dark"] .counts { background: #1d323d; }
  [data-theme="dark"] .errorlist { background: #46282d; color: #ffccd0; }
  [data-theme="dark"] :focus-visible { outline-color: #e8bf75; }
}
@media screen and (max-width: 1050px) { .top-controls { gap: 12px; } }
@media screen and (max-width: 740px) {
  .top-controls { justify-content: space-between; width: 100%; }
  .top nav { flex-wrap: wrap; }
  [data-theme="dark"] .topic-nav { background: var(--white); }
}
/* Printed reports always retain a white page, regardless of the screen theme. */
@media print { :root { color-scheme: light; } .theme-toggle { display: none !important; } }
