/* verySocial — text-only social network
   Type: Schibsted Grotesk (interface), Literata (what people write)
   Color: petrol accent on cool paper; blue-black ink */
:root {
  --paper: #FFFFFF;
  --wash: #F3F5F7;
  --ink: #17202C;
  --muted: #5E6878;
  --line: #E4E8ED;
  --accent: #0A6E6A;
  --accent-ink: #FFFFFF;
  --accent-wash: #E2F1EF;
  --rose: #C8335E;
  --rose-wash: #FBE8EE;
  --warn: #A86A08;
  --danger: #B42318;
  --danger-wash: #FDECEA;
  --hero: #0B4F4C;
  --hero-accent: #8FE3D8;
  --ui: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --read: 'Literata', Georgia, 'Times New Roman', serif;
  --r-sm: 10px;
  --r-md: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10151D;
    --wash: #18202A;
    --ink: #E9EDF2;
    --muted: #9AA4B2;
    --line: #253041;
    --accent: #3CC2B5;
    --accent-ink: #062220;
    --accent-wash: #12302F;
    --rose: #F2668B;
    --rose-wash: #3A1C26;
    --warn: #E8B04A;
    --danger: #F97066;
    --danger-wash: #3B1A18;
    --hero: #0E3533;
    --hero-accent: #7FD9CE;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.45 var(--ui);
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 600px) 340px;
  justify-content: center;
  min-height: 100vh;
}
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 20px 18px 12px;
}
.col {
  border-inline: 1px solid var(--line);
  min-height: 100vh;
  padding-bottom: 80px;
}
.side { padding: 14px 0 24px 28px; }
.side-inner { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; align-self: flex-start; }
.mark { width: 34px; height: 34px; flex: none; }
.mark path:first-child { fill: var(--accent); }
.mark .v { fill: none; stroke: var(--accent-ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.word { font: 800 25px/1 var(--ui); letter-spacing: -0.035em; }

/* ---------- left nav ---------- */
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav a {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 11px 16px 11px 12px; border-radius: 999px;
  font: 500 19px/1 var(--ui); letter-spacing: -0.01em;
  align-self: flex-start;
}
.nav a svg { width: 26px; height: 26px; }
.nav a:hover { background: var(--wash); }
.nav a.on { font-weight: 700; }
.nav a.on svg { stroke-width: 2.4; }
.post-cta { margin-top: 14px; width: 100%; font-size: 17px; padding: 15px 20px; }
.post-cta svg { display: none; width: 24px; height: 24px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 999px; min-width: 0; }
.me-chip:hover { background: var(--wash); }
.me-chip .who { min-width: 0; }
.me-chip .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .hd { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- column header ---------- */
.colhead {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.colhead.bare { border-bottom: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; position: static; }
.mobilebar { display: none; align-items: center; justify-content: space-between; padding: 10px 16px 4px; }
.mobilebar .brand { padding: 4px 0; }
.mobilebar .mark { width: 30px; height: 30px; }
.mobilebar .word { font-size: 22px; }
.titlebar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 56px; }
.titlebar h1 { font: 700 20px/1.2 var(--ui); letter-spacing: -0.02em; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titlebar .sub { color: var(--muted); font-size: 13px; }
.back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; }
.back:hover { background: var(--wash); }
.back svg { width: 20px; height: 20px; }
.feedtabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.feedtabs a { position: relative; text-align: center; padding: 17px 8px 15px; font: 500 15px/1 var(--ui); color: var(--muted); }
.feedtabs a:hover { background: var(--wash); }
.feedtabs a.on { color: var(--ink); font-weight: 700; }
.feedtabs a.on::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; transform: translateX(-50%); border-radius: 4px; background: var(--accent); }

/* ---------- welcome (signed out) ---------- */
.welcome { padding: 34px 22px 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.welcome h2 { font: 800 clamp(34px, 6vw, 46px)/1.02 var(--ui); letter-spacing: -0.04em; margin: 0; max-width: 12ch; }
.promises { display: flex; flex-wrap: wrap; gap: 8px; }
.promise { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--wash); font-weight: 600; font-size: 14px; }
.promise svg { width: 18px; height: 18px; color: var(--accent); }
.welcome .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- hero (signed out) ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero); color: #fff; border-bottom: 1px solid var(--line); }
.hero-weave { position: absolute; inset: 0; width: 100%; height: 100%; stroke: rgba(255, 255, 255, .09); }
.hero-in { position: relative; padding: 52px 26px 36px; display: flex; flex-direction: column; gap: 22px; }
.hero h2 { font: 800 clamp(42px, 8vw, 62px)/.98 var(--ui); letter-spacing: -0.045em; margin: 0; max-width: 11ch; }
.hero .promise { background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hero .promise svg { color: var(--hero-accent); }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.light { background: #fff; color: #0B4F4C; }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.outline-light:hover { background: rgba(255, 255, 255, .1); filter: none; }

/* ---------- composer ---------- */
.composer { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.composer textarea {
  width: 100%; border: 0; background: transparent; color: var(--ink); resize: none;
  font: 400 20px/1.45 var(--read); padding: 8px 0 10px; min-height: 52px; outline: none;
}
.composer textarea::placeholder { color: var(--muted); }
.composer .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.composer .bar .right { display: flex; align-items: center; gap: 14px; }
.composer .note { font-size: 13px; color: var(--muted); max-width: 34ch; }
.ring { width: 26px; height: 26px; position: relative; display: grid; place-items: center; }
.ring svg { width: 26px; height: 26px; transform: rotate(-90deg); position: absolute; inset: 0; }
.ring .track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.ring .fill { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset .12s; }
.ring.low .fill { stroke: var(--warn); }
.ring.over .fill { stroke: var(--danger); }
.ring span { position: relative; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.ring.over span { color: var(--danger); }

/* ---------- posts ---------- */
.post { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 18px 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post:hover { background: color-mix(in srgb, var(--wash) 60%, transparent); }
.post.focus { cursor: default; }
.post.focus:hover { background: none; }
.av { position: relative; overflow: hidden; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 18px/1 var(--ui); flex: none; }
.av .pat { position: absolute; inset: 0; width: 100%; height: 100%; stroke: rgba(255, 255, 255, .24); }
.av span { position: relative; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.av.sm { width: 38px; height: 38px; font-size: 15px; }
.ctx { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.ctx svg { width: 14px; height: 14px; }
.ctx a:hover { text-decoration: underline; }
.head { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.head .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .nm:hover { text-decoration: underline; }
.head .hd { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.head .tm { margin-left: auto; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.head .tm:hover { text-decoration: underline; }
.text { font: 400 17px/1.55 var(--read); margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 62ch; }
.post.focus .text { font-size: 21px; line-height: 1.5; margin: 10px 0 12px; }
.acts { display: flex; justify-content: space-between; max-width: 400px; margin-left: -8px; }
.acts button {
  display: inline-flex; align-items: center; gap: 4px; min-width: 56px;
  background: none; border: 0; padding: 6px 8px; border-radius: 999px; cursor: pointer;
  color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums;
}
.acts button svg { width: 19px; height: 19px; }
.acts button[data-act="reply"]:hover { color: var(--accent); background: var(--accent-wash); }
.acts button[data-act="repost"]:hover, .acts button[data-act="repost"].on { color: var(--accent); }
.acts button[data-act="repost"]:hover { background: var(--accent-wash); }
.acts button[data-act="like"]:hover { color: var(--rose); background: var(--rose-wash); }
.acts button[data-act="like"].on { color: var(--rose); }
.acts button[data-act="like"].on svg path { fill: currentColor; }
.acts button[data-act="report"]:hover, .acts button[data-act="delete"]:hover { color: var(--danger); background: var(--danger-wash); }
.acts button[data-confirm] { color: var(--danger); font-weight: 600; }
.acts button:disabled { cursor: default; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty svg { width: 40px; height: 40px; color: var(--line); }
.empty b { color: var(--ink); font-size: 17px; }
.section-gap { height: 8px; background: var(--wash); border-bottom: 1px solid var(--line); }

/* ---------- profile ---------- */
.banner { position: relative; overflow: hidden; height: 148px; }
.banner-weave { position: absolute; inset: 0; width: 100%; height: 100%; stroke: rgba(255, 255, 255, .2); }
.prof { padding: 0 18px 16px; border-bottom: 1px solid var(--line); }
.prof .top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -44px; gap: 12px; }
.prof .av { width: 92px; height: 92px; font-size: 36px; box-shadow: 0 0 0 4px var(--paper); }
.prof h2 { font: 800 24px/1.15 var(--ui); letter-spacing: -0.025em; margin: 12px 0 0; }
.prof .hd { color: var(--muted); }
.prof .bio { font: 400 16px/1.55 var(--read); margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.prof .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.prof .facts b { color: var(--ink); font-weight: 700; }
.prof .facts span { display: inline-flex; align-items: center; gap: 6px; }
.prof .facts svg { width: 16px; height: 16px; }

/* ---------- forms ---------- */
.page { padding: 22px 22px 28px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.page h2 { font: 700 19px/1.25 var(--ui); letter-spacing: -0.015em; margin: 0; }
.page.auth { max-width: 440px; margin: 0 auto; border-bottom: 0; padding-top: 34px; }
.page.auth h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
input, textarea.box {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink); font: 400 16px/1.4 var(--ui); padding: 12px 14px;
}
textarea.box { min-height: 96px; resize: vertical; font-family: var(--read); line-height: 1.5; }
input:focus, textarea.box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.never { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.never div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: var(--r-md); background: var(--wash); font-size: 13px; font-weight: 600; text-align: center; }
.never svg { width: 26px; height: 26px; color: var(--muted); }
.never em { font-style: normal; color: var(--accent); font-size: 12px; font-weight: 700; }
.msg { font-size: 14px; border-radius: var(--r-sm); padding: 10px 14px; background: var(--accent-wash); }
.msg.bad { background: var(--danger-wash); color: var(--danger); }
.note { font-size: 13px; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

.ledger { display: flex; flex-direction: column; }
.ledger div { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.ledger div:first-child { border-top: 0; }
.ledger svg { width: 20px; height: 20px; }
.ledger .ok { color: var(--accent); }
.ledger b { font-weight: 600; font-size: 14px; color: var(--muted); }
pre { background: var(--wash); border-radius: var(--r-sm); padding: 12px; font: 12px/1.45 ui-monospace, Menlo, monospace; overflow: auto; max-height: 260px; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--ui); letter-spacing: -0.005em;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--wash); filter: none; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; padding: 14px 20px; font-size: 16px; }

/* ---------- side panel ---------- */
.box { background: var(--wash); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.box h3 { font: 800 20px/1.2 var(--ui); letter-spacing: -0.025em; margin: 0; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rules li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; line-height: 1.35; }
.rules svg { width: 22px; height: 22px; color: var(--accent); margin-top: -1px; }
.rules b { display: block; font-weight: 700; }
.rules span { color: var(--muted); font-size: 14px; }
.people { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; min-width: 0; }
.person:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.person .who { min-width: 0; display: flex; flex-direction: column; }
.person .who b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot { font-size: 13px; color: var(--muted); padding: 0 6px; }

/* ---------- admin ---------- */
.mod { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.mod .why { font-size: 13px; color: var(--danger); font-weight: 600; }
.modhead { padding: 16px 18px 8px; font: 700 17px/1.2 var(--ui); display: flex; align-items: center; gap: 8px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--wash); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.count.hot { background: var(--danger); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; background: var(--wash); font-size: 13px; font-weight: 600; }
.chip svg { width: 14px; height: 14px; color: var(--accent); }
.log { padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }
.fab { display: none; }
.fab[hidden] { display: none !important; }
.mobilebar .av { width: 34px; height: 34px; font-size: 14px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(16, 21, 29, .18);
}

/* ---------- feedback motion (only in answer to a tap) ---------- */
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.38); } 100% { transform: scale(1); } }
.acts button.pop svg { animation: pop .32s ease-out; }
@keyframes fresh { from { background: var(--accent-wash); } to { background: transparent; } }
.post.fresh { animation: fresh 1.8s ease-out; }

/* ---------- responsive ---------- */
@media (max-width: 1159px) {
  .shell { grid-template-columns: 88px minmax(0, 600px); }
  .side { display: none; }
  .rail { padding: 14px 12px; align-items: center; }
  .rail .word, .nav a span, .me-chip .who { display: none; }
  .brand { padding: 8px; align-self: center; }
  .nav a { padding: 12px; align-self: center; }
  .post-cta { width: 52px; height: 52px; padding: 0; align-self: center; }
  .post-cta span { display: none; }
  .post-cta svg { display: block; }
  .me-chip { padding: 6px; justify-content: center; }
  .rail-foot .btn { display: none; }
}
@media (max-width: 699px) {
  .shell { display: block; }
  .rail { display: none; }
  .col { border: 0; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .mobilebar { display: flex; }
  .titlebar { padding: 8px 12px 10px; min-height: 48px; }
  .post, .composer { padding-inline: 14px; }
  .welcome { padding: 24px 16px 22px; }
  .hero-in { padding: 36px 18px 28px; gap: 18px; }
  .page { padding-inline: 16px; }
  .prof { padding-inline: 14px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: grid; place-items: center; height: 56px; color: var(--muted); }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on svg { stroke-width: 2.4; }
  .tabbar svg { width: 26px; height: 26px; }
  .fab {
    display: grid; place-items: center; position: fixed; z-index: 21;
    right: 16px; bottom: calc(72px + env(safe-area-inset-bottom));
    width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(10, 110, 106, .32);
  }
  .fab svg { width: 26px; height: 26px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .never div { padding: 12px 4px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
