/* Real or Fake? "Fact Check Bureau": a dark teal investigator's desk with manila case files,
   rubber stamps (green REAL, red FAKE) and typewriter text. One committed look in light and dark mode.
   Fonts: Staatliches (stamps, headings), Courier Prime (typed statements). Everything scoped to .rof. */
.rof {
  --desk: #0f2427; --desk2: #163a3c; --paper: #f6ecd2; --paper2: #efe1bd; --paper-line: #e3d3a8; --ink: #2a2116; --ink2: #5b4c35;
  --real: #2e7d4f; --real-soft: #dcefdf; --fake: #c8322b; --fake-soft: #f8dcd8; --brass: #d9b45a; --tape: rgba(242, 201, 76, .55);
  --stamp: "Staatliches", Impact, "Arial Narrow", sans-serif; --type: "Courier Prime", "Courier New", Courier, monospace;
  position: relative; color: var(--paper); color-scheme: dark;
  background:
    repeating-linear-gradient(35deg, rgba(255,255,255,.025) 0 6px, transparent 6px 14px),
    radial-gradient(120% 90% at 50% 0%, var(--desk2), var(--desk) 70%);
  padding: clamp(14px, 3vw, 32px) 0 clamp(18px, 3vw, 28px);
  margin-bottom: 8px;
}
.rof .desk { max-width: 1000px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.rof *, .rof *::before, .rof *::after { box-sizing: border-box; }
.rof [hidden] { display: none !important; }
.rof :focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.rof kbd { font: 700 12px/1 var(--type); border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; opacity: .8; }
.rof .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.backlink { font-weight: 800; font-size: 14px; text-decoration: none; justify-self: start; }
.backlink:hover { text-decoration: underline; }

/* ---------- Start screen ---------- */
.rof .hero { position: relative; min-height: clamp(460px, 62vh, 560px); border-radius: 22px; overflow: hidden; display: grid; place-items: center; padding: 28px 14px;
  background: #0c1f22 center / cover no-repeat; box-shadow: 0 22px 50px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); }
.rof .hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, rgba(8,20,22,.15), rgba(8,20,22,.65)); pointer-events: none; }
.rof .hero.has-img .hero-art { display: none; }
.rof .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.rof .card { position: relative; z-index: 1; color: var(--ink); background: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 29px, var(--paper-line) 29px 30px); border-radius: 6px 18px 18px 18px;
  box-shadow: 0 2px 0 var(--paper2), 0 4px 0 #d8c697, 0 18px 40px rgba(0,0,0,.45); }
.rof .folder { width: min(460px, 100%); padding: 34px clamp(18px, 4vw, 34px) 22px; text-align: center; display: grid; gap: 12px; }
.rof .tabpill { position: absolute; top: -19px; left: 18px; font: 400 15px/1 var(--stamp); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  background: var(--paper2); padding: 8px 16px 10px; border-radius: 10px 10px 0 0; }
.rof .mark { margin: 0; line-height: 0; }
.rof .mark svg { width: 100%; max-width: 380px; height: auto; }
.rof .sub { margin: 0; font: 700 16px/1.45 var(--type); color: var(--ink2); }
.rof .play { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; border: 0; border-radius: 12px; cursor: pointer;
  font: 400 32px/1 var(--stamp); letter-spacing: .12em; text-transform: uppercase; color: #fff8ec; background: var(--fake);
  box-shadow: 0 5px 0 #8e1f1a, 0 10px 18px rgba(0,0,0,.25); transition: transform .12s, box-shadow .12s; }
.rof .play:hover { transform: translateY(-1px) rotate(-.6deg); }
.rof .play:active { transform: translateY(4px); box-shadow: 0 1px 0 #8e1f1a; }
.rof .play:disabled { opacity: .7; cursor: progress; transform: none; font-size: 22px; }
.rof .meta { display: flex; row-gap: 8px; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font: 700 16px/1.2 var(--type); }
.rof .sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; user-select: none; }
.rof .sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rof .sw i { width: 50px; height: 28px; border-radius: 99px; background: #cbbb92; position: relative; transition: background .15s; flex: none; }
.rof .sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.rof .sw input:checked + i { background: var(--real); }
.rof .sw input:checked + i::after { transform: translateX(22px); }
.rof .sw input:focus-visible + i { outline: 3px solid var(--brass); outline-offset: 2px; }
.rof .now { margin: 0; font: 400 13px/1.4 var(--type); color: var(--ink2); }
.rof .optbtn { justify-self: center; font: 700 14px/1 var(--type); color: var(--ink); background: transparent; border: 2px dashed var(--ink2); border-radius: 999px; padding: 9px 18px; cursor: pointer; min-height: 40px; }
.rof .optbtn[aria-expanded="true"] { border-style: solid; background: var(--paper2); }
.rof .optpanel { display: grid; gap: 12px; text-align: left; background: rgba(255,255,255,.5); border-radius: 12px; padding: 12px; }
.rof .optrow { display: grid; gap: 6px; }
.rof .ol { font: 400 14px/1 var(--stamp); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.rof .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rof .seg button, .rof .chip { font: 700 14px/1.2 var(--type); color: var(--ink); background: var(--paper); border: 2px solid #cdbb8d; border-radius: 10px; padding: 9px 10px; cursor: pointer; min-height: 40px; }
.rof .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rof .chip { border-radius: 999px; padding: 7px 12px; }
.rof .seg button[aria-pressed="true"], .rof .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rof .bests { margin: 0; font: 400 13px/1.4 var(--type); color: var(--ink2); }
.rof .bests b { font-family: var(--stamp); font-size: 17px; font-weight: 400; color: var(--ink); }
.rof .catstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.rof .cs { display: grid; justify-items: center; gap: 6px; text-align: center; }
.rof .cs small { font: 400 13px/1.15 var(--stamp); letter-spacing: .08em; text-transform: uppercase; color: #cfe3df; }
@media (max-width: 560px) { .rof .catstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rof .credit-line { margin: 10px 0 0; font: italic 400 12px/1.4 var(--type); color: #9fbab6; }
.rof .credit-line a { color: inherit; }
.rof .photo-credits { max-width: 1000px; margin: 8px auto 0; padding: 0 16px; }
.rof .photo-credits:empty { display: none; }

/* Photo thumbs with an illustrated fallback until the image file exists */
.rof .ph { position: relative; display: block; overflow: hidden; background: radial-gradient(circle at 35% 30%, #fff8e6, var(--paper2)); }
.rof .ph::before { content: attr(data-art); position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6em; }
.rof .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.rof .ph.has-img img { opacity: 1; }
.rof .ph.has-img::before { display: none; }
.rof .thumb { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 4px 10px rgba(0,0,0,.35); font-size: 20px; }

/* ---------- Play screen ---------- */
.rof .qcard { color: var(--ink); background: var(--paper); border-radius: 18px; overflow: hidden; box-shadow: 0 22px 50px rgba(0,0,0,.45); }
.rof .qbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px clamp(14px, 3vw, 24px); background: var(--paper2); border-bottom: 2px dashed #cdbb8d; }
.rof .qtitle { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rof .qtitle b { display: block; font: 400 22px/1 var(--stamp); letter-spacing: .08em; text-transform: uppercase; }
.rof .qcat .thumb { width: 48px; height: 48px; font-size: 18px; }
.rof .lvl { display: inline-block; margin-top: 5px; font: 700 12px/1 var(--type); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--paper); }
.rof .lvl[data-l="2"] { background: #8a5a12; } .rof .lvl[data-l="3"] { background: var(--fake); }
.rof .qstats { display: flex; align-items: center; gap: 14px; position: relative; font: 700 17px/1 var(--type); }
.rof .qnum { white-space: nowrap; }
.rof .sc { white-space: nowrap; padding: 9px 12px; border-radius: 10px; background: var(--paper); color: var(--real); }
.rof .sc b { font: 400 22px/1 var(--stamp); letter-spacing: .04em; }
.rof .pts { position: absolute; right: calc(100% + 6px); top: 6px; white-space: nowrap; font: 400 18px/1 var(--stamp); letter-spacing: .06em; color: #fff; background: var(--real); padding: 5px 10px; border-radius: 999px; opacity: 0; pointer-events: none; }
.rof .pts.pop { animation: rofPop 1.1s ease-out forwards; }
@keyframes rofPop { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 18% { opacity: 1; transform: translateY(-14px) scale(1.1); } 70% { opacity: 1; transform: translateY(-22px) scale(1); } 100% { opacity: 0; transform: translateY(-30px); } }
.rof .ring { position: relative; width: 48px; height: 48px; flex: none; }
.rof .ring svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.rof .ring circle { fill: none; stroke-width: 4; }
.rof .ring .trk { stroke: #d8c697; }
.rof .ring .arc { stroke: var(--real); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.rof .ring.low .arc { stroke: var(--fake); }
.rof .ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 19px/1 var(--stamp); }
.rof .progress { height: 6px; background: #e4d5ab; }
.rof .progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--real), var(--brass), var(--fake)); transition: width .35s; }
.rof .prompt { margin: 0; padding: 22px 16px 6px; text-align: center; font: 400 clamp(26px, 4vw, 36px)/1.05 var(--stamp); letter-spacing: .06em; text-transform: uppercase; }

.rof .opts { padding: 14px clamp(14px, 3vw, 28px) 8px; display: grid; gap: 18px; }
.rof .opts.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .rof .opts.pair { grid-template-columns: minmax(0, 1fr); } }
.rof .opt { position: relative; font: inherit; color: var(--ink); cursor: pointer; text-align: left; transition: transform .12s, opacity .25s, box-shadow .12s, border-color .15s; }
/* evidence cards */
.rof .opts.pair .opt { display: grid; align-content: start; gap: 10px; min-height: 150px; padding: 22px 20px 62px; border-radius: 6px; border: 3px solid transparent;
  background: #fffaf0; box-shadow: 0 3px 0 #e2d1a4, 0 10px 18px rgba(60,40,10,.12); }
.rof .opts.pair .opt:nth-child(1) { transform: rotate(-.7deg); } .rof .opts.pair .opt:nth-child(2) { transform: rotate(.6deg); }
.rof .opts.pair .opt::before { content: ""; position: absolute; top: -10px; left: 50%; width: 86px; height: 22px; margin-left: -43px; background: var(--tape); transform: rotate(-3deg); }
.rof .opts.pair .opt:not(:disabled):hover { transform: translateY(-3px) rotate(0); border-color: var(--ink); box-shadow: 0 6px 0 #e2d1a4, 0 16px 24px rgba(60,40,10,.18); }
.rof .ex { font: 400 15px/1 var(--stamp); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.rof .txt { font: 700 clamp(17px, 2vw, 19px)/1.45 var(--type); margin: 0; }
.rof .stamp { position: absolute; right: 12px; bottom: 10px; font: 400 34px/1 var(--stamp); letter-spacing: .1em; text-transform: uppercase; padding: 2px 12px 0;
  border: 4px solid currentColor; border-radius: 8px; opacity: 0; transform: rotate(-12deg) scale(1.6); pointer-events: none; }
.rof .is-real .stamp { color: var(--real); } .rof .is-fake .stamp { color: var(--fake); }
.rof .is-real .stamp, .rof .is-fake .stamp { opacity: .9; transform: rotate(-12deg) scale(1); transition: opacity .2s, transform .25s cubic-bezier(.2,1.6,.4,1); }
.rof .opt.faded { opacity: .55; }
.rof .opt.right, .rof .opt.answer { border-color: var(--real) !important; background: var(--real-soft); }
.rof .opt.wrong { border-color: var(--fake) !important; background: var(--fake-soft); }
.rof .badge { position: absolute; top: -14px; right: -12px; width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.rof .badge svg { width: 20px; height: 20px; }
.rof .right .badge, .rof .answer .badge { display: grid; background: var(--real); }
.rof .wrong .badge { display: grid; background: var(--fake); }
.rof .opt:disabled { cursor: default; }

/* single mode */
.rof .exhibit { position: relative; padding: 26px 22px 54px; border-radius: 6px; background: #fffaf0; box-shadow: 0 3px 0 #e2d1a4, 0 10px 18px rgba(60,40,10,.12); display: grid; gap: 10px; max-width: 720px; width: 100%; justify-self: center; }
.rof .exhibit .txt { font-size: clamp(19px, 2.4vw, 23px); }
.rof .yn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; width: 100%; justify-self: center; }
.rof .pick { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 72px; border-radius: 12px; border: 4px solid currentColor; background: #fffaf0; text-align: center; }
.rof .pick .lab { font: 400 34px/1 var(--stamp); letter-spacing: .14em; text-transform: uppercase; }
.rof .pick.real { color: var(--real); } .rof .pick.fake { color: var(--fake); }
.rof .pick:not(:disabled):hover { transform: rotate(-2deg) scale(1.03); }
.rof .pick.right { background: var(--real-soft); } .rof .pick.wrong { background: var(--fake-soft); }
.rof .pick.right .badge, .rof .pick.answer .badge { background: var(--real); }

/* lightbulb explanation */
.rof .explain { margin: 18px clamp(14px, 3vw, 28px) 0; padding: 16px 18px; border-radius: 12px; background: #fff7dd; border-left: 6px solid var(--brass); display: grid; gap: 10px;
  font: 400 16px/1.55 "Nunito", system-ui, sans-serif; color: var(--ink); }
.rof .explain p { margin: 0; }
.rof .ehead { display: flex; align-items: center; gap: 10px; font: 400 22px/1 var(--stamp); letter-spacing: .06em; text-transform: uppercase; }
.rof .bulb { width: 28px; height: 28px; color: #8a6200; flex: none; }
.rof .tag { display: inline-block; font: 400 13px/1 var(--stamp); letter-spacing: .12em; text-transform: uppercase; color: #fff; padding: 4px 7px 3px; border-radius: 5px; margin-right: 4px; vertical-align: 1px; }
.rof .tag.real { background: var(--real); } .rof .tag.fake { background: var(--fake); }
.rof .src { color: #1f5a8a; font-weight: 700; white-space: nowrap; }
.rof .nextwrap { display: flex; justify-content: center; padding: 18px 16px 4px; }
.rof .next { min-width: 180px; min-height: 56px; border: 0; border-radius: 12px; cursor: pointer; font: 400 26px/1 var(--stamp); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); background: var(--ink); box-shadow: 0 5px 0 #000; }
.rof .next::after { content: " \2192"; }
.rof .next:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.rof .qfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 16px clamp(14px, 3vw, 24px) 18px; font: 400 13px/1.4 var(--type); color: var(--ink2); }
.rof .qfoot b { font-family: var(--stamp); font-weight: 400; font-size: 17px; color: var(--ink); }
.rof .linkbtn { font: 700 13px var(--type); color: var(--ink2); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px 0; }
@media (max-width: 560px) {
  .rof .qbar { padding: 10px 12px; }
  .rof .qfoot .keys { display: none; }
  .rof .qstats { gap: 10px; font-size: 15px; }
  .rof .pts { right: auto; left: calc(100% + 8px); top: 10px; }
  .rof .stamp { font-size: 26px; }
  .rof .pick .lab { font-size: 28px; }
  .rof .opts.pair .opt { min-height: 0; padding: 20px 16px 54px; }
  .rof .opts.pair .opt:nth-child(n) { transform: none; }
}
@media (hover: none) { .rof .keys, .rof .opt kbd, .rof .pick kbd { display: none; } }

/* ---------- End screen ---------- */
.rof .end-screen { display: grid; place-items: center; padding: 20px 0 6px; }
.rof .end { width: min(640px, 100%); text-align: center; }
.rof .rank { margin: 6px 0 0; display: inline-block; justify-self: center; font: 400 24px/1 var(--stamp); letter-spacing: .1em; text-transform: uppercase; color: var(--real);
  border: 4px solid currentColor; border-radius: 8px; padding: 6px 14px 4px; transform: rotate(-3deg); }
.rof .end h2 { margin: 0; font: 700 clamp(26px, 4vw, 34px)/1.1 var(--type); }
.rof .endstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rof .endstats div { background: var(--paper2); border-radius: 10px; padding: 10px 6px; }
.rof .endstats span { display: block; font: 700 12px/1.2 var(--type); color: var(--ink2); }
.rof .endstats b { font: 400 28px/1.1 var(--stamp); }
.rof .newbest { margin: 0; font: 400 20px/1 var(--stamp); letter-spacing: .1em; color: var(--fake); text-transform: uppercase; }
.rof .recap { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.rof .recap li { display: flex; gap: 10px; align-items: flex-start; font: 400 14px/1.45 "Nunito", system-ui, sans-serif; background: rgba(255,255,255,.55); border-radius: 8px; padding: 8px 10px; }
.rof .recap .mk { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.rof .recap .mk svg { width: 15px; height: 15px; }
.rof .recap .ok .mk { background: var(--real); } .rof .recap .no .mk { background: var(--fake); }
.rof .endbtns { display: grid; gap: 10px; justify-items: center; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rof .shake { animation: rofShake .4s ease-in-out; }
  @keyframes rofShake { 0%, 100% { translate: 0; } 20% { translate: -9px; } 40% { translate: 8px; } 60% { translate: -6px; } 80% { translate: 4px; } }
  .rof .play-screen:not([hidden]) .qcard, .rof .end-screen:not([hidden]) .end { animation: rofSlide .35s ease-out; }
  @keyframes rofSlide { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .rof *, .rof *::before, .rof *::after { transition: none !important; animation: none !important; } .rof .pts.pop { opacity: 1; } }

/* The guide under the game keeps the site look, with a typed heading accent. */
.guide h2 { font-family: "Staatliches", var(--font-head); letter-spacing: .04em; font-weight: 400; }
