/* ============================================================================
   SADO — design tokens
   Direction: editorial print journal. Warm paper, ink, one vermilion accent,
   hairline rules, oversized serif display, mono micro-labels.
   ========================================================================== */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic-ext.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla.woff2') format('woff2');
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla-ext.woff2') format('woff2');
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* surfaces */
  --paper: #f3ede3;
  --paper-2: #fbf7f0;
  --paper-3: #ece4d6;
  --ink: #1a1712;
  --ink-2: #57503f;
  --ink-3: #857a66;
  --line: #ded4c1;
  --line-2: #c9bca4;
  /* accents: exactly two */
  --accent: #c0441c;
  --accent-deep: #8f2f11;
  --accent-wash: #f6e2d8;
  --pine: #1e4a42;
  --pine-wash: #e2ece7;
  /* semantic */
  --ok: #2c6f4a;
  --warn: #9d6d16;
  --danger: #a32a1f;
  --danger-wash: #f7e0dc;
  /* type */
  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Karla', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
  --fs-body: clamp(15px, 0.28vw + 14.2px, 16.5px);
  --fs-h1: clamp(38px, 5.4vw + 12px, 68px);
  --fs-h2: clamp(26px, 2.4vw + 14px, 40px);
  --fs-h3: clamp(19px, 1vw + 14px, 24px);
  /* spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;
  /* shape */
  --radius: 3px;
  --radius-lg: 6px;
  --shell: 1180px;
  --dur: 180ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--fs-body)/1.62 var(--font-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* paper grain — atmosphere without noise */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

img, svg, video { max-width: 100%; }
img { height: auto; display: block; background: var(--paper-3); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

::selection { background: var(--accent); color: #fff6ee; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.main { position: relative; z-index: 1; flex: 1 0 auto; }

/* ------------------------------------------------------------------ layout */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--sp-6); }
.narrow { max-width: 720px; margin: 0 auto; width: 100%; }
.micro {
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius);
  transition: top var(--dur) var(--ease);
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--shell); margin: 0 auto; padding: 0 var(--sp-6);
  height: 64px; display: flex; align-items: center; gap: var(--sp-8);
}
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; }
.brand-mark { color: var(--accent); flex: none; }
.brand-word {
  font-family: var(--font-display); font-size: 27px; line-height: 1;
  letter-spacing: -.025em; color: var(--ink);
}
.topnav { display: flex; align-items: center; gap: var(--sp-6); }
.topnav a {
  position: relative; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; transition: color var(--dur) var(--ease);
}
.topnav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after, .topnav a.is-active::after { transform: scaleX(1); }
.topnav a.is-active { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 0; background: transparent; border-radius: 50%; color: var(--ink-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  position: relative; list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--paper-3); color: var(--ink); }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--accent); color: #fff6ee;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.user-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 8px 0 4px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent;
  list-style: none; transition: background var(--dur) var(--ease);
}
.user-btn::-webkit-details-marker { display: none; }
.user-btn:hover { background: var(--paper-2); }
.user-btn-name { font-size: 13px; font-weight: 500; max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn-caret { color: var(--ink-3); }

/* ------------------------------------------------------------------ dock */
.dock { display: none; }

/* ------------------------------------------------------------------ flash */
.flash-stack {
  position: fixed; right: 20px; top: 76px; z-index: 70;
  display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 40px));
}
.flash {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--pine); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(26, 23, 18, .1);
  animation: flash-in 260ms var(--ease) both;
}
.flash p { margin: 0; font-size: 13.5px; line-height: 1.45; flex: 1; }
.flash-ok { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--danger); }
.flash-info { border-left-color: var(--pine); }
.flash-x {
  border: 0; background: transparent; color: var(--ink-3); font-size: 18px; line-height: 1;
  padding: 0 2px; margin-top: -2px;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ popover */
.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop-sheet {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 218px; padding: 6px; background: var(--paper-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(26, 23, 18, .14);
  animation: pop-in 150ms var(--ease) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pop-head { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); display: grid; gap: 1px; }
.pop-head b { font-size: 14px; font-weight: 600; }
.pop-head span { font-size: 12px; color: var(--ink-3); }
.pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
  border: 0; background: transparent; border-radius: 2px; text-align: left;
  font-size: 13.5px; color: var(--ink); transition: background var(--dur) var(--ease);
}
.pop-item:hover { background: var(--paper-3); }
.pop-item.is-danger { color: var(--danger); }
.pop-item-admin { color: var(--pine); }
.pop-note { display: block; padding: 6px 10px; font-size: 11px; color: var(--ink-3); }
.pop form { margin: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600;
  letter-spacing: .01em; text-align: center; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff6ee; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-pine { background: var(--pine); color: #eef4f1; }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--paper)); }
.btn-danger:hover { background: var(--danger-wash); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .icon { flex: none; }

/* ------------------------------------------------------------------ fields */
.field { display: grid; gap: 6px; margin-bottom: var(--sp-4); }
.field-label {
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2);
}
.field-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.field input, .field textarea, .field select, .input {
  width: 100%; min-height: 44px; padding: 11px 12px; background: var(--paper-2);
  border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); background: #fffdf8;
}
.field-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.field-error { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ chips / avatar */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2);
  background: var(--paper-2); vertical-align: middle;
}
.chip-quiet { border-color: var(--line); color: var(--ink-3); }
.chip-pine { color: var(--pine); border-color: color-mix(in srgb, var(--pine) 35%, var(--paper)); background: var(--pine-wash); }
.chip-accent { color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 35%, var(--paper)); background: var(--accent-wash); }

.ava {
  --ava: 40px; width: var(--ava); height: var(--ava); border-radius: 50%;
  overflow: hidden; flex: none; display: inline-grid; place-items: center;
  background: var(--accent-wash); color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava-ini { font-family: var(--font-display); font-size: calc(var(--ava) * .38); line-height: 1; letter-spacing: 0; }
.ava-dock { --ava: 22px; }
.dot { color: var(--ink-3); }

/* ------------------------------------------------------------------ entries */
.entry {
  display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: var(--sp-5);
  padding: var(--sp-8) 0; border-bottom: 1px solid var(--line); position: relative;
}
.entry:first-of-type { border-top: 1px solid var(--line); }
.entry-rail {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 4px;
}
.entry-idx { color: var(--accent); font-weight: 600; }
.entry-rail-line { width: 22px; height: 1px; background: var(--line-2); margin: 4px 0 6px; }
.entry-rail-num { display: none; }
.entry-head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.entry-ava { flex: none; }
.entry-who { min-width: 0; flex: 1; display: grid; gap: 2px; }
.entry-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.entry-name:hover { color: var(--accent); }
.entry-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: var(--ink-3);
}
.entry-handle { color: var(--ink-2); }
.entry-handle:hover { color: var(--accent); }
.entry-text {
  margin: 14px 0 0; font-size: 15.5px; line-height: 1.68; color: var(--ink);
  max-width: 64ch; overflow-wrap: anywhere;
}
.entry-text + .media-grid { margin-top: var(--sp-4); }

.media-grid { display: grid; gap: 5px; margin-top: var(--sp-4); }
.media-cell {
  display: block; overflow: hidden; background: var(--paper-3);
  border: 1px solid var(--line-2); border-radius: 2px; position: relative;
}
.media-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease); }
.media-cell:hover img { transform: scale(1.025); }
.media-grid.m-1 { grid-template-columns: 1fr; }
.media-grid.m-1 .media-cell { aspect-ratio: 16 / 10; max-height: 520px; }
.media-grid.m-2 { grid-template-columns: 1fr 1fr; }
.media-grid.m-2 .media-cell { aspect-ratio: 4 / 3.2; }
.media-grid.m-3 { grid-template-columns: 1fr 1fr; }
.media-grid.m-3 .media-cell:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8.5; }
.media-grid.m-3 .media-cell { aspect-ratio: 1 / 1; }
.media-grid.m-4 { grid-template-columns: 1fr 1fr; }
.media-grid.m-4 .media-cell { aspect-ratio: 1 / 1; }

.entry-actions { display: flex; align-items: center; gap: var(--sp-5); margin-top: var(--sp-4); }
.act {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0;
  border: 0; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.act:hover { color: var(--accent); }
.act .icon { transition: transform 200ms var(--ease); }
.act:hover .icon { transform: translateY(-1px); }
.act-num { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.act.is-on { color: var(--accent); }
.act.is-on .icon { fill: var(--accent); }
.act.is-on .act-num { color: var(--accent); }
.act.is-on .icon { animation: pop 220ms var(--ease); }
.act-quiet { color: var(--ink-3); margin-left: auto; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* ------------------------------------------------------------------ feed */
.feed-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: var(--sp-16); padding: var(--sp-10) 0 var(--sp-16); }
.feed-main { min-width: 0; }
.feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-bottom: var(--sp-4); }
.feed-title { font-family: var(--font-display); font-size: clamp(32px, 3.4vw, 46px); line-height: 1; letter-spacing: -.02em; }
.feed-sub { font-size: 13.5px; color: var(--ink-2); max-width: 46ch; margin: 8px 0 0; }
.feed-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: 2px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: transparent; transition: all var(--dur) var(--ease);
}
.filter:hover { background: var(--paper-2); color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.rail { position: sticky; top: 88px; align-self: start; display: grid; gap: var(--sp-6); }
.rail-block { border-top: 2px solid var(--ink); padding-top: var(--sp-3); }
.rail-block.rail-soft { border-top-color: var(--line-2); }
.rail-title { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--sp-3); }
.stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row span { font-size: 13px; color: var(--ink-2); }
.stat-row b { font-family: var(--font-mono); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rail-person { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rail-person-main { min-width: 0; flex: 1; display: grid; }
.rail-person-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-person-name:hover { color: var(--accent); }
.rail-person-handle { font-size: 11.5px; color: var(--ink-3); }
.rail-follow {
  height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 2px;
  background: transparent; font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: all var(--dur) var(--ease);
}
.rail-follow:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rail-note {
  font-family: var(--font-display); font-size: 19px; line-height: 1.35; color: var(--ink);
  font-style: italic; margin: 0;
}
.rail-note-src { display: block; margin-top: 8px; font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

.more-row { padding: var(--sp-6) 0; display: flex; justify-content: center; }
.more-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: var(--radius); font-size: 13px; font-weight: 600;
  transition: all var(--dur) var(--ease);
}
.more-btn:hover { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------------ empty */
.empty {
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  background: var(--paper-2); padding: var(--sp-8); border-radius: 2px;
  display: grid; gap: var(--sp-2); justify-items: start;
}
.empty h3 { font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.empty p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 46ch; }
.empty .btn { margin-top: var(--sp-3); }

/* ------------------------------------------------------------------ footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line-2); margin-top: var(--sp-16); background: color-mix(in srgb, var(--paper-3) 45%, var(--paper)); }
.foot-in {
  max-width: var(--shell); margin: 0 auto; padding: var(--sp-10) var(--sp-6) var(--sp-6);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-8);
}
.foot-brand p { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); max-width: 30ch; }
.foot-brand .brand-word { font-size: 30px; }
.foot-col { display: grid; gap: 7px; align-content: start; }
.foot-col h4 { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.foot-col a { font-size: 13.5px; color: var(--ink-2); transition: color var(--dur) var(--ease); }
.foot-col a:hover { color: var(--accent); }
.foot-base {
  max-width: var(--shell); margin: 0 auto; padding: var(--sp-4) var(--sp-6) var(--sp-6);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3);
}
.foot-mono { font-family: var(--font-mono); letter-spacing: .02em; }

/* ------------------------------------------------------------------ dialog */
.dialog {
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 0;
  background: var(--paper-2); color: var(--ink); width: min(460px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(26, 23, 18, .28);
}
.dialog::backdrop { background: rgba(26, 23, 18, .45); backdrop-filter: blur(2px); }
.dialog-form { padding: var(--sp-5); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.dialog-head h2 { font-family: var(--font-display); font-size: 26px; }
.dialog-head .icon-btn { font-size: 22px; line-height: 1; }
.dialog-note { font-size: 13px; color: var(--ink-2); margin-bottom: var(--sp-4); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--sp-2); }

/* ------------------------------------------------------------------ landing */
.landing { padding-bottom: var(--sp-12); }
.hero {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding: clamp(40px, 6vw, 84px) 0 clamp(32px, 4vw, 56px);
}
.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-5); }
.hero-eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(44px, 7.2vw, 88px); line-height: .96;
  letter-spacing: -.032em; margin: 0 0 var(--sp-5); text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-lede { font-size: clamp(15px, 1.1vw + 12px, 17.5px); line-height: 1.62; color: var(--ink-2); max-width: 44ch; margin: 0 0 var(--sp-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: var(--sp-6); font-size: 12px; color: var(--ink-3); }
.hero-proof span { display: inline-flex; align-items: center; gap: 6px; }
.hero-proof span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.hero-stack { position: relative; min-height: 380px; }
.hero-card {
  position: absolute; background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: 3px; padding: 18px 20px; box-shadow: 0 22px 50px rgba(26, 23, 18, .1);
}
.hero-card-a { inset: 0 0 auto 0; transform: rotate(-1.4deg); }
.hero-card-b { right: -6px; bottom: 0; width: min(78%, 300px); transform: rotate(1.6deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hero-card-b .micro { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.hero-card-b .hero-quote { font-family: var(--font-display); font-size: 24px; line-height: 1.28; margin: 8px 0 12px; }
.hero-card-b .hero-sign { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 55%, transparent); }
.hero-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hero-card-img {
  aspect-ratio: 4 / 3; border-radius: 2px; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 20% 10%, #d9a48a 0%, #b05a34 45%, #54261a 100%);
  display: grid; place-items: end start; padding: 12px; overflow: hidden;
}
.hero-card-img span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 246, 238, .8); }
.hero-card-lines { display: grid; gap: 7px; margin-top: 14px; }
.hero-card-lines i { display: block; height: 7px; background: var(--paper-3); border-radius: 1px; }
.hero-card-lines i:nth-child(2) { width: 82%; }
.hero-card-lines i:nth-child(3) { width: 64%; }

.flows { border-top: 1px solid var(--line-2); margin-top: var(--sp-6); }
.flow {
  display: grid; grid-template-columns: 56px 200px 1fr auto; gap: var(--sp-5); align-items: baseline;
  padding: var(--sp-5) 0; border-bottom: 1px solid var(--line);
}
.flow .num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .1em; }
.flow h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.15; }
.flow p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 54ch; }
.flow .icon { color: var(--ink-3); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-6) 0 var(--sp-4); border-bottom: 2px solid var(--ink); flex-wrap: wrap;
}
.section-head h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.02em; }
.section-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.section-link { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--accent); }

.public-spread { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.public-spread .entry { border-bottom: 1px solid var(--line); grid-template-columns: 1fr; padding: var(--sp-6) var(--sp-6) var(--sp-6) 0; }
.public-spread .entry:nth-child(odd) { padding-right: var(--sp-6); border-right: 1px solid var(--line); }
.public-spread .entry:nth-child(even) { padding-left: var(--sp-6); padding-right: 0; }
.public-spread .entry-rail { display: none; }

/* ------------------------------------------------------------------ auth */
.auth {
  display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100dvh - 64px);
}
.auth-art {
  position: relative; padding: clamp(32px, 5vw, 64px); border-right: 1px solid var(--line-2);
  background:
    radial-gradient(90% 70% at 15% 10%, rgba(192, 68, 28, .12) 0%, transparent 60%),
    radial-gradient(70% 60% at 85% 85%, rgba(30, 74, 66, .1) 0%, transparent 65%),
    var(--paper-3);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-10); overflow: hidden;
}
.auth-art .brand-word { font-size: 30px; }
.auth-art h1 {
  font-family: var(--font-display); font-size: clamp(38px, 4.4vw, 62px); line-height: .98;
  letter-spacing: -.03em; max-width: 13ch;
}
.auth-art h1 em { font-style: italic; color: var(--accent); }
.auth-art p { color: var(--ink-2); max-width: 38ch; font-size: 14.5px; margin-top: var(--sp-4); }
.auth-lines { display: grid; gap: 0; margin-top: var(--sp-6); border-top: 1px solid var(--line-2); }
.auth-line { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.auth-line .icon { color: var(--accent); flex: none; }
.auth-art-foot { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.auth-form-wrap { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) var(--sp-6); }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2, .auth-form h1 { font-family: var(--font-display); font-size: clamp(30px, 3vw, 40px); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-form .auth-note { font-size: 13.5px; color: var(--ink-2); margin: 0 0 var(--sp-6); }
.auth-form .btn { margin-top: var(--sp-2); }
.auth-alt { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.auth-alt a { font-weight: 600; color: var(--accent); }
.form-errors {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--paper));
  background: var(--danger-wash); border-radius: 2px; padding: 10px 12px; margin-bottom: var(--sp-4);
  font-size: 13px; color: var(--danger); display: grid; gap: 4px;
}
.form-errors ul { margin: 0; padding-left: 16px; }

/* ------------------------------------------------------------------ compose */
.compose { max-width: 720px; margin: 0 auto; padding: var(--sp-8) var(--sp-6) var(--sp-16); }
.compose-card { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 3px; padding: var(--sp-6); }
.compose-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-5); }
.compose-head .ava { --ava: 44px; }
.compose-title { font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
.compose-sub { font-size: 12.5px; color: var(--ink-3); }
.compose-area {
  width: 100%; min-height: 170px; padding: 4px 0; border: 0; background: transparent;
  font-size: 17px; line-height: 1.62; resize: vertical; color: var(--ink);
}
.compose-area:focus { outline: none; }
.compose-area::placeholder { color: var(--ink-3); }
.compose-tools { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.compose-count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.compose-count.is-warn { color: var(--warn); }
.upload-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  border: 1px dashed var(--line-2); border-radius: 2px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; transition: all var(--dur) var(--ease);
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: var(--sp-4) 0 0; }
.preview-cell { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: var(--paper-3); }
.preview-cell img { width: 100%; height: 100%; object-fit: cover; }
.preview-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: rgba(26, 23, 18, .72); color: #fff; font-size: 14px;
  line-height: 1; display: grid; place-items: center;
}
.compose-meta { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.visibility-set { display: flex; flex-wrap: wrap; gap: 6px; }
.visibility-set label { position: relative; }
.visibility-set input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.visibility-set span {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 2px; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; transition: all var(--dur) var(--ease);
}
.visibility-set input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.visibility-set input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: var(--sp-5); flex-wrap: wrap; }
.compose-hint { font-size: 12px; color: var(--ink-3); max-width: 44ch; }

/* ------------------------------------------------------------------ profile */
.profile-wrap { padding-bottom: var(--sp-12); }
.profile-cover {
  position: relative; height: clamp(170px, 24vw, 290px); border-bottom: 1px solid var(--line-2);
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(26, 23, 18, .04) 0 1px, transparent 1px 9px),
    radial-gradient(80% 120% at 20% 0%, rgba(192, 68, 28, .16), transparent 60%),
    var(--paper-3);
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-inner { max-width: var(--shell); margin: 0 auto; padding: 0 var(--sp-6); }
.profile-ident { display: flex; align-items: flex-end; gap: var(--sp-5); margin-top: -52px; flex-wrap: wrap; position: relative; }
.profile-ava {
  --ava: 108px; border: 4px solid var(--paper); box-shadow: 0 2px 10px rgba(26, 23, 18, .12);
  border-radius: 50%;
}
.profile-ident-main { flex: 1; min-width: 240px; padding-bottom: 6px; }
.profile-name { font-family: var(--font-display); font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -.025em; }
.profile-handle { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.profile-actions { display: flex; gap: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.profile-bio { margin: var(--sp-5) 0 0; font-size: 15px; line-height: 1.62; color: var(--ink); max-width: 60ch; white-space: pre-line; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: var(--sp-3); font-size: 12.5px; color: var(--ink-3); }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-stats { display: flex; gap: clamp(20px, 4vw, 44px); margin-top: var(--sp-5); padding: var(--sp-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.profile-stat b { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.profile-stat span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--sp-12); margin-top: var(--sp-6); }

.tabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-4); }
.tabs a { position: relative; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.tabs a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.tabs a.is-active { color: var(--ink); }
.tabs a.is-active::after { background: var(--accent); }
.tabs a:hover { color: var(--ink); }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
  position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line-2); border-radius: 2px;
  overflow: hidden; background: var(--paper-3); display: block;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease); }
.tile:hover img { transform: scale(1.035); }
.tile-over {
  position: absolute; inset: auto 0 0 0; padding: 24px 10px 9px;
  background: linear-gradient(transparent, rgba(20, 18, 14, .82));
  color: #fff6ee; opacity: 0; transition: opacity var(--dur) var(--ease);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
}
.tile:hover .tile-over, .tile:focus-visible .tile-over { opacity: 1; }
.tile-quote {
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--paper-2);
}
.tile-quote p {
  font-family: var(--font-display); font-size: 17px; line-height: 1.3; margin: 0;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
}
.tile-quote .tile-date { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.profile-side { position: sticky; top: 88px; align-self: start; display: grid; gap: var(--sp-6); }
.side-title { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: var(--sp-3); }
.friends-row { display: flex; flex-wrap: wrap; gap: 8px; }
.friends-row a { display: block; }
.locked {
  border: 1px dashed var(--line-2); border-radius: 2px; padding: var(--sp-8);
  display: grid; gap: 8px; justify-items: start; background: var(--paper-2);
}
.locked h3 { font-family: var(--font-display); font-size: 24px; }
.locked p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 44ch; }

/* ------------------------------------------------------------------ post detail */
.post-page { max-width: 740px; margin: 0 auto; padding: var(--sp-6) var(--sp-6) var(--sp-16); }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: var(--sp-4); }
.post-back { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.post-back:hover { color: var(--accent); }
.post-author { display: flex; align-items: center; gap: 12px; padding: var(--sp-4) 0; border-top: 1px solid var(--line-2); }
.post-author-main { display: grid; gap: 1px; }
.post-author-name { font-size: 15px; font-weight: 700; }
.post-author-name:hover { color: var(--accent); }
.post-author-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.post-body { font-size: clamp(17px, 1.2vw + 14px, 20px); line-height: 1.68; color: var(--ink); overflow-wrap: anywhere; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-media-stack { display: grid; gap: 10px; margin: var(--sp-5) 0; }
.post-media-stack figure { margin: 0; }
.post-media-stack img { width: 100%; border: 1px solid var(--line-2); border-radius: 2px; }
.post-media-stack figcaption { margin-top: 6px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.post-actions { display: flex; align-items: center; gap: var(--sp-5); padding: var(--sp-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: var(--sp-5) 0 var(--sp-6); }
.post-actions .act { font-size: 13.5px; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-2); }
.comments-head h2 { font-family: var(--font-display); font-size: 26px; }
.comments-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.comment { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: var(--sp-4) 0; border-bottom: 1px dotted var(--line-2); }
.comment-main { min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.comment-name { font-size: 13.5px; font-weight: 700; }
.comment-name:hover { color: var(--accent); }
.comment-time { font-size: 11.5px; color: var(--ink-3); }
.comment-body { font-size: 14.5px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.comment-del { border: 0; background: transparent; color: var(--ink-3); padding: 2px; border-radius: 2px; }
.comment-del:hover { color: var(--danger); }
.comment-form { margin-top: var(--sp-5); display: grid; gap: 10px; }
.comment-form textarea { min-height: 84px; }
.comment-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-signed { font-size: 12px; color: var(--ink-3); }

/* ------------------------------------------------------------------ search / people */
.search-hero { padding: var(--sp-8) 0 var(--sp-5); border-bottom: 1px solid var(--line-2); }
.search-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -.025em; margin-bottom: var(--sp-5); }
.search-form { display: flex; gap: 8px; }
.search-form input {
  flex: 1; height: 52px; padding: 0 16px; font-size: 17px; background: var(--paper-2);
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.search-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.seg { display: flex; gap: 6px; margin: var(--sp-4) 0 var(--sp-2); flex-wrap: wrap; }
.result-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.person-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.person-row:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.person-main { min-width: 0; }
.person-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-name:hover { color: var(--accent); }
.person-handle { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.person-bio { font-size: 13px; color: var(--ink-2); margin: 3px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.people-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: var(--sp-5) 0 var(--sp-8); }
.person-card { border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 3px; padding: var(--sp-5); display: grid; gap: 10px; align-content: start; }
.person-card-top { display: flex; align-items: center; gap: 12px; }
.person-card .person-bio { -webkit-line-clamp: 3; }
.person-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.person-stat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* ------------------------------------------------------------------ notifications */
.notif-page { max-width: 760px; margin: 0 auto; padding: var(--sp-8) var(--sp-6) var(--sp-16); }
.notif-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-bottom: var(--sp-4); border-bottom: 2px solid var(--ink); }
.notif-head h1 { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 46px); line-height: 1; letter-spacing: -.02em; }
.notif-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); position: relative; }
.notif-row.is-unread { background: color-mix(in srgb, var(--accent-wash) 45%, transparent); }
.notif-row.is-unread::before { content: ''; position: absolute; left: -12px; top: 14px; bottom: 14px; width: 2px; background: var(--accent); }
.notif-main { min-width: 0; }
.notif-text { font-size: 14px; line-height: 1.5; margin: 0; }
.notif-text b { font-weight: 700; }
.notif-text a { font-weight: 700; }
.notif-text a:hover { color: var(--accent); }
.notif-when { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; display: block; }
.notif-actions { display: flex; gap: 6px; align-items: center; }
.notif-excerpt { font-size: 13px; color: var(--ink-2); font-style: italic; margin: 4px 0 0; }
.notif-quote { font-family: var(--font-display); font-size: 17px; line-height: 1.35; color: var(--ink); margin: 6px 0 0; }

/* ------------------------------------------------------------------ settings */
.settings-wrap { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: var(--sp-12); padding: var(--sp-8) 0 var(--sp-16); }
.settings-nav { position: sticky; top: 88px; align-self: start; display: grid; gap: 1px; }
.settings-nav a { padding: 8px 10px; font-size: 13px; color: var(--ink-2); border-left: 2px solid transparent; }
.settings-nav a:hover { background: var(--paper-2); color: var(--ink); }
.settings-nav a.is-active { border-left-color: var(--accent); background: var(--paper-2); color: var(--ink); font-weight: 600; }
.settings-nav .micro { padding: 0 10px var(--sp-2); }
.set-card { border-top: 2px solid var(--ink); padding-top: var(--sp-4); margin-bottom: var(--sp-10); max-width: 640px; }
.set-card:last-child { margin-bottom: 0; }
.set-card h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.05; margin-bottom: 4px; }
.set-card .set-note { font-size: 13px; color: var(--ink-2); margin: 0 0 var(--sp-5); max-width: 52ch; }
.set-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
.set-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px dotted var(--line-2); }
.set-row:last-of-type { border-bottom: 0; }
.set-row-main { min-width: 0; }
.set-row-main b { display: block; font-size: 14px; font-weight: 600; }
.set-row-main span { font-size: 12.5px; color: var(--ink-3); }
.set-actions { display: flex; gap: 8px; margin-top: var(--sp-4); flex-wrap: wrap; }
.avatar-edit { display: flex; align-items: center; gap: var(--sp-4); padding-bottom: var(--sp-5); }
.avatar-edit .ava { --ava: 72px; }
.cover-edit { margin-bottom: var(--sp-5); }
.cover-preview {
  height: 120px; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(26, 23, 18, .05) 0 1px, transparent 1px 8px), var(--paper-3);
  display: grid; place-items: center; font-size: 12px; color: var(--ink-3); margin-bottom: 8px;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--paper)); background: color-mix(in srgb, var(--danger-wash) 55%, var(--paper-2)); border-radius: 2px; padding: var(--sp-4); }
.danger-zone b { color: var(--danger); }
.danger-zone p { font-size: 12.5px; color: var(--ink-2); margin: 4px 0 var(--sp-3); }

/* ------------------------------------------------------------------ admin */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-8) 0 var(--sp-4); border-bottom: 2px solid var(--ink); }
.admin-head h1 { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 48px); line-height: 1; letter-spacing: -.02em; }
.admin-head .admin-who { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.admin-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); overflow-x: auto; }
.admin-tabs a { padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-tabs a:hover { color: var(--ink); background: var(--paper-2); }
.admin-tabs a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.admin-body { padding-bottom: var(--sp-16); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: var(--sp-6); }
.kpi { border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 3px; padding: var(--sp-4); }
.kpi b { display: block; font-family: var(--font-mono); font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.kpi.is-accent b { color: var(--accent); }
.kpi.is-pine b { color: var(--pine); }
.admin-section { margin-bottom: var(--sp-8); }
.admin-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-3); }
.admin-section-head h2 { font-family: var(--font-display); font-size: 24px; }
.table-wrap { border: 1px solid var(--line-2); border-radius: 3px; background: var(--paper-2); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th {
  text-align: left; padding: 10px 12px; font-size: 10px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2);
  background: var(--paper-3); white-space: nowrap;
}
table.data td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: color-mix(in srgb, var(--paper-3) 45%, transparent); }
table.data .num { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.table-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.table-user b { font-size: 13px; font-weight: 600; display: block; }
.table-user span { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.table-cell-text { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 2px; }
.admin-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.admin-empty { padding: var(--sp-6); text-align: center; color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------------ errors / about */
.error-page { max-width: 620px; margin: 0 auto; padding: clamp(48px, 10vw, 120px) var(--sp-6); }
.error-code { font-family: var(--font-display); font-size: clamp(72px, 14vw, 132px); line-height: .8; color: var(--accent); letter-spacing: -.04em; }
.error-page h1 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.06; margin: var(--sp-4) 0 var(--sp-3); }
.error-page p { color: var(--ink-2); max-width: 48ch; }
.error-page .btn { margin-top: var(--sp-4); }

.about-page { max-width: 760px; margin: 0 auto; padding: var(--sp-10) var(--sp-6) var(--sp-16); }
.about-page h1 { font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); line-height: .98; letter-spacing: -.03em; margin-bottom: var(--sp-4); }
.about-page h1 em { font-style: italic; color: var(--accent); }
.about-page h2 { font-family: var(--font-display); font-size: 28px; margin: var(--sp-8) 0 var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--line-2); }
.about-page p, .about-page li { color: var(--ink-2); font-size: 15px; line-height: 1.68; }
.about-page ul { padding-left: 18px; margin: 0 0 var(--sp-4); display: grid; gap: 6px; }
.about-page li b { color: var(--ink); }
.about-lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink) !important; }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  .entry, .person-card, .notif-row, .kpi, .set-card {
    animation: rise 380ms var(--ease) both;
  }
  .entry:nth-child(2) { animation-delay: 45ms; }
  .entry:nth-child(3) { animation-delay: 90ms; }
  .entry:nth-child(4) { animation-delay: 135ms; }
  .entry:nth-child(5) { animation-delay: 180ms; }
  .entry:nth-child(n+6) { animation-delay: 210ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: none; }
  }
  .hero h1, .auth-art h1, .profile-name { animation: rise 460ms var(--ease) both; }
  .hero-lede, .auth-art p { animation: rise 460ms 80ms var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .feed-wrap { grid-template-columns: minmax(0, 1fr) 260px; gap: var(--sp-8); }
  .profile-grid { grid-template-columns: minmax(0, 1fr) 240px; gap: var(--sp-8); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .feed-wrap { grid-template-columns: 1fr; }
  .rail {
    position: static; grid-template-columns: 1fr 1fr; display: grid; gap: var(--sp-6);
    border-top: 1px solid var(--line-2); padding-top: var(--sp-6);
  }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { border-right: 0; border-bottom: 1px solid var(--line-2); padding: var(--sp-8) var(--sp-6); gap: var(--sp-6); }
  .auth-art h1 { font-size: clamp(34px, 7vw, 48px); }
  .auth-lines { display: none; }
  .auth-form-wrap { padding: var(--sp-8) var(--sp-6) var(--sp-12); }
  .auth-form { max-width: 440px; }
  .hero { grid-template-columns: 1fr; }
  .hero-stack { min-height: 340px; max-width: 460px; }
  .flow { grid-template-columns: 40px 1fr; gap: 4px var(--sp-4); }
  .flow p { grid-column: 2; }
  .flow .icon { display: none; }
  .public-spread { grid-template-columns: 1fr; }
  .public-spread .entry, .public-spread .entry:nth-child(odd), .public-spread .entry:nth-child(even) {
    padding: var(--sp-5) 0; border-right: 0;
  }
  .settings-wrap { grid-template-columns: 1fr; gap: var(--sp-6); }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
  .settings-nav .micro { display: none; }
  .settings-nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 8px 12px; }
  .settings-nav a.is-active { border-bottom-color: var(--accent); }
}
@media (max-width: 760px) {
  :root { --shell: 100%; }
  body { padding-bottom: 58px; }
  .shell, .topbar-in, .profile-inner, .foot-in, .foot-base { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .topnav { display: none; }
  .user-btn-name, .user-btn-caret { display: none; }
  .user-btn { padding: 0 4px; border: 0; }
  .topbar-search { display: none; }
  .topbar-in { gap: var(--sp-3); height: 58px; }

  .dock {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--paper-2) 96%, transparent);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line-2);
  }
  .dock-item {
    display: grid; justify-items: center; gap: 2px; font-size: 9.5px; letter-spacing: .02em;
    color: var(--ink-3); height: 100%; align-content: center; position: relative;
  }
  .dock-item.is-active { color: var(--ink); }
  .dock-item.is-active .icon { color: var(--accent); }
  .dock-badge {
    position: absolute; top: 6px; right: calc(50% - 18px); min-width: 15px; height: 15px;
    border-radius: 8px; background: var(--accent); color: #fff; font-style: normal;
    font-size: 9px; font-weight: 700; line-height: 15px; text-align: center; padding: 0 3px;
  }
  .dock-new {
    width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff6ee;
    display: grid; place-items: center; margin: -18px auto 0;
    box-shadow: 0 6px 18px rgba(143, 47, 17, .3);
  }

  .entry { grid-template-columns: 1fr; padding: var(--sp-6) 0; }
  .entry-rail { display: none; }
  .entry-text { font-size: 15px; }
  .entry-actions { gap: var(--sp-4); }
  .entry:first-of-type { border-top: 0; }
  .feed-head { padding-top: var(--sp-2); }
  .feed-wrap { padding-top: var(--sp-6); }
  .rail { grid-template-columns: 1fr; }

  .tile-grid { grid-template-columns: 1fr 1fr; }
  .profile-ident { margin-top: -44px; gap: var(--sp-4); }
  .profile-ava { --ava: 84px; }
  .profile-actions { width: 100%; padding-bottom: 0; }
  .profile-actions .btn { flex: 1; }
  .profile-stats { gap: var(--sp-6); }
  .profile-side { grid-template-columns: 1fr; }

  .people-grid { grid-template-columns: 1fr; }
  .set-split { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .foot-brand { grid-column: 1 / -1; }
  .post-page { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .notif-page, .compose { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .comment { grid-template-columns: 32px minmax(0, 1fr); }
  .comment-del { grid-column: 2; justify-self: start; }
  .flash-stack { top: auto; bottom: 74px; right: 12px; left: 12px; max-width: none; }
  .search-form input { font-size: 16px; }
  .dialog { width: calc(100vw - 24px); }
  .admin-head { padding-top: var(--sp-6); }
  .kpi b { font-size: 22px; }
}
@media (max-width: 520px) {
  .hero { padding-top: var(--sp-6); }
  .hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .hero-stack { min-height: 300px; }
  .hero-card-b { width: 84%; }
  .media-grid.m-3 .media-cell:first-child { aspect-ratio: 4 / 3; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-name { font-size: 34px; }
  .profile-meta { font-size: 11.5px; }
  .act-text { display: none; }
  .foot-base { flex-direction: column; gap: 4px; }
  .search-hero h1 { font-size: 34px; }
  .person-row { grid-template-columns: 40px minmax(0, 1fr); }
  .person-row > .btn, .person-row > form { grid-column: 2; justify-self: start; }
  .tile-quote p { font-size: 15px; -webkit-line-clamp: 4; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ------------------------------------------------------------------ fixes */
.entry-main, .profile-main, .feed-main, .person-main, .notif-main, .set-row-main { min-width: 0; }
.flash-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--pine); flex: none; margin-top: 6px; }
.flash-ok .flash-mark { background: var(--ok); }
.flash-error .flash-mark { background: var(--danger); }
.compose-top { margin-bottom: 14px; }

.foot-base a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
