/* Estudos Bacen TI
   Layout: uma coluna de leitura; na sessão, um relógio fixo no topo; o quiz imita uma folha de respostas de certo ou errado. */
:root {
  --paper: #f4f6f7;
  --sheet: #ffffff;
  --ink: #16212a;
  --muted: #586571;
  --rule: #d8dfe4;
  --accent: #0d6b67;
  --accent-soft: #e0f0ee;
  --mark: #9a5b0f;
  --mark-soft: #fbf0df;
  --good: #1f7a3b;
  --good-soft: #e3f2e7;
  --bad: #b2362e;
  --bad-soft: #f8e5e3;
  --code-bg: #edf1f3;
  --code-ink: #1d2933;
  --tok-k: #0d6b67;
  --tok-b: #2c55a0;
  --tok-s: #9a5b0f;
  --tok-c: #78848f;
  --tok-n: #a2342c;
  --r1: #0d6b67; --r2: #2c55a0; --r3: #9a5b0f; --r4: #7a3b8f; --r5: #b2362e; --r6: #1f7a3b;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1317; --sheet: #151c21; --ink: #e2e8ec; --muted: #97a3ac; --rule: #27313a;
    --accent: #5bbfb6; --accent-soft: #13302d; --mark: #e2a553; --mark-soft: #32271a;
    --good: #62c27f; --good-soft: #16301e; --bad: #ee7b70; --bad-soft: #3a1f1c;
    --code-bg: #10171c; --code-ink: #d6dfe5;
    --tok-k: #5bbfb6; --tok-b: #8fb2f0; --tok-s: #e2a553; --tok-c: #7f8b95; --tok-n: #ee8f86;
    --r1: #5bbfb6; --r2: #8fb2f0; --r3: #e2a553; --r4: #c99ae0; --r5: #ee7b70; --r6: #62c27f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.bar-in, .wrap {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { padding-block: 28px 72px; display: flex; flex-direction: column; gap: 48px; }

/* type */
.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
h3 .min { font-family: var(--font-mono); font-size: 13px; font-weight: 400; color: var(--muted); }
p { margin: 0; max-width: 65ch; }
.lead { font-size: 19px; color: var(--muted); }
section { display: flex; flex-direction: column; gap: 18px; }
.sec-head { display: flex; flex-direction: column; gap: 6px; }
code { font-family: var(--font-mono); font-size: .86em; background: var(--code-bg); color: var(--code-ink); padding: 1px 5px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

/* top navigation */
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }

/* buttons */
button, .botao {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .02em;
  border-radius: 6px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block;
  border: 1px solid var(--accent); background: var(--accent); color: var(--sheet); line-height: 1.3;
}
button.ghost, .botao.ghost { background: transparent; color: var(--accent); }
button:hover, .botao:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; filter: none; }

/* sticky session clock */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--sheet); border-bottom: 1px solid var(--rule);
}
body.tem-relogio::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--sheet);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.clock { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); min-width: 0; flex-wrap: wrap; }
.clock .bloco { font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.clock .tempo { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent); }
.clock .total { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btns { display: flex; gap: 8px; }

/* the hour */
.hora { display: flex; flex-direction: column; gap: 8px; }
.hora-bar { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--rule); gap: 2px; }
.seg { background: var(--accent-soft); transition: background .3s; }
.seg.ativo { background: var(--accent); }
.seg.feito { background: color-mix(in srgb, var(--accent) 45%, var(--accent-soft)); }
.marcador { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: 0; transition: left .5s linear; }
.legenda { display: grid; grid-template-columns: var(--colunas, 10fr 35fr 15fr); gap: 2px; font-family: var(--font-display); font-size: 14px; }
.legenda div { min-width: 0; }
.legenda b { display: block; font-weight: 600; }
.legenda span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
@media (max-width: 480px) { .legenda { grid-template-columns: 1fr 1fr 1fr; } }

/* steps */
.passos { display: flex; flex-direction: column; gap: 22px; }
.grupo { display: flex; flex-direction: column; gap: 6px; }
.grupo-tit { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.grupo-tit span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; text-transform: none; letter-spacing: 0; }
ol.check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ol.check li { display: grid; grid-template-columns: 26px 28px 1fr; align-items: start; gap: 4px; padding-block: 9px; border-bottom: 1px solid var(--rule); }
ol.check li:last-child { border-bottom: 0; }
ol.check .n { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
ol.check input { width: 18px; height: 18px; margin: 5px 0 0; accent-color: var(--accent); }
ol.check label { min-width: 0; cursor: pointer; }
ol.check input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }
.progresso { font-family: var(--font-display); font-size: 15px; color: var(--muted); }
.progresso b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* material */
.topico { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.topico .numero { font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
pre {
  margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 8px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 14.5px; line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; }
.saida { font-family: var(--font-display); font-size: 15px; color: var(--muted); margin-top: -6px; }
.tok-k { color: var(--tok-k); font-weight: 500; }
.tok-b { color: var(--tok-b); }
.tok-s { color: var(--tok-s); }
.tok-c { color: var(--tok-c); font-style: italic; }
.tok-n { color: var(--tok-n); }
.tok-p { color: var(--tok-c); user-select: none; }
.tok-o { color: var(--muted); }
.tabela { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td code { white-space: nowrap; }
p code, li code { overflow-wrap: anywhere; }
.nw { white-space: nowrap; }
table.quebra td code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 480px) { table { font-size: 15px; } th, td { padding-right: 8px; } th { font-size: 12px; letter-spacing: .03em; } }
th code { text-transform: none; letter-spacing: 0; font-size: 13px; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 14px; }
.pegadinhas { background: var(--mark-soft); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pegadinhas .rot { font-family: var(--font-display); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mark); }
.pegadinhas ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }

/* reading passages, as printed in a Cebraspe booklet */
.texto-prova { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.texto-prova .rotulo { font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0; }
.texto-prova h3 { font-size: 20px; }
ol.paragrafos { list-style: none; margin: 0; padding: 0; counter-reset: par; display: flex; flex-direction: column; gap: 12px; }
ol.paragrafos li { counter-increment: par; display: grid; grid-template-columns: 26px 1fr; gap: 6px; }
ol.paragrafos li::before { content: counter(par); font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
ol.paragrafos p { max-width: none; }
.texto-prova .fonte { font-family: var(--font-display); font-size: 13px; color: var(--muted); }
.folha .texto-prova { border: 0; border-radius: 0; border-bottom: 1px solid var(--rule); background: var(--paper); }
.mini-itens { display: flex; flex-direction: column; gap: 12px; }
.mini-item { display: flex; flex-direction: column; gap: 8px; }
.mini-item > p { font-weight: 600; }
.mini-item .letra { font-family: var(--font-mono); color: var(--muted); font-weight: 400; margin-right: 6px; }

/* network layers: OSI rows with the TCP/IP layer spanning them */
table.camadas td.tcpip {
  background: var(--accent-soft); color: var(--ink); vertical-align: middle; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; padding-inline: 10px; border-left: 2px solid var(--sheet); border-right: 2px solid var(--sheet);
}
table.camadas td.nc { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
table.camadas td.osi { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }

/* encapsulation: each layer adds its header in front of the data */
.encaps { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-display); font-size: 14px; }
.encaps .linha { display: grid; grid-template-columns: 96px 1fr 76px; gap: 10px; align-items: center; }
.encaps .camada { color: var(--muted); font-weight: 600; }
.encaps .pdu { display: flex; gap: 3px; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.encaps .pdu span { padding: 5px 9px; border-radius: 4px; background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--rule); white-space: nowrap; }
.encaps .pdu .dados { background: var(--accent-soft); border-color: var(--accent); }
.encaps .nome { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
@media (max-width: 520px) {
  .encaps .linha { grid-template-columns: 1fr auto; row-gap: 4px; }
  .encaps .camada { grid-column: 1 / -1; }
  .encaps .pdu { justify-content: flex-start; }
}

/* nested fields: IA contains ML contains deep learning */
.aninhado { border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--accent) 5%, var(--sheet)); }
.aninhado .aninhado { margin-top: 8px; background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); }
.aninhado .aninhado .aninhado { background: color-mix(in srgb, var(--accent) 16%, var(--sheet)); }
.aninhado .aninhado .aninhado .aninhado { background: color-mix(in srgb, var(--accent) 24%, var(--sheet)); }
.aninhado > b { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.aninhado > span { font-size: 15px; color: var(--muted); }

/* rule flows: what goes in and what comes out */
.fluxos { display: flex; flex-direction: column; gap: 10px; }
.fluxo { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; align-items: center; }
.fluxo > b { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.fluxo > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 15px; }
.fluxo .peca { padding: 5px 10px; border-radius: 6px; background: var(--code-bg); border: 1px solid var(--rule); }
.fluxo .peca.sai { background: var(--accent-soft); border-color: var(--accent); }
.fluxo .seta { color: var(--muted); }
@media (max-width: 520px) { .fluxo { grid-template-columns: 1fr; } }

/* data split bar */
.divisao { display: flex; border-radius: 8px; overflow: hidden; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.divisao div { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.divisao div span { font-weight: 400; font-size: 13px; }
.divisao .tr { background: var(--accent); color: var(--sheet); }
.divisao .va { background: color-mix(in srgb, var(--accent) 45%, var(--sheet)); color: var(--ink); }
.divisao .te { background: var(--mark-soft); color: var(--mark); border-left: 2px solid var(--sheet); }
td.rotulo-col, th.rotulo-col { background: var(--mark-soft); }

/* truth tables: V in green, F in red, result column tinted */
table.tv { width: auto; }
table.tv th, table.tv td { text-align: center; padding: 6px 14px; font-family: var(--font-mono); font-size: 15px; }
table.tv th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); white-space: nowrap; }
@media (max-width: 480px) { table.tv th, table.tv td { padding: 6px 6px; } }

/* permissões do Linux: tipo, dono, grupo e outros */
.perm { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-display); }
.perm > div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 66px; padding: 8px 12px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); }
.perm > div.tipo { background: var(--code-bg); }
.perm code { font-size: 22px; background: none; padding: 0; letter-spacing: .08em; color: var(--ink); }
.perm span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.perm b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--accent); }
@media (max-width: 480px) { .perm > div { min-width: 0; flex: 1; padding: 8px 4px 10px; } .perm code { font-size: 19px; } .perm b { font-size: 13px; } }

/* fórmula em destaque */
.conta { margin: 0; padding: 12px 16px; border-radius: 8px; background: var(--code-bg); color: var(--code-ink); font-family: var(--font-mono); font-size: 16px; text-align: center; overflow-x: auto; }
.conta small { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 13px; color: var(--muted); }
tr.total td { font-weight: 600; border-top: 2px solid var(--rule); }
table.tv td.v { color: var(--good); font-weight: 500; }
table.tv td.f { color: var(--bad); }
table.tv .res { background: var(--accent-soft); }
table.tv .sep { border-left: 2px solid var(--rule); }

/* confusion matrix */
table.matriz { width: auto; min-width: 320px; }
table.matriz th, table.matriz td { text-align: center; padding: 8px 12px; border: 1px solid var(--rule); }
table.matriz th { font-size: 12px; }
table.matriz td b { font-family: var(--font-mono); font-size: 18px; font-weight: 500; display: block; }
table.matriz td span { font-family: var(--font-display); font-size: 13px; color: var(--muted); }
table.matriz td.ok { background: var(--good-soft); }
table.matriz td.falha { background: var(--bad-soft); }

/* flashcard practice */
.escolha { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.escolha label { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.escolha select { font: inherit; font-size: 17px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); width: 100%; }
.escolha .resumo { font-size: 16px; color: var(--muted); }
.treino-topo { display: flex; flex-direction: column; gap: 8px; }
.treino-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: var(--font-display); font-size: 15px; color: var(--muted); }
.treino-linha b { color: var(--ink); font-variant-numeric: tabular-nums; }
.barra-prog { height: 10px; border-radius: 5px; background: var(--rule); overflow: hidden; }
.barra-prog i { display: block; height: 100%; width: 0; background: var(--good); transition: width .3s; }
.flash {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 22px 22px 26px;
  min-height: 300px; display: flex; flex-direction: column; gap: 16px; outline: none;
}
.flash-meta { display: flex; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; font-family: var(--font-display); font-size: 14px; color: var(--muted); }
.flash-meta .volta { color: var(--bad); font-weight: 600; }
.flash-frente { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 4.6vw, 28px); line-height: 1.3; text-wrap: balance; }
.flash-verso { border-top: 1px dashed var(--rule); padding-top: 16px; font-size: 19px; line-height: 1.55; }
.flash-link { font-family: var(--font-display); font-size: 15px; }
.flash-acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.flash-acoes.um { grid-template-columns: 1fr; }
.flash-acoes button { padding: 14px 10px; font-size: 17px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.flash-acoes button small { font-family: var(--font-body); font-weight: 400; font-size: 13px; letter-spacing: 0; opacity: .85; }
button.av-errei { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
button.av-quase { background: var(--mark-soft); border-color: var(--mark); color: var(--mark); }
button.av-acertei { background: var(--good-soft); border-color: var(--good); color: var(--good); }
kbd { font-family: var(--font-mono); font-size: 12px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; opacity: .7; }
.so-teclado { font-family: var(--font-display); font-size: 14px; color: var(--muted); }
@media (hover: none) { .so-teclado, .flash-acoes kbd { display: none; } }
ul.dificeis { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
ul.dificeis li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
ul.dificeis li:last-child { border-bottom: 0; }
ul.dificeis .vezes { font-family: var(--font-mono); font-size: 13px; color: var(--bad); white-space: nowrap; }
ul.dificeis a { font-family: var(--font-display); font-size: 14px; grid-column: 1 / -1; }
.caixas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.caixas div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.caixas b { font-family: var(--font-display); font-size: 15px; }
.caixas span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.caixas em { font-style: normal; font-family: var(--font-mono); font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.ferramentas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ferramentas a { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.ferramentas a:hover { border-color: var(--accent); }
.ferramentas b { font-family: var(--font-display); font-size: 18px; color: var(--accent); }
.ferramentas span { font-size: 15px; color: var(--muted); }
@media (max-width: 520px) { .ferramentas { grid-template-columns: 1fr; } }

/* subjects tracker on the home page */
.trilha-resumo { display: flex; flex-direction: column; gap: 8px; }
.trilha-resumo p { font-family: var(--font-display); font-size: 16px; color: var(--muted); }
.trilha-resumo p b { color: var(--ink); font-variant-numeric: tabular-nums; }
.trilha-resumo .t-bem { color: var(--good); }
.trilha-resumo .t-rever { color: var(--bad); }
.barra-status { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--rule); }
.barra-status i { display: block; height: 100%; }
.barra-status .bem { background: var(--good); }
.barra-status .rever { background: var(--bad); }
.filtros-status { display: flex; gap: 6px; flex-wrap: wrap; }
.filtros-status button { background: transparent; color: var(--accent); border-color: var(--rule); border-radius: 16px; padding: 5px 12px; font-size: 14px; }
.filtros-status button[aria-pressed="true"] { background: var(--accent); color: var(--sheet); border-color: var(--accent); }
.materias { display: flex; flex-direction: column; gap: 10px; }
details.materia { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
details.materia > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; padding: 14px 16px; cursor: pointer; color: var(--ink); }
details.materia > summary::-webkit-details-marker { display: none; }
details.materia > summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); grid-column: 2; grid-row: 1; }
details.materia[open] > summary::after { content: "−"; }
details.materia[open] > summary { border-bottom: 1px solid var(--rule); }
.materia-titulo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.materia-titulo b { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.materia-titulo span { font-family: var(--font-display); font-size: 14px; color: var(--muted); }
details.materia .barra-status { grid-column: 1 / -1; height: 8px; }
ul.assuntos { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; }
ul.assuntos > li { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding-block: 12px; border-bottom: 1px solid var(--rule); align-items: start; }
ul.assuntos > li:last-child { border-bottom: 0; }
.assunto-corpo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.assunto-nome { font-size: 16px; line-height: 1.45; display: flex; gap: 8px; align-items: baseline; }
.assunto-nome::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); transform: translateY(-1px); }
li.st-bem .assunto-nome::before { background: var(--good); border-color: var(--good); }
li.st-rever .assunto-nome::before { background: var(--bad); border-color: var(--bad); }
.assunto-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-display); font-size: 13.5px; color: var(--muted); padding-left: 17px; }
.assunto-tags .base { color: var(--mark); font-weight: 600; }
.assunto-tags .bom { color: var(--good); font-weight: 600; }
.assunto-tags .ruim { color: var(--bad); font-weight: 600; }
.assunto-tags button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; letter-spacing: 0; }
.status-btns { display: flex; gap: 6px; }
.status-btns button { padding: 6px 10px; font-size: 14px; background: transparent; color: var(--muted); border-color: var(--rule); white-space: nowrap; }
.status-btns button.bem[aria-pressed="true"] { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.status-btns button.rever[aria-pressed="true"] { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.assunto-nota { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; padding-left: 17px; }
.assunto-nota label { font-family: var(--font-display); font-size: 13.5px; color: var(--muted); }
.assunto-nota textarea { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); resize: vertical; min-height: 64px; }
@media (max-width: 560px) {
  ul.assuntos { padding: 0 12px; }
  ul.assuntos > li { grid-template-columns: 1fr; }
  .status-btns { padding-left: 17px; }
}

/* mind map */
.wrap.largo { max-width: 1280px; }
.mapa-controles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mapa-controles .sep { flex: 1; }
.mapa-area { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.mapa-area svg { display: block; }
.mapa-area .mm-no { cursor: default; }
.mapa-area .mm-no.abre, .mapa-area .mm-no.oculto { cursor: pointer; }
.mapa-area .mm-no:focus { outline: none; }
.mapa-area .mm-no:focus-visible rect { stroke-width: 3; }
.mm-txt { font-family: var(--font-display); fill: var(--ink); }
.mm-raiz rect { fill: var(--ink); }
.mm-raiz .mm-txt { fill: var(--sheet); font-weight: 700; }
.mm-mais { font-family: var(--font-mono); font-size: 12px; }
.mapa-lista { padding: 12px 4px 4px; }
.mapa-lista ul { list-style: none; margin: 0; padding-left: 18px; border-left: 2px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.mapa-lista > ul { border-left: 0; padding-left: 0; gap: 14px; }
.mapa-lista li { font-size: 16px; }
.mapa-lista li > b { font-family: var(--font-display); font-size: 17px; }
.mapa-lista .ramo > ul { margin-top: 6px; }

/* exercises */
.exercicios { display: flex; flex-direction: column; gap: 14px; }
.exercicio { border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; display: flex; flex-direction: column; gap: 10px; }
.exercicio h3 { font-size: 18px; }
details { border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); }
summary { cursor: pointer; padding: 9px 14px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--accent); }
details[open] summary { border-bottom: 1px solid var(--rule); }
details > div { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }

/* answer sheet */
.aviso { font-size: 15px; color: var(--muted); }
.folha { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
fieldset.item { position: relative; border: 0; margin: 0; padding: 16px 18px; display: grid; grid-template-columns: 34px 1fr; gap: 6px 10px; border-bottom: 1px solid var(--rule); min-width: 0; }
fieldset.item:last-child { border-bottom: 0; }
.item .q { font-family: var(--font-mono); font-size: 14px; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.item .corpo, .item .enunciado { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.assunto-tag { font-family: var(--font-display); font-size: 13px; color: var(--muted); }
.bolhas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bolha { position: relative; }
.bolha input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bolha span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px;
  border: 1.5px solid var(--muted); border-radius: 17px; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  cursor: pointer; color: var(--ink);
}
.bolha input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.bolha input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bolha input:disabled + span { cursor: default; }
.coment { font-size: 15.5px; border-radius: 6px; padding: 10px 12px; background: var(--paper); }
.coment b { font-family: var(--font-display); }
fieldset.item.certo { background: var(--good-soft); }
fieldset.item.errado { background: var(--bad-soft); }
fieldset.item.certo .coment b { color: var(--good); }
fieldset.item.errado .coment b { color: var(--bad); }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.resultado { font-family: var(--font-display); font-size: 17px; }
.resultado b { font-size: 26px; font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent); }
.formula, .nota-pe { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.ultima { font-family: var(--font-display); font-size: 15px; color: var(--muted); }

/* flashcards */
.cartoes { display: flex; flex-direction: column; gap: 10px; }
.cartao {
  width: 100%; text-align: left; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 10px; padding: 14px 16px; font-family: var(--font-body); font-weight: 400; font-size: 17px; letter-spacing: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.cartao:hover { filter: none; border-color: var(--accent); }
.cartao .frente { font-weight: 600; }
.cartao .verso { color: var(--accent); }
.cartao .dica { font-family: var(--font-display); font-size: 13px; color: var(--muted); }

/* links */
ul.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ul.links li { padding-block: 10px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
ul.links li:last-child { border-bottom: 0; }
ul.links .desc { font-size: 15.5px; color: var(--muted); }
.amanha { background: var(--accent-soft); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }

/* home and panel */
.numeros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.numeros div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.numeros b { font-family: var(--font-mono); font-weight: 500; font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.numeros span { font-family: var(--font-display); font-size: 14px; color: var(--muted); }
@media (max-width: 480px) {
  .numeros { gap: 8px; }
  .numeros div { padding: 12px; }
  .numeros b { font-size: 19px; white-space: nowrap; }
  ol.reforco li { grid-template-columns: 24px 1fr; }
  ol.reforco .rn { grid-column: 2; }
}
.destaque { background: var(--sheet); border: 1px solid var(--accent); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.destaque h3 { font-size: 22px; }
.vazio { color: var(--muted); font-size: 16px; background: var(--sheet); border: 1px dashed var(--rule); border-radius: 10px; padding: 16px 18px; }
ul.sessoes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
ul.sessoes li { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
ul.sessoes li:last-child { border-bottom: 0; }
ul.sessoes .sn { font-family: var(--font-mono); color: var(--muted); font-size: 14px; }
ul.sessoes .st { min-width: 0; display: flex; flex-direction: column; }
ul.sessoes .st a { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
ul.sessoes .st span { font-size: 14.5px; color: var(--muted); }
.selo { font-family: var(--font-display); font-weight: 600; font-size: 13px; padding: 2px 10px; border-radius: 12px; white-space: nowrap; background: var(--paper); color: var(--muted); }
.selo.feita { background: var(--good-soft); color: var(--good); }
.selo.andamento { background: var(--mark-soft); color: var(--mark); }

.alternar { display: inline-flex; border: 1px solid var(--accent); border-radius: 8px; overflow: hidden; }
.alternar button { border: 0; border-radius: 0; background: transparent; color: var(--accent); }
.alternar button[aria-pressed="true"] { background: var(--accent); color: var(--sheet); }
.reforco { display: flex; flex-direction: column; gap: 10px; }
.reforco li { list-style: none; }
ol.reforco { margin: 0; padding: 0; counter-reset: r; }
ol.reforco li { counter-increment: r; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: baseline; background: var(--bad-soft); border-radius: 10px; padding: 12px 16px; }
ol.reforco li::before { content: counter(r); font-family: var(--font-mono); color: var(--bad); font-weight: 500; }
ol.reforco .ra { min-width: 0; display: flex; flex-direction: column; }
ol.reforco .ra b { font-family: var(--font-display); font-size: 17px; }
ol.reforco .ra span { font-size: 14.5px; color: var(--muted); }
ol.reforco .rn { font-family: var(--font-mono); font-size: 14px; color: var(--bad); white-space: nowrap; }
.barra { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--bad-soft); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.barra i { display: block; height: 100%; background: var(--good); }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: var(--accent-soft); }
tr.escolhido td { background: var(--accent-soft); }
.filtros { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-family: var(--font-display); font-size: 15px; }
.filtros select { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); max-width: 100%; }
.filtros label { display: inline-flex; gap: 6px; align-items: center; }
.filtros input { accent-color: var(--accent); }
.erros { display: flex; flex-direction: column; gap: 12px; }
.erro { background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--bad); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.erro.corrigido { border-left-color: var(--good); }
.erro .topo { display: flex; gap: 8px 14px; flex-wrap: wrap; font-family: var(--font-display); font-size: 14px; color: var(--muted); }
.erro .topo b { color: var(--ink); }
.erro .texto { display: flex; flex-direction: column; gap: 8px; font-size: 16px; min-width: 0; }
.erro .texto p { overflow-wrap: anywhere; }
.erro .resp { font-family: var(--font-display); font-size: 15px; }
.erro .resp .sua { color: var(--bad); font-weight: 600; }
.erro .resp .gab { color: var(--good); font-weight: 600; }
.erro .com { font-size: 15.5px; background: var(--paper); border-radius: 6px; padding: 10px 12px; }

/* login and toast */
.login { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 55%, transparent); display: flex; align-items: center; justify-content: center; padding: 16px; }
.login form { background: var(--sheet); border-radius: 12px; padding: 24px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; }
.login label { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.login input { font: inherit; font-size: 17px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.login .falha { color: var(--bad); font-size: 15px; }
.aviso-flutuante {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  background: var(--ink); color: var(--sheet); font-family: var(--font-display); font-size: 15px; padding: 9px 16px; border-radius: 8px;
  max-width: calc(100% - 32px); box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}
.aviso-flutuante.erro { background: var(--bad); color: #fff; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .topico { padding: 18px 16px 20px; }
  fieldset.item { padding: 14px 14px; grid-template-columns: 28px 1fr; }
  .clock .tempo { font-size: 20px; }
  ul.sessoes li { grid-template-columns: 34px 1fr; }
  ul.sessoes .selo { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
