/* EvenLine (/news). Plain white/black like a feed, the site's pine bar on top
   with a bronze rule, serif headlines to match the wordmark. */

:root {
  --bg: #ffffff;
  --text: #0f1419;
  --muted: #536471;
  --line: #eff3f4;
  --line-strong: #cfd9de;
  --hover: rgba(15, 20, 25, 0.03);
  --panel: #f7f9f9;
  --green: #1f3a2c;
  --green-ink: #2c5240;
  --gold: #9a7438;
  --gold-bright: #c9a45c;
  --gold-soft: rgba(168, 128, 63, 0.12);
  --danger: #b42318;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #e7e9ea;
    --muted: #71767b;
    --line: #2f3336;
    --line-strong: #3e4144;
    --hover: rgba(231, 233, 234, 0.03);
    --panel: #16181c;
    --gold: #c9a45c;
    --gold-bright: #d8b773;
    --gold-soft: rgba(201, 164, 92, 0.14);
    --danger: #f4877d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--sans); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--green); border-bottom: 2px solid var(--gold);
}
.topbar-inner {
  max-width: 990px; margin: 0 auto; height: 54px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 27px; width: auto; display: block; }
.brand:hover { text-decoration: none; opacity: 0.92; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a.navlink { color: rgba(255, 255, 255, 0.85); font-size: 14px; font-weight: 600; }
.topnav a.navlink:hover, .topnav a.navlink.active { color: #fff; text-decoration: none; }
.topnav a.navlink.active { box-shadow: 0 2px 0 var(--gold-bright); }
.topnav .me img, .topnav .me .initials { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--gold-bright); }
.topnav .btn-signin {
  color: #fff; border: 1px solid var(--gold-bright); border-radius: 999px; padding: 5px 16px; font-weight: 700; font-size: 14px;
}
.topnav .btn-signin:hover { background: rgba(201, 164, 92, 0.18); text-decoration: none; }

/* ---------- layout ---------- */

.layout { max-width: 990px; margin: 0 auto; display: flex; justify-content: center; gap: 28px; }
.column {
  width: 100%; max-width: 600px; min-height: calc(100vh - 56px);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.rail { width: 350px; flex: none; padding-top: 14px; display: none; }
@media (min-width: 1000px) { .rail { display: block; } }
@media (max-width: 600px) { .column { border-left: 0; border-right: 0; } }

.col-head {
  display: flex; align-items: center; gap: 20px; min-height: 53px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.col-head h1 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.col-head .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.back {
  width: 34px; height: 34px; margin-left: -8px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.back:hover { background: var(--hover); text-decoration: none; }
.back svg { width: 20px; height: 20px; }

.loading { padding: 40px; display: flex; justify-content: center; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; display: inline-block;
  border: 3px solid var(--line); border-top-color: var(--green-ink);
  animation: spin 0.8s linear infinite;
}
@media (prefers-color-scheme: dark) { .spinner { border-top-color: var(--gold); } }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 48px 32px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 22px; font-weight: 800; margin-bottom: 6px; }

/* ---------- avatars ---------- */

.avatar, .initials { border-radius: 50%; display: block; object-fit: cover; flex: none; }
.initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-strong); color: var(--text); font-weight: 700; font-size: 13px;
}

/* ---------- posts ---------- */

.post {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px;
  padding: 12px 16px 6px; border-bottom: 1px solid var(--line);
}
.post.clickable { cursor: pointer; }
.post.clickable:hover { background: var(--hover); }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; }
.post-body { min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; overflow: hidden; }
.post-name { font-weight: 700; }
.badge { width: 17px; height: 17px; flex: none; }
.post-meta .muted { overflow: hidden; text-overflow: ellipsis; }
.topic {
  margin-left: auto; padding-left: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--gold); text-transform: uppercase;
}
.headline { font-family: var(--serif); font-size: 20px; line-height: 1.28; font-weight: 700; margin: 3px 0 6px; overflow-wrap: anywhere; }
.post.single .headline { font-size: 25px; }
.summary p { margin-bottom: 8px; overflow-wrap: anywhere; }
.post.single .summary { font-size: 16.5px; }

.actions { display: flex; align-items: center; gap: 4px; margin: 2px 0 0 -8px; max-width: 460px; }
.act {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border-radius: 999px;
  color: var(--muted); font-size: 13px;
}
.act svg { width: 18px; height: 18px; flex: none; }
.act:hover { color: var(--gold); background: var(--gold-soft); }
.act.on { color: var(--gold); }
.act.on .heart { fill: currentColor; }
.act-sources .chev { width: 15px; height: 15px; transition: transform 0.15s; }
.act-sources[aria-expanded="true"] { color: var(--text); }
.act-sources[aria-expanded="true"] .chev { transform: rotate(180deg); }
.act.danger:hover { color: var(--danger); background: rgba(180, 35, 24, 0.08); }
.cov { margin-right: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cov-short { display: none; }
.act { white-space: nowrap; }
@media (max-width: 500px) {
  .actions { gap: 0; }
  .act { padding: 0 6px; gap: 4px; }
  .cov-long { display: none; }
  .cov-short { display: inline; }
  .post-meta .handle { display: none; }
}
.post-meta a.muted, .topic { flex: none; }

/* ---------- sources dropdown ---------- */

.sources { margin: 6px 0 10px; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.sources ol { list-style: none; }
.src { padding: 11px 14px 6px; border-top: 1px solid var(--line); }
.src:first-child { border-top: 0; }
.src-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.src-outlet { font-weight: 700; }
.src-title { display: block; margin-top: 3px; font-size: 15px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.src-title::after { content: " \2197"; color: var(--muted); font-size: 12px; }
.src-note { margin-top: 3px; font-size: 14px; color: var(--muted); }
.src-foot { display: flex; align-items: center; margin-left: -8px; }
.src-foot .act { height: 30px; }
.sources-note { padding: 9px 14px; font-size: 12.5px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }

/* 7-dot lean scale: which point of left … right this outlet sits at */
.lean { display: inline-flex; align-items: center; gap: 3px; }
.lean i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.lean i.mid { width: 1px; height: 9px; border-radius: 0; }
.lean i.on { width: 8px; height: 8px; background: var(--c); }

/* ---------- bias rating (stars) ---------- */

.bias { display: inline-block; }
.bias-stars { display: flex; gap: 6px; }
.bias-stars svg { width: 30px; height: 30px; fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linejoin: round; }
.bias-stars svg.on { fill: var(--c); stroke: var(--c); }
.bias-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.bias.sm .bias-stars { gap: 3px; }
.bias.sm .bias-stars svg { width: 20px; height: 20px; }
.bias.sm .bias-scale { font-size: 10px; }
.bias-label { font-weight: 700; font-size: 17px; margin-top: 10px; }
.bias-label .muted { font-weight: 400; font-size: 14px; }

/* ---------- profile ---------- */

.banner { height: 130px; background: var(--line-strong); border-bottom: 2px solid var(--gold); }
.profile-head { padding: 0 16px 14px; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -46px; }
.profile-top .avatar, .profile-top .initials { width: 92px; height: 92px; border: 4px solid var(--bg); font-size: 30px; }
.profile-name { font-size: 20px; font-weight: 800; margin-top: 8px; }
.profile-sub { color: var(--muted); }
.section { padding: 16px; border-top: 1px solid var(--line); }
.section h2 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.section > p { color: var(--muted); font-size: 14px; }
.split { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; margin-top: 12px; }
.split b { font-weight: 700; }
.liked { list-style: none; }
.liked li { padding: 10px 0; border-top: 1px solid var(--line); }
.liked li:first-child { border-top: 0; padding-top: 0; }
.liked .on-story { font-size: 13px; color: var(--muted); margin-top: 2px; }
.liked .on-story a { color: var(--text); }

/* ---------- rail ---------- */

.card { background: var(--panel); border-radius: 16px; padding: 12px 16px 14px; margin-bottom: 16px; }
.card h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.card ol { padding-left: 18px; font-size: 14px; }
.card ol li { margin-bottom: 6px; }
.card .btn { margin-top: 6px; }
.rail-foot { font-size: 13px; color: var(--muted); padding: 0 16px; }
.rail-foot a:hover { color: var(--text); }

/* ---------- buttons + forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 15px; white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.block { display: flex; width: 100%; height: 40px; }
.btn.sm { height: 32px; font-size: 14px; padding: 0 14px; }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: 0.88; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover:not(:disabled) { background: var(--gold-bright); }
.btn-outline { border-color: var(--line-strong); }
.btn-outline:hover:not(:disabled) { background: var(--hover); }
.btn-text { color: var(--muted); padding: 0 8px; }
.btn-text.danger:hover { color: var(--danger); }
.btn .seal { width: 20px; height: 20px; border-radius: 50%; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field-row { display: flex; justify-content: space-between; }
.field-row a { color: var(--gold); font-weight: 400; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 11px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
textarea { resize: vertical; line-height: 1.45; }
select { width: auto; padding: 5px 8px; }
.form-error { color: var(--danger); font-size: 14px; margin-bottom: 12px; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.fine a { text-decoration: underline; }
.notice { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.notice.warn { border-color: var(--gold); background: var(--gold-soft); }
.notice.error { border-color: var(--danger); color: var(--danger); background: transparent; }

/* ---------- sign in ---------- */

.signin { max-width: 420px; margin: 0 auto; padding: 24px 16px 40px; }
.signin-lede { color: var(--muted); margin-bottom: 18px; }
.signin .btn .avatar { width: 22px; height: 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { flex: 1; padding: 10px 0; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--gold); }

/* ---------- admin ---------- */

.admin-block { padding: 16px; border-bottom: 1px solid var(--line); }
.admin-block h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.admin-block > p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.scan-form { display: flex; gap: 8px; }
.scan-form input { flex: 1; min-width: 0; }
.job { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 12px; color: var(--muted); }
.scan-meta { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.cands { list-style: none; }
.cand { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.cand-main { flex: 1; min-width: 0; }
.cand-title { font-weight: 600; }
.cand-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cand details { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cand details summary { cursor: pointer; }
.cand details li { margin: 3px 0 0 16px; }
.cand .flag { font-size: 12.5px; color: var(--gold); margin-top: 3px; }

.draft { padding: 16px 0; border-top: 1px solid var(--line); }
.draft:first-child { border-top: 0; padding-top: 4px; }
.draft-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.draft input[name=headline] { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.draft-sources { list-style: none; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.draft-sources li { padding: 10px 12px; border-top: 1px solid var(--line); }
.draft-sources li:first-child { border-top: 0; }
.draft-sources li.removed { opacity: 0.45; }
.ds-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-bottom: 6px; }
.ds-head a { flex: 1 1 200px; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-remove { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.draft-sources input[name=note] { font-size: 14px; padding: 6px 9px; }
.draft-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.draft-actions .btn-text { margin-left: auto; }

.admins { list-style: none; margin-bottom: 12px; }
.admins li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.admins li .btn-text { margin-left: auto; font-size: 13px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.outlets { columns: 2; font-size: 13px; list-style: none; margin-top: 8px; }
.outlets li { display: flex; align-items: center; gap: 8px; padding: 2px 0; break-inside: avoid; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--green); color: #fff; border-bottom: 2px solid var(--gold);
  padding: 10px 16px; border-radius: 6px; font-size: 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.more { padding: 16px; text-align: center; border-bottom: 1px solid var(--line); }

/* ---- /contact ---- */
.choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.choice { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.choice input { margin-top: 3px; accent-color: var(--gold); }
#requestForm textarea { width: 100%; }
.req-msg { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; margin-top: 4px; }
.req-reply { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 8px 8px 0; }

/* ================================================================ *
 * classes (news-class.js): teacher dashboard, discussions, game
 * ================================================================ */

:root {
  --left: #2f6db5;
  --center: #7a7f85;
  --right: #c0453a;
  --ok: #1f8a4c;
}
@media (prefers-color-scheme: dark) {
  :root { --left: #6fa3e6; --center: #9aa0a6; --right: #ee7a6f; --ok: #4cc283; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-link { color: var(--gold); font-size: 13.5px; font-weight: 600; padding: 0; text-align: left; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--muted); }
.btn-link.danger:hover { color: var(--danger); }
.danger-btn { color: var(--danger); border-color: var(--danger); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.sub-h { font-size: 14px; font-weight: 700; margin: 16px 0 8px; }
.section code, .notice code, .fine code { font: 600 13.5px ui-monospace, Menlo, Consolas, monospace; background: var(--panel); padding: 1px 5px; border-radius: 4px; }

.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel); border: 1px solid var(--line-strong);
}
.chip.ok { color: var(--ok); border-color: var(--ok); background: transparent; }
.chip.warn { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.chip.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.chip.gold { color: #fff; background: var(--gold); border-color: var(--gold); }
.dot-count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 999px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; }

.educator-box { margin: -2px 0 14px; }
.choices.row { flex-direction: row; gap: 18px; flex-wrap: wrap; }
.choice.indent { margin-left: 24px; }
.choice:has(input:disabled) { opacity: 0.55; }
.ticks { list-style: none; font-size: 14.5px; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--gold); font-weight: 700; }
.teach-intro h2 { font-family: var(--serif); font-size: 21px; }

/* tabs on the class page */
.class-tabs { margin: 0; overflow-x: auto; }
.class-tabs button { flex: 1 0 auto; padding: 12px 10px; white-space: nowrap; font-size: 14px; }

/* tiles + charts */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--panel); border-radius: 12px; padding: 12px 14px; }
.tile-n { font-size: 26px; font-weight: 800; line-height: 1.1; }
.tile-of { font-size: 15px; color: var(--muted); font-weight: 600; }
.tile-l { font-size: 13px; color: var(--muted); }
@media (max-width: 460px) { .tiles { grid-template-columns: 1fr 1fr; } }

.readbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--panel); }
.readbar .rb { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; }
.readbar .rb.left { background: var(--left); }
.readbar .rb.center { background: var(--center); }
.readbar .rb.right { background: var(--right); }
.readbar.empty { align-items: center; padding: 0 10px; font-size: 13px; color: var(--muted); }
.readbar-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.readbar-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.readbar-key i.left { background: var(--left); }
.readbar-key i.center { background: var(--center); }
.readbar-key i.right { background: var(--right); }

.spread { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 110px; align-items: end; margin-top: 12px; }
.spread-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.spread-n { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.spread-bar { width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; min-height: 2px; }
.spread-scale { margin-top: 6px; }

.chart { width: 100%; height: auto; display: block; margin-top: 4px; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.chart line.grid { stroke: var(--line); stroke-width: 1; }
.chart line.mid { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.chart circle { stroke: var(--bg); stroke-width: 1.5; }
.chart-empty { font-size: 14px; }
.guess-vs { margin-top: 12px; font-size: 14px; }

/* side chips: L C R, lit when read */
.side-chips { display: inline-flex; gap: 3px; vertical-align: middle; }
.side-chip { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--muted); border: 1px solid var(--line-strong); }
.side-chip.on { color: #fff; border-color: transparent; }
.side-chip.left.on { background: var(--left); }
.side-chip.center.on { background: var(--center); }
.side-chip.right.on { background: var(--right); }
.reads-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-top: 10px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.ctable td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ctable th:first-child, .ctable td:first-child { padding-left: 0; }
.ctable .num { text-align: right; white-space: nowrap; }
.ctable tr.paused td { opacity: 0.6; }
.rating-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* adding students */
.srow { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.srow input { min-width: 0; }
.srow input[name=password] { font-family: ui-monospace, Menlo, Consolas, monospace; }
.srow .btn-text { height: 32px; padding: 0 6px; font-size: 13px; }
.srow-error { grid-column: 1 / -1; color: var(--danger); font-size: 13px; margin-top: -2px; }
@media (max-width: 500px) { .srow { grid-template-columns: 1fr auto; } .srow input[name=password] { grid-row: 2; } }
.creds-ready { display: flex; flex-direction: column; gap: 10px; }

/* discussions list */
.threads { list-style: none; }
.threads li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.threads li:first-child { border-top: 0; }
.thread-link { flex: 1; min-width: 0; }
.thread-link:hover { text-decoration: none; }
.thread-link:hover .thread-title { text-decoration: underline; }
.thread-title { font-weight: 700; overflow-wrap: anywhere; }
.thread-meta { font-size: 13px; color: var(--muted); }
.missing { list-style: none; }
.missing li { padding: 6px 0; font-size: 14px; }

.thread-form { border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; margin: 4px 0 16px; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.form-grid input { width: 100%; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .field:first-child { grid-column: 1 / -1; } }
input[type=number], input[type=datetime-local] { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; }
.poll-edit { margin-top: 10px; font-size: 14px; }
.poll-edit summary { cursor: pointer; margin-bottom: 10px; }
.suggest-box { margin: -4px 0 14px; font-size: 13px; }
.suggestions { list-style: none; margin-top: 8px; }
.suggestions li { padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 8px 8px 0; margin-bottom: 6px; }
.suggestions .btn-link { color: var(--text); font-weight: 400; font-size: 14px; }

/* one discussion */
.thread-h { font-family: var(--serif); font-size: 22px !important; line-height: 1.25; }
.thread-prompt { margin-top: 6px; }
.thread-prompt p { margin-bottom: 6px; }
.rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.thread-head .notice { margin: 12px 0 0; }
.thread-story .post { border-top: 1px solid var(--line); }

.compose { margin-bottom: 14px; }
.compose textarea, .reply-form textarea { width: 100%; }
.compose-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; }
.compose-row select { flex: 1; min-width: 0; max-width: 420px; }

.cthread { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.cpost { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin-bottom: 8px; }
.cpost.removed { display: block; font-size: 14px; font-style: italic; }
.cpost.pending .cp-main, .cpost.hidden .cp-main { opacity: 0.7; }
.cp-av { width: 34px; height: 34px; font-size: 12px; }
.cp-av.teacher { background: var(--gold); color: #fff; }
.cp-main { min-width: 0; }
.cp-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.cp-body { margin-top: 3px; overflow-wrap: anywhere; }
.cp-body p { margin-bottom: 6px; }
.cp-actions { display: flex; gap: 14px; margin-top: 2px; }
.cite { display: flex; align-items: center; gap: 7px; margin-top: 5px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; max-width: 100%; }
.cite span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cite:hover { background: var(--hover); text-decoration: none; }
.creplies { margin-left: 44px; padding-left: 12px; border-left: 2px solid var(--line); }
.reply-form { margin: 0 0 10px 44px; }

.poll-q { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.poll-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.poll-results { list-style: none; }
.poll-results li { margin-bottom: 10px; font-size: 14px; }
.pr-top { display: flex; justify-content: space-between; gap: 10px; }
.pr-bar { height: 8px; border-radius: 999px; background: var(--panel); overflow: hidden; margin-top: 4px; }
.pr-bar span { display: block; height: 100%; background: var(--gold); }
.poll-results li.mine .pr-top span:first-child { font-weight: 700; }
.pr-voters { font-size: 12.5px; margin-top: 3px; }

/* rating guess */
.self-guess { margin-top: 14px; }
.bias-stars.pick button { padding: 0; line-height: 0; border-radius: 6px; }
.bias-stars.pick button:hover svg { stroke: var(--gold); }
.bias-stars.pick button.on svg { fill: var(--c); stroke: var(--c); }
.bias-stars.pick svg { width: 34px; height: 34px; fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linejoin: round; }
.self-guess .bias-label { min-height: 26px; margin-bottom: 10px; }

/* Guess the lean */
.game-stats { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.game-story { font-size: 13.5px; color: var(--muted); }
.game-story b { color: var(--text); font-weight: 600; }
.game-title { font-family: var(--serif); font-size: 23px; line-height: 1.3; font-weight: 700; margin: 8px 0 12px; overflow-wrap: anywhere; }
.game-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.side-btn { height: 44px; }
.side-btn.left { border-color: var(--left); color: var(--left); }
.side-btn.center { border-color: var(--center); color: var(--center); }
.side-btn.right { border-color: var(--right); color: var(--right); }
.side-btn:disabled { opacity: 0.45; }
.side-btn.is-right:disabled, .side-btn.is-wrong:disabled { opacity: 1; }
.game-buttons .side-btn.is-wrong { background: var(--danger); border-color: var(--danger); color: #fff; }
.game-buttons .side-btn.is-right { background: var(--ok); border-color: var(--ok); color: #fff; }
.game-answer { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); }
.game-answer.good { border-color: var(--ok); }
.game-answer.bad { border-color: var(--danger); }
.ga-verdict { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.game-answer .btn-row { margin-top: 12px; }

/* admin: teachers */
.educators { list-style: none; }
.educators li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.educators li:first-child { border-top: 0; }
.edu-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.edu-note { margin-top: 4px; padding: 6px 10px; background: var(--panel); border-radius: 8px; white-space: pre-wrap; }
.edu-actions { display: flex; gap: 4px; align-items: center; flex: none; }
.danger-zone h2 { color: var(--danger); }

/* ---------- site look: the site bar is the pine one, so EvenLine's own bar is light ---------- */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line-strong); }
.topnav a.navlink { color: var(--muted); }
.topnav a.navlink:hover, .topnav a.navlink.active { color: var(--text); }
.topnav a.navlink.active { box-shadow: 0 2px 0 var(--gold); }
.topnav .me img, .topnav .me .initials { box-shadow: 0 0 0 2px var(--gold); }
.topnav .btn-signin { color: var(--green); border-color: var(--green); }
.topnav .btn-signin:hover { background: rgba(31, 58, 44, 0.08); }
@media (prefers-color-scheme: dark) {
  .topnav .btn-signin { color: #e7e9ea; border-color: var(--gold-bright); }
}

/* draft editor: topic, region and category side by side */
.draft-tags { display: flex; flex-wrap: wrap; gap: 0 14px; }
.draft-tags .field { flex: 0 1 220px; }
.draft-tags select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); }

/* "I'm 13 or older" on sign-up forms */
.age-box { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-size: 0.92rem; cursor: pointer; }
.age-box input { width: auto; margin: 0; }
