:root {
  --bg: #11120f;
  --panel: #1a1b17;
  --panel-2: #23241f;
  --line: #3d3e36;
  --ink: #f0e9d8;
  --muted: #aaa99f;
  --copper: #c88952;
  --copper-light: #e4b27a;
  --yes: #8ad6a0;
  --no: #e27d6b;
  --irrelevant: #b7b5ad;
  --ease: cubic-bezier(.2,.7,.2,1);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, rgba(200,137,82,.12), transparent 38rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, .case-card { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--copper-light);
  outline-offset: 3px;
}
::selection { background: var(--copper); color: var(--bg); }
[hidden] { display: none !important; }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .8rem 1rem; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 1rem; }
.site-header {
  width: min(1120px, calc(100% - 2rem));
  min-height: 76px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: .65rem; align-items: center; padding: .55rem; margin-left: -.55rem; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius); }
.brand:hover { background: rgba(255,255,255,.035); }
.brand svg { width: 38px; height: 38px; fill: var(--panel-2); stroke: var(--copper); stroke-width: 1.4; }
.brand svg circle { fill: var(--copper); stroke: none; }
.brand span { display: grid; text-align: left; line-height: 1.05; }
.brand b { font-family: Georgia, serif; font-size: 1.08rem; font-weight: 600; }
.brand small, .score-chip span, .kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase; letter-spacing: .14em; font-size: .64rem; font-weight: 700;
}
.brand small { margin-top: .25rem; color: var(--muted); letter-spacing: .08em; }
.score-chip { display: flex; align-items: baseline; gap: .55rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.score-chip span { color: var(--muted); }
.score-chip strong { color: var(--copper-light); font-family: Georgia, serif; font-size: 1.45rem; line-height: 1; }
main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 3.5rem 0 5rem; }
.hero { max-width: 780px; margin: 2rem auto 0; text-align: center; }
.kicker { margin: 0 0 1rem; color: var(--copper-light); }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 8vw, 6.8rem); line-height: .91; letter-spacing: -.055em; font-weight: 500; }
.hero h1 em { color: var(--copper-light); font-weight: 400; }
.hero-copy { max-width: 590px; margin: 1.75rem auto 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.hero-copy b { color: var(--ink); }
.archive-rule { display: flex; align-items: center; gap: 1rem; margin: 3.25rem 0 2rem; color: var(--copper); }
.archive-rule span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line)); }
.archive-rule span:last-child { transform: scaleX(-1); }
.archive-rule svg { width: 18px; fill: none; stroke: currentColor; }
.category-filter { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .15rem 1.25rem; scrollbar-width: thin; }
.category-filter button { min-height: 44px; white-space: nowrap; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: .18s var(--ease); }
.category-filter button:hover, .category-filter button[aria-pressed="true"] { color: var(--ink); border-color: var(--copper); background: rgba(200,137,82,.09); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.case-card {
  position: relative; overflow: hidden; min-height: 230px; padding: 1.35rem; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--panel-2), var(--panel)); cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.case-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(228,178,122,.65), transparent); }
.case-card:hover { transform: translateY(-3px); border-color: #6a5743; box-shadow: 0 18px 38px -25px rgba(200,137,82,.75); }
.case-card .case-number { color: var(--copper-light); font: 700 .68rem/1 ui-monospace, monospace; letter-spacing: .15em; }
.case-card h2 { margin: auto 0 .65rem; font: 500 1.65rem/1.05 Georgia, serif; }
.case-card p { margin: 0; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case-meta { margin-top: 1.1rem; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font: 700 .62rem/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.case-meta svg { width: 20px; fill: none; stroke: var(--copper-light); stroke-width: 1.7; }
.back-button { min-height: 44px; display: flex; align-items: center; gap: .3rem; padding: .4rem .65rem; margin: -1rem 0 1.5rem -.65rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.back-button:hover { color: var(--ink); background: var(--panel); }
.back-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.case-heading { max-width: 720px; margin: 0 auto; text-align: center; }
.case-heading h2 { margin: 0; font: 500 clamp(2.1rem, 6vw, 4rem)/1 Georgia, serif; letter-spacing: -.035em; }
.case-heading > p:last-child { margin: 1rem auto 0; color: var(--muted); font-size: 1.05rem; }
.oracle-shell { position: relative; width: min(430px, 100%); margin: 2.5rem auto 0; display: grid; place-items: center; }
.oracle-aura { position: absolute; width: 240px; height: 240px; top: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(200,137,82,.11), transparent 66%); filter: blur(8px); transition: background .35s var(--ease); }
.oracle-head { position: relative; z-index: 1; width: min(320px, 86vw); filter: drop-shadow(0 24px 28px rgba(0,0,0,.45)); }
.stone { fill: url(#stone); stroke: #8d8e84; stroke-width: 2; filter: url(#rough); }
.stone-line { fill: none; stroke: #33352f; stroke-width: 4; opacity: .8; }
.brow { fill: #171814; stroke: #77786f; stroke-width: 2; }
.mouth { fill: #171814; stroke: #62645b; stroke-width: 2; }
.lamps { position: absolute; z-index: 2; top: 43%; display: flex; gap: 2rem; }
.lamp { display: grid; justify-items: center; gap: .45rem; }
.lamp span { width: 28px; height: 28px; border: 2px solid #787970; border-radius: 50%; background: #292a25; box-shadow: inset 0 2px 6px #000; transition: .3s var(--ease); }
.lamp b { color: #86867f; font: 700 .57rem/1 ui-monospace, monospace; letter-spacing: .11em; }
.oracle-shell[data-answer="sim"] .lamp-yes span { background: var(--yes); border-color: #d9ffe2; box-shadow: 0 0 10px var(--yes), 0 0 34px rgba(138,214,160,.75); animation: lamp-on .55s var(--ease); }
.oracle-shell[data-answer="nao"] .lamp-no span { background: var(--no); border-color: #ffe0da; box-shadow: 0 0 10px var(--no), 0 0 34px rgba(226,125,107,.7); animation: lamp-on .55s var(--ease); }
.oracle-shell[data-answer="irrelevante"] .lamp-irrelevant span { background: var(--irrelevant); border-color: #fff; box-shadow: 0 0 10px var(--irrelevant), 0 0 30px rgba(183,181,173,.6); animation: lamp-on .55s var(--ease); }
.oracle-shell[data-answer="sim"] .oracle-aura { background: radial-gradient(circle, rgba(138,214,160,.18), transparent 66%); }
.oracle-shell[data-answer="nao"] .oracle-aura { background: radial-gradient(circle, rgba(226,125,107,.16), transparent 66%); }
.oracle-shell.resolved .lamp span { animation: victory-lamps .6s var(--ease) both; }
.oracle-shell.resolved .mouth { transform-box: fill-box; transform-origin: center; animation: stone-open .65s var(--ease) both; }
.oracle-shell.resolved .oracle-aura { background: radial-gradient(circle, rgba(228,178,122,.32), transparent 68%); }
.oracle-message { z-index: 2; min-height: 1.5rem; margin: -.25rem 0 0; color: var(--muted); font: 650 .78rem/1.4 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.question-panel { max-width: 680px; margin: 2rem auto 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(26,27,23,.85); box-shadow: 0 16px 50px -34px rgba(200,137,82,.7); }
.ask-form label, dialog label { display: block; margin-bottom: .55rem; font-weight: 700; }
.input-row { display: flex; gap: .6rem; }
input, textarea { width: 100%; border: 1px solid #55564e; border-radius: var(--radius); background: #0d0e0c; color: var(--ink); padding: .85rem 1rem; resize: vertical; }
input { min-height: 50px; }
input::placeholder, textarea::placeholder { color: #77786f; }
.primary-button { flex: 0 0 50px; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--copper-light); border-radius: var(--radius); background: var(--copper); color: var(--bg); cursor: pointer; transition: .18s var(--ease); }
.primary-button:hover, .primary-wide:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(200,137,82,.95); background: var(--copper-light); }
.primary-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ask-form small { display: block; margin-top: .55rem; color: var(--muted); }
.actions-row { display: flex; gap: .65rem; margin-top: 1.15rem; }
.guess-button, .quiet-button, .primary-wide { min-height: 48px; border-radius: var(--radius); cursor: pointer; transition: .18s var(--ease); }
.guess-button { flex: 1; border: 1px solid var(--copper); background: rgba(200,137,82,.1); color: var(--copper-light); font-weight: 750; }
.guess-button:hover { background: rgba(200,137,82,.18); }
.quiet-button { padding: 0 1rem; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.quiet-button:hover { color: var(--ink); border-color: #66675f; }
.history { max-width: 680px; margin: 3rem auto 0; }
.section-title { display: flex; align-items: center; gap: .8rem; }
.section-title span { height: 1px; flex: 1; background: var(--line); }
.section-title h3 { margin: 0; font: 500 1rem/1 Georgia, serif; color: var(--muted); }
.history ol { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: .65rem; }
.history-item { display: grid; grid-template-columns: 30px 1fr auto; gap: .75rem; align-items: start; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.history-number { color: var(--muted); font: 700 .68rem/1.5 ui-monospace, monospace; }
.history-copy p { margin: 0; }
.history-answer { margin-top: .3rem !important; color: var(--copper-light); font: 700 .68rem/1.4 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.dispute-button { min-width: 44px; min-height: 44px; padding: .35rem; border: 0; background: transparent; color: var(--muted); font-size: .69rem; text-decoration: underline; cursor: pointer; }
.dispute-button:hover { color: var(--ink); }
.dispute-button[disabled] { color: var(--yes); text-decoration: none; cursor: default; }
.empty-history { text-align: center; color: var(--muted); font-style: italic; }
dialog { width: min(520px, calc(100% - 2rem)); border: 1px solid #5a5145; border-radius: var(--radius-lg); background: var(--panel); color: var(--ink); padding: 0; box-shadow: 0 30px 100px #000; }
dialog::backdrop { background: rgba(5,6,4,.82); backdrop-filter: blur(5px); }
dialog form, .reveal-content { position: relative; padding: 2rem; }
dialog h2 { margin: 0 0 1.5rem; font: 500 2.2rem/1 Georgia, serif; }
.dialog-close { position: absolute; top: .7rem; right: .7rem; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 2rem; cursor: pointer; }
.guess-warning { color: var(--muted); font-size: .85rem; }
.primary-wide { width: 100%; padding: .75rem 1rem; border: 1px solid var(--copper-light); background: var(--copper); color: var(--bg); font-weight: 800; }
.reveal-dialog { width: min(650px, calc(100% - 1.5rem)); text-align: center; }
.reveal-image-wrap { aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: #0d0e0c; }
.reveal-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.image-placeholder { display: grid; justify-items: center; gap: .8rem; color: var(--muted); font: 700 .7rem/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.image-placeholder svg { width: 68px; fill: none; stroke: var(--copper); stroke-width: 1.4; }
blockquote { margin: 1.4rem 0; padding-left: 1rem; border-left: 2px solid var(--copper); text-align: left; font: 1.08rem/1.55 Georgia, serif; }
.final-score { color: var(--muted); }
.final-score strong { display: block; color: var(--copper-light); font: 500 3.4rem/1 Georgia, serif; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 1.25rem; translate: -50% calc(100% + 3rem); width: min(420px, calc(100% - 2rem)); padding: .9rem 1rem; border: 1px solid #66543f; border-radius: var(--radius); background: #29251f; text-align: center; box-shadow: 0 12px 40px #000; transition: translate .28s var(--ease); }
.toast.visible { translate: -50% 0; }
.noscript { margin: 1rem; padding: 1rem; background: var(--no); color: #190b08; }
.loading { opacity: .58; pointer-events: none; }
@keyframes lamp-on { 0% { transform: scale(.65); } 65% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes victory-lamps { 0%, 100% { background: var(--copper-light); box-shadow: 0 0 12px var(--copper-light); } 50% { background: #fff5d7; box-shadow: 0 0 38px #fff5d7; transform: scale(1.35); } }
@keyframes stone-open { from { transform: scaleY(1); } to { transform: translateY(9px) scaleY(2.2); opacity: .15; } }
.js .reveal { animation: enter .7s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 760px) {
  main { padding-top: 2rem; }
  .case-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 190px; }
  .hero { margin-top: 1rem; }
  .oracle-shell { margin-top: 1.75rem; }
}
@media (max-width: 390px), (max-height: 680px) {
  .site-header { min-height: 66px; }
  .brand small { display: none; }
  main { padding-top: 1.4rem; }
  .hero h1 { font-size: clamp(2.45rem, 14vw, 3.2rem); }
  .oracle-head { width: 250px; }
  .lamps { top: 41%; gap: 1.35rem; }
  .lamp span { width: 25px; height: 25px; }
  .question-panel { padding: 1rem; }
  dialog form, .reveal-content { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; animation-delay: 0s !important; }
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; animation-delay: 0s !important; scroll-behavior: auto !important; }

.campaign-footer{max-width:1120px;margin:24px auto;padding:20px;text-align:center;font-size:12px;line-height:1.6;color:#b8b9ab}.campaign-footer p{margin:0 0 8px}.campaign-footer nav{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 18px}.campaign-footer a{display:inline-flex;align-items:center;min-height:44px;color:#d5e9a5;text-underline-offset:3px}.campaign-footer p a{font-weight:bold}

html[data-theme="light"] { color-scheme: light; --bg:#f6f1e7; --panel:#fffaf2; --panel-2:#eee7d9; --line:#c6bbab; --ink:#28251e; --muted:#655e52; --copper:#986032; --copper-light:#885023; --yes:#8ad6a0; --no:#e27d6b; }
html[data-theme="light"] .question-panel { background:var(--panel); }
html[data-theme="light"] input, html[data-theme="light"] textarea, html[data-theme="light"] .reveal-image-wrap { background:var(--panel); border-color:var(--line); }
html[data-theme="light"] .toast { background:var(--panel); box-shadow:0 12px 40px #0003; }
html[data-theme="light"] dialog { box-shadow:0 30px 100px #0005; }
html[data-theme="light"] .primary-button, html[data-theme="light"] .primary-wide { color:#fffaf2; }
.campaign-footer { color:var(--muted); }
.campaign-footer a { color:var(--copper-light); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.header-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.preference-control { position:relative; display:inline-flex; height:44px; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:12px; background:var(--panel); font:600 13px/1 system-ui,sans-serif; flex-shrink:0; }
.language-control { width:82px; }
.theme-control { width:44px; font-size:22px; }
.preference-control select { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.preference-control:focus-within { outline:2px solid #a887df; outline-offset:2px; }
.portal-nav { width:min(1120px,calc(100% - 2rem)); margin:6px auto 0; }
.portal-nav a { display:inline-flex; min-height:44px; align-items:center; color:var(--muted); text-decoration:none; font-size:.85rem; }
.portal-nav a:hover { color:var(--ink); text-decoration:underline; }
.portal-nav a:focus-visible { outline:2px solid #a887df; outline-offset:2px; }
.score-rule { max-width:590px; margin:1rem auto 0; text-align:center; color:var(--muted); font-size:.85rem; }
#archive-status { padding:2rem 1rem; text-align:center; color:var(--muted); border:1px solid var(--line); border-radius:12px; }
#archive-retry { min-height:44px; }
.lamp b { text-transform:uppercase; }
@media(max-width:540px) {
 .site-header { flex-wrap:wrap; gap:4px; padding:8px 0; }
 .brand b { font-size:1rem; }
 .brand svg { width:30px; height:30px; }
 .brand small { display:none; }
 .header-tools .score-chip { order:3; }
 .score-chip span { letter-spacing:0; }
 .history-item { grid-template-columns:24px minmax(0,1fr); }
 .history-copy { overflow-wrap:anywhere; }
 .dispute-button { grid-column:2; justify-self:start; }
}
@media(max-width:360px) { .site-header { column-gap:0; } .brand { gap:5px; } .brand b { font-size:.92rem; } .header-tools { gap:4px; } .language-control { width:76px; } .header-tools .score-chip { position:absolute; right:16px; margin-top:100px; } }
