@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* Light by default: a warm stone page with white cards and one blue for actions.
   Names, titles and scores are set in a serif; everything else is a plain sans. */
:root {
  --page: #f4f2ee;
  --card: #ffffff;
  --sunk: #efece6;
  --ink: #16150f;
  --dim: #55524b;
  --muted: #8b877e;
  --line: #e5e1d8;
  --line-2: #d6d1c6;
  --blue: #0052ff;
  --blue-ink: #ffffff;
  --blue-soft: rgba(0, 82, 255, 0.09);
  --good: #13854f;
  --warn: #b7700c;
  --bad: #d23b2c;
  --neutral: #77736a;
  --best: #0052ff;
  --shadow: 0 1px 2px rgba(22, 21, 15, 0.05), 0 6px 24px rgba(22, 21, 15, 0.05);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --r: 20px;
  --rail: 252px;
  --wrap: 1040px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0f0f11;
    --card: #18181b;
    --sunk: #1f1f23;
    --ink: #f3f2ee;
    --dim: #b4b1aa;
    --muted: #7c7a75;
    --line: #26262b;
    --line-2: #34343a;
    --blue: #3d7bff;
    --blue-soft: rgba(61, 123, 255, 0.14);
    --good: #3cc483;
    --warn: #e2a33e;
    --bad: #f0604f;
    --neutral: #9d9a93;
    --best: #6f9bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--ink);
  font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; border-radius: 10px; z-index: 80; }
.skip:focus { left: 8px; }
.good-t { color: var(--good); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: #fff; }

/* ── the bar: a left rail on wide screens, a top bar below that ── */
.topbar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: var(--rail);
  display: flex; flex-direction: column; gap: 18px; padding: 22px 16px 20px;
  background: var(--page); border-right: 1px solid var(--line); overflow-y: auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 2px 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.mark { width: 32px; height: 32px; flex: none; }
.mark rect { fill: var(--blue); }
.mark path { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; }
.brand-name { font: 400 28px/1 var(--serif); letter-spacing: -0.01em; }
.search { position: relative; }
.search-ic { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search .field { min-height: 42px; padding-left: 38px; border-radius: 999px; background: var(--sunk); border-color: transparent; font-size: 14px; }
.search .field:focus { background: var(--card); border-color: var(--blue); }
.nav { display: grid; gap: 2px; }
.nav a, .bell {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 12px; border-radius: 14px;
  color: var(--dim); font: 500 15.5px/1 var(--sans); background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.nav a:hover, .bell:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { color: var(--ink); font-weight: 700; background: var(--card); box-shadow: var(--shadow); }
.nav svg, .bell svg, .tabbar svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on svg { stroke-width: 2.2; }
.nav .badge, .bell .badge { margin-left: auto; }
.bar-end { display: grid; gap: 8px; margin-top: auto; }
.net, .demo { padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.net:empty { display: none; }
.demo { color: var(--warn); }
.connect { width: 100%; max-width: 100%; min-height: 46px; }
.connect span:not(.av) { overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.badge:empty { display: none; }
.badge { display: inline-block; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font: 700 11px/19px var(--sans); text-align: center; font-style: normal; }

.shell { margin-left: var(--rail); min-width: 0; }

/* ── controls ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.solid, .btn.brass { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.solid:hover, .btn.brass:hover { filter: brightness(1.08); color: var(--blue-ink); }
.btn.red { background: var(--ink); border-color: var(--ink); color: var(--page); }
.btn.red:hover { opacity: 0.88; color: var(--page); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 9%, transparent); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--sunk); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linkish:hover { text-decoration: underline; }

.field {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: 14px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  font: 400 16px/1.4 var(--sans); outline: none; transition: border-color .15s, background .15s;
}
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field::placeholder { color: var(--muted); }
.field.area { min-height: 76px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field[disabled] { opacity: 0.5; }

.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: var(--sunk); color: var(--dim); white-space: nowrap; }
.tag.good, .tag.s1 { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.tag.bad, .tag.s3 { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.55; }
.counter { font-size: 12px; color: var(--muted); }
.counter.low { color: var(--warn); }
.empty-note { padding: 22px 4px; color: var(--muted); font-size: 14px; }
.empty-note b { color: var(--ink); font-weight: 600; }
.when { font-size: 12.5px; color: var(--muted); white-space: nowrap; margin-left: auto; }
.row-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-inline .field { flex: 1 1 140px; min-width: 0; }

/* ── type ── */
.label { display: flex; align-items: baseline; gap: 8px; font: 700 15px/1.3 var(--sans); margin: 0 0 12px; }
.label.center { justify-content: center; margin: 56px 0 24px; font: 400 34px/1.1 var(--serif); }
.meta { font-size: 13px; color: var(--muted); margin-top: 8px; }
.meta a { color: var(--blue); font-weight: 600; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* ── page shell ── */
.view { position: relative; max-width: calc(var(--wrap) + 64px); margin: 0 auto; padding: 8px 32px 48px; outline: none; min-height: 60vh; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* page headers: a serif title with an italic second half */
.phead { display: grid; gap: 28px; align-items: center; padding: 30px 0 30px; }
.phead.big { padding: 44px 0 36px; }
.phead.with-right { grid-template-columns: minmax(0, 1fr) auto; }
.title { font: 400 clamp(40px, 6vw, 64px)/1.02 var(--serif); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.phead.big .title { font-size: clamp(46px, 8vw, 92px); }
.title em { font-style: italic; color: var(--muted); }
.phead-meta { margin-top: 12px; color: var(--dim); font-size: 15px; max-width: 640px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* home intro card */
.intro { position: relative; overflow: hidden; padding: 34px 34px 30px; margin: 22px 0 8px; }
.intro::after { content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, var(--blue-soft), transparent); pointer-events: none; }
.intro .title { font-size: clamp(40px, 6vw, 68px); }
.intro p.lead { margin-top: 12px; color: var(--dim); max-width: 560px; font-size: 16px; }

/* avatars + people */
.av {
  --h: 140; position: relative; overflow: hidden; display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: linear-gradient(150deg, hsl(calc(var(--h) + 30) 62% 66%), hsl(var(--h) 55% 42%));
  color: #fff; font-weight: 700; letter-spacing: 0.01em;
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av.genesis { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--blue); }
.av.court { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--warn); }
.av.revoked { filter: grayscale(1); opacity: 0.6; }
.av-link { display: inline-flex; border-radius: 50%; }
.person { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.person-text { display: grid; min-width: 0; line-height: 1.35; }
.person-text b { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.person-text small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.person-text small a { color: var(--ink); font-weight: 600; }
.person-text small a:hover { color: var(--blue); }
.pname { min-width: 0; overflow: hidden; color: var(--ink); }
.name { font-weight: 700; }

/* score pill: serif number in the level's color */
.pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 10%, transparent); font: 400 19px/1 var(--serif); white-space: nowrap; }
.pill i { font: 600 11px/1 var(--sans); font-style: normal; }
.lv0 { color: var(--bad); } .lv1 { color: var(--warn); } .lv2 { color: var(--neutral); } .lv3 { color: var(--good); } .lv4 { color: var(--best); }

/* ── home feed ── */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.side { position: sticky; top: 20px; display: grid; gap: 16px; }
.side > section { padding: 18px 18px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.side .label { margin-bottom: 8px; }
.composer { display: grid; gap: 10px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.composer .field { background: var(--sunk); border-color: transparent; }
.composer .field:focus { background: var(--card); border-color: var(--blue); }
.composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-row .btn.solid, .composer-row .btn.red { margin-left: auto; }
.chips { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--sunk); font-size: 13px; font-weight: 600; color: var(--dim); }
.chip input:checked + span { color: #fff; }
.chip.s1 input:checked + span { background: var(--good); }
.chip.s2 input:checked + span { background: var(--neutral); }
.chip.s3 input:checked + span { background: var(--bad); }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 18px 0 12px; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--dim); font: 600 13.5px/1 var(--sans); cursor: pointer; }
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--page); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.post { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-head .person { flex: 1 1 220px; }
.post-body { margin: 12px 0 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.post .meta { margin-top: 10px; }
.reply { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--sunk); font-size: 14px; color: var(--dim); white-space: pre-line; overflow-wrap: anywhere; }
.reply b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 3px; }
.reply-form { margin: 12px 0 0; }
.line-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 14.5px; color: var(--dim); }
.line-item p { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.line-item p b, .line-item p .name { color: var(--ink); }
.line-item.bad p { color: var(--bad); }
.dot-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--sunk); color: var(--dim); font-weight: 700; }
.line-item.bad .dot-ic { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.case-post { box-shadow: inset 3px 0 0 var(--warn); }

/* side lists */
.mini { list-style: none; margin: 0; padding: 0; }
.mini li a { display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 14px; color: var(--ink); }
.mini li + li a { border-top: 1px solid var(--line); }
.mini li a > span:not(.av):not(.pill) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mini .pill { font-size: 16px; padding: 4px 9px 5px; }
.mini .pill i { display: none; }
.me-mini { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.me-mini > span:not(.av):not(.pill) { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.me-mini b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-mini small { color: var(--muted); font-size: 12.5px; }

/* ── profile: cover, big avatar, serif name, the score as the headline number ── */
.pcard { overflow: hidden; margin-top: 22px; }
.pcover {
  --h: 140; height: 150px;
  background:
    radial-gradient(120% 140% at 100% 0%, hsl(calc(var(--h) + 40) 70% 72% / 0.85), transparent 60%),
    radial-gradient(90% 120% at 0% 100%, hsl(var(--h) 60% 55% / 0.75), transparent 65%),
    hsl(calc(var(--h) + 20) 35% 86%);
}
@media (prefers-color-scheme: dark) { .pcover { background: radial-gradient(120% 140% at 100% 0%, hsl(calc(var(--h) + 40) 55% 42% / 0.9), transparent 60%), radial-gradient(90% 120% at 0% 100%, hsl(var(--h) 50% 32% / 0.85), transparent 65%), hsl(calc(var(--h) + 20) 20% 16%); } }
.pcover.revoked { filter: grayscale(1); }
.pcard-body { padding: 0 28px 26px; }
.pcard-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -56px; }
.pcard-top .av { box-shadow: 0 0 0 5px var(--card); }
.pcard-top .av.genesis { box-shadow: 0 0 0 5px var(--card), 0 0 0 8px var(--blue); }
.pcard-top .av.court { box-shadow: 0 0 0 5px var(--card), 0 0 0 8px var(--warn); }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; }
.pcard-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-top: 16px; }
.pcard-id { min-width: 0; flex: 1 1 320px; }
.pname-big { font: 400 clamp(36px, 5vw, 52px)/1.02 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.handle { margin-top: 4px; color: var(--muted); font-size: 15px; }
.handle a { color: var(--muted); }
.handle a:hover { color: var(--blue); }
.pmeta { margin-top: 12px; color: var(--dim); font-size: 14px; }
.pmeta a { font-weight: 600; }
.pscore { display: grid; justify-items: end; line-height: 1; }
.pscore-num { font: 400 clamp(56px, 8vw, 84px)/0.9 var(--serif); letter-spacing: -0.02em; }
.pscore-lv { margin-top: 8px; font: 700 13px/1 var(--sans); }
.pscore small { margin-top: 6px; font-size: 12px; color: var(--muted); }
.notice { margin-top: 18px; padding: 13px 16px; border-radius: 14px; font-size: 14px; color: var(--ink); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.notice.bad { background: color-mix(in srgb, var(--bad) 11%, transparent); }
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.profile-aside { display: grid; gap: 16px; position: sticky; top: 20px; }
.profile-aside > section { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.profile .score-top { display: none; }
.profile .score-track { margin-top: 6px; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; background: var(--sunk); border-radius: 999px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 36px; padding: 0 15px; border-radius: 999px; background: none; border: 0; color: var(--dim); font: 600 13.5px/1 var(--sans); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tab i { margin-left: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.tab-pane > * + * { margin-top: 12px; }
.list { list-style: none; margin: 0; padding: 4px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.list:has(> .empty-note:only-child) { padding: 0 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; }
.row + .row, .act-row + .act-row { border-top: 1px solid var(--line); }
.row .person { flex: 1 1 220px; }
.row .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.amt { font: 400 20px/1 var(--serif); white-space: nowrap; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.act-row { display: flex; gap: 14px; align-items: baseline; padding: 13px 0; font-size: 14px; color: var(--dim); }
.act-row span { min-width: 0; overflow-wrap: anywhere; }
.thread { list-style: none; margin: 0; padding: 0 0 0 2px; }
.thread li { position: relative; padding: 0 0 12px 22px; font-size: 14px; }
.thread li::before { content: ""; position: absolute; left: 1px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); }
.thread li::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.thread li:last-child::after { display: none; }
.thread li.self::before { background: var(--blue); border-color: var(--blue); }
.thread .tag { padding: 3px 8px; font-size: 11px; }
.wallet-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--dim); }
.back-form label { display: block; margin-bottom: 10px; font-weight: 600; }
.back-form .hint { margin-top: 10px; }
.back-form, .box { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.rewards-note { color: var(--good); font-size: 13px; font-weight: 600; }

/* score bar */
.score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.score-num { font: 400 56px/1 var(--serif); letter-spacing: -0.02em; }
.score-level { font: 700 12px/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, currentColor 11%, transparent); }
.score-track { position: relative; height: 8px; margin: 18px 0 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--bad) 0 28.57%, var(--warn) 28.57% 42.86%, var(--neutral) 42.86% 57.14%, var(--good) 57.14% 71.43%, var(--best) 71.43% 100%); }
.score-track span { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink); transform: translate(-50%, -50%); box-shadow: var(--shadow); }
.score-scale { position: relative; height: 14px; font-size: 10.5px; color: var(--muted); }
.score-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.score-scale span:first-child { left: 0; transform: none; }
.score-scale span:last-child { transform: none; }
.score-why { margin-top: 12px; font-size: 13px; }
.score-why summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.score-why ul { list-style: none; margin: 10px 0; padding: 0; }
.score-why li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--dim); }
.score-why li b { font-weight: 700; color: var(--good); white-space: nowrap; }
.score-why li:first-child b { color: var(--ink); }
.score-why li b.neg { color: var(--bad); }
.score-why p { font-size: 12px; }

/* court */
.case { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.case + .case { margin-top: 10px; }
.case.open { box-shadow: inset 3px 0 0 var(--warn); }
.case-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-head .person { flex: 1 1 220px; }
.case-reason { margin: 14px 0; font-size: 16px; overflow-wrap: anywhere; white-space: pre-line; }
.answer { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--sunk); color: var(--dim); white-space: pre-line; overflow-wrap: anywhere; }
.meta-in { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.votes { display: grid; gap: 2px; }
.vote-bar { display: flex; height: 8px; overflow: hidden; border-radius: 999px; background: var(--sunk); }
.vote-bar .g { background: var(--bad); } .vote-bar .n { background: var(--good); }
.case .row-inline { margin-top: 14px; }
.respond { margin-top: 14px; }
.open-case summary { cursor: pointer; color: var(--bad); font-weight: 600; }
.open-case .form { margin-top: 12px; }
.court-note { max-width: 680px; color: var(--dim); font-size: 15px; margin: -10px 0 30px; }

/* explore: a row of the most trusted people, then everyone ranked */
.works { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 14px; margin: 0 0 22px; scrollbar-width: thin; }
.work { flex: 0 0 210px; scroll-snap-align: start; }
.work-link { display: grid; justify-items: center; text-align: center; gap: 4px; height: 100%; padding: 22px 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); transition: border-color .15s, transform .15s; }
.work-link:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-2px); }
.work-link .av { margin-bottom: 8px; }
.work-title { font: 400 25px/1.1 var(--serif); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-handle { font-size: 13px; color: var(--muted); min-height: 18px; }
.work-score { margin-top: 8px; font: 400 40px/1 var(--serif); }
.work-lv { font: 700 12px/1 var(--sans); }
.work-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.explore-tools { display: grid; gap: 4px; margin-bottom: 4px; }
.board { list-style: none; margin: 0; padding: 4px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.board > li + li { border-top: 1px solid var(--line); }
.board-row { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 14px; color: var(--ink); }
.board-row:hover { color: var(--ink); background: var(--sunk); }
.rank { width: 26px; text-align: right; font-weight: 600; font-size: 13px; color: var(--muted); flex: none; }
.board-name { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.35; }
.board-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name small, .board-stake small { font-size: 12.5px; color: var(--muted); }
.board-stake { display: grid; text-align: right; line-height: 1.35; font-size: 14px; }

/* you + forms */
.stack { display: grid; gap: 16px; max-width: 760px; }
.stack > section { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.stack > section > .list { padding: 0; border: 0; border-radius: 0; background: none; }
.stack .label { margin-bottom: 8px; font-size: 17px; }
.stack section > p { color: var(--dim); font-size: 14.5px; margin-bottom: 14px; }
.form { display: grid; gap: 8px; }
.form label { font-size: 13px; font-weight: 600; color: var(--dim); }
.form .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.copyline { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.copyline code { font: 500 13px/1.4 ui-monospace, Consolas, monospace; padding: 11px 14px; border-radius: 12px; background: var(--sunk); overflow-wrap: anywhere; flex: 1 1 240px; }
.highlight { padding: 22px; border-radius: var(--r); background: var(--blue); color: #fff; }
.highlight h3 { font: 400 28px/1.1 var(--serif); margin-bottom: 8px; }
.highlight p { color: rgba(255, 255, 255, 0.86); margin-bottom: 16px; }
.highlight .btn.red { background: #fff; border-color: #fff; color: #0b2a8a; }
.guardian-pick .tag { padding: 4px 8px 4px 4px; }
.guardian-pick .linkish { color: var(--muted); font-size: 15px; line-height: 1; }

/* about + developers */
.prose { max-width: 660px; margin: 0 auto; color: var(--dim); font-size: 16px; line-height: 1.7; }
.prose p + p { margin-top: 14px; }
.prose.left { margin: 0; }
.journey { position: relative; display: grid; gap: 4px; max-width: 660px; margin: 0 auto; padding-left: 34px; }
.journey::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: var(--line-2); }
.stop { position: relative; padding: 4px 0 22px; }
.stop::before { content: ""; position: absolute; left: -31px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--page); }
.stop h3 { font: 400 30px/1.1 var(--serif); margin-bottom: 6px; }
.stop p { color: var(--dim); }
.stop b { color: var(--ink); }
.faq { max-width: 760px; margin: 0 auto; padding: 4px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 30px 18px 0; font-size: 15.5px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 14px; color: var(--blue); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--dim); }
.faq a { color: var(--blue); }
.code { margin: 10px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--sunk); font: 500 12.5px/1.6 ui-monospace, Consolas, monospace; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.endpoint h3 { font: 600 15px/1.3 ui-monospace, Consolas, monospace; margin-bottom: 6px; }
.endpoint p { color: var(--dim); }

/* ── ticker: scores moving along the top, like a market strip ── */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13.5px; color: var(--dim); white-space: nowrap; background: var(--page); }
.ticker:has(.ticker-track:empty) { display: none; }
.ticker-track { display: inline-flex; align-items: center; animation: tick 70s linear infinite; }
.ticker-track > span { display: inline-flex; align-items: center; gap: 7px; margin-right: 26px; }
.ticker-track b { color: var(--ink); font-weight: 600; }
.ticker-track .tk { font: 400 18px/1 var(--serif); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── footer ── */
.foot { max-width: calc(var(--wrap) + 64px); margin: 0 auto; padding: 26px 32px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot b { color: var(--ink); font-weight: 600; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--dim); }
.foot-links a:hover { color: var(--blue); }
.foot .linkish { color: var(--dim); }

/* ── notifications ── */
.notif { position: fixed; left: calc(var(--rail) + 12px); bottom: 20px; z-index: 60; width: min(400px, calc(100vw - 32px)); max-height: 72vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); padding: 18px 14px 8px; }
.notif .label { margin: 0 4px 10px; font-size: 17px; }
.notif ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.notif .line-item { padding: 12px; border: 0; border-radius: 14px; cursor: pointer; }
.notif .line-item:hover { background: var(--sunk); }
.notif .line-item:hover p { color: var(--ink); }
.notif .line-item.new p::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 8px; vertical-align: middle; }

/* ── toast + dialog ── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--page); font-size: 14px; font-weight: 600; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.toast.bad { background: var(--bad); color: #fff; }
dialog.confirm { max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--ink); padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,0.25); }
dialog.confirm::backdrop { background: rgba(10, 10, 12, 0.45); backdrop-filter: blur(3px); }
dialog.confirm h3 { font: 400 30px/1.1 var(--serif); margin-bottom: 10px; }
dialog.confirm p { color: var(--dim); margin-bottom: 20px; }
dialog.confirm .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.tabbar { display: none; }

/* ── narrower screens: the rail becomes a top bar plus a bottom tab bar ── */
@media (max-width: 1240px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .topbar {
    position: sticky; bottom: auto; width: auto; height: 64px; flex-direction: row; align-items: center; gap: 14px;
    padding: 0 24px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible;
    background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .shell { margin-left: 0; }
  .nav { display: none; }
  .search { flex: 1 1 auto; max-width: 420px; margin-left: auto; }
  .bar-end { display: flex; align-items: center; gap: 6px; margin: 0; }
  .net { display: none; }
  .bell { width: 42px; min-height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
  .bell-text { display: none; }
  .bell .badge { position: absolute; top: 2px; right: 0; margin: 0; }
  .connect { width: auto; max-width: 200px; min-height: 40px; }
  .notif { left: auto; right: 16px; top: 72px; bottom: auto; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; min-width: 64px; padding: 6px 8px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on svg { stroke-width: 2.3; }
  .tabbar .badge { position: absolute; top: 0; right: 10px; }
  body { padding-bottom: 72px; }
  .toast { bottom: 86px; }
}
@media (max-width: 860px) {
  .phead.with-right { grid-template-columns: minmax(0, 1fr); }
  .pscore { justify-items: start; }
}
@media (max-width: 640px) {
  .topbar { height: 58px; padding: 0 14px; gap: 8px; }
  .brand { padding: 0; }
  .brand-name, .demo { display: none; }
  .view { padding: 4px 16px 32px; }
  .side, .profile-aside, .form .row2 { grid-template-columns: minmax(0, 1fr); }
  .board-stake { display: none; }
  .post { padding: 16px; }
  .intro { padding: 26px 20px 22px; }
  .pcover { height: 110px; }
  .pcard-body { padding: 0 18px 20px; }
  .pcard-top { margin-top: -44px; }
  .connect { max-width: 132px; padding: 0 14px; }
  .foot { padding: 22px 16px 32px; }
  .label.center { margin: 44px 0 20px; font-size: 30px; }
  .stack > section { padding: 18px; }
  .work { flex-basis: 180px; }
}
@media (max-width: 400px) { .connect span:not(.av) { display: none; } .connect { padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ── home timeline: one column of rows split by hairlines, tabs on top, like and share under reviews ── */
.tl { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.tl-tabs { position: sticky; top: 0; z-index: 5; display: flex; overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.tl-tabs::-webkit-scrollbar { display: none; }
.tl-tab { flex: 1 0 auto; min-height: 52px; padding: 0 18px; background: none; border: 0; color: var(--dim); font: 600 14.5px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.tl-tab span { display: inline-flex; align-items: center; height: 52px; box-shadow: inset 0 -3px 0 transparent; }
.tl-tab:hover { background: var(--sunk); color: var(--ink); }
.tl-tab.on { color: var(--ink); }
.tl-tab.on span { box-shadow: inset 0 -3px 0 var(--blue); }
.tl-note { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.tl-compose { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.tl-compose-body { display: grid; gap: 10px; min-width: 0; }
.tl-compose .field { background: var(--sunk); border-color: transparent; }
.tl-compose .field:focus { background: var(--card); border-color: var(--blue); }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-list .empty-note { padding: 28px 18px; }
.tw { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .12s; }
.tw:last-child { border-bottom: 0; border-radius: 0 0 var(--r) var(--r); }
.tw:hover { background: color-mix(in srgb, var(--sunk) 45%, transparent); }
.tw > .av-link, .tw > .dot-ic { align-self: start; }
.tw > .dot-ic { width: 44px; height: 44px; }
.tw-main { min-width: 0; }
.tw-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 15px; }
.tw-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.tw-name:hover { text-decoration: underline; }
.tw-handle { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.tw-time { color: var(--muted); white-space: nowrap; flex: none; }
.tw-time:not(:empty)::before { content: "· "; }
.tw-ctx { margin: 2px 0 0; font-size: 14px; color: var(--dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tw-ctx .name, .tw-line .name { color: var(--ink); font-weight: 600; }
.tw-ctx .tag { padding: 4px 8px; font-size: 11.5px; }
.tw-body { margin: 6px 0 0; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.tw-line { margin: 2px 0 0; font-size: 14.5px; color: var(--dim); overflow-wrap: anywhere; }
.tw-line b { color: var(--ink); }
.tw.bad .tw-line { color: var(--bad); }
.tw.bad > .dot-ic { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.tw .reply { margin-top: 10px; }
.tw .meta { margin-top: 8px; }
.tw-acts { display: flex; align-items: center; gap: 4px; margin: 8px 0 -6px -8px; max-width: 340px; justify-content: space-between; }
.post .tw-acts { margin-top: 12px; }
.tw-act { display: inline-flex; align-items: center; gap: 4px; min-width: 44px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 13px/1 var(--sans); cursor: pointer; text-decoration: none; list-style: none; }
.tw-act::-webkit-details-marker { display: none; }
.tw-act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tw-act span:empty { display: none; }
.tw-act:hover { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.tw-act.like:hover, .tw-act.like.on { color: var(--bad); }
.tw-act.like:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.tw-act.like.on svg { fill: currentColor; }
.tw-act:disabled { opacity: .45; cursor: default; background: none; color: var(--muted); }
.share { position: relative; }
.share-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; display: grid; min-width: 168px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.share-menu a, .share-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 600 14px/1.2 var(--sans); text-align: left; text-decoration: none; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--sunk); }
@media (max-width: 1099px) { .tl-tabs { top: 64px; } }
@media (max-width: 640px) {
  .tl { border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
  .tl-tabs { top: 58px; border-radius: 0; }
  .tl-tab { padding: 0 14px; font-size: 14px; }
  .tw, .tl-compose { padding: 12px 16px; gap: 10px; }
  .tw:last-child { border-radius: 0; }
}

/* ── comments under a review ── */
.cthread { margin: 12px 0 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.cthread-note { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.cm-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.cm { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.cm-main { min-width: 0; }
.cm-head { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: 14px; min-width: 0; }
.cm-del { margin-left: auto; font-size: 12.5px; color: var(--muted); flex: none; }
.cm-text { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.cm-form { display: flex; gap: 8px; align-items: center; }
.cm-form .field { flex: 1 1 auto; min-width: 0; min-height: 40px; background: var(--sunk); border-color: transparent; border-radius: 999px; padding: 0 14px; font-size: 16px; }
.cm-form .field:focus { background: var(--card); border-color: var(--blue); }

/* ── token check ── */
.tok-verdict { padding: 22px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--muted); }
.tok-verdict h2 { font: 400 30px/1.1 var(--serif); margin: 0 0 8px; overflow-wrap: anywhere; }
.tok-verdict p { margin: 0; color: var(--dim); max-width: 640px; }
.tok-verdict.good { box-shadow: inset 4px 0 0 var(--good); }
.tok-verdict.warn { box-shadow: inset 4px 0 0 var(--bad); }
.row .me-mini.grow { text-decoration: none; }
