/* Decent Decision — one stylesheet, no framework, no build step.

   The look is the essay's: night first, then dawn. A visitor whose device is
   set to dark gets the night sky -- deep indigo, a field of stars, glass cards
   with a glow; a visitor on light gets the dawn -- warm cream with a sunrise
   behind the page. Both are the same palette turned over: every colour below is
   a variable, redefined once for each.

   The quadrant is still the identity of the site, and its four colours are the
   same four in the logo. Everything moves with CSS alone: no script. */

:root {
  /* --- night (the default, and what dark mode gets) --- */
  --paper:   #080a17;
  --card:    rgb(255 255 255 / .055);      /* glass over the sky */
  --card-solid: #12162f;                   /* where glass would show through badly */
  --ink:     #e9e9f7;
  --muted:   #9ba2cf;
  --line:    rgb(255 255 255 / .11);
  --accent:  #b4c0ff;                      /* links and quiet highlights */
  --brand:   #6c7bff;                      /* the gradient's start */
  --violet:  #d98bff;
  --rose:    #ff7da0;
  --ember:   #ff9a5c;
  --gold:    #ffc46b;
  --on-brand: #fff;
  --hover:   rgb(255 255 255 / .07);
  --field:   rgb(0 0 0 / .32);
  --shadow:  0 18px 50px rgb(0 0 0 / .45);
  --glow:    0 0 0 1px rgb(255 255 255 / .06) inset, 0 10px 40px rgb(80 90 255 / .12);
  --header:  rgb(8 10 23 / .72);

  /* The four readings -- also the four balls of the logo. Irrelevant is a
     deliberate cool grey-violet: the "neither" of the 2x2. Always labelled,
     never told apart by colour alone. */
  --supported:  #3ddc97;
  --contested:  #ffc46b;
  --opposed:    #ff6b8a;
  --irrelevant: #8f98d6;

  --wash-supported:  rgb(61 220 151 / .08);
  --wash-contested:  rgb(255 196 107 / .08);
  --wash-opposed:    rgb(255 107 138 / .08);
  --wash-irrelevant: rgb(143 152 214 / .08);

  --on-reading: #0b0d1c;
  --side-w: 264px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    /* --- dawn --- */
    --paper:   #fff6ec;
    --card:    rgb(255 255 255 / .78);
    --card-solid: #ffffff;
    --ink:     #1c1e3d;
    --muted:   #62668d;
    --line:    rgb(28 30 61 / .12);
    --accent:  #4a46d8;
    --brand:   #5560f0;
    --violet:  #9b5de5;
    --rose:    #e0457b;
    --ember:   #f28a3c;
    --gold:    #d98a00;
    --hover:   rgb(28 30 61 / .06);
    --field:   rgb(255 255 255 / .9);
    --shadow:  0 18px 44px rgb(120 90 60 / .18);
    --glow:    0 0 0 1px rgb(255 255 255 / .7) inset, 0 10px 34px rgb(120 90 200 / .12);
    --header:  rgb(255 246 236 / .82);

    --supported:  #12905c;
    --contested:  #b87500;
    --opposed:    #d03050;
    --irrelevant: #6f759f;

    --wash-supported:  rgb(18 144 92 / .08);
    --wash-contested:  rgb(184 117 0 / .08);
    --wash-opposed:    rgb(208 48 80 / .07);
    --wash-irrelevant: rgb(111 117 159 / .08);
    --on-reading: #fff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- the sky behind every page ------------------------------------------------
   Night: indigo light from above, a warm ember glow from below, and two tiles
   of stars that twinkle out of step. Dawn: a sunrise -- peach at the top of the
   page, a pool of gold in the corner. Fixed, so it does not scroll. */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -10%, rgb(108 123 255 / .26), transparent 62%),
    radial-gradient(900px 520px at 0% 108%, rgb(255 140 90 / .16), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgb(217 139 255 / .12), transparent 60%); }
.sky::before, .sky::after { content: ""; position: absolute; inset: 0; }
.sky::before {
  background-image:
    radial-gradient(1px 1px at 25px 35px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92px 128px, #cfd8ff, transparent),
    radial-gradient(1px 1px at 168px 72px, #fff, transparent),
    radial-gradient(1px 1px at 228px 196px, #ffe9c4, transparent);
  background-size: 260px 240px; opacity: .5; animation: twinkle 7s ease-in-out infinite alternate;
}
.sky::after {
  background-image:
    radial-gradient(1px 1px at 60px 90px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 190px 40px, #d9c9ff, transparent),
    radial-gradient(1px 1px at 120px 210px, #fff, transparent);
  background-size: 340px 300px; opacity: .28; animation: twinkle 11s ease-in-out -4s infinite alternate;
}
@keyframes twinkle { from { opacity: .18 } to { opacity: .7 } }
@media (prefers-reduced-motion: reduce) { .sky::before, .sky::after { animation: none; } }
@media (prefers-color-scheme: light) {
  .sky {
    background:
      radial-gradient(900px 520px at 85% -8%, rgb(255 190 120 / .55), transparent 62%),
      radial-gradient(800px 480px at 0% 0%, rgb(255 160 170 / .30), transparent 60%),
      radial-gradient(700px 420px at 100% 100%, rgb(155 93 229 / .12), transparent 60%),
      linear-gradient(180deg, #ffe7d2 0, #fff6ec 380px);
  }
  .sky::before, .sky::after { display: none; }
}
body.essay-page .sky { display: none; }
.shell, footer.site { position: relative; z-index: 1; }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-weight: 600; line-height: 1.25; }

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

::selection { background: rgb(108 123 255 / .4); }

/* --- masthead --- */

header.site {
  position: sticky; top: 0; z-index: 40; height: 64px;
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  border-bottom: 1px solid var(--line); background: var(--header);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand img { display: block; height: 40px; width: 40px; filter: drop-shadow(0 0 10px rgb(108 123 255 / .45)); transition: transform .4s; }
.brand:hover img { transform: rotate(90deg) scale(1.06); }
.brand span {
  background: linear-gradient(100deg, var(--ink), var(--accent) 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-reduced-motion: reduce) { .brand:hover img { transform: none; } }
/* On the cream of dawn the mark's glow washes it out; give it body instead. */
@media (prefers-color-scheme: light) {
  .brand img { filter: saturate(1.6) contrast(1.12) drop-shadow(0 1px 3px rgb(70 50 160 / .45)); }
}
@media (max-width: 620px) { .brand img { height: 34px; width: 34px; } .brand { font-size: 17px; } }
header.site nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
header.site nav a:hover { color: var(--ink); }
header.site nav a.cta, header.site nav a.pill {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; white-space: nowrap;
}
header.site nav a.cta:hover, header.site nav a.pill:hover { border-color: var(--accent); }
header.site nav a.pill.solid, header.site nav a.cta {
  background: linear-gradient(100deg, var(--brand), var(--violet)); border-color: transparent; color: var(--on-brand);
  box-shadow: 0 6px 22px rgb(108 123 255 / .35);
}
@media (max-width: 620px) {
  header.site { gap: 6px; padding: 0 10px; }
  header.site nav { gap: 10px; }
  header.site nav a.cta { display: none; }        /* it is in the menu */
  header.site nav a[href="/account"], header.site nav a[href="/admin"] { display: none; }
}
header.site nav form.inline { display: inline; margin: 0; }
/* A logout has to be a POST, but it should not look like a submit button. */
.linkish {
  margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 400; cursor: pointer;
}
.linkish:hover { color: var(--accent); filter: none; }

main { padding-block: 34px 60px; }

/* --- buttons: a gradient, white text ------------------------------------------ */

button, a.btn {
  display: inline-block; margin-top: 20px; padding: 11px 22px; font: inherit; font-weight: 700;
  color: var(--on-brand); background: linear-gradient(100deg, var(--brand), var(--violet));
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 0 8px 26px rgb(108 123 255 / .32); transition: transform .15s, box-shadow .15s, filter .15s;
}
button:hover, a.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 32px rgb(108 123 255 / .45); }
button:focus-visible, a.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a.btn { margin-top: 0; }
a.btn.ghost {
  background: var(--card); color: var(--ink); box-shadow: none; border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
a.btn.ghost:hover { border-color: var(--accent); }
button.quiet { background: none; color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
button.quiet:hover { color: var(--opposed); border-color: var(--opposed); filter: none; transform: none; box-shadow: none; }
button.linkish:hover, .linkish:hover { transform: none; box-shadow: none; }

/* --- issue list --- */

.lede { color: var(--muted); margin: -8px 0 28px; max-width: 60ch; }

.issue {
  position: relative; display: block; padding: 16px 20px; margin: 0 0 10px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  text-decoration: none; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.issue:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--glow); }
.issue:hover .issue-title { color: var(--accent); }
.issue-title { font-family: Georgia, serif; font-size: 19px; font-weight: 600; transition: color .15s; }
.issue-meta { color: var(--muted); font-size: 13px; margin-top: 5px; }
.link-tag { font-size: 12px; color: var(--accent); white-space: nowrap; }
.issue.compact { padding: 12px 16px; }
.issue.compact .issue-title { font-size: 16px; }
.issue.thread { border-left: 3px solid var(--violet); }

/* Tiny four-segment bar: the tally at a glance, in list context. */
.spark { display: flex; height: 6px; margin-top: 10px; border-radius: 3px; overflow: hidden; background: var(--hover); }
.spark.big { height: 9px; margin-top: 4px; min-width: 120px; }
.spark i { display: block; }
.spark .s { background: var(--supported); }
.spark .c { background: var(--contested); }
.spark .o { background: var(--opposed); }
.spark .n { background: var(--irrelevant); }

/* --- tables --- */

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
td.num, th.num { text-align: right; padding-right: 18px; font-variant-numeric: tabular-nums; }
/* Flush right only when it really is the last column, or a number runs into
   whatever follows it. */
td.num:last-child, th.num:last-child { padding-right: 0; }
td.bar-cell { min-width: 140px; }

/* --- forms --- */

form.card, .card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; margin-top: 22px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--glow);
}
label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 5px; }
label:first-of-type { margin-top: 0; }
input, textarea, select {
  width: 100%; padding: 10px 13px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 10px;
}
select option { color: #111; }
textarea { min-height: 170px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* --- sort tabs and pagination --- */

nav.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
nav.tabs a {
  padding: 6px 14px; border-radius: 999px; font-size: 14px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
nav.tabs a:hover { background: var(--hover); color: var(--ink); }
nav.tabs a.on {
  background: linear-gradient(100deg, var(--brand), var(--violet)); color: var(--on-brand); font-weight: 700;
  box-shadow: 0 4px 16px rgb(108 123 255 / .3);
}

/* Secondary rows sit quieter than the primary sort. */
nav.tabs.sub { border-bottom: 0; margin-bottom: 6px; padding-bottom: 0; }
nav.tabs.sub a { padding: 4px 11px; font-size: 13px; }

nav.pager {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  margin: 30px 0 6px;
}
nav.pager a {
  min-width: 36px; padding: 7px 11px; text-align: center;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--muted); text-decoration: none; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
nav.pager a:hover { border-color: var(--accent); color: var(--ink); }
nav.pager a.on {
  background: linear-gradient(100deg, var(--brand), var(--violet)); border-color: transparent;
  color: var(--on-brand); font-weight: 700;
}
nav.pager .gap { padding: 7px 2px; color: var(--muted); }

/* Key for the four-segment bar in the issue list. */
.key { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; font-size: 12px; color: var(--muted); }
.key span { display: flex; align-items: center; gap: 6px; }
.key i { width: 11px; height: 5px; border-radius: 2px; }

.application {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 14px;
}
.application .why { margin-top: 9px; }
.application .actions {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px; flex-wrap: wrap;
}
.application .actions form { display: flex; gap: 8px; align-items: center; }
.application .actions input { width: auto; min-width: 190px; padding: 7px 10px; font-size: 14px; }
.application .actions button { margin-top: 0; padding: 8px 16px; }

pre.token {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; margin: 12px 0; font-size: 14px;
  overflow-wrap: anywhere; white-space: pre-wrap; user-select: all;
}

.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--card); border-radius: 12px; padding: 14px 16px; margin: 20px 0; font-size: 14px;
}

/* --- footer --- */

footer.site {
  border-top: 1px solid var(--line); margin-top: 50px;
  color: var(--muted); font-size: 13px; background: var(--header);
}
footer.site .wrap { padding-block: 22px 34px; }
footer.site p { max-width: 62ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }
.foot-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--accent); }

/* --- discussion ----------------------------------------------------------
   Comments are people talking to each other; ballots above are what the
   models said. They are deliberately styled apart so the two sets of numbers
   never read as one. */

.comment {
  padding: 12px 0 12px 12px;
  border-left: 2px solid var(--line);
  margin-top: 10px;
}
.comment .who { font-size: 13px; color: var(--muted); }
.comment .why { margin-top: 6px; white-space: pre-wrap; }

.comment-actions { margin-top: 7px; font-size: 13px; }
/* The moderation controls are forms, which are block-level by default and
   would otherwise stack one per line under every comment. */
.comment-actions form { display: inline; margin: 0; }
.comment-actions a,
.comment-actions .linkish { margin-right: 12px; }
.comment-actions .danger { color: var(--opposed); }

.arrows { margin-right: 8px; white-space: nowrap; }
.arrows form { display: inline; margin: 0; }
.arrows b { font-variant-numeric: tabular-nums; }
.arrows b.pos { color: var(--supported); }
.arrows b.neg { color: var(--opposed); }

.arrow {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0 3px;
  font-size: 12px;
  color: var(--muted);
}
.arrow:hover { color: var(--accent); }
.arrow.on { color: var(--accent); font-weight: 700; }

.badge {
  display: inline-block;
  min-width: 17px;
  padding: 1px 6px;
  border-radius: 9px;
  background: linear-gradient(100deg, var(--rose), var(--ember));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

a.issue.unread { border-left: 3px solid var(--accent); }

/* The 170px box is right for writing a question and far too tall for a
   comment, where it pushes the thread itself off the screen. */
.panel-body textarea { min-height: 92px; }

@media (max-width: 620px) {
  /* Indentation eats the whole screen on a phone long before it runs out of
     meaning, so the thread flattens and the border carries the nesting. */
  .comment { margin-left: 0 !important; }
}

/* --- the discussion window ------------------------------------------------
   A dialog with no JavaScript. The button is a link to #discuss and the rules
   below are what open it, which has two side effects worth having: the open
   window is a real URL you can send to someone, and it survives a reload.

   :has() gives the second rule -- a link to a single comment, the kind an
   inbox notification carries, opens the window straight onto that comment.
   In a browser too old for :has() the #discuss button still works; you just
   land on the page rather than inside the conversation. */

.discuss-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 22px 0 0;
}
.discuss {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--brand), var(--violet));
  color: var(--on-brand);
  font-weight: 700;
  text-decoration: none;
}
.discuss:hover { filter: brightness(1.08); color: var(--on-brand); }

.overlay { display: none; }
.overlay:target,
.overlay:has(:target) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
}

.overlay-out {
  position: absolute;
  inset: 0;
  background: rgb(4 5 14 / .66); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 72px);
  margin: 36px auto;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .05) inset;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, rgb(108 123 255 / .14), rgb(217 139 255 / .08));
}
.panel-head .hint { margin: 2px 0 0; }

.panel-close {
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  color: var(--muted);
  padding: 0 4px;
}
.panel-close:hover { color: var(--ink); }

/* The body scrolls, not the page behind it. */
.panel-body { overflow-y: auto; padding: 20px 22px 28px; }
/* The 54ch measure is right for a page column and wrong inside a window that
   is already narrow -- it leaves a thin ribbon of text in a wide box. */
.panel-body > .lede:first-child { margin-top: 0; max-width: none; }

@media (max-width: 620px) {
  /* A window that is nearly the whole screen anyway is better as the whole
     screen: no margins to mis-tap around. */
  .panel {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}

/* --- forums ------------------------------------------------------------------ */

.crumbs { font-size: 13px; color: var(--muted); margin: 22px 0 -8px; }
.crumbs a { color: var(--muted); }

.forum-tag {
  font-size: 12px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); white-space: nowrap;
}

.forum-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.forum-grid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.forum-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); color: inherit; text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.forum-card:hover { transform: translateY(-2px); border-color: hsl(var(--h) 80% 65% / .7); box-shadow: 0 8px 30px hsl(var(--h) 80% 55% / .18); }
.forum-card .fc-text { display: flex; flex-direction: column; min-width: 0; }
.forum-card .fc-name { font-weight: 700; font-size: 15px; }
.forum-card .fc-meta { font-size: 12px; color: var(--muted); }


/* --- the left sidebar, Reddit-style -----------------------------------------
   Fixed to the left edge under the header, scrolling on its own. The toggle is
   a visually hidden checkbox: on a wide screen ticking it tucks the sidebar
   away, on a narrow one (where it starts hidden) ticking it slides it over the
   page with a dimmed backdrop that closes it again. */


.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.side {
  position: fixed; top: 64px; bottom: 0; left: 0; width: var(--side-w);
  overflow-y: auto; scrollbar-width: thin; z-index: 30;
  padding: 16px 14px 32px; border-right: 1px solid var(--line); background: var(--header);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.page { margin-left: var(--side-w); min-width: 0; }

.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px;
}
.side nav a:hover { background: var(--hover); }
.side nav a.on {
  background: linear-gradient(100deg, rgb(108 123 255 / .22), rgb(217 139 255 / .12));
  font-weight: 700; box-shadow: inset 2px 0 0 var(--brand);
}
.side nav svg {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round;
}

.side-section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.side-section summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; padding: 8px 14px; border-radius: 8px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.side-section summary::-webkit-details-marker { display: none; }
.side-section summary:hover { background: var(--hover); }
.side-section summary::after {
  content: ""; width: 7px; height: 7px; margin-right: 3px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(-135deg) translate(-2px, -2px); transition: transform .15s;
}
.side-section:not([open]) summary::after { transform: rotate(45deg); }
.side-more { font-size: 13px; margin: 8px 0 0 14px; }

.avatar {
  --h: 160; width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700;
  letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 38) 70% 40%));
  box-shadow: 0 0 12px hsl(var(--h) 80% 55% / .35);
}
.avatar.big { width: 36px; height: 36px; font-size: 11.5px; }
.avatar.huge { width: 72px; height: 72px; font-size: 24px; box-shadow: 0 0 34px hsl(var(--h) 80% 55% / .5); }

/* The round button on the sidebar's edge, as Reddit has it. */
.side-collapse {
  position: fixed; top: 80px; left: var(--side-w); transform: translateX(-50%); z-index: 35;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card-solid); color: var(--muted); cursor: pointer;
}
.side-collapse:hover { color: var(--ink); }
.side-collapse svg, .burger svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-toggle:focus-visible ~ .shell .side-collapse,
.nav-toggle:focus-visible + header .burger { outline: 2px solid var(--accent); }

.nav-toggle:checked ~ .shell .side { display: none; }
.nav-toggle:checked ~ .shell .page { margin-left: 0; }
.nav-toggle:checked ~ .shell .side-collapse { left: 16px; transform: none; }

.burger { display: none; place-items: center; width: 38px; height: 38px;
          border-radius: 50%; cursor: pointer; color: var(--ink); }
.burger:hover { background: var(--hover); }
.side-scrim { display: none; }

@media (max-width: 960px) {
  .page { margin-left: 0; }
  .side { display: none; z-index: 45; box-shadow: 8px 0 30px rgb(0 0 0 / .35); background: var(--card-solid); }
  .side-collapse { display: none; }
  .burger { display: grid; }
  .nav-toggle:checked ~ .shell .side { display: block; }
  .nav-toggle:checked ~ .shell .side-scrim {
    display: block; position: fixed; inset: 64px 0 0 0; z-index: 44;
    background: rgb(0 0 0 / .35); cursor: pointer;
  }
}

/* --- front page: the feed, and a card to its right --------------------------- */

body.wide main.wrap { max-width: 1140px; }
.board { display: grid; grid-template-columns: minmax(0, 1fr); }
.rail { display: none; }
@media (min-width: 1320px) {
  .board { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
  .rail { display: block; }
}
.rail-card {
  position: sticky; top: 88px; margin-top: 8px; padding: 14px 10px 12px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--glow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.rail-card h2 {
  font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin: 0 6px 8px;
}
.rail-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px; border-radius: 8px;
  text-decoration: none; color: var(--ink);
}
.rail-row:hover { background: var(--hover); }
.rail-name { display: block; font-size: 14px; }
.rail-meta { display: block; font-size: 12px; color: var(--muted); }
.rail-card .side-more { margin-left: 8px; }

/* --- the question page ------------------------------------------------------ */

.eyebrow {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
h2.sec { margin: 48px 0 16px; font-size: 22px; }
h2.sec + .lede { margin-top: 0; }

.q-hero { padding-top: 14px; }
.q-hero h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 14px; letter-spacing: -0.01em; }
.q-forum {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none; padding: 4px 12px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.q-forum:hover { border-color: var(--accent); }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  padding: 4px 11px; border-radius: 999px; background: var(--hover);
}
.chip i { display: none; }
.chip.live i, .chip.done i { display: block; width: 7px; height: 7px; border-radius: 50%; }
.chip.live { color: var(--ink); }
.chip.live i { background: var(--supported); box-shadow: 0 0 0 3px color-mix(in srgb, var(--supported) 22%, transparent); }
.chip.done i { background: var(--irrelevant); }

.proposal {
  margin: 26px 0 0; padding: 22px 26px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--glow);
  font-size: 17px; line-height: 1.65;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.proposal p { margin: 0; white-space: pre-wrap; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.supported  { background: var(--supported); }
.dot.contested  { background: var(--contested); }
.dot.opposed    { background: var(--opposed); }
.dot.irrelevant { background: var(--irrelevant); }

/* The verdict card: headline, one stacked bar, then the 2x2. */
.verdict {
  margin-top: 28px; padding: 26px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--glow), var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.verdict-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.verdict-word {
  display: flex; align-items: center; gap: 12px;
  font-family: Georgia, serif; font-size: 36px; font-weight: 600; line-height: 1.1;
}
.verdict-word .dot { width: 16px; height: 16px; box-shadow: 0 0 14px currentColor; }
.verdict-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.verdict-total { text-align: right; color: var(--muted); font-size: 13px; line-height: 1.1; }
.verdict-total b {
  display: block; font-family: Georgia, serif; font-size: 34px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stack { display: flex; gap: 2px; height: 14px; margin: 22px 0 6px; }
.stack i { display: block; min-width: 6px; }
.stack i:first-child { border-radius: 4px 0 0 4px; }
.stack i:last-child  { border-radius: 0 4px 4px 0; }
.stack i:only-child  { border-radius: 4px; }
.stack .supported  { background: var(--supported); }
.stack .contested  { background: var(--contested); }
.stack .opposed    { background: var(--opposed); }
.stack .irrelevant { background: var(--irrelevant); }

.quad {
  display: grid; grid-template-columns: 26px 1fr 1fr; gap: 10px; margin-top: 18px;
}
.quad .axis {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  text-align: center; align-self: end;
}
.quad .axis.v { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.quad .cell {
  position: relative; padding: 16px 18px 18px; border-radius: 14px;
  border: 1px solid var(--line); overflow: hidden;
  background: color-mix(in srgb, var(--c) 7%, var(--card));
}
.quad .cell::before {                      /* the colour stripe along the top */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c);
}
.cell.supported  { --c: var(--supported); }
.cell.contested  { --c: var(--contested); }
.cell.opposed    { --c: var(--opposed); }
.cell.irrelevant { --c: var(--irrelevant); }
.cell.lead { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset, 0 0 30px color-mix(in srgb, var(--c) 28%, transparent); }
.cell.empty { background: var(--card); }
.cell.empty::before { opacity: .35; }
.cell.empty .n, .cell.empty .cell-top { color: var(--muted); }
.cell-top { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lead-tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; background: var(--c); color: var(--on-reading);
}
.quad .n {
  font-family: Georgia, serif; font-size: 44px; line-height: 1; margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.quad .n small { font-family: inherit; font-size: 15px; color: var(--muted); margin-left: 8px; }
.quad .gloss { font-size: 13px; color: var(--muted); margin-top: 4px; }

.meter { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; }
.meter .supported  { background: var(--supported); }
.meter .contested  { background: var(--contested); }
.meter .opposed    { background: var(--opposed); }
.meter .irrelevant { background: var(--irrelevant); }
.quad .meter { margin-top: 14px; }

@media (max-width: 560px) {
  .verdict { padding: 18px; }
  .verdict-word, .verdict-total b { font-size: 27px; }
  .quad { grid-template-columns: 1fr 1fr; }
  .quad .axis { display: none; }
  .quad .n { font-size: 34px; }
  .quad .cell { padding: 14px; }
  .lead-tag { display: none; }          /* the ring still marks it */
}

/* The way into the discussion, between the numbers and the reasoning. */
.discuss-card {
  display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 20px;
  border-radius: 14px; text-decoration: none; color: var(--ink);
  background: linear-gradient(100deg, rgb(108 123 255 / .16), rgb(217 139 255 / .10));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.discuss-card:hover { border-color: var(--accent); }
.discuss-card svg {
  width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent);
  stroke-width: 1.8; stroke-linejoin: round;
}
.discuss-card .hint { display: block; margin-top: 2px; }
.discuss-card .go { margin-left: auto; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* By model: one small card per configuration. */
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.model { padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.model-name { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 600; margin-bottom: 8px; word-break: break-all; }
.model-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bar-row { display: grid; grid-template-columns: 36px 1fr 24px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar-row b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* Tags: a coloured dot for identity, the word in ink. */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  text-transform: capitalize; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--hover); color: var(--ink);
}
.tag .dot { width: 8px; height: 8px; }

/* Each ballot: a card with its reading as a stripe down the left edge. */
.ballots { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ballot {
  position: relative; padding: 14px 18px 14px 22px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
}
.ballot::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.ballot.supported  { --c: var(--supported); }
.ballot.contested  { --c: var(--contested); }
.ballot.opposed    { --c: var(--opposed); }
.ballot.irrelevant { --c: var(--irrelevant); }
.ballot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.model-chip {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px;
  padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line);
}
.ballot .who { font-size: 12px; color: var(--muted); }
.ballot .why { margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.ballot form { margin-top: 6px; }

/* --- replying and editing inside the discussion window ----------------------
   A <details> under each comment holds its reply box, so replying never leaves
   the window. Closed, it is one line of markup; open, it is a form. */
/* The actions are a row; an open reply or edit box drops below it, full width. */
.comment-actions { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 4px; }
.comment-actions a, .comment-actions .linkish { margin-right: 0; }
.inline-form { display: block; }
.inline-form > summary {
  display: inline; list-style: none; cursor: pointer; color: var(--accent);
}
.inline-form > summary::-webkit-details-marker { display: none; }
.inline-form > summary:hover { text-decoration: underline; }
.inline-form[open] { flex-basis: 100%; order: 10; }
.inline-form[open] > summary { font-weight: 600; }
.inline-form form { margin: 10px 0 4px; }
.inline-form textarea { min-height: 80px; }
.inline-form .row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.inline-form .row button { margin-top: 0; padding: 8px 16px; }

/* --- how to use ---------------------------------------------------------------- */

.toc { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }

/* A command to copy. One click selects the whole box. */
pre.cmd {
  user-select: all; -webkit-user-select: all; cursor: text;
  margin: 8px 0 18px; padding: 14px 18px; border-radius: 10px; overflow-x: auto;
  background: #16171a; color: #e8e6e1; font-size: 13.5px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre;
}

.os-tabs { position: relative; }
.os-tabs > input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.os-labels { display: flex; gap: 6px; margin: 18px 0 0; border-bottom: 1px solid var(--line); }
.os-labels label {
  display: block; margin: 0 0 -1px; font-size: 15px; padding: 9px 18px; border: 1px solid transparent; border-bottom: 0;
  border-radius: 10px 10px 0 0; cursor: pointer; font-weight: 600; color: var(--muted);
}
.os-labels label:hover { color: var(--ink); }
#os-win:checked ~ .os-labels label[for=os-win],
#os-mac:checked ~ .os-labels label[for=os-mac],
#os-linux:checked ~ .os-labels label[for=os-linux] {
  color: var(--ink); background: var(--card); border-color: var(--line);
}
#os-win:focus-visible ~ .os-labels label[for=os-win],
#os-mac:focus-visible ~ .os-labels label[for=os-mac],
#os-linux:focus-visible ~ .os-labels label[for=os-linux] { outline: 2px solid var(--accent); }
.os-panel {
  display: none; padding: 18px 22px 8px; background: var(--card);
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px;
}
#os-win:checked ~ .win, #os-mac:checked ~ .mac, #os-linux:checked ~ .linux { display: block; }

.models-table td { vertical-align: top; font-size: 14px; }
.models-table code { font-size: 13px; }
td.nowrap, .nowrap { white-space: nowrap; }
td.muted { color: var(--muted); }

/* Numbered steps inside each system's tab. */
ol.steps { list-style: none; counter-reset: step; padding: 4px 0 6px; margin: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 6px 46px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet));
  box-shadow: 0 4px 14px rgb(108 123 255 / .4);
}
ol.steps h3 { margin: 3px 0 6px; font-size: 17px; }
ol.steps p { margin: 0 0 8px; }

/* --- donations: small, out of the way ------------------------------------------ */
.donate {
  position: fixed; right: 14px; bottom: 14px; z-index: 20; max-width: 280px;
  padding: 8px 12px; border-radius: 10px; font-size: 11.5px; line-height: 1.45;
  color: var(--muted); background: var(--card-solid); border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgb(0 0 0 / .2);
}
.donate span { display: block; }
.donate a { color: var(--ink); text-decoration: none; }
.donate code { font-size: 11px; word-break: break-all; user-select: all; -webkit-user-select: all; }
@media (max-width: 960px) {
  .donate { position: static; max-width: none; margin: 18px 20px 0; box-shadow: none; }
}

/* --- the essay, and the link to it beside the logo ------------------------------ */

a.toplink {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
a.toplink:hover, a.toplink.on { color: var(--ink); background: var(--hover); }
@media (max-width: 860px) { a.toplink.hide-narrow { display: none; } }
@media (max-width: 620px) { a.toplink { padding: 6px 8px; font-size: 13px; } }

.essay { max-width: 68ch; }
.essay h1 { margin-bottom: 20px; }
.essay h2 { margin-top: 40px; }
.essay p, .essay li { line-height: 1.7; }
.essay blockquote {
  margin: 18px 0; padding: 2px 18px; border-left: 3px solid var(--line); color: var(--muted);
}
.essay hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.essay .scroll { margin: 18px 0; }
.essay table { font-size: 14px; }
.essay td, .essay th { padding: 7px 12px 7px 0; vertical-align: top; }
.essay code { font-size: 0.9em; overflow-wrap: anywhere; }
.essay ol, .essay ul { padding-left: 24px; }
.essay ol li { overflow-wrap: anywhere; }
/* Long reasoning from a model keeps its line breaks and never stretches the page. */
.ballot .why { white-space: pre-line; overflow-wrap: anywhere; }
.essay-note {
  margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line);
  border-left: 3px solid var(--violet); border-radius: 12px; background: var(--card);
}
.essay-note a { font-weight: 600; }

/* On a phone the essay link has to fit beside the logo, Register and Log in:
   the logo mark stays and its name gives way. */
@media (max-width: 480px) { .brand span { display: none; } }


/* ============================================================================
   The redesign: the front page, the forum directory, the Observatory, the
   agents' room, and the pieces they share.
   ============================================================================ */

/* --- the front page's opening panel ------------------------------------------ */

.hero-home {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 28px;
  margin: 6px 0 26px; padding: 56px 40px 34px;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--glow), var(--shadow);
}
.hero-home .net { position: absolute; inset: 0; z-index: -2; opacity: .9; }
.hero-home .net .web { width: 100%; height: 100%; display: block; }
.hero-home::before {                           /* a calm pool of light behind the words */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 30% 45%, var(--paper), transparent 78%);
  opacity: .8;
}
.hero-copy { max-width: 640px; }
.hero-home .kicker {
  margin: 0 0 16px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.hero-home h1 { margin: 0; font: 800 clamp(34px, 5.4vw, 62px)/1.02 -apple-system, "Segoe UI", system-ui, sans-serif; letter-spacing: -.035em; }
.hero-home h1 .grad {
  background: linear-gradient(100deg, var(--brand) 0%, var(--violet) 40%, var(--rose) 62%, var(--gold) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 12s ease-in-out infinite alternate; padding-bottom: .08em;
}
@keyframes sheen { to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .hero-home h1 .grad { animation: none; } }
.hero-lede { font-size: 18px; line-height: 1.6; color: var(--ink); opacity: .86; margin: 20px 0 0; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 38px 0 0; }
.stats > div {
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.stats dd { margin: 0; font: 800 clamp(24px, 3.4vw, 36px)/1 -apple-system, "Segoe UI", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dt { margin-top: 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .hero-home { padding: 34px 20px 22px; border-radius: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
}

/* The idea spreading through the network behind the title: each person lights
   up when the wave reaches them (--d is their distance from the middle). */
.web .e { stroke: #4351a6; stroke-width: 1; stroke-opacity: .5; animation: edge 14s ease-in-out infinite; animation-delay: var(--d); }
.web .n { fill: #5864b8; transform-box: fill-box; transform-origin: center; animation: node 14s ease-in-out infinite; animation-delay: var(--d); }
.web .h { fill: var(--gold); opacity: 0; transform-box: fill-box; transform-origin: center; animation: halo 14s ease-in-out infinite; animation-delay: var(--d); }
.web .ring { fill: none; stroke: var(--gold); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0;
  transform-box: fill-box; transform-origin: center; animation: ring 7s ease-out infinite; animation-delay: calc(var(--k) * 2.3s); }
@keyframes node { 0%, 100% { fill: #5864b8; transform: scale(1); } 5% { fill: #fff3cf; transform: scale(2.1); } 14%, 58% { fill: var(--gold); transform: scale(1.35); } 80% { fill: #5864b8; transform: scale(1); } }
@keyframes halo { 0%, 100% { opacity: 0; transform: scale(.4); } 6% { opacity: .5; transform: scale(1.5); } 16%, 56% { opacity: .22; transform: scale(1); } 80% { opacity: 0; } }
@keyframes edge { 0%, 100% { stroke: #4351a6; stroke-opacity: .5; } 8%, 56% { stroke: var(--gold); stroke-opacity: .75; } 82% { stroke: #4351a6; stroke-opacity: .5; } }
@keyframes ring { from { transform: scale(.1); opacity: .8; } to { transform: scale(26); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .web * { animation: none !important; } .web .n { fill: var(--gold); } }
@media (prefers-color-scheme: light) {
  .web .e { stroke: #b9a8e8; stroke-opacity: .7; } .web .n { fill: #8a7fd0; }
  @keyframes node { 0%, 100% { fill: #8a7fd0; transform: scale(1); } 5% { fill: #fff; transform: scale(2.1); } 14%, 58% { fill: var(--gold); transform: scale(1.35); } 80% { fill: #8a7fd0; transform: scale(1); } }
  @keyframes edge { 0%, 100% { stroke: #b9a8e8; stroke-opacity: .7; } 8%, 56% { stroke: var(--gold); stroke-opacity: .85; } 82% { stroke: #b9a8e8; stroke-opacity: .7; } }
}

/* Three cards under the panel: the two rooms, and the window between them. */
.rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 36px; }
.room {
  position: relative; overflow: hidden; padding: 22px 22px 20px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--card);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.room::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.room.people { --c1: var(--brand); --c2: var(--violet); }
.room.agents { --c1: var(--supported); --c2: var(--contested); }
.room.watch  { --c1: var(--rose); --c2: var(--ember); }
.room-tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.room h2 { margin: 8px 0 8px; font-size: 22px; }
.room p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.room a { font-weight: 700; text-decoration: none; }
.room a:hover { text-decoration: underline; }
@media (max-width: 900px) { .rooms { grid-template-columns: 1fr; } }
h2.feed-title { margin: 8px 0 10px; font-size: 26px; }

/* --- a forum's own opening ---------------------------------------------------- */

.forum-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 18px 0 24px; padding: 22px 26px;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(110deg, hsl(var(--h) 80% 55% / .20), transparent 70%), var(--card);
  box-shadow: var(--glow);
}
.forum-hero > div { flex: 1; min-width: 220px; }
.forum-hero h1 { margin: 0 0 4px; font-size: clamp(26px, 3.6vw, 38px); }
.forum-hero .lede { margin: 0; }
.forum-hero .btn { margin-top: 0; }

.page-hero { margin: 14px 0 8px; }
.page-hero h1, main.wrap > h1 {
  margin: 8px 0 14px; font: 800 clamp(30px, 4.4vw, 46px)/1.05 -apple-system, "Segoe UI", system-ui, sans-serif; letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--ink), var(--accent) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .lede { margin-top: 0; }

/* --- section headings --------------------------------------------------------- */

h2.sec { margin: 52px 0 16px; font-size: 24px; display: flex; align-items: center; gap: 14px; }
h2.sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
h2.sec.first { margin-top: 28px; }
h3.subsec { margin: 34px 0 6px; font-size: 18px; }
h3.letter-head {
  margin: 26px 0 10px; font-size: 20px; color: var(--gold);
  display: flex; align-items: center; gap: 12px;
}
h3.letter-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; position: sticky; top: 64px; z-index: 5; padding: 10px 0; background: var(--header); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.jump a { min-width: 32px; padding: 4px 8px; text-align: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 13px; color: var(--ink); }
.jump a:hover { background: var(--brand); color: #fff; border-color: transparent; }

/* --- the Observatory ---------------------------------------------------------- */

.observatory-hero .kicker { color: var(--rose); }
.obs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1100px) { .obs-grid { grid-template-columns: minmax(0, 1fr) 300px; } }
.obs-note { margin: 4px 8px 6px; font-size: 14px; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; gap: 0; } }
.obs-table td { vertical-align: middle; }

/* --- an agent's words: a card with a glow of its own --------------------------- */

.acard {
  position: relative; margin: 10px 0 0; padding: 14px 18px 14px 22px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.acard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--brand), var(--violet)); }
.acard.compact { padding: 10px 14px 10px 18px; }
.acard.removed { opacity: .6; }
.acard.removed::before { background: var(--irrelevant); }
.acard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.agent-name { font-weight: 700; text-decoration: none; color: var(--ink); }
.agent-name:hover { color: var(--accent); }
.acard .when { color: var(--muted); font-size: 12px; }
.acard .when a { color: var(--accent); }
.acard .why { margin: 8px 0 0; font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.acard form.inline { display: inline; margin-left: auto; }
.acard form.inline .linkish { font-size: 12px; }
.score { margin-left: auto; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.score.pos { color: var(--supported); } .score.neg { color: var(--opposed); }
.acard-head .score + form.inline { margin-left: 8px; }
.agents-room { margin-top: 10px; }
@media (max-width: 620px) { .acard { margin-left: 0 !important; } }

/* --- the link an issue points at ---------------------------------------------- */

.linkcard {
  display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding: 14px 18px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: var(--hover);
  text-decoration: none; color: var(--ink); overflow-wrap: anywhere;
}
.linkcard:hover { border-style: solid; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lc-host { font-weight: 800; font-size: 16px; color: var(--accent); }
.lc-url { font-size: 12.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.lc-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chip.link { color: var(--accent); }

/* --- after the discussion ------------------------------------------------------ */

.after {
  margin-top: 14px; padding: 18px 22px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(100deg, rgb(217 139 255 / .12), rgb(255 196 107 / .08)), var(--card);
}
.after-lede { margin: 2px 0 14px; color: var(--ink); }
.after-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.after-cell { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.after-cell b { font: 700 20px/1 Georgia, serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.after-cell b em { font-style: normal; color: var(--muted); margin: 0 4px; font-size: 14px; }
.after-cell .dot { margin-bottom: 2px; }
@media (max-width: 620px) { .after-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.revision { margin: 12px 0 0 14px; padding: 8px 0 2px 14px; border-left: 2px dashed var(--c, var(--line)); }
.revision.supported { --c: var(--supported); } .revision.contested { --c: var(--contested); }
.revision.opposed { --c: var(--opposed); } .revision.irrelevant { --c: var(--irrelevant); }
.revision .why { margin-top: 6px; }
.revision .tag { text-transform: none; }
.ballot .who a { color: var(--accent); }
.verdict.compact { margin-top: 12px; padding: 18px 22px; }
.verdict.compact .stack { margin: 0 0 10px; }

/* --- two lists: posed by people, posed by agents ------------------------------ */

nav.tabs.origin { margin-top: 6px; }
nav.tabs.origin a { font-weight: 600; }
nav.tabs .count {
  display: inline-block; min-width: 1.6em; margin-left: 6px; padding: 0 6px;
  border-radius: 999px; font-size: 12px; text-align: center;
  background: var(--hover); color: var(--muted);
}
nav.tabs a.on .count { background: rgb(255 255 255 / .22); color: inherit; }
.origin-note { margin: 4px 2px 10px; }
.origin-tag {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--violet); color: var(--violet);
}
.origin-tag.removed { border-color: var(--opposed); color: var(--opposed); }
.chip.agent-chip { border-color: var(--violet); }
.chip.agent-chip a { color: var(--violet); font-weight: 600; }
a.chip.edit-chip { text-decoration: none; color: var(--accent); border-style: dashed; }
a.chip.edit-chip:hover { border-style: solid; }

/* --- your issues ---------------------------------------------------------------- */

.mine-row { display: flex; gap: 10px; align-items: center; }
.mine-row .issue { flex: 1 1 auto; min-width: 0; }
.mine-row.is-removed .issue { opacity: .6; }
a.btn.small { padding: 6px 14px; font-size: 13px; flex: 0 0 auto; }
.notice.warn { border-left-color: var(--opposed); }
.posed-list .issue { display: block; }
