/* newSchoolWorks Arcade — shared house styles (nsw.css)
   Day/night tokens from /style. Toggle: html[data-mode="night"]. */

:root {
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #000000;
  --ink2: #1f2937;
  --muted: #4b5563;
  --line: #d6d6d6;
  --head: #000000;
  --accent: #0b6e7a;
  --accent2: #8a6a1c;
  --good: #0f766e;
  --chip: #f3f4f6;
  --chipstd: #e6f4f6;
  --highlight: #fff3c4;
  --danger: #b3261e;
  --gold: #c9a24b;
  --cyan: #4fc6db;
  --teal: #2dd4bf;
  --navy: #1f3a7a;
}

html[data-mode="night"] {
  --paper: #000000;
  --card: #0e1117;
  --ink: #edf1e6;
  --ink2: #c9cfd8;
  --muted: #a6aebb;
  --line: #262c36;
  --head: #ffffff;
  --accent: #4fc6db;
  --accent2: #c9a24b;
  --good: #2dd4bf;
  --chip: #141922;
  --chipstd: #10222a;
  --highlight: #2a2410;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  color: var(--head);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

a { color: var(--accent); }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.kicker {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.wordmark {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--head);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark .sch { color: var(--accent); }
.wordmark:hover .sch { text-decoration: underline; }

/* band nav (used by game pages: Arcade / Puzzles / Simulations / Multiverse) */
.bandnav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.bandnav a {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink2);
  text-decoration: none;
}
.bandnav a:hover { color: var(--accent); }
.bandnav a[aria-current="page"] { color: var(--accent); }

/* ---- lede / hero ---- */
.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.lede {
  font-family: "PT Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--ink2);
  max-width: 44rem;
}

/* ---- cards & grid ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 1.5rem 0;
}
.band-card h2 { font-size: 1.5rem; }
.band-card p { color: var(--ink2); }
.band-card .btn { margin-top: 0.5rem; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  background: var(--good);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
}
.btn-ghost:hover { border-color: var(--accent); filter: none; }

/* ---- chips ---- */
.chip {
  display: inline-block;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip.live {
  background: var(--chipstd);
  border-color: var(--good);
  color: var(--good);
}

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer nav { margin-bottom: 0.75rem; }
.footer nav a { margin-right: 1rem; }

/* ---- game bits ---- */
.progress {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.25rem 0 0.75rem;
}
.cipher {
  font-family: "PT Mono", ui-monospace, monospace;
  font-size: clamp(1.1rem, 3.4vw, 1.9rem);
  line-height: 1.6;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  word-break: break-word;
  margin: 0 0 0.75rem;
}
.choices { display: grid; gap: 0.6rem; margin: 1rem 0; }
.choice {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
}
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice:disabled { cursor: default; }
.choice.correct { border: 2px solid var(--good); background: var(--chipstd); }
.choice.wrong { border: 2px solid var(--danger); opacity: 0.65; }
.feedback {
  border-left: 4px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--ink2);
}
.feedback strong { color: var(--head); }
.feedback.good { border-color: var(--good); }
.feedback.bad { border-color: var(--danger); }
.hidden { display: none !important; }

/* cipher wheel */
.wheel-wrap { margin: 1.25rem 0; }
.wheel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.wcell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-family: "PT Mono", ui-monospace, monospace;
  padding: 0.35rem 0;
  text-align: center;
  cursor: pointer;
  line-height: 1.3;
}
.wcell .pl { display: block; color: var(--muted); font-size: 0.8em; }
.wcell.active { border: 2px solid var(--accent); background: var(--highlight); }
.wheel-read {
  font-family: "PT Mono", ui-monospace, monospace;
  font-size: 1.3rem;
  margin-top: 0.6rem;
  color: var(--ink2);
}

/* riddle / prompt text */
.prompt-text { white-space: pre-line; }
.clues { padding-left: 1.25rem; color: var(--ink2); }
.voterow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.voterow .who { font-weight: 700; min-width: 9rem; }
.votebtn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.votebtn.sel-yes { background: var(--good); border-color: var(--good); color: #ffffff; }
.votebtn.sel-no { background: var(--danger); border-color: var(--danger); color: #fff; }
/* Dark ink on the teal only passes contrast in night mode (brighter --good).
   Ghost buttons keep ink text in both modes (transparent background). */
html[data-mode="night"] .btn:not(.btn-ghost) { color: #04231e; }
html[data-mode="night"] .votebtn.sel-yes { color: #04231e; }
.vocab-block { margin: 1rem 0; }
.vocab-block .clue { font-weight: 700; margin-bottom: 0.5rem; }
.wordopts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wordbtn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-family: "PT Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  cursor: pointer;
}
.wordbtn.sel { border: 2px solid var(--accent); background: var(--highlight); }

.api-strip { margin-top: 2rem; }
.api-strip p { color: var(--ink2); }
.ramp { margin-top: 1rem; }
.ramp ol { margin: 0.5rem 0 0; padding-left: 1.25rem; color: var(--ink2); }
.ramp li { margin-bottom: 0.4rem; }
.ramp strong { color: var(--head); }

.debrief-score {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--head);
  margin: 0.5rem 0 1rem;
}
.src-tag { margin: 0 0 1rem; }

@media (max-width: 640px) {
  .hero { padding: 2rem 0 1.25rem; }
  .topbar-in { padding-top: 0.55rem; padding-bottom: 0.55rem; flex-wrap: wrap; row-gap: 0.5rem; }
  .kicker { white-space: nowrap; letter-spacing: 0.18em; }
  .card { padding: 1.1rem; }
  .voterow .who { min-width: 100%; }
}

/* Assess-mode toggle + result card (shared, assets/assess.js) */
.assess-toggle { display:flex; align-items:center; gap:8px; margin:14px 0; flex-wrap:wrap; }
.assess-toggle button { font:700 0.85rem "Atkinson Hyperlegible",system-ui,sans-serif; padding:8px 18px; border-radius:999px; border:2px solid var(--line,#d8cdb8); background:transparent; color:inherit; cursor:pointer; }
.assess-toggle button.on { background:#1F3A7A; border-color:#1F3A7A; color:#fff; }
.assess-toggle .assess-note { font-size:0.85rem; opacity:0.75; }
.assess-card { border:2px solid var(--line,#d8cdb8); border-radius:12px; padding:20px; margin:18px 0; }
.assess-card h2 { margin:6px 0 12px; }
.assess-table { border-collapse:collapse; width:100%; max-width:420px; margin:0 0 12px; }
.assess-table th, .assess-table td { border:1px solid var(--line,#d8cdb8); padding:6px 10px; text-align:left; font-size:0.9rem; }
.assess-card .note { font-size:0.85rem; opacity:0.75; }
.report-card .report-voice { font-family: "PT Serif", serif; font-style: italic; font-size: 1.05rem; line-height: 1.7; margin: 10px 0; }

/* ARCADE-FOOTER-CENTERED-V1 (site.tasks #10542, Dr. F 2026-10-09: "footer should be centered, always") */
footer, .footer { text-align: center !important; }
.footer nav a, footer nav a { margin: 0 0.5rem !important; }
