/* ShituationalBewareness — a vitrine: look, don't touch.
   One loud thing (the enamel placard), everything else quiet. */

@font-face { font-family: "Atkinson"; src: url("/static/atkinson-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/static/atkinson-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/static/atkinson-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --glass: #e7efec;        /* the pane you look through */
  --glass-deep: #d5e3df;
  --ink: #0f2a2e;
  --ink-soft: #4c6669;
  --enamel: #14484c;       /* the placard */
  --enamel-ink: #eef4f1;
  --signal: #e3c14b;       /* paper mode, and nothing else */
  --ok: #2c7a4b;
  --no: #b0393a;
  --rule: #b9cbc6;
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --glass: #0c1b1d; --glass-deep: #12272a; --ink: #dce8e5; --ink-soft: #93abaa;
    --enamel: #1c5a5e; --enamel-ink: #f1f6f3; --signal: #e8c757; --ok: #5fbf84; --no: #ee7a75; --rule: #27413f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 106.25%; }
body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font-family: "Atkinson", system-ui, sans-serif;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 2px; }

.masthead, .main, .footer { max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }

/* masthead: small and plain; the placard is the headline */
.masthead { padding-top: 1.5rem; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; }
.tagline { margin: 0.2rem 0 1rem; color: var(--ink-soft); max-width: var(--measure); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 0.2rem 0; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.main { padding-top: 1.75rem; padding-bottom: 3rem; }
.page-title { font-size: 1rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 1.25rem; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.6rem; }
h3 { font-size: 1.05rem; line-height: 1.3; margin: 0 0 0.35rem; }
p { margin: 0 0 0.75rem; max-width: var(--measure); }
.block { margin: 0 0 2.5rem; }
.muted { color: var(--ink-soft); }
.bad { color: var(--no); font-weight: 700; }
.empty { color: var(--ink-soft); font-style: italic; }

/* meta details: spacing instead of separator characters */
.meta { display: inline-flex; flex-wrap: wrap; gap: 0 0.9em; color: var(--ink-soft); font-size: 0.92rem; }

/* the enamel placard: the one loud element */
.placard {
  position: relative;
  background: var(--enamel);
  color: var(--enamel-ink);
  border-radius: 14px;
  padding: 1.6rem 1.6rem 1.3rem;
  margin: 0 0 2.75rem;
  box-shadow: inset 0 0 0 3px var(--enamel), inset 0 0 0 4.5px color-mix(in srgb, var(--enamel-ink) 55%, transparent);
  max-width: 44rem;
}
.placard::before, .placard::after {   /* the two screws holding it to the glass */
  content: ""; position: absolute; top: 0.85rem; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: color-mix(in srgb, var(--enamel-ink) 35%, var(--enamel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.placard::before { left: 0.85rem; }
.placard::after { right: 0.85rem; }
.placard-name { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; margin: 0 0 0.3rem; }
.placard-latin { display: block; font-size: 1.05rem; font-style: italic; font-weight: 400; letter-spacing: 0; opacity: 0.85; margin-top: 0.45rem; }
.placard-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 1.2rem 0 1.1rem; }
.placard-facts div { display: contents; }
.placard-facts dt { font-weight: 700; }
.placard-facts dd { margin: 0; }
.paper { background: var(--signal); color: #1d1a0c; font-weight: 700; padding: 0.05em 0.45em; border-radius: 4px; margin-right: 0.35em; }
.placard-warning { margin: 0; padding-top: 0.8rem; border-top: 1px solid color-mix(in srgb, var(--enamel-ink) 30%, transparent); font-weight: 700; }

.alert { border-left: 4px solid var(--no); background: color-mix(in srgb, var(--no) 10%, var(--glass)); padding: 0.7rem 1rem; margin: 0 0 2rem; }

/* last round: the brain's own words */
.summary { max-width: var(--measure); border-left: 3px solid var(--rule); padding-left: 1rem; }
.summary p, .digest p { max-width: var(--measure); }

/* wallets */
.wallets { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-bottom: 1rem; }
.wallet h3 { font-size: 0.95rem; color: var(--ink-soft); font-weight: 400; margin: 0; }
.big { font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 0.1rem 0 0.2rem; }

.table { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: 0.95rem; }
.table th { text-align: left; font-weight: 700; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding: 0.35rem 0.6rem 0.35rem 0; }
.table td { border-bottom: 1px solid var(--rule); padding: 0.45rem 0.6rem 0.45rem 0; vertical-align: top; }
.table .num { text-align: right; }
.token { overflow-wrap: anywhere; }

/* decisions: a ruled list, not a wall of cards */
.cards { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.card.decision { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--rule); }
.card.decision header { display: flex; gap: 0.75rem; align-items: baseline; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0.25rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.3rem 2rem; margin: 0.4rem 0 0.6rem; }
.facts dt { font-size: 0.85rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; }
details summary { cursor: pointer; color: var(--ink-soft); }
details[open] summary { margin-bottom: 0.4rem; }

.badge { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 0.05em 0.5em; border-radius: 4px; border: 1.5px solid currentColor; line-height: 1.5; }
.badge-paper { color: #1d1a0c; background: var(--signal); border-color: var(--signal); }
.badge-ok { color: var(--ok); }
.badge-no { color: var(--no); }
.badge-none { color: var(--ink-soft); }
.reasons { color: var(--no); font-size: 0.9rem; overflow-wrap: anywhere; }

/* plain lists: beliefs, lessons, predictions, rounds, digests */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.list li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.list li p { margin: 0.25rem 0 0; }
.key { font-weight: 700; overflow-wrap: anywhere; }
.prob { display: inline-block; min-width: 3.2ch; font-weight: 700; }

.digest h2, .digest h3 { margin-top: 1.1rem; }
.digest ul, .prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.card.digest, .card.prose { max-width: 44rem; }
code { font-family: ui-monospace, monospace; font-size: 0.9em; background: var(--glass-deep); padding: 0.05em 0.3em; border-radius: 3px; }

.footer { border-top: 1px solid var(--rule); padding-top: 1rem; padding-bottom: 2.5rem; font-size: 0.92rem; }

@media (max-width: 520px) {
  html { font-size: 100%; }
  .placard { padding: 1.4rem 1.1rem 1.1rem; border-radius: 10px; }
  .placard-facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .placard-facts dd { margin-bottom: 0.45rem; }
  .table th:nth-child(5), .table td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
