/* ===========================
   EyeScore — Common Room
   The question-and-answer page. Sits on base.css (tokens, fonts) and
   portfolio.css (the dialogs, form fields and back pill it shares with the
   main page). Everything here is the Common Room's own: the list, the
   thread, the iris status marks and the question form, as in the mockup.
   =========================== */

.cr-page { --cr-ink: #f1f5f9; --cr-ink-2: rgba(255,255,255,0.78); --cr-ink-3: rgba(255,255,255,0.6);
  --cr-line: rgba(255,255,255,0.08); --cr-line-2: rgba(255,255,255,0.14);
  --cr-cyan: #5fc6ea; --cr-notch: #ff6b6b; --cr-amber: #f0c987;
  --mono: 'IBM Plex Mono', ui-monospace, monospace; }

.cr {
  position: relative; z-index: 1;
  width: min(100%, calc(780px * var(--ui)));
  margin: 0 auto;
  padding: max(1.4rem, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 4rem max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 1.1rem;
}
.cr-view { display: flex; flex-direction: column; gap: 1.1rem; }
.cr-view[hidden] { display: none; }
.cr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cr-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cr-back { align-self: flex-start; text-decoration: none; --dc: #5fc6ea; }
.cr-back:hover .cr-back-arrow { transform: translateX(-3px); }
.cr-back-arrow { transition: transform .34s cubic-bezier(.22,1,.36,1); }
.cr-who {
  font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer;
  color: var(--cr-ink-2); background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 999px; padding: .38rem .85rem;
  max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cr-who:hover { color: #fff; border-color: rgba(95,198,234,0.45); }

.cr-title {
  font-family: 'pixer', Georgia, serif; font-weight: normal; letter-spacing: 2.5px;
  font-size: clamp(1.6rem, 4.2vw, 2.15rem); line-height: 1.15; color: var(--cr-cyan);
  margin: .2rem 0 0; text-wrap: balance;
}
.cr-blurb { margin: .45rem 0 0; font-size: .93rem; line-height: 1.62; color: var(--cr-ink-2); max-width: 62ch; text-wrap: pretty; }

/* Small capitalised labels, as everywhere else on the site. */
.cr-label, .cr-chip, .cr-stage, .cr-count, .cr-kicker {
  font-family: var(--mono); font-weight: 500; letter-spacing: .13em; text-transform: uppercase;
}
.cr-label { font-size: .68rem; color: var(--cr-ink-3); display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 0; }
.cr-opt { text-transform: none; letter-spacing: 0; }
.cr-count { font-size: .68rem; color: var(--cr-ink-3); letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* ── Controls ─────────────────────────────────── */
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.05rem; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: inherit; font-size: .86rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  color: #e6f7ff; background: rgba(74,174,209,0.16); border: 1px solid rgba(74,174,209,0.55);
  transition: background .2s, transform .2s, border-color .2s;
}
.cr-btn:hover { background: rgba(74,174,209,0.26); transform: translateY(-1px); }
.cr-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.cr-btn-quiet { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: var(--cr-ink-2); font-weight: 500; }
.cr-link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--cr-ink-3); text-decoration: underline; text-underline-offset: 3px;
}
.cr-link:hover { color: var(--cr-ink); }
.cr-input {
  width: 100%; font: inherit; font-size: .92rem; padding: .62rem .75rem; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--cr-line); color: rgba(255,255,255,0.92);
  transition: border-color .16s, background .16s;
}
.cr-input::placeholder { color: rgba(255,255,255,0.5); }
.cr-input:focus { outline: none; border-color: rgba(95,198,234,0.55); background: rgba(255,255,255,0.05); }
.cr-area { resize: vertical; min-height: 6.5rem; line-height: 1.55; }
.cr-select { appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.6) 50%), linear-gradient(135deg, rgba(255,255,255,0.6) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.cr-select:disabled { opacity: .5; }
.cr-select option { background: #0c1428; }
.cr-hint { font-size: .78rem; color: var(--cr-ink-3); }
.cr-hint.is-bad, .cr-status.is-bad { color: #ffb3b3; }
.cr-status { margin: 0; font-size: .84rem; color: var(--cr-ink-2); min-height: 1.2em; }
.cr-fine { margin: 0; font-size: .78rem; color: var(--cr-ink-3); }
.cr-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }

/* ── The room ─────────────────────────────────── */
.cr-bar { display: flex; gap: .6rem; align-items: stretch; flex-wrap: wrap; }
.cr-search { flex: 1 1 240px; min-width: 0; position: relative; }
.cr-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--cr-ink-3); pointer-events: none; }
.cr-search .cr-input { padding-left: 2.3rem; }
.cr-filters { display: flex; flex-direction: column; gap: .55rem; }
.cr-chiprow { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; padding-right: 24px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.cr-chiprow::-webkit-scrollbar { display: none; }
/* A swipeable strip suits a touch screen, but a mouse wheel only scrolls up
   and down, and with no scrollbar to drag the later domains were out of
   reach. Whenever a mouse or trackpad is present (any-pointer, so a touch
   laptop or tablet with a mouse plugged in counts too) the chips wrap
   instead, all in view. common-room.js also turns the wheel sideways over
   the strip, for any case this misses. */
@media (any-pointer: fine) {
  .cr-chiprow { flex-wrap: wrap; overflow: visible; padding-right: 0; -webkit-mask-image: none; mask-image: none; }
}
.cr-fchip {
  --dc: rgba(255,255,255,0.7);
  flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .42rem;
  font: inherit; font-size: .78rem; font-weight: 500; color: var(--cr-ink-2);
  padding: .4rem .7rem; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid var(--cr-line);
  transition: background .2s, border-color .2s, color .2s;
}
.cr-fchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--dc); display: block; }
.cr-fchip:hover { color: var(--cr-ink); border-color: color-mix(in srgb, var(--dc) 45%, transparent); }
.cr-fchip[aria-pressed="true"] { color: var(--cr-ink); background: color-mix(in srgb, var(--dc) 16%, transparent); border-color: color-mix(in srgb, var(--dc) 60%, transparent); }
.cr-seg { display: inline-flex; gap: .2rem; padding: .2rem; border-radius: 999px; border: 1px solid var(--cr-line); background: rgba(255,255,255,0.02); align-self: flex-start; }
.cr-seg button { border: 0; background: none; cursor: pointer; font: inherit; font-size: .76rem; font-weight: 500; color: var(--cr-ink-3); padding: .32rem .7rem; border-radius: 999px; }
.cr-seg button[aria-pressed="true"] { color: var(--cr-ink); background: rgba(255,255,255,0.08); }
.cr-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--cr-line); }
.cr-tab {
  flex: 1 1 0; appearance: none; background: none; border: 0; cursor: pointer; font: inherit;
  font-size: .88rem; font-weight: 500; color: rgba(255,255,255,0.72);
  padding: .55rem .6rem; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s;
}
.cr-tab:hover { color: rgba(255,255,255,0.9); }
.cr-tab[aria-selected="true"] { color: var(--cr-cyan); border-bottom-color: var(--cr-cyan); }
.cr-key { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .76rem; color: var(--cr-ink-3); }
.cr-key span { display: inline-flex; align-items: center; gap: .35rem; }

/* The red notch: a dot, never a number. */
.cr-has-notch { position: relative; display: inline-block; }
.cr-notch { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--cr-notch); pointer-events: none; }
.cr-notch-tab { top: -2px; right: -10px; }

.cr-list { display: flex; flex-direction: column; gap: .6rem; }
.cr-card {
  --dc: var(--cr-cyan);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .9rem; align-items: start;
  width: 100%; text-align: left; cursor: pointer; text-decoration: none; color: inherit;
  padding: .95rem 1.1rem; border-radius: 14px;
  background: rgba(255,255,255,0.032); border: 1px solid rgba(255,255,255,0.07);
  transition: border-color .25s, background .25s, transform .3s cubic-bezier(.22,1,.36,1);
}
.cr-card:hover { border-color: color-mix(in srgb, var(--dc) 45%, transparent); background: color-mix(in srgb, var(--dc) 5%, rgba(255,255,255,0.032)); transform: translateY(-1px); }
.cr-card:focus-visible { outline: 2px solid rgba(95,198,234,0.7); outline-offset: 2px; }
.cr-card .cr-iris { margin-top: .15rem; }
.cr-card-main { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.cr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.cr-ach { font-size: .76rem; color: var(--cr-ink-3); }
.cr-card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--cr-ink); text-wrap: pretty; }
.cr-card-title .cr-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cr-notch); margin-left: .45rem; vertical-align: .12em; }
.cr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; font-size: .78rem; color: var(--cr-ink-3); }
.cr-meta b { font-weight: 500; color: var(--cr-ink-2); }
.cr-views { display: inline-flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; }
.cr-views svg { opacity: .85; }
.cr-n { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; padding-top: .1rem; }
.cr-n b { font: 600 1.05rem/1 var(--mono); color: color-mix(in srgb, var(--dc) 72%, #fff); font-variant-numeric: tabular-nums; }
.cr-n.is-zero b { color: var(--cr-ink-3); }
.cr-n span { font: 500 .6rem/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cr-ink-3); }
.cr-empty { text-align: center; padding: 2rem 1rem; border: 1px dashed var(--cr-line-2); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: .8rem; color: var(--cr-ink-2); font-size: .92rem; }
mark { background: rgba(95,198,234,0.22); color: inherit; border-radius: 3px; padding: 0 .1em; }

/* Tag chips: the site's cap pill, in the domain's own colour. */
.cr-chip {
  --dc: var(--cr-cyan);
  display: inline-flex; align-items: center; gap: .4rem; font-size: .62rem; line-height: 1;
  color: var(--dc); background: color-mix(in srgb, var(--dc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--dc) 34%, transparent); padding: .3rem .55rem; border-radius: 999px; white-space: nowrap;
}
.cr-chip-cycle { --dc: rgba(255,255,255,0.7); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
.cr-chip-past { --dc: var(--cr-amber); }
.cr-chip-state { --dc: rgba(255,255,255,0.62); background: transparent; border-style: dashed; align-self: flex-start;
  /* The longest label ("Waiting for approval · only you can see this") is
     wider than a 320px phone, so this one may wrap. */
  white-space: normal; line-height: 1.35; }
.cr-stage { font-size: .6rem; line-height: 1; letter-spacing: .1em; color: var(--cr-ink-2);
  border: 1px solid var(--cr-line-2); border-radius: 5px; padding: .2rem .35rem; }

/* ── A thread ─────────────────────────────────── */
.cr-banners { display: flex; flex-direction: column; gap: .6rem; }
.cr-banners:empty { display: none; }
.cr-banner {
  display: flex; gap: .7rem; align-items: flex-start; flex-wrap: wrap; margin: 0;
  padding: .75rem .95rem; border-radius: 12px; background: rgba(240,201,135,0.07); border: 1px solid rgba(240,201,135,0.3);
  font-size: .85rem; line-height: 1.55; color: rgba(255,240,215,0.92);
}
.cr-banner .cr-link { color: rgba(255,240,215,0.92); }
.cr-q { --dc: var(--cr-cyan); position: relative; display: flex; flex-direction: column; gap: .7rem; padding-bottom: 1.2rem; }
.cr-q::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--dc) 75%, transparent), var(--cr-line) 55%, transparent); }
.cr-q-head { display: flex; gap: .85rem; align-items: flex-start; }
.cr-q-title { margin: 0; font-size: clamp(1.2rem, 3.2vw, 1.45rem); font-weight: 600; line-height: 1.35; letter-spacing: -.005em; text-wrap: balance; color: var(--cr-ink); }
.cr-body { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--cr-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 65ch; }
.cr-gone { font-style: italic; color: var(--cr-ink-3); }
.cr-answers-head { margin: 0; font: 500 .68rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--cr-ink-3); }
.cr-answers-n, .cr-compose .cr-label { color: color-mix(in srgb, var(--dc) 75%, #fff); }
.cr-ans {
  --dc: var(--cr-cyan);
  display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem; border-radius: 14px;
  background: rgba(255,255,255,0.032); border: 1px solid rgba(255,255,255,0.07);
}
.cr-ans.is-best { border-color: color-mix(in srgb, var(--dc) 50%, transparent); background: color-mix(in srgb, var(--dc) 6%, rgba(255,255,255,0.032)); }
.cr-ans.is-mine-waiting { border-style: dashed; }
.cr-best { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem;
  font: 500 .62rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dc); }
.cr-helpful {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font: inherit;
  font-size: .78rem; font-weight: 500; color: var(--cr-ink-2); padding: .32rem .65rem; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--cr-line-2); transition: background .2s, border-color .2s, color .2s;
}
.cr-helpful b { font: 600 .78rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.cr-helpful:hover:not(:disabled) { border-color: rgba(95,198,234,0.5); color: var(--cr-ink); }
.cr-helpful[aria-pressed="true"] { color: #e6f7ff; border-color: rgba(95,198,234,0.6); background: rgba(95,198,234,0.14); }
.cr-helpful:disabled { cursor: default; }
.cr-compose { display: flex; flex-direction: column; gap: .55rem; padding-top: .4rem; }
.cr-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.cr-modnote { font-size: .82rem; color: rgba(255,240,215,0.92); }

/* ── Asking ───────────────────────────────────── */
.cr-form { display: flex; flex-direction: column; gap: 1.3rem; }
.cr-field { display: flex; flex-direction: column; gap: .45rem; }
.cr-fieldset { border: 0; padding: 0; margin: 0; }
.cr-similar { border: 1px solid rgba(95,198,234,0.28); border-radius: 12px; overflow: hidden; background: rgba(95,198,234,0.04); }
.cr-similar-head { padding: .6rem .85rem .2rem; }
.cr-similar a {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .7rem; align-items: center;
  text-decoration: none; border-top: 1px solid var(--cr-line); padding: .6rem .85rem; font-size: .88rem; color: var(--cr-ink);
}
.cr-similar a:first-of-type { border-top: 0; }
.cr-similar a:hover { background: rgba(255,255,255,0.04); }
.cr-similar small { font: 500 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cr-ink-3); white-space: nowrap; }
.cr-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.cr-dgrid .cr-fchip { justify-content: flex-start; }
.cr-switch { display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; position: relative; }
.cr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cr-switch-track { flex-shrink: 0; width: 38px; height: 22px; border-radius: 999px; position: relative; margin-top: .1rem;
  background: rgba(255,255,255,0.08); border: 1px solid var(--cr-line-2); transition: background .2s, border-color .2s; }
.cr-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.85); transition: transform .25s cubic-bezier(.22,1,.36,1); }
.cr-switch input:checked + .cr-switch-track { background: rgba(74,174,209,0.4); border-color: rgba(74,174,209,0.7); }
.cr-switch input:checked + .cr-switch-track::after { transform: translateX(16px); }
.cr-switch input:focus-visible + .cr-switch-track { outline: 2px solid rgba(95,198,234,0.75); outline-offset: 2px; }
.cr-switch-text { font-size: .9rem; color: var(--cr-ink); }
.cr-switch-text small { display: block; font-size: .8rem; color: var(--cr-ink-3); margin-top: .1rem; }

/* Choices inside dialogs: stage and report reason. */
.cr-stages, .cr-reasons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.cr-reasons { flex-direction: column; align-items: stretch; margin: .2rem 0 .8rem; }
.cr-pick {
  font: inherit; font-size: .84rem; cursor: pointer; text-align: left; color: var(--cr-ink-2);
  padding: .45rem .8rem; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid var(--cr-line);
}
.cr-reasons .cr-pick { border-radius: 10px; }
.cr-pick[aria-checked="true"] { color: #fff; background: rgba(95,198,234,0.14); border-color: rgba(95,198,234,0.6); }
.cr-rules-short ol { margin: .2rem 0 .4rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; color: var(--cr-ink-2); line-height: 1.5; }

/* ── Rules, terms, privacy ────────────────────── */
.cr-doc h2 { font-size: 1rem; margin: 1rem 0 .2rem; color: var(--cr-ink); }
.cr-doc p, .cr-doc li { font-size: .9rem; line-height: 1.6; color: var(--cr-ink-2); max-width: 66ch; }
.cr-doc ol, .cr-doc ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.cr-doc table { border-collapse: collapse; font-size: .82rem; color: var(--cr-ink-2); width: 100%; }
.cr-doc th, .cr-doc td { text-align: left; vertical-align: top; padding: .45rem .5rem; border-bottom: 1px solid var(--cr-line); }
.cr-doc th { color: var(--cr-ink); font-weight: 600; }
.cr-table { overflow-x: auto; }
.cr-table:focus-visible { outline: 2px solid rgba(95,198,234,0.7); outline-offset: 2px; }

.cr-foot { margin: 1.5rem 0 0; font-size: .78rem; color: var(--cr-ink-3); text-align: center; }

.cr-toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  width: min(92vw, 460px); padding: .75rem 1rem; border-radius: 12px;
  background: rgba(12,20,40,0.96); border: 1px solid rgba(95,198,234,0.4);
  font-size: .86rem; line-height: 1.5; color: var(--cr-ink); box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.cr-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .cr-card { grid-template-columns: auto minmax(0, 1fr); }
  .cr-n { grid-column: 2; flex-direction: row; gap: .35rem; align-items: baseline; justify-content: flex-start; }
  .cr-n b { font-size: .9rem; }
  .cr-bar .cr-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cr *, .cr *::before, .cr *::after, .cr-toast { transition: none !important; animation: none !important; }
}

/* ── Moving between pages ─────────────────────── */
/* The dial's own change of view (portfolio.css, .pf-view): the old page fades
   back and up over 0.2s, the new one rises into place. pf-viewin is defined
   there. */
.cr > .cr-view { transition: opacity .2s ease, transform .2s ease; }
.cr > .cr-view.is-out { opacity: 0; transform: scale(.97) translateY(-8px); }
.cr > .cr-view.is-in  { animation: pf-viewin .42s cubic-bezier(.22,1,.36,1) both; }
/* A thread's content when it arrives after "Loading…". */
.cr-fadein { animation: cr-fadein .36s ease both; }
@keyframes cr-fadein { from { opacity: 0; transform: translateY(6px); } }
/* Gentle reveals (revealBelowFold in common-room.js): below the fold until
   first scrolled to, then in place for good. */
.cr-card { transition: border-color .25s, background .25s, transform .3s cubic-bezier(.22,1,.36,1), opacity .55s ease; }
.cr-ans  { transition: opacity .55s ease, transform .65s cubic-bezier(.22,1,.36,1); }
.cr-card.is-waiting, .cr-ans.is-waiting { opacity: 0; transform: translateY(16px); }

/* The anonymous switch sits on its own line under the answer box. */
.cr-compose .cr-switch { margin-top: .1rem; }

/* The privacy table on a phone: four columns are too narrow to read, so each
   row becomes a card, every cell labelled with its column's name. */
@media (max-width: 560px) {
  .cr-doc table, .cr-doc tbody, .cr-doc tr, .cr-doc td { display: block; width: 100%; }
  .cr-doc tr:first-child { display: none; }
  .cr-doc tr { padding: .7rem .8rem; margin-bottom: .6rem; border: 1px solid var(--cr-line); border-radius: 12px; background: rgba(255,255,255,0.025); }
  .cr-doc td { border: 0; padding: .25rem 0; }
  .cr-doc td::before {
    content: attr(data-label); display: block; margin-bottom: .1rem;
    font: 500 .62rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cr-ink-3);
  }
  .cr-doc td:first-child { color: var(--cr-ink); font-weight: 600; }
}

/* ── Light and colour ─────────────────────────── */
/* A thread takes on its domain's colour: a soft wash of light at the top of
   the page, which changes colour smoothly from one thread to the next. */
@property --wash { syntax: '<color>'; inherits: true; initial-value: #5fc6ea; }
.cr-wash {
  position: absolute; top: 0; left: 0; right: 0; height: 620px; pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity .8s ease, --wash .8s ease;
  background: radial-gradient(ellipse 70% 95% at 50% 0%,
    color-mix(in srgb, var(--wash) 12%, transparent) 0%,
    color-mix(in srgb, var(--wash) 4%, transparent) 45%, transparent 76%);
}
body.cr-washed[data-view="v-thread"] .cr-wash { opacity: 1; }

/* Each card carries its domain's colour down its left edge, as the dial's
   segments do. It lengthens and brightens on hover. */
.cr-card { position: relative; }
.cr-card::before {
  content: ''; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 2px; border-radius: 0 2px 2px 0;
  background: var(--dc); opacity: .65; box-shadow: 0 0 10px color-mix(in srgb, var(--dc) 60%, transparent);
  transition: opacity .25s, top .35s cubic-bezier(.22,1,.36,1), bottom .35s cubic-bezier(.22,1,.36,1);
}
.cr-card:hover::before, .cr-card:focus-visible::before { opacity: 1; top: 10px; bottom: 10px; }

/* The tabs' underline glides to the chosen tab (placed by common-room.js).
   Until it has been placed, each tab draws its own. */
.cr-tabs { position: relative; }
.cr-tabs.has-ind .cr-tab[aria-selected="true"] { border-bottom-color: transparent; }
.cr-tabs.has-ind::after {
  content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px;
  width: var(--tab-w); transform: translateX(var(--tab-x)); background: var(--cr-cyan);
  box-shadow: 0 0 10px rgba(95,198,234,0.5);
}
.cr-tabs.is-ready::after { transition: transform .4s cubic-bezier(.22,1,.36,1), width .4s cubic-bezier(.22,1,.36,1); }

/* Placeholders while questions load: the shape of what is coming, with a
   slow sheen across it. */
.cr-skel {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: .9rem; padding: 1rem 1.1rem;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.05); background: rgba(255,255,255,0.02);
}
.cr-skel + .cr-skel { opacity: .7; }
.cr-skel + .cr-skel + .cr-skel { opacity: .45; }
.cr-skel > span { display: flex; flex-direction: column; gap: .6rem; padding-top: .15rem; }
.cr-skel i, .cr-skel-thread > i {
  display: block; height: .65rem; border-radius: 6px;
  background: linear-gradient(100deg, rgba(255,255,255,0.045) 30%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.045) 70%);
  background-size: 300% 100%; animation: cr-skel 1.8s ease-in-out infinite;
}
.cr-skel i.cr-skel-dot { width: 26px; height: 26px; border-radius: 50%; }
.cr-skel > span i:nth-child(1) { width: 30%; }
.cr-skel > span i:nth-child(2) { width: 72%; }
.cr-skel > span i:nth-child(3) { width: 24%; }
.cr-skel:nth-of-type(2) > span i:nth-child(2) { width: 60%; }
.cr-skel:nth-of-type(3) > span i:nth-child(2) { width: 66%; }
.cr-skel:nth-of-type(3) > span i:nth-child(3) { width: 32%; }
.cr-skel i.cr-skel-big { height: 1rem; }
.cr-skel-thread { display: flex; flex-direction: column; gap: .7rem; }
.cr-skel-thread > i { height: .65rem; }
.cr-skel-thread > i:nth-child(1) { width: 34%; }
.cr-skel-thread > i:nth-child(2) { width: 82%; height: 1.5rem; }
.cr-skel-thread > i:nth-child(3) { width: 26%; margin-bottom: 1.1rem; }
.cr-skel-ans { grid-template-columns: minmax(0, 1fr); }
.cr-skel-thread > .cr-skel { opacity: .7; }
.cr-skel-thread > .cr-skel + .cr-skel { opacity: .45; }
@keyframes cr-skel { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Helpful: the count pops and a ring spreads when you vote. */
.cr-helpful b { display: inline-block; }
.cr-helpful.is-pop { animation: cr-ring .65s ease-out; }
.cr-helpful.is-pop b { animation: cr-pop .5s cubic-bezier(.34,1.56,.64,1); }
.cr-helpful.is-pop svg { animation: cr-nudge .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes cr-ring { from { box-shadow: 0 0 0 0 rgba(95,198,234,0.55); } to { box-shadow: 0 0 0 10px rgba(95,198,234,0); } }
@keyframes cr-pop { 35% { transform: scale(1.45) translateY(-1px); } }
@keyframes cr-nudge { 35% { transform: translateY(-3px); } }

/* The accepted answer: a soft glow in the domain's colour, and once, as the
   thread opens, a gleam of light along its border. */
.cr-ans { position: relative; }
.cr-ans.is-best { box-shadow: 0 14px 40px -22px color-mix(in srgb, var(--dc) 75%, transparent); }
.cr-ans.is-sheen::after {
  content: ''; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--dc) 55%, #fff6e6) 50%, transparent 60%) no-repeat;
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; animation: cr-sheen 1.9s .45s cubic-bezier(.45,0,.25,1) both;
}
@keyframes cr-sheen {
  0%   { opacity: 0; background-position: 100% 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-wash { transition: none; }
  .cr-ans.is-sheen::after { display: none; }
}

/* ── Who's who ────────────────────────────────── */
/* Each stage its own colour: one family, periwinkle to rose, warmer the
   further along, and kept apart from the domains' orange, blue and teal. */
[data-stage="Student"] { --sc: #9fb3ff; }
[data-stage="FY1"]     { --sc: #b9a2ff; }
[data-stage="FY2"]     { --sc: #d39af5; }
[data-stage="Post-FY"] { --sc: #ee98d6; }
[data-stage="OST"]     { --sc: #ff9fae; }
.cr-stage[data-stage] { color: var(--sc); border-color: color-mix(in srgb, var(--sc) 42%, transparent);
  background: color-mix(in srgb, var(--sc) 11%, transparent); }
.cr-pick[data-stage] { display: inline-flex; align-items: center; gap: .45rem; }
.cr-pick[data-stage]::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex-shrink: 0; }
.cr-pick[data-stage][aria-checked="true"] { background: color-mix(in srgb, var(--sc) 16%, transparent);
  border-color: color-mix(in srgb, var(--sc) 62%, transparent); }

/* Roles beside a name: the person who asked, in the question's colour, and
   your own posts. */
.cr-role { font: 600 .58rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .24rem .4rem; border-radius: 5px; }
.cr-role-asker { color: #0b1222; background: color-mix(in srgb, var(--dc) 85%, #fff); }
.cr-role-you { color: #dff4ff; background: rgba(95,198,234,0.16); border: 1px solid rgba(95,198,234,0.45); padding: .18rem .36rem; }
/* The site's own moderator: bright, with a shield, and a soft glow. */
.cr-role-admin { display: inline-flex; align-items: center; gap: .28rem; color: #04121c;
  background: linear-gradient(135deg, #a6ecff, #5fc6ea 55%, #3fa8d8); box-shadow: 0 0 12px rgba(95,198,234,0.45); }

/* ── Delete: a bin ───────────────────────────── */
/* Quiet at rest; on hover it turns soft red and its lid tips open. The first
   press opens it out into "Yes, delete it", in red, for the second. */
.cr-del {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 30px; min-width: 30px; padding: 0 .4rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; white-space: nowrap;
  color: var(--cr-ink-3); background: none; border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s, padding .3s cubic-bezier(.22,1,.36,1);
}
.cr-del svg { flex-shrink: 0; overflow: visible; }
.cr-del-lid { transform-box: view-box; transform-origin: 4px 7px; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.cr-del:hover, .cr-del:focus-visible { color: #ff9e9e; background: rgba(255,107,107,0.09); border-color: rgba(255,107,107,0.28); }
.cr-del:focus-visible { outline: 2px solid rgba(255,107,107,0.6); outline-offset: 2px; }
.cr-del:hover .cr-del-lid, .cr-del:focus-visible .cr-del-lid, .cr-del.is-armed .cr-del-lid { transform: translateY(-1.5px) rotate(-16deg); }
.cr-del.is-armed { color: #ffd6d6; background: rgba(255,107,107,0.16); border-color: rgba(255,107,107,0.55); padding: 0 .8rem 0 .6rem; }
.cr-del-text { animation: cr-del-in .25s ease both; }
@keyframes cr-del-in { from { opacity: 0; transform: translateX(-4px); } }
