/* Baixo estímulo: papel quente, serifa, monocromático, zero animação. */
:root {
  --bg: #f4efe4;
  --fg: #2a2824;
  --muted: #6f6a60;
  --line: #d6cebd;
  --soft: #ebe4d5;
  --accent: #2a2824;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1d1a;
    --fg: #ddd6c8;
    --muted: #9a9282;
    --line: #3b3832;
    --soft: #29261f;
    --accent: #ddd6c8;
  }
}
* { box-sizing: border-box; transition: none !important; animation: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 19px/1.6 Charter, "Iowan Old Style", "Source Serif Pro", Georgia, serif;
}
main { max-width: 40rem; margin: 0 auto; padding: 1rem 16px 4rem; }
header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; color: var(--muted); font-size: .9rem; }
header .brand { margin-left: auto; letter-spacing: .08em; }
a { color: var(--fg); text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1 { font-size: 1.5rem; font-weight: normal; margin: .2rem 0 .6rem; }
h2 { font-size: 1.05rem; font-weight: bold; margin: 2rem 0 .4rem; }
.meta { color: var(--muted); font-size: .88rem; }
.warn { border-left: 3px solid var(--fg); padding-left: .7rem; }
ul.list, ul.journal { padding-left: 0; list-style: none; }
ul.list li, ul.journal li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
th { font-weight: normal; color: var(--muted); }
button, .button {
  font: inherit; font-size: .95rem; color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px; padding: .5rem 1rem;
  cursor: pointer; text-decoration: none; display: inline-block; margin: .2rem .2rem .2rem 0;
}
button.secondary, .button.secondary { background: transparent; color: var(--fg); }
button.link { background: none; border: none; color: var(--muted); padding: 0; text-decoration: underline; }
form.inline { display: inline; }
footer { margin-top: 3rem; }
fieldset { border: none; padding: 0; margin: 1rem 0; }
legend { color: var(--muted); font-size: .9rem; margin-bottom: .3rem; }
label.choice {
  display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem;
  border: 1px solid var(--line); border-radius: 3px; margin-bottom: .4rem; cursor: pointer;
}
label.choice:has(input:checked) { border-color: var(--fg); background: var(--soft); }
label.choice input { margin-top: .45rem; }
.letter { color: var(--muted); min-width: 1.1rem; }
label.conf { display: inline-flex; gap: .3rem; align-items: center; margin-right: 1rem; font-size: .95rem; }
textarea, input[type=password] {
  width: 100%; font: inherit; color: var(--fg); background: var(--soft);
  border: 1px solid var(--line); border-radius: 3px; padding: .5rem;
}
.answer { white-space: pre-wrap; background: var(--soft); padding: .6rem .8rem; border-radius: 3px; }
.prompt { font-size: 1.05rem; }
.md.inline p { margin: 0; display: inline; }
blockquote { margin: .8rem 0; padding: .1rem 0 .1rem .9rem; border-left: 2px solid var(--line); color: var(--muted); }
blockquote.callout { border-left-width: 3px; }
blockquote.callout::before { display: block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
blockquote.callout-conjectura::before { content: "conjectura"; }
blockquote.callout-especulacao::before { content: "especulação"; }
blockquote.callout-estabelecido::before { content: "estabelecido"; }
blockquote.quote { font-style: italic; }
.cite { font-size: .8rem; color: var(--muted); border-bottom: 1px dotted var(--muted); cursor: help; }
pre, code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .85em; }
pre { background: var(--soft); padding: .7rem; overflow-x: auto; border-radius: 3px; }
details { margin-top: 2.5rem; color: var(--muted); }
details form { margin-top: .6rem; }
.resolution { margin-top: .3rem; color: var(--muted); font-size: .92rem; }
.verdict { font-size: 1.3rem; font-weight: normal; margin-top: 1.5rem; }
.katex-display { overflow-x: auto; overflow-y: hidden; }
img { max-width: 100%; }
