/* Radar de Imigração — Go Visa. Sem framework, sem build. Escala de espaço de 4px.
   Cores de marca: azul #1b3a6b e vermelho #b22234 (o vermelho só marca o que é FOCO: Visto U/T/VAWA). */
:root {
  --navy: #1b3a6b;
  --red: #b22234;
  --bg: #f3f4f7;
  --surface: #fbfbfc;
  --surface-2: #f0f2f6;
  --line: #dfe3ea;
  --text: #1a2030;
  --text-2: #525d72;
  --text-3: #7a8499;
  --accent: #1b3a6b;
  --accent-ink: #ffffff;
  --accent-soft: #e4ebf7;
  --focus-soft: #fbe9ec;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --bad: #c0392b;
  --blocked: #7b4bb3;
  --shadow: 0 1px 2px rgba(20, 30, 55, .06), 0 4px 14px rgba(20, 30, 55, .06);
  --radius: 10px;
  --topbar: 56px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e131d;
  --surface: #151c2a;
  --surface-2: #1b2333;
  --line: #27314a;
  --text: #e6eaf2;
  --text-2: #a5afc4;
  --text-3: #7d889f;
  --accent: #7aa2ee;
  --accent-ink: #0b1220;
  --accent-soft: #1d2b49;
  --focus-soft: #3a1c25;
  --ok: #4cc785;
  --warn: #e0b055;
  --bad: #ef7b6c;
  --blocked: #b99aea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131d; --surface: #151c2a; --surface-2: #1b2333; --line: #27314a; --text: #e6eaf2; --text-2: #a5afc4;
    --text-3: #7d889f; --accent: #7aa2ee; --accent-ink: #0b1220; --accent-soft: #1d2b49; --focus-soft: #3a1c25;
    --ok: #4cc785; --warn: #e0b055; --bad: #ef7b6c; --blocked: #b99aea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(10, 20, 45, .25); }
:root[data-theme="dark"] .topbar { background: #101a2e; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 22l6-11 4.5 7.5 2.5-4.5 4 8' fill='none' stroke='%231b3a6b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='24' cy='9' r='3' fill='%23b22234'/%3E%3C/svg%3E") center / 24px no-repeat; }
.brand-mark.big { width: 48px; height: 48px; border-radius: 12px; background-size: 38px; background-color: var(--surface-2); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { font-size: 11px; opacity: .72; }
.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tab { background: none; border: 0; color: rgba(255,255,255,.75); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.tab:hover { background: rgba(255,255,255,.09); color: #fff; }
.tab[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
.search { position: relative; flex: 1 1 280px; max-width: 520px; margin-left: auto; }
.search input { width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: #fff; }
.search input::placeholder { color: rgba(255,255,255,.62); }
.search input:focus { background: #fff; color: #1a2030; outline: none; border-color: #fff; }
.search input:focus::placeholder { color: #7a8499; }
.search-ico { position: absolute; left: 10px; top: 9px; width: 18px; height: 18px; color: rgba(255,255,255,.7); pointer-events: none; }
.search input:focus ~ .search-ico, .search:focus-within .search-ico { color: #525d72; }
.status { font-size: 12px; line-height: 1.25; text-align: right; color: rgba(255,255,255,.82); min-width: 128px; }
.status b { color: #fff; font-weight: 600; }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4cc785; margin-right: 5px; }
.status .dot.run { background: #ffd166; animation: pulse 1.1s ease-in-out infinite; }
.status .dot.bad { background: #ff7b6b; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); background: var(--red); }
.topbar .btn.primary { height: 36px; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.busy .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: inherit; flex: none; }
.topbar .icon-btn { color: rgba(255,255,255,.85); }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.list-col .icon-btn, .reader .icon-btn, .card .icon-btn { color: var(--text-3); }
.list-col .icon-btn:hover, .reader .icon-btn:hover, .card .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.on { color: #d99a0b !important; }
.icon-btn.on svg { fill: currentColor; }
.only-mobile { display: none; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start; max-width: 1760px; margin: 0 auto; }
.shell.with-reader { grid-template-columns: 264px minmax(360px, 1fr) minmax(440px, 46%); }
.sidebar { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow: auto; padding: 16px 12px 32px 16px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.list-col { padding: 16px 20px 64px; min-width: 0; }
.reader { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow: auto; background: var(--surface); border-left: 1px solid var(--line); scrollbar-width: thin; }

/* ---------- sidebar ---------- */
.side-h { margin: 20px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; }
.side-h:first-child { margin-top: 0; }
.side-h button { background: none; border: 0; color: var(--text-3); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.side-h button:hover { color: var(--text); text-decoration: underline; }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; text-align: left; color: var(--text-2); }
.nav:hover { background: var(--surface-2); color: var(--text); }
.nav[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav .n { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-3); }
.nav[aria-pressed="true"] .n { color: inherit; }
.nav .swatch { width: 8px; height: 8px; border-radius: 3px; background: var(--navy); flex: none; }
.nav .swatch.focus { background: var(--red); }
.nav.focus-nav .n { background: var(--red); color: #fff; padding: 0 7px; border-radius: 99px; font-weight: 700; }
.nav.zero { opacity: .5; }
.group-h { cursor: pointer; }
.grp-row { display: flex; align-items: center; gap: 2px; }
.grp-row .nav { flex: 1; min-width: 0; }
.grp-row .nav span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-3); }
.exp:hover { background: var(--surface-2); color: var(--text); }
.srcs { display: none; margin: 2px 0 6px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.srcs.open { display: block; }
.srcs .nav { font-size: 13px; padding: 5px 8px; }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; border-radius: 8px; }
.toggle-row:hover { background: var(--surface-2); }
.toggle-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.sel select { height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.sidebar select { width: 100%; }

/* ---------- topo da lista ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.banner button { margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
button.tile:hover { border-color: var(--accent); }
.tile .k { font-size: 12px; color: var(--text-3); font-weight: 600; }
.tile .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile.focus .v { color: var(--red); }
.tile .s { font-size: 12px; color: var(--text-3); }
.list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.list-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.list-title small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 8px; }
.list-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; border: 0; }
.fchip:hover { filter: brightness(.96); }

/* ---------- cartões ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 14px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: border-color .12s, transform .12s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow); }
.card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: transparent; }
.card.unread::before { background: var(--accent); }
.card.focus::before { background: var(--red); }
.card.read .title { font-weight: 500; color: var(--text-2); }
.card .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.card .src { color: var(--text-2); font-weight: 600; }
.card .title { margin: 0 0 4px; font-size: 16px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.card .summary { margin: 0; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .chips { margin-top: 8px; }
.card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card .thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.card .acts { display: flex; gap: 0; }
.card .icon-btn { width: 32px; height: 32px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--text-2); }
.badge.t-oficial { background: var(--accent-soft); color: var(--accent); }
.badge.t-especialista { background: #e0f3ee; color: #0f7a63; }
.badge.t-pesquisa { background: #efe6fa; color: #6a3fb0; }
.badge.t-imprensa { background: var(--surface-2); color: var(--text-2); }
:root[data-theme="dark"] .badge.t-especialista { background: #14352e; color: #5fd0b3; }
:root[data-theme="dark"] .badge.t-pesquisa { background: #2a2040; color: #bba0ee; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid transparent; }
.chip.focus { background: var(--focus-soft); color: var(--red); }
:root[data-theme="dark"] .chip.focus { color: #ff8a98; }
.chip.tag { background: transparent; border-color: var(--line); color: var(--text-3); }
.chip.warn { background: #fdf0d5; color: #8a5a00; }
:root[data-theme="dark"] .chip.warn { background: #3d2f12; color: #f0c36a; }
.cluster { font-weight: 600; color: var(--accent); }

.empty { padding: 48px 16px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text-2); font-size: 16px; margin-bottom: 4px; }
.more { display: grid; place-items: center; padding: 20px; }
.skeleton { height: 112px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; border: 1px solid var(--line); animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- leitor ---------- */
.reader-in { max-width: 760px; margin: 0 auto; padding: 20px 28px 64px; }
.reader-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 8px 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reader-bar .sp { flex: 1; }
.reader h1 { font: 700 26px/1.25 var(--font); letter-spacing: -.02em; margin: 8px 0 12px; overflow-wrap: anywhere; }
.reader .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-3); font-size: 13px; margin-bottom: 12px; }
.reader .meta .src { color: var(--text-2); font-weight: 600; }
.reader .lead { font-size: 16px; color: var(--text-2); border-left: 3px solid var(--line); padding-left: 14px; margin: 16px 0; }
.reader img.hero { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); margin: 4px 0 16px; background: var(--surface-2); }
.prose { font: 17px/1.7 var(--serif); color: var(--text); }
.prose p { margin: 0 0 1em; overflow-wrap: anywhere; }
.prose h3 { font: 700 19px/1.3 var(--font); margin: 1.6em 0 .5em; letter-spacing: -.01em; }
.prose ul { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--line); color: var(--text-2); font-style: italic; }
.prose .add, .prose .del { font: 14px/1.55 var(--font); padding: 6px 10px; border-radius: 6px; margin: 4px 0; overflow-wrap: anywhere; }
.prose .add { background: color-mix(in srgb, var(--ok) 14%, transparent); border-left: 3px solid var(--ok); }
.prose .del { background: color-mix(in srgb, var(--bad) 12%, transparent); border-left: 3px solid var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.prose .hd { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 18px 0 4px; }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: 14px; margin: 12px 0; }
.related h4, .notes h4 { margin: 28px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.related a { display: block; padding: 9px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.related a:hover { border-color: var(--accent); text-decoration: none; }
.related small { display: block; color: var(--text-3); }
.notes textarea { width: 100%; min-height: 72px; resize: vertical; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.close-reader { display: none; }

/* ---------- páginas Fontes / Coletas ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.page h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.page .sub { margin: 0 0 20px; color: var(--text-2); max-width: 760px; }
.gh { margin: 28px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 12px; color: var(--text-3); font-weight: 700; background: var(--surface-2); }
.table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.table .err { color: var(--bad); font-size: 12px; max-width: 420px; overflow-wrap: anywhere; }
.led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); margin-right: 8px; vertical-align: middle; }
.led.ok { background: var(--ok); } .led.warn { background: var(--warn); } .led.bad { background: var(--bad); } .led.blocked { background: var(--blocked); } .led.off { background: var(--line); }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.run { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
.run summary { display: flex; gap: 14px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.run summary::-webkit-details-marker { display: none; }
.run .when { font-weight: 650; }
.run .pill { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.run .pill.new { background: var(--accent-soft); color: var(--accent); }
.run .body { padding: 0 16px 14px; }
.run .body .table { box-shadow: none; }

/* ---------- login / toasts ---------- */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; padding: 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.login-card h1 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; }
.login-card p { margin: 0 0 8px; color: var(--text-2); }
.login-card label { font-weight: 600; font-size: 13px; }
.login-card input { height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); }
.login-card .err { color: var(--bad); min-height: 20px; margin: 0; font-size: 13px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 14px; border-radius: 9px; background: #1d2740; color: #fff; box-shadow: var(--shadow); max-width: 360px; animation: pop .18s ease-out; }
.toast.bad { background: #8d2a20; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 30, .5); }

/* ---------- responsivo ---------- */
@media (max-width: 1360px) {
  .shell.with-reader { grid-template-columns: 240px minmax(320px, 1fr) minmax(400px, 48%); }
  .brand-text small { display: none; }
}
@media (max-width: 1100px) {
  .shell, .shell.with-reader { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-grid; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; height: 100vh; width: min(320px, 86vw); background: var(--surface); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); padding-top: 20px; }
  .sidebar.open { transform: none; }
  .reader { position: fixed; z-index: 60; inset: 0; height: 100vh; border: 0; }
  .close-reader { display: inline-grid; }
  .tabs { margin-left: 0; }
  .status { display: none; }
}
@media (max-width: 720px) {
  .topbar { gap: 6px; padding: 0 8px; }
  .brand-text { display: none; }
  .tab { padding: 8px 8px; font-size: 13px; }
  .search { flex: 1 1 100px; }
  .btn.primary .lbl { display: none; }
  .btn.primary { padding: 0 10px; }
  .list-col { padding: 12px 12px 64px; }
  .card { grid-template-columns: minmax(0, 1fr); padding-left: 16px; }
  .card .side { flex-direction: row; justify-content: space-between; align-items: center; }
  .card .thumb { display: none; }
  .reader-in { padding: 12px 16px 64px; }
  .reader h1 { font-size: 22px; }
  .prose { font-size: 16px; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .topbar, .sidebar, .list-col, .reader-bar { display: none !important; } .reader { position: static; height: auto; overflow: visible; border: 0; } .shell { display: block; } }

/* ---------- celular: barra em 2 linhas (menu · abas · coletar / busca) ---------- */
.mobile-only { display: none; }
@media (max-width: 720px) {
  :root { --topbar: 100px; }
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 10px; row-gap: 8px; }
  .search { order: 10; flex: 1 0 100%; max-width: none; margin-left: 0; }
  .tabs { flex: 1; justify-content: center; margin-left: 0; }
  #btn-theme, #btn-logout { display: none; }
  .mobile-only { display: block; }
  .sidebar { top: 0; height: 100vh; }
  .reader { top: 0; height: 100vh; }
}
