.library-overview { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 24px; overflow: hidden; }
.library-overview div { padding: 22px 24px; border-right: 1px solid var(--line); }
.library-overview div:last-child { border: 0; }
.library-overview b { display: block; font-size: 32px; font-weight: 650; color: var(--green); line-height: 1.2; }
.library-overview span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.library-collections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
.library-collections button { text-align: left; display: flex; flex-direction: column; gap: 9px; padding: 23px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s, transform .15s; }
.library-collections button:hover { border-color: var(--green); transform: translateY(-2px); }
.library-collections span { color: var(--green); font: 10px var(--mono); letter-spacing: .1em; }
.library-collections b { font-size: 19px; line-height: 1.4; }
.library-collections small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.library-filters .search { flex-basis: 100%; min-width: 0; font-size: 15px; min-height: 48px; }
.library-filters select { flex: 1; min-width: 0; max-width: 100%; font-size: 13px; min-height: 44px; }
.library-statusbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.library-view { display: flex; padding: 4px; gap: 3px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.library-view button { border: 0; border-radius: 8px; min-height: 40px; padding: 8px 14px; background: transparent; color: var(--muted); font-size: 13px; }
.library-view button[aria-pressed="true"] { color: var(--text); background: var(--panel3); }
.library-results { font-size: 13px; min-height: 20px; }
.pdf-resource.panel { padding: 0; border-radius: 16px; overflow: hidden; }
.pdf-cover { min-height: 108px; padding: 20px; display: flex; position: relative; flex-direction: column; gap: 9px; background: linear-gradient(120deg, var(--panel3), var(--bg2)); color: var(--green); border-bottom: 1px solid var(--line); }
.pdf-cover span { font: 10px var(--mono); letter-spacing: .09em; }
.pdf-cover b { font-size: 22px; font-weight: 600; }
.pdf-cover i { position: absolute; right: 20px; bottom: 14px; font-size: 40px; line-height: 1; opacity: .35; font-style: normal; }
.pdf-natureza, .pdf-linguagens { color: var(--cyan); }
.pdf-humanas, .pdf-revisao { color: var(--amber); }
.resource-content { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.resource-content h3 { margin-bottom: 12px; line-height: 1.45; font-size: 18px; }
.resource-content p { font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.resource-meta .chip { font-size: 10px; padding: 5px 8px; }
.resource-size { font-size: 11px; color: var(--muted); align-self: center; }
.resource-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.resource-links .pdf-open { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 12px; background: var(--panel3); border: 1px solid var(--line2); border-radius: 9px; font-size: 13px; color: var(--green); }
.resource-links a:last-child { min-height: 44px; padding: 10px 0; display: inline-flex; align-items: center; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.resource-actions button { min-height: 44px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; padding: 8px 10px; }
.resource-actions button[aria-pressed="true"] { color: var(--green); border-color: var(--line2); background: var(--panel3); }
.library-empty { grid-column: 1 / -1; text-align: center; padding: 35px; }
.library-empty p { color: var(--muted); margin: 15px 0; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 25px; }
.library-pagination span { font-size: 13px; color: var(--muted); }
.library-disclosure { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 25px; max-width: 750px; }
.official-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }
.official-exam-cover { padding: 24px; border: 1px solid var(--line2); background: var(--panel3); border-radius: 14px; margin-top: 12px; }
.official-exam-cover > span:first-child { font: 11px var(--mono); letter-spacing: .1em; color: var(--green); }
.official-exam-cover h3 { font-size: 23px; margin: 12px 0; }
.official-exam-cover p { color: var(--muted); line-height: 1.65; margin: 10px 0 18px; }
.official-exam-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.official-exam-links > a:last-child { color: var(--cyan); display: block; width: 100%; font-size: 13px; padding: 6px 0; }
.official-clock { padding: 25px 0; text-align: center; border-block: 1px solid var(--line); margin: 20px 0; }
.official-clock > span { font: 10px var(--mono); color: var(--muted); letter-spacing: .1em; }
.official-clock b { font: 500 clamp(28px, 4vw, 44px)/1.4 var(--mono); display: block; color: var(--green); margin: 12px 0; font-variant-numeric: tabular-nums; }
.official-clock > div { display: flex; gap: 10px; justify-content: center; }
.official-exam-panel > p { font-size: 13px; line-height: 1.65; }
.official-score-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#officialResultForm { margin-top: 20px; }
#officialResultForm p { font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
#officialFeedback { color: var(--green); margin: 16px 0 0; }
.official-history-head { margin: 35px 0 20px; }
.official-history { display: grid; gap: 12px; }
.official-history-item { display: flex; gap: 20px; justify-content: space-between; align-items: center; }
.official-history-item > div { min-width: 0; }
.official-history-item h3 { margin: 10px 0; }
.official-history-item p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin: 6px 0; white-space: pre-line; }
.official-history-item > b { color: var(--green); font-size: 34px; font-weight: 650; text-align: right; flex-shrink: 0; }
.official-history-item small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.official-insight { display: flex; gap: 24px; align-items: center; border-color: var(--line2); margin-top: 24px; }
.official-insight h3 { margin: 12px 0; }
.official-insight p { font-size: 14px; line-height: 1.7; color: var(--muted); margin-bottom: 12px; }
.official-insight .btn { flex-shrink: 0; }
.quick-search { color: var(--text); background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; width: min(600px, calc(100% - 30px)); max-height: min(720px, 88dvh); box-shadow: var(--shadow); }
.quick-search::backdrop { background: #0009; backdrop-filter: blur(3px); }
.quick-search-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.quick-search-head h2 { font-size: 21px; line-height: 1.4; }
.quick-search-results { display: grid; gap: 7px; margin-top: 18px; }
.quick-search-results button { display: grid; grid-template-columns: 1fr auto; gap: 5px 15px; text-align: left; color: var(--text); padding: 13px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; min-height: 60px; }
.quick-search-results button:hover { border-color: var(--green); }
.quick-search-results span { font: 9px var(--mono); color: var(--muted); }
.quick-search-results b { grid-column: 1; font-size: 14px; font-weight: 550; line-height: 1.5; }
.quick-search-results i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--green); }
.quick-search > p { margin-top: 20px; font-size: 11px; }
@media (max-width: 1000px) { .official-layout { grid-template-columns: 1fr; } .official-insight { align-items: flex-start; flex-direction: column; } }
@media (max-width: 600px) {
  .top-inner { padding-inline: 12px; gap: 8px; }
  .brand > span:nth-child(2) { display: none; }
  .brand .brand-mark { display: grid; width: 30px; height: 32px; flex-shrink: 0; }
  #openQuickSearch { width: 36px; min-height: 40px; }
  .library-overview { grid-template-columns: 1fr 1fr; }
  .library-overview div { padding: 18px; border-bottom: 1px solid var(--line); }
  .library-overview div:nth-child(2) { border-right: 0; }
  .library-overview div:nth-child(3) { border-bottom: 0; }
  .library-overview b { font-size: 28px; }
  .library-overview span { font-size: 11px; }
  .library-collections { gap: 8px; }
  .library-collections button { padding: 16px; }
  .library-collections b { font-size: 15px; }
  .library-collections small { font-size: 11px; }
  .library-filters select { flex-basis: calc(50% - 8px); }
  .library-view button { padding: 8px 10px; font-size: 12px; }
  .library-pagination { gap: 10px; }
  .library-pagination .btn { padding: 10px; font-size: 12px; }
  .official-exam-cover { padding: 20px; }
  .official-score-fields { gap: 8px; }
  .official-score-fields .field span { font-size: 12px; }
  .official-history-item { gap: 12px; align-items: flex-start; }
  .official-history-item h3 { font-size: 17px; }
  .official-history-item > b { font-size: 28px; }
  .quick-search { padding: 18px; }
}
.tab.on { animation: none; }
body[data-view]:not([data-view="hoje"]) .hero,
body[data-view]:not([data-view="hoje"]) .metric-grid { display: none; }
.is-filtered .library-overview, .is-filtered .library-collections { display: none; }
[data-theme="light"] .btn.primary { color: #ffffff; background: var(--kalore-primary); }
[data-theme="light"] .btn.danger { color: var(--red); border-color: var(--red); }
.official-exam-cover .chip { color: var(--text); background: var(--panel); }
.flash-front { width: 100%; text-align: left; color: var(--text); cursor: pointer; }
.flash-front .flash-title { margin: auto 0; font-size: 20px; line-height: 1.45; font-weight: 600; }
.flash-front .flash-due { margin-top: 12px; }
.flash-repeat { color: var(--cyan); background: none; border: none; text-align: left; font-size: 12px; padding: 9px 0; }
.flashcard, .flash-inner, .flash-face { min-height: 300px; }
