/* ==========================================================================
   RetroVault OS — base visual
   Tokens centralizados em :root. Temas oficiais via [data-theme].
   Somente o desenvolvedor altera este arquivo; usuários não enviam CSS.
   ========================================================================== */

:root {
  /* Paleta inicial (briefing) — usada pelos temas escuros */
  --bg:            #1B1B1B;
  --bg-2:          #242520;
  --bg-3:          #2C2E27;
  --bg-inset:      #151614;
  --olive:         #626B3D;
  --olive-hi:      #89975B;
  --olive-lo:      #474E2C;
  --text:          #E5E5DE;
  --text-2:        #A3A59A;
  --text-3:        #7C7E73;
  --border:        #414637;
  --border-hi:     #59604A;

  --danger:        #B5543F;
  --danger-hi:     #D06A52;
  --danger-text:   #F2D3CB;
  --warn:          #C49A3A;
  --ok:            #89975B;
  --info:          #6D8BA0;

  --grid-line:     rgba(137, 151, 91, 0.055);
  --shadow:        0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.3);
  --focus:         0 0 0 2px var(--bg), 0 0 0 4px var(--olive-hi);

  --titlebar-a:    #4E5631;
  --titlebar-b:    #626B3D;
  --titlebar-text: #F1F2E8;

  /* Derivados (acompanham o tema automaticamente) */
  --on-accent:     #12130F;                                   /* texto sobre botões de destaque */
  --accent-soft:   color-mix(in srgb, var(--olive) 14%, transparent);
  --accent-soft-2: color-mix(in srgb, var(--olive) 26%, transparent);
  --sel-bg:        color-mix(in srgb, var(--olive) 38%, transparent);
  --sel-fg:        var(--titlebar-text);
  --hover-row:     rgba(255, 255, 255, 0.02);
  --checker-a:     #2a2a2a;
  --checker-b:     #333333;

  /* Destaque de sintaxe */
  --hl-kw: #C9A86A; --hl-st: #A9C27A; --hl-nu: #D59A7E; --hl-pp: #B49AD6;
  --hl-tg: #8FB4D9; --hl-at: #D8C27A; --hl-ty: #8FC7B8;

  /* Rodapé (sempre escuro, como uma base firme da página) */
  --foot-bg:       #1A1B16;
  --foot-text:     #A3A59A;
  --foot-strong:   #F1F2E8;
  --foot-link:     #D4D6C8;
  --foot-line:     rgba(255, 255, 255, 0.10);
  --foot-accent:   #C9D58F;

  --radius:        8px;
  --radius-sm:     5px;
  --radius-lg:     12px;

  --font-ui:   "Segoe UI", Tahoma, Verdana, "DejaVu Sans", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs:    0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2.25rem;

  --gap: 16px;
  --topbar-h: 48px;
  color-scheme: dark;
}

/* Tema claro (padrão): papel quente, verde-oliva como destaque */
[data-theme="light"] {
  --bg: #F4F3EE; --bg-2: #FFFFFF; --bg-3: #F7F6F1; --bg-inset: #FFFFFF;
  --olive: #66723C; --olive-hi: #4E5A28; --olive-lo: #E3E7D2;
  --text: #1E2016; --text-2: #575B4C; --text-3: #8B8E80;
  --border: #E1DFD5; --border-hi: #C9C7BA;
  --danger: #B23B26; --danger-hi: #C84E37; --danger-text: #9A2E1B;
  --warn: #9C700C; --ok: #4E7A28; --info: #346A8E;
  --grid-line: rgba(78, 90, 40, 0.045);
  --shadow: 0 12px 32px rgba(46, 50, 30, 0.10), 0 1px 3px rgba(46, 50, 30, 0.08);
  --shadow-sm: 0 1px 3px rgba(46, 50, 30, 0.10);
  --focus: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--olive);
  --titlebar-a: #5A6633; --titlebar-b: #75834A; --titlebar-text: #FFFFFF;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(102, 114, 60, 0.09);
  --accent-soft-2: rgba(102, 114, 60, 0.16);
  --sel-bg: rgba(102, 114, 60, 0.15);
  --sel-fg: var(--text);
  --hover-row: rgba(102, 114, 60, 0.05);
  --checker-a: #ECEBE5; --checker-b: #F8F7F2;
  --hl-kw: #8A4F00; --hl-st: #3C7318; --hl-nu: #B0441C; --hl-pp: #7140A6;
  --hl-tg: #285C9C; --hl-at: #7E6200; --hl-ty: #17766A;
  color-scheme: light;
}

/* Tema âmbar: fósforo de monitor CRT */
[data-theme="amber"] {
  --bg: #141210; --bg-2: #1D1A15; --bg-3: #262118; --bg-inset: #0E0C0A;
  --olive: #8A5A14; --olive-hi: #E0A040; --olive-lo: #5E3E10;
  --text: #F2E3C6; --text-2: #BCA27A; --text-3: #8A7656;
  --border: #4A3A22; --border-hi: #6B5432;
  --grid-line: rgba(224, 160, 64, 0.05);
  --titlebar-a: #6A4510; --titlebar-b: #8A5A14; --titlebar-text: #FFF1D6;
  --ok: #E0A040;
  --on-accent: #1A1206;
}

/* Tema clássico 2000: cinza aço e barra de título azul-marinho */
[data-theme="classic"] {
  --bg: #1E2126; --bg-2: #2A2E35; --bg-3: #333842; --bg-inset: #171A1E;
  --olive: #2F4E86; --olive-hi: #7FA3E0; --olive-lo: #22385F;
  --text: #E6E8EC; --text-2: #A7ADB8; --text-3: #7A818D;
  --border: #464C57; --border-hi: #5D6573;
  --grid-line: rgba(127, 163, 224, 0.05);
  --titlebar-a: #0A246A; --titlebar-b: #3A6EA5; --titlebar-text: #FFFFFF;
  --ok: #7FB27F;
  --on-accent: #FFFFFF;
  --foot-accent: #A9C4F0;
}

/* --------------------------------------------------------------------------
   Reset e base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font: 400 var(--fs)/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
img { display: block; }
a { color: var(--olive-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, pre, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em; }
code { background: var(--bg-inset); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--gap) 0; }
::selection { background: var(--olive); color: var(--titlebar-text); }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 0.75em; }
[hidden] { display: none !important; }

.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.wrap { word-break: break-word; overflow-wrap: anywhere; }
.danger { color: var(--danger-hi); }
.h2 { font-size: var(--fs-lg); margin: 1.5em 0 0.6em; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 1.2em 0 0.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ícones do sprite */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico--lg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Janela clássica
   -------------------------------------------------------------------------- */
.window {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.window--narrow { max-width: 520px; margin: 0 auto; }
.titlebar {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 4px 6px 4px 10px;
  background: linear-gradient(180deg, var(--titlebar-b), var(--titlebar-a));
  color: var(--titlebar-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  font-weight: 600; font-size: var(--fs-sm);
  user-select: none;
}
.titlebar__icon { width: 16px; height: 16px; opacity: 0.95; }
.titlebar__title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar__controls { display: inline-flex; gap: 4px; }
.titlebar__controls i, .winbtn {
  width: 22px; height: 20px; display: inline-grid; place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.4); border-radius: 4px;
  background: rgba(255, 255, 255, 0.12); color: var(--titlebar-text);
}
.winbtn { cursor: pointer; padding: 0; }
.winbtn:hover { background: rgba(255, 255, 255, 0.24); }
.winbtn--close:hover { background: var(--danger); }
.winbtn .ico { width: 12px; height: 12px; }
.window__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--bg-3); border-bottom: 1px solid var(--border);
}
.window__body { padding: 16px; }
.window__status {
  display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 4px 10px; font-size: var(--fs-xs); color: var(--text-2);
  background: var(--bg-3); border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Botões e formulários
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 5px 12px;
  border: 1px solid var(--border-hi); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { border-color: var(--olive-hi); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: linear-gradient(180deg, var(--olive-hi), var(--olive)); border-color: var(--olive); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { border-color: var(--olive-hi); filter: brightness(1.06); }
.btn--danger { background: linear-gradient(180deg, var(--danger-hi), var(--danger)); border-color: var(--danger); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--bg-3); border-color: var(--border); }
.btn--sm { min-height: 26px; padding: 2px 8px; font-size: var(--fs-xs); }
.btn--block { width: 100%; margin-bottom: 8px; }
.btn--icon { padding: 4px; min-width: 32px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--olive-hi); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.muted { color: var(--text-2); }
.inline-form { display: inline; margin: 0; }

input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--bg-inset);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 9px; min-height: 32px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--olive-hi); box-shadow: 0 0 0 3px rgba(137, 151, 91, 0.18); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--olive-hi); }
input[type="file"] { padding: 4px; }
.input--sm { min-height: 26px; padding: 2px 6px; width: 150px; font-size: var(--fs-xs); }
.form { display: grid; gap: 12px; }
.form--compact { gap: 8px; margin: 8px 0; padding: 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 240px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.field small { color: var(--text-3); font-size: var(--fs-xs); }
.check { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
legend { padding: 0 6px; color: var(--olive-hi); font-weight: 600; font-size: var(--fs-sm); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.danger-zone { border-color: rgba(181, 84, 63, 0.5); }

/* --------------------------------------------------------------------------
   Componentes
   -------------------------------------------------------------------------- */
.notice { padding: 9px 12px; border: 1px solid var(--border); border-left: 3px solid var(--info); border-radius: var(--radius-sm); background: var(--bg-3); font-size: var(--fs-sm); }
.notice--ok { border-left-color: var(--ok); }
.notice--err { border-left-color: var(--danger); color: var(--danger-text); }
.notice--warn { border-left-color: var(--warn); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: var(--fs-xs); border: 1px solid var(--border-hi); color: var(--text-2); background: var(--bg-inset); white-space: nowrap; }
.badge--accent { color: var(--olive-hi); border-color: var(--olive); }
.badge--danger { color: var(--danger-text); border-color: var(--danger); }
.badge--ok { color: var(--ok); border-color: var(--olive); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0.5em 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--olive); color: var(--olive-hi); font-size: var(--fs-xs); background: var(--accent-soft); }
.chip:hover { text-decoration: none; background: var(--accent-soft-2); }
.chip--on { background: var(--olive); color: var(--titlebar-text); }
.chip--muted { border-color: var(--border-hi); color: var(--text-2); background: transparent; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 600; color: var(--text-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--border-hi); background: var(--bg-3); }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:hover td { background: var(--hover-row); }
.table--dense td { padding: 4px 8px; }

.panel { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.tabs:empty { display: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 12px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--text-2); font-size: var(--fs-sm); background: none; cursor: pointer; font-family: inherit; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--text); background: var(--bg-3); border-color: var(--border); margin-bottom: -1px; }

.empty { text-align: center; padding: 40px 16px; color: var(--text-2); }
.empty__icon { width: 44px; height: 44px; color: var(--olive); margin: 0 auto 10px; display: block; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 2px; }
.stat__label { font-size: var(--fs-xs); color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.stat__value { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: var(--fs-xs); color: var(--text-3); }

.sev { font-size: var(--fs-xs); padding: 0 6px; border-radius: 3px; border: 1px solid var(--border-hi); }
.sev--info, .sev--ok { color: var(--ok); border-color: var(--olive); }
.sev--warning { color: var(--warn); border-color: var(--warn); }
.sev--critical { color: var(--danger-text); border-color: var(--danger); background: rgba(181, 84, 63, .15); }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.meter { height: 8px; border-radius: 99px; background: var(--bg-inset); border: 1px solid var(--border); overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--olive), var(--olive-hi)); }
.meter--hot > i { background: linear-gradient(90deg, var(--warn), var(--danger)); }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-inset); border: 1px solid var(--border-hi); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 96px; height: 96px; }
.avatar--lg .ico { width: 44px; height: 44px; }

details.details > summary { list-style: none; }
details.details > summary::-webkit-details-marker { display: none; }

/* Prosa (páginas públicas e documentos) */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--fs-lg); margin-top: 1.4em; color: var(--olive-hi); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }

/* Notificações flutuantes */
.toasts { position: fixed; z-index: 1000; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-hi); border-left: 3px solid var(--ok); background: var(--bg-3); box-shadow: var(--shadow); font-size: var(--fs-sm); animation: toast-in .16s ease-out; }
.toast--err { border-left-color: var(--danger); }
.toast--warn { border-left-color: var(--warn); }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* Diálogo modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal--wide { width: min(760px, 100%); }
.modal .window__body { overflow: auto; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; background: var(--bg-3); border-top: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   Pré-visualização (compartilhada entre desktop e visualizador independente)
   -------------------------------------------------------------------------- */
.preview { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.preview__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-3); border-bottom: 1px solid var(--border); }
.preview__name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview__body { flex: 1; min-height: 0; overflow: auto; background: var(--bg-inset); }
.preview__frame { width: 100%; height: 100%; min-height: 70vh; border: 0; background: #fff; display: block; }
.preview__media { padding: 24px; display: grid; place-items: center; }
.preview__media video { max-height: 70vh; background: #000; border-radius: var(--radius-sm); }
.preview__media audio { width: min(520px, 100%); }
.preview__text { margin: 0; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 var(--font-mono); color: var(--text); }
.preview__note { padding: 8px 14px; margin: 0; }
.code { display: flex; font: 13px/1.55 var(--font-mono); min-width: max-content; }
.code__gutter { padding: 12px 10px 12px 12px; text-align: right; color: var(--text-3); user-select: none; border-right: 1px solid var(--border); background: var(--bg-2); position: sticky; left: 0; }
.code__gutter span { display: block; }
.code__pre { margin: 0; padding: 12px 16px; color: var(--text); tab-size: 4; }
.code__pre code, pre code { background: none; border: 0; padding: 0; border-radius: 0; font-size: inherit; }
.hl-kw { color: var(--hl-kw); font-weight: 600; }
.hl-st { color: var(--hl-st); }
.hl-nu { color: var(--hl-nu); }
.hl-cm { color: var(--text-3); font-style: italic; }
.hl-pp { color: var(--hl-pp); }
.hl-tg { color: var(--hl-tg); }
.hl-at { color: var(--hl-at); }
.hl-ty { color: var(--hl-ty); }
.imgview { display: flex; flex-direction: column; height: 100%; }
.imgview__tools { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.imgview__zoom { min-width: 60px; text-align: center; font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.imgview__stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 16px; cursor: grab; min-height: 300px;
  background-color: var(--checker-a); background-image: linear-gradient(45deg, var(--checker-b) 25%, transparent 25%), linear-gradient(-45deg, var(--checker-b) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--checker-b) 75%), linear-gradient(-45deg, transparent 75%, var(--checker-b) 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.imgview__stage:active { cursor: grabbing; }
.imgview__img { max-width: none; image-rendering: auto; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.imgview__img.is-fit { max-width: 100%; max-height: 72vh; }
.sheetview { padding: 10px; }
.table--grid { font: 12px/1.4 var(--font-mono); }
.table--grid th { text-transform: none; letter-spacing: 0; text-align: center; font-size: 11px; }
.table--grid td { border-right: 1px solid var(--border); white-space: pre; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.table--grid tbody th { background: var(--bg-3); color: var(--text-3); position: sticky; left: 0; }
.docview { max-width: 76ch; margin: 0 auto; padding: 24px 28px; background: var(--bg-2); min-height: 100%; }
.docview p { white-space: pre-wrap; }
.docview h2, .docview h3 { color: var(--olive-hi); }
.slideview { display: grid; gap: 14px; padding: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.slideview__slide { aspect-ratio: 16 / 9; overflow: auto; background: var(--bg-2); border: 1px solid var(--border-hi); border-radius: var(--radius-sm); padding: 14px 16px; position: relative; }
.slideview__slide h3 { font-size: var(--fs); color: var(--olive-hi); }
.slideview__slide p { font-size: var(--fs-sm); margin: 0 0 4px; }
.slideview__num { position: absolute; right: 8px; bottom: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.facts--left dd { text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
