/* FeedCheck shared styles (student + host). Matches the mst0242 look. */

:root {
  --blue: #2c5f8a; --teal: #1e8f7a; --red: #c0392b; --amber: #b0700e;
  --purple: #6d4fa1; --ink: #1c2430; --mut: #5b6774; --bg: #f4f6f8;
  --good: #0ca30c; --line: #c8d0d8;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 14px 60px; }
.wrap.wide { max-width: 1040px; }
h1 { font-size: 1.25rem; margin: 8px 0 2px; }
h2 { font-size: 1.02rem; margin: 16px 0 8px; }
h3 { font-size: .92rem; margin: 10px 0 4px; }
.sub { color: var(--mut); font-size: .85rem; margin-bottom: 14px; }
.card { background: #fff; border-radius: 10px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hint { font-size: .79rem; color: var(--mut); margin: 3px 0 5px; line-height: 1.4; }
.linkbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.err { color: var(--red); font-size: .9rem; min-height: 1.2em; }
.hidden { display: none !important; }
button { font: inherit; border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; background: #e6ebf0; }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--blue); color: #fff; font-weight: 600; }
.danger { background: var(--red); color: #fff; font-weight: 600; }
input[type=text], input[type=number], textarea {
  width: 100%; padding: 10px; font-size: 1rem; border: 1px solid var(--line);
  border-radius: 8px; font-family: inherit;
}
textarea { resize: vertical; min-height: 64px; }
label { font-weight: 600; font-size: .9rem; display: block; margin: 10px 0 6px; }
.pill { display: inline-block; background: #eef1f4; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .85rem; }
.pill.open { background: #e9f7e9; border-color: #a9d8a9; color: var(--good); }
.pill.closed { background: #f2f2f2; color: var(--mut); }
.spinner { display: inline-block; width: 26px; height: 26px; border: 3px solid #cdd6de; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.waitbox { text-align: center; padding: 34px 10px; color: var(--mut); }
.wavelist { list-style: none; padding: 0; margin: 8px 0 0; }
.wavelist li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid #eef1f4; font-size: .95rem; }
.wavelist li:first-child { border-top: 0; }
.wavelist .lbl { flex: 1; }
.check { color: var(--good); font-size: .8rem; font-weight: 700; }

/* ----- student sliders ----- */
.dim { padding: 12px 0 6px; border-top: 1px solid #eef1f4; }
.dim:first-child { border-top: 0; }
.dim .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dim .title { font-weight: 700; font-size: .98rem; }
.dim .value { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; min-width: 2.6em; text-align: right; color: var(--blue); }
.dim .value.untouched { color: var(--mut); font-weight: 500; font-size: .85rem; }
.dim .anchors { display: flex; justify-content: space-between; gap: 12px; font-size: .74rem; color: var(--mut); margin: 2px 0 4px; }
.dim .anchors span:last-child { text-align: right; }
.sliderrow { display: flex; align-items: center; gap: 8px; }
.sliderrow button { width: 44px; height: 40px; padding: 0; font-size: 1.3rem; font-weight: 700; flex: none; }
input[type=range] { flex: 1; width: 100%; margin: 0; accent-color: var(--blue); height: 40px; cursor: pointer; }
input[type=range].untouched { accent-color: #aab6c0; opacity: .75; }
.submitted { background: #e9f7e9; border: 1px solid #a9d8a9; border-radius: 8px; padding: 10px 14px; font-size: .92rem; margin: 10px 0; }

/* ----- predicted-vs-actual reveal panel (student) ----- */
.reveal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--mut); margin: 6px 0 4px; align-items: center; }
.reveal-legend .rv-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.reveal-legend .rv-swatch.pred { background: #8a97a3; }
.reveal-legend .rv-swatch.act { background: var(--blue); }
.reveal-dim { padding: 10px 0 14px; border-top: 1px solid #eef1f4; }
.reveal-dim:first-child { border-top: 0; }
.reveal-dim .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.reveal-dim .title { font-weight: 700; font-size: .95rem; }
.rv-nums { font-variant-numeric: tabular-nums; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.rv-num.pred { color: #8a97a3; }
.reveal-track { position: relative; height: 26px; background: #eef1f4; border-radius: 6px; margin-top: 6px; }
.rv-marker { position: absolute; top: 2px; bottom: 2px; width: 8px; border-radius: 4px; transform: translateX(-50%); }
.rv-marker.pred { background: #8a97a3; }
.rv-tick { position: absolute; top: 7px; bottom: 7px; width: 2px; transform: translateX(-50%); opacity: .9; }
.rv-tick.pred { background: #5b6774; }

/* ----- host ----- */
.tabs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.tabs button { padding: 9px 16px; font-weight: 600; }
.tabs button.sel { background: var(--blue); color: #fff; }
#pred-toggle.sel { background: var(--blue); color: #fff; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; align-items: center; }
.wavegrid { display: grid; gap: 10px; }
.waverow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f7f9fb; border: 1px solid #e2e8ee; border-radius: 8px; flex-wrap: wrap; }
.waverow .lbl { font-weight: 700; min-width: 9em; }
.waverow .meta { color: var(--mut); font-size: .85rem; flex: 1; }
.obsgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .obsgrid { grid-template-columns: 1fr; } }
table.stats { border-collapse: collapse; width: 100%; font-size: 1rem; }
table.stats th, table.stats td { padding: 7px 10px; text-align: right; border-bottom: 1px solid #eef1f4; font-variant-numeric: tabular-nums; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
td.up { color: var(--red); font-weight: 700; }     /* drift toward extreme = warning color */
td.down { color: var(--good); font-weight: 700; }
.cloud { line-height: 2.1; }
.cloud span { margin-right: 14px; white-space: nowrap; }
.quotes { list-style: none; padding: 0; margin: 6px 0; }
.quotes li { border-left: 3px solid var(--line); padding: 4px 10px; margin: 8px 0; font-size: .95rem; color: #333; }
.quotes li .who { color: var(--mut); font-size: .78rem; }
svg.fc-chart { width: 100%; height: auto; display: block; background: #fff; }
.obsline { font-size: 1.02rem; margin: 4px 0; }
.obsline b { font-variant-numeric: tabular-nums; }

/* projector-friendly: bump host result text on big screens */
@media (min-width: 900px) {
  .results h2 { font-size: 1.35rem; }
  .results .hint { font-size: .95rem; }
  table.stats { font-size: 1.15rem; }
  .cloud { font-size: 1.1rem; }
}

.demo-banner {
  background: repeating-linear-gradient(45deg, #fff3cd, #fff3cd 14px, #ffe9a8 14px, #ffe9a8 28px);
  border: 2px dashed #b0700e; color: #7a4d00; font-weight: 700;
  border-radius: 8px; padding: 10px 14px; margin: 10px 0; text-align: center;
}
footer.ethics { margin-top: 26px; padding: 12px 14px; background: #eef4fa; border: 1px solid #cfe0ee; border-radius: 8px; font-size: .82rem; color: #33475b; line-height: 1.5; }

#qr img { image-rendering: pixelated; width: 200px; height: 200px; }
.joinurl { font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; word-break: break-all; }
.danger-zone { border: 1px solid #e4b6b6; }
