/* ==========================================================
   Public Voice — prototype stylesheet
   Sofia Pro Medium (licensed webfont, loaded locally)
   ========================================================== */

@font-face {
  font-family: 'Sofia Pro';
  src: url('fonts/sofiapro-medium-webfont.woff2') format('woff2'),
       url('fonts/sofiapro-medium-webfont.woff') format('woff');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-latin-ext-400.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-latin-400.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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sentient';
  src: url('fonts/sentient-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sentient';
  src: url('fonts/sentient-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@property --ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #111111;
}
@property --ink-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #6f6f6f;
}
@property --ink-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #a3a3a3;
}
@property --line {
  syntax: "<color>";
  inherits: true;
  initial-value: #e9e9e9;
}
@property --tint {
  syntax: "<color>";
  inherits: true;
  initial-value: #f8f8f8;
}
@property --tint-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2f2f2;
}
@property --paper {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffffff;
}
@property --text-soft {
  syntax: "<color>";
  inherits: true;
  initial-value: #262626;
}
@property --quote-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #3a3a3a;
}
@property --on-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffffff;
}
@property --ink-hover {
  syntax: "<color>";
  inherits: true;
  initial-value: #333333;
}
@property --scroll {
  syntax: "<color>";
  inherits: true;
  initial-value: #dcdcdc;
}
@property --scrim {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(17, 17, 17, 0.28);
}

:root {
  --ink: #111111;
  --ink-2: #6f6f6f;      /* secondary text */
  --ink-3: #a3a3a3;      /* tertiary / placeholders */
  --line: #e9e9e9;       /* 1px structural rule */
  --tint: #f8f8f8;       /* flat surface (notes, action cells) */
  --tint-2: #f2f2f2;     /* selected / hover */
  --paper: #ffffff;
  --text-soft: #262626;  /* note text */
  --quote-ink: #3a3a3a;  /* imported quote text */
  --on-ink: #ffffff;     /* text on ink-filled controls */
  --ink-hover: #333333;
  --scroll: #dcdcdc;
  --scrim: rgba(17, 17, 17, 0.28);
  --font-ui: 'Sofia Pro', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'DM Sans', Arial, Helvetica, sans-serif;
  --font-body-weight: 400;
  color-scheme: light;

  --pv-wide-layout-min: 1441px;
  --bar: 72px;
  --rail: clamp(320px, 23vw, 408px);
  --author: 212px;
  --note: clamp(300px, 23vw, 392px);
  --pad: 40px;           /* main horizontal padding */
  --note-cell: 44px;     /* square note/contribution action cells (prev, next, quote, add) */
  --rail-pad: 32px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --motion-fast: 120ms;
  --motion-standard: 170ms;
  --motion-content: 160ms;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* Suppress focus chrome only when the browser says keyboard focus is not visible. */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }
:root[data-pv-pointer-focus] .brand:focus-visible { outline: none; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }

/* ----------------------------------------------------------
   Top bar
   ---------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--bar) var(--bar) var(--bar) var(--note);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar > * { display: flex; align-items: center; }

.brand {
  gap: 14px;
  padding: 0 var(--rail-pad);
  border-right: 1px solid var(--line);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 40px; height: 40px; display: block; flex: none; margin-left: -4px; }

.bar-context {
  padding: 0 var(--pad);
  font-size: 15px;
  color: var(--ink-3);
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.bar-context > * { opacity: 0; transform: translateY(4px); transition: opacity var(--motion-standard), transform var(--motion-standard) var(--ease); }
.bar-context.show > * { opacity: 1; transform: none; }
.bar-context span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bar-context b { font-weight: inherit; color: var(--ink-2); }
.bar-context .sep { color: var(--line); }

.site-menu-control { position: relative; justify-content: center; }
.site-menu-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bar);
  height: 100%;
  color: var(--ink-2);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.site-menu-toggle:hover,
.site-menu-toggle[aria-expanded="true"] { background: var(--tint); color: var(--ink); }
.site-menu-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}
.site-menu-toggle .icon { width: 20px; height: 20px; }
.site-menu-toggle .close-glyph { display: none; }
.site-menu-toggle[aria-expanded="true"] .menu-glyph { display: none; }
.site-menu-toggle[aria-expanded="true"] .close-glyph { display: block; }
.account-drawer-scrim[hidden],
.account-drawer[hidden] { display: none !important; }
.account-drawer-scrim {
  position: fixed;
  z-index: 129;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--scrim);
  opacity: 1;
}
.account-drawer {
  position: fixed;
  z-index: 130;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: var(--note);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 220ms var(--ease), visibility 0s linear 220ms;
}
.account-drawer.is-open,
.account-drawer.is-closing {
  visibility: visible;
  transition: transform 220ms var(--ease), visibility 0s;
}
.account-drawer.is-open { transform: translateX(0); }
.account-drawer.is-closing { transform: translateX(100%); }
.account-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  min-height: var(--bar);
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
}
.account-drawer-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  color: var(--ink-2);
}
.account-drawer-close:hover { color: var(--ink); background: var(--tint); }
.account-drawer-profile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  column-gap: 18px;
  row-gap: 18px;
  flex: none;
  padding: 28px var(--pad) 24px;
  border-bottom: 1px solid var(--line);
}
.account-drawer-profile .account-drawer-avatar { width: 72px; height: 72px; }
.account-drawer-member { min-width: 0; }
.account-drawer-name {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}
.account-drawer-username {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.account-drawer-profile-link {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  gap: 8px;
  min-height: 40px;
  color: var(--ink-2);
  font-size: 14px;
}
.account-drawer-profile-link:hover { color: var(--ink); }
.account-drawer-nav { flex: none; }
.account-drawer-nav a,
.account-drawer-nav button,
.account-drawer-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.account-drawer-nav a:hover,
.account-drawer-nav button:hover,
.account-drawer-nav a:focus-visible,
.account-drawer-nav button:focus-visible,
.account-drawer-profile-link:focus-visible,
.account-drawer-close:focus-visible,
.account-drawer-logout:hover,
.account-drawer-logout:focus-visible {
  background: var(--tint);
  color: var(--ink);
}
.account-drawer-nav a:focus-visible,
.account-drawer-nav button:focus-visible,
.account-drawer-profile-link:focus-visible,
.account-drawer-close:focus-visible,
.account-drawer-logout:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}
.account-drawer-icon { width: 20px; height: 20px; }
.account-drawer-row-label { min-width: 0; }
.account-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.account-unread-badge[hidden] { display: none !important; }
.account-unread-trigger-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 1;
  border: 1px solid var(--paper);
}
.account-drawer-logout {
  justify-content: flex-start;
  margin-top: auto;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  cursor: pointer;
}
.account-drawer-status:not([hidden]) {
  flex: none;
  margin: 0;
  padding: 12px var(--pad);
  color: var(--ink-2);
  font-size: 13px;
}
.pv-account-drawer-open { overscroll-behavior: none; }
@media (min-width: 861px) and (max-width: 1023px) {
  .account-drawer { width: min(300px, 100%); }
}
@media (max-width: 860px) {
  .account-drawer { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .account-drawer { transition: none !important; }
}

.theme-toggle { width: var(--bar); justify-content: center; }

.account {
  position: relative;
  width: var(--bar);
  justify-content: center;
  border-left: 1px solid var(--line);
}

.bar-action {
  display: none;
  justify-content: space-between;
  padding: 0 var(--pad) 0 32px;
  border-left: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink-2);
  font-size: 17px;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.bar-action:hover { background: var(--tint-2); color: var(--ink); }
.bar-utility-cell {
  display: none;
  position: relative;
  align-items: stretch;
  min-width: 0;
  border-left: 1px solid var(--line);
}
.bar-utility-cell .home-aside-header { width: 100%; height: 100%; }
:root.pv-wide-desktop .bar-utility-cell .bar-utility-header {
  display: flex;
  position: relative;
  z-index: 26;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
}
:root.pv-wide-desktop .bar-utility-cell .home-aside-heading {
  width: 100%;
  height: 100%;
  padding: 0;
  border-bottom: 0;
  font-size: 19px;
}
:root.pv-wide-desktop .bar-utility-cell .home-utility-toggle {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 16px 0 var(--pad);
  font-size: 19px;
  background: var(--tint);
  transition: background var(--motion-fast), color var(--motion-fast);
}
:root.pv-wide-desktop .bar-utility-cell .thread-utility-header .home-utility-toggle {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  width: auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 14px 0 var(--pad);
  font-size: 19px;
  background: var(--tint);
  transition: background var(--motion-fast), color var(--motion-fast);
}
:root.pv-wide-desktop .bar-utility-cell .thread-utility-header .home-utility-toggle:hover,
:root.pv-wide-desktop .bar-utility-cell .thread-utility-header .home-utility-toggle:focus-visible,
:root.pv-wide-desktop .bar-utility-cell .thread-utility-header .home-utility-toggle[aria-expanded="true"] {
  background: var(--tint-2);
  color: var(--ink);
}
:root.pv-wide-desktop .bar-utility-cell .utility-header-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 14px 0 var(--pad);
  color: var(--ink);
  font-size: 19px;
  background: var(--tint);
}
:root.pv-wide-desktop .bar-utility-cell .home-utility-menu-toggle {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  background: var(--tint);
  color: var(--ink-2);
  transition: background var(--motion-fast), color var(--motion-fast);
}
:root.pv-wide-desktop .bar-utility-cell .wide-home-utility-toggle {
  flex: 1 1 auto;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  padding: 0 var(--pad);
  color: var(--ink);
  font-size: 19px;
}
:root.pv-wide-desktop .bar-utility-cell .wide-home-utility-toggle .home-utility-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  height: 100%;
  color: var(--ink);
  font-size: inherit;
}
:root.pv-wide-desktop .bar-utility-cell .home-utility-menu-toggle:hover,
:root.pv-wide-desktop .bar-utility-cell .home-utility-menu-toggle:focus-visible,
:root.pv-wide-desktop .bar-utility-cell .home-utility-menu-toggle[aria-expanded="true"] {
  background: var(--tint-2);
  color: var(--ink);
}
:root.pv-wide-desktop .bar-utility-cell .thread-utility-panel-toggle {
  flex: 0 0 var(--bar);
  border-left: 1px solid var(--line);
}
:root.pv-wide-desktop .utility-header-menu {
  position: absolute;
  z-index: 26;
  top: 100%;
  right: 0;
  width: 100%;
  max-height: calc(100vh - var(--bar) - 8px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
:root.pv-wide-desktop .bar-utility-cell .home-utility-toggle:hover,
:root.pv-wide-desktop .bar-utility-cell .home-utility-toggle:focus-visible,
:root.pv-wide-desktop .bar-utility-cell .home-utility-toggle[aria-expanded="true"] {
  background: var(--tint-2);
  color: var(--ink);
}

.desktop-utility-panel { display: none; }
.desktop-utility-panel[hidden] { display: none !important; }
.utility-drawer-scrim { display: none; }
.utility-drawer-scrim[hidden] { display: none !important; }
.utility-panel-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bar);
  height: 100%;
  color: var(--ink-2);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.utility-panel-toggle:hover,
.utility-panel-toggle[aria-expanded="true"] {
  background: var(--tint);
  color: var(--ink);
}
.utility-panel-toggle .close-glyph { display: none; }
.utility-panel-toggle[aria-expanded="true"] .panel-glyph { display: none; }
.utility-panel-toggle[aria-expanded="true"] .close-glyph { display: block; }
.utility-context-return {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
}
.utility-context-return .icon { width: 16px; height: 16px; flex: none; }
.utility-context-return:hover,
.utility-context-return:focus-visible {
  background: var(--tint);
  color: var(--ink);
}
.home-utility-menu {
  position: static;
  width: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.home-utility-menu[hidden] { display: none !important; }
.home-utility-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.home-utility-option:last-child { border-bottom: 0; }
.home-utility-option:hover,
.home-utility-option[aria-checked="true"] {
  background: var(--tint);
  color: var(--ink);
}
.home-utility-option-count {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.utility-drawer-header .home-aside-heading {
  display: flex;
  align-items: center;
  height: 68px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.3;
}
.utility-drawer-header .utility-header-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 14px 0 var(--pad);
  color: var(--ink);
  font-size: 19px;
  background: var(--tint);
}
.utility-drawer-header .home-utility-menu-toggle {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  color: var(--ink-2);
  background: var(--tint);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.utility-drawer-header .home-utility-menu-toggle:hover,
.utility-drawer-header .home-utility-menu-toggle:focus-visible,
.utility-drawer-header .home-utility-menu-toggle[aria-expanded="true"] {
  background: var(--tint-2);
  color: var(--ink);
}
.utility-rail-content {
  min-width: 0;
  min-height: 100%;
}
#desktopUtilityPanel:has(.home-aside-updates):not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#desktopUtilityPanel:has(.home-aside-updates) > .utility-rail-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#desktopUtilityPanel .home-aside-updates {
  position: static;
  top: auto;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}

/* ----------------------------------------------------------
   Shell
   ---------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: calc(100vh - var(--bar));
}

/* ----------------------------------------------------------
   Left rail
   ---------------------------------------------------------- */
.rail {
  position: sticky;
  top: var(--bar);
  height: calc(100vh - var(--bar));
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.pane {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}
.pane > * { flex-shrink: 0; }
.pane > .rail-page-viewport {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
.pane > .rail-page-viewport > .list,
.pane > .rail-page-viewport > .empty,
.pane > .rail-page-viewport > .page-slide {
  flex: 0 0 auto;
}
.pane > .rail-page-viewport.is-transitioning { overflow: hidden; }
.pane > .rail-page-viewport > .empty { padding: 20px var(--rail-pad); }

.page-slide {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}
.page-slide-layer {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  transition: transform 200ms var(--ease);
  will-change: transform;
}
.page-slide-layer[aria-hidden="true"] { pointer-events: none; }
.page-slide-layer[data-role="incoming"][data-direction="next"] { transform: translateX(100%); }
.page-slide-layer[data-role="incoming"][data-direction="previous"] { transform: translateX(-100%); }
.page-slide.is-running .page-slide-layer[data-role="outgoing"][data-direction="next"] { transform: translateX(-100%); }
.page-slide.is-running .page-slide-layer[data-role="outgoing"][data-direction="previous"] { transform: translateX(100%); }
.page-slide.is-running .page-slide-layer[data-role="incoming"] { transform: none; }
.rail-page-viewport > .page-slide { height: auto; }
.rail-page-viewport .page-slide-layer { overflow: visible; }
.home-discovery-latest > .page-slide .page-slide-layer { overflow: visible; }
.pv-motion-center {
  animation: pv-center-fade var(--motion-content) var(--ease) both;
}
@keyframes pv-center-fade {
  from { opacity: .96; }
  to { opacity: 1; }
}

/* Keep thread creation in the desktop Thread rail, before its search field. */
.rail-new-thread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  padding: 0 var(--rail-pad);
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink-2);
  font-size: 17px;
  text-align: left;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.rail-new-thread:hover,
.rail-new-thread:focus-visible { background: var(--tint-2); color: var(--ink); }
.rail-new-thread .icon { color: var(--ink-3); }

/* Search / filter field */
.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  transition: background var(--motion-fast);
}
.field:focus-within { background: var(--tint); color: var(--ink); }
.field input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 64px 0 var(--rail-pad);
  font-size: 17px;
  color: var(--ink);
}
.field input:focus-visible { outline: none; }
.field input::placeholder { color: var(--ink-3); }
.field input::-webkit-search-cancel-button { display: none; }
.field .icon { position: absolute; right: var(--rail-pad); pointer-events: none; }
.field .clear {
  position: absolute; right: calc(var(--rail-pad) - 6px);
  width: 32px; height: 32px; display: none;
  align-items: center; justify-content: center; color: var(--ink-2);
}
.field.has-value .clear { display: flex; }
.field.has-value > .icon { display: none; }

/* Thread rows */
.list { list-style: none; margin: 0; padding: 0; }

.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  padding: 0 var(--rail-pad);
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.3;
  transition: background var(--motion-fast);
}
.row:hover { background: var(--tint); }
.row.is-current { background: var(--tint); }
.row.is-current:hover { background: var(--tint-2); }
.row .count { font-size: 15px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row .row-end { display: flex; align-items: center; }

.row.thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.row.thread .thread-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.row.thread .thread-title .t {
  flex: 1;
  min-width: 0;
}
.row.thread .thread-pin-icon {
  color: var(--ink-3);
  transform: translateY(1px) rotate(45deg);
  transform-origin: 50% 50%;
}
.row.thread .t {
  display: -webkit-box;
  padding-block: 5px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  clip-path: inset(5px 0);
}
.row.thread .s { margin-top: 5px; font-size: 14px; color: var(--ink-3); }
.row.thread .thread-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
}
.row.thread .thread-meta-left {
  display: contents;
}
.row.thread .thread-response-count {
  flex: none;
  white-space: nowrap;
  color: var(--ink-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.row.thread .thread-meta .unread-indicator { flex: none; }

/* Global Active homepage — a plain list, using the existing thread-list language. */
.home-aside { display: none; }
.home-utility-label { color: var(--ink-2); }
.home-mobile-switch { display: none; }
.home-discovery-latest { display: none; }
.home-discovery-conversation { display: block; }
.active-list { list-style: none; margin: 0; padding: 0; }
.active-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  padding: 20px var(--pad) 21px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  transition: background var(--motion-fast);
}
.active-row:hover, .active-row:focus-visible { background: var(--tint); }
.active-topic { font-size: 13px; line-height: 1.3; color: var(--ink-3); }
.active-title { max-width: 48em; font-size: 20px; line-height: 1.35; }
.active-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-3);
}
.active-meta-left { display: inline-flex; align-items: center; min-width: 0; }
.active-response-count {
  flex: none;
  margin-left: auto;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.unread-indicator { display: inline-block; margin-left: 6px; color: var(--ink-3); font-size: 12px; font-weight: 400; line-height: 1.4; white-space: nowrap; }

.response-composer-layout {
  display: block;
  min-width: 0;
}
.response-composer-main {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* app.js reads this minimum and toggles .pv-wide-desktop; CSS has no second breakpoint value to drift. */
:root.pv-wide-desktop .bar-utility-cell { display: flex; }
:root.pv-wide-desktop .desktop-utility-panel:not([hidden]) {
  display: block;
  position: fixed;
  z-index: 15;
  top: var(--bar);
  right: 0;
  bottom: 0;
  width: var(--note);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
:root.pv-wide-desktop .desktop-utility-panel.is-wide-transition {
  background: var(--paper);
  transition: transform 210ms var(--ease);
  will-change: transform;
}
:root.pv-wide-desktop .desktop-utility-panel.is-wide-transition.is-entering-from-right,
:root.pv-wide-desktop .desktop-utility-panel.is-wide-transition.is-leaving-to-right {
  transform: translateX(100%);
}
:root.pv-wide-desktop .main.utility-mode .head-side,
:root.pv-wide-desktop .main.utility-mode .notes { visibility: hidden; }
:root.pv-wide-desktop .home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--note);
  align-items: start;
  min-height: calc(100vh - var(--bar));
}
:root.pv-wide-desktop .home-center {
  --home-content-column: calc(var(--author) - 20px);
  min-width: 0;
}
:root.pv-wide-desktop .home-aside {
  display: block;
  position: sticky;
  top: var(--bar);
  align-self: start;
  height: calc(100vh - var(--bar));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
:root.pv-wide-desktop .home-aside-header { position: relative; z-index: 3; }
:root.pv-wide-desktop .home-aside-heading {
  display: flex;
  align-items: center;
  height: 68px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.3;
}
:root.pv-wide-desktop .home-utility-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% + 2 * var(--pad));
  height: 100%;
  margin-left: calc(-1 * var(--pad));
  padding: 0 var(--pad);
  color: var(--ink);
}
.home-utility-current-indicator {
  display: inline-block;
  min-width: 0;
  margin-left: 8px;
  color: var(--ink-3);
  font-size: inherit;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.home-utility-current-indicator::before { content: attr(data-count); }
:root.pv-wide-desktop .home-aside-list { list-style: none; margin: 0; padding: 0; }
:root.pv-wide-desktop .home-aside-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  transition: background .12s;
}
:root.pv-wide-desktop .home-aside-row:hover,
:root.pv-wide-desktop .home-aside-row:focus-visible { background: var(--tint); }
:root.pv-wide-desktop .home-aside-topic,
:root.pv-wide-desktop .home-aside-meta {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-3);
}
:root.pv-wide-desktop .home-aside-meta { font-style: normal; }
:root.pv-wide-desktop .home-aside-activity {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}
:root.pv-wide-desktop .home-aside-activity b { color: var(--ink); font-weight: 400; }
:root.pv-wide-desktop .home-aside-title { font-size: 17px; line-height: 1.35; color: var(--ink); }
:root.pv-wide-desktop .home-aside-empty {
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
}
:root.pv-wide-desktop .home-aside-signin {
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
:root.pv-wide-desktop .home-aside-all {
  width: 100%;
  padding: 17px var(--pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink-2);
  font-size: 14px;
  transition: background .12s, color .12s;
}
:root.pv-wide-desktop .home-aside-all:hover { background: var(--tint); color: var(--ink); }
#desktopUtilityPanel .utility-updates-body .home-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}
#desktopUtilityPanel .utility-updates-body .home-aside-list > li {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
#desktopUtilityPanel .utility-updates-body .home-aside-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  transition: background .12s;
  white-space: normal;
  overflow-wrap: anywhere;
}
#desktopUtilityPanel .utility-updates-body .home-aside-row > .home-aside-activity,
#desktopUtilityPanel .utility-updates-body .home-aside-row > .home-aside-title,
#desktopUtilityPanel .utility-updates-body .home-aside-row > .home-aside-meta {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#desktopUtilityPanel .utility-updates-body .home-aside-row:hover,
#desktopUtilityPanel .utility-updates-body .home-aside-row:focus-visible {
  background: var(--tint);
}
#desktopUtilityPanel .utility-updates-body .home-aside-meta {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-3);
  font-style: normal;
}
#desktopUtilityPanel .utility-updates-body .home-aside-activity {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}
#desktopUtilityPanel .utility-updates-body .home-aside-activity b {
  color: var(--ink);
  font-weight: 400;
}
#desktopUtilityPanel .utility-updates-body .home-aside-title {
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
}
#desktopUtilityPanel .utility-updates-body .home-aside-empty {
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
}
#desktopUtilityPanel .utility-updates-body .home-aside-all {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 17px var(--pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink-2);
  font-size: 14px;
  transition: background .12s, color .12s;
  white-space: normal;
  overflow-wrap: anywhere;
}
#desktopUtilityPanel .utility-updates-body .home-aside-all:hover {
  background: var(--tint);
  color: var(--ink);
}
:root.pv-wide-desktop .main:has(.thread-head) .post {
  grid-template-columns: calc(var(--author) - 20px) minmax(0, 1fr) var(--note);
}
/* Published media reclaims the otherwise empty NOTE track on wide thread rows. */
@media (min-width: 1341px) {
  :root .main:has(.thread-head) .post:has(> .body .pv-image-gallery) {
    grid-template-columns: var(--author) minmax(0, 1fr);
  }
  :root.pv-wide-desktop .main:has(.thread-head) .post:has(> .body .pv-image-gallery) {
    grid-template-columns: calc(var(--author) - 20px) minmax(0, 1fr);
  }
}
:root.pv-wide-desktop .main:has(.thread-head) .post.composer .response-composer-body {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(0, 1fr) var(--note);
  grid-template-rows: auto auto;
  padding: 38px 0 34px 8px;
}
:root.pv-wide-desktop .response-composer-intro { grid-column: 1; grid-row: 1; min-width: 0; }
:root.pv-wide-desktop .response-composer-layout {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) var(--note);
  align-items: start;
  min-width: 0;
}
:root.pv-wide-desktop .response-composer-main {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  min-width: 0;
}
:root:not(.pv-wide-desktop) .bar-utility-cell {
  display: flex;
  width: var(--bar);
  justify-content: center;
  border-left: 1px solid var(--line);
}
:root:not(.pv-wide-desktop) .bar-utility-cell .utility-panel-toggle { width: var(--bar); }
:root:not(.pv-wide-desktop) .desktop-utility-panel.is-utility-drawer:not([hidden]) {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 32;
  top: var(--bar);
  right: 0;
  bottom: 0;
  width: var(--note);
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background: var(--paper);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 210ms var(--ease), visibility 0s linear 210ms;
}
:root:not(.pv-wide-desktop) .desktop-utility-panel.is-utility-drawer.is-open:not([hidden]) {
  transform: translateX(0);
  visibility: visible;
  transition: transform 210ms var(--ease);
}
:root:not(.pv-wide-desktop) .desktop-utility-panel.is-utility-drawer.is-closing:not([hidden]) {
  transform: translateX(100%);
  visibility: visible;
  transition: transform 210ms var(--ease);
}
:root:not(.pv-wide-desktop) .utility-drawer-scrim:not([hidden]) {
  display: block;
  position: fixed;
  z-index: 31;
  inset: var(--bar) 0 0;
  background: var(--scrim);
}
:root:not(.pv-wide-desktop) .utility-drawer-header { flex: none; }

.pv-wide-desktop .home-aside:has(> .pv-chat) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
#desktopUtilityPanel:has(.pv-chat):not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#desktopUtilityPanel:has(.pv-chat) .utility-rail-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.pv-chat {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
}
.pv-chat-history {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
.pv-chat-list { min-width: 0; }
.pv-chat-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 0 16px;
  padding: 14px var(--pad) 14px calc(var(--pad) - 16px);
  border-bottom: 1px solid var(--line);
}
.pv-chat-avatar {
  grid-column: 1;
  grid-row: 1;
  width: 36px;
  height: 36px;
  font-size: 11px;
}
.pv-chat-message-content { min-width: 0; }
.pv-chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  line-height: 1.3;
}
.pv-chat-username { color: var(--ink); font-size: 13px; font-weight: 600; }
.pv-chat-message-meta time,
.pv-chat-edited {
  color: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.pv-chat-body {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pv-chat-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 6px;
}
.pv-chat-message-actions button {
  min-height: 28px;
  color: var(--ink-3);
  font-size: 12px;
}
.pv-chat-message-actions button:hover,
.pv-chat-message-actions button:focus-visible { color: var(--ink); }
.pv-chat-edit { min-width: 0; margin-top: 8px; }
.pv-chat-edit textarea,
.pv-chat-composer textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  max-height: 124px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}
.pv-chat-entry {
  margin-inline: calc(-1 * var(--pad));
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--line);
}
.pv-chat-composer textarea {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 36px;
}
.pv-chat-edit-error,
.pv-chat-feedback {
  margin: 6px var(--pad) 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pv-chat-edit-error { margin: 6px 0 0; color: var(--ink-2); }
.pv-chat-feedback[hidden] { display: none; }
.pv-chat-state-wrap { flex: none; }
.pv-chat-state {
  margin: 8px var(--pad);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.4;
}
.pv-chat-retry {
  margin-left: 6px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pv-chat-empty {
  flex: none;
  margin: 0;
  padding: 14px var(--pad);
  color: var(--ink-3);
  font-size: 13px;
}
.pv-chat-empty[hidden] { display: none; }
.pv-chat-jump-wrap {
  display: flex;
  flex: none;
  justify-content: center;
  min-height: 0;
}
.pv-chat-new {
  margin: 6px 0 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12px;
}
.pv-chat-new:hover { background: var(--tint); color: var(--ink); }
.pv-chat-new[hidden] { display: none; }
.pv-chat-composer {
  flex: none;
  padding: 10px var(--pad) max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.pv-chat-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.pv-chat-retention {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.35;
}
.pv-chat-send {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
}
.pv-chat-send:not(:disabled):hover { background: var(--tint); color: var(--ink); }
.pv-chat-send:disabled { color: var(--ink-3); cursor: not-allowed; }
.pv-chat-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.pv-chat-auth .inline-link { text-align: left; }
.pv-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;
}

.back {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 var(--rail-pad);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.back:hover { background: var(--tint); color: var(--ink); }
.back .icon { margin-left: -4px; }

.topic-head {
  padding: 30px var(--rail-pad) 28px;
  border-bottom: 1px solid var(--line);
}
.topic-head h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.015em; }
.topic-head p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

.empty {
  padding: 28px var(--rail-pad);
  font-size: 15px;
  color: var(--ink-3);
}

/* ----------------------------------------------------------
   Main — thread
   ---------------------------------------------------------- */
.main { min-width: 0; }

.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--note);
  border-bottom: 1px solid var(--line);
}
.thread-head,
.profile-head {
  grid-template-areas:
    "back back"
    "main side"
    "meta meta";
}
.thread-back-row,
.profile-back-row {
  grid-area: back;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
.head-main {
  padding: 44px var(--pad) 40px;
  min-width: 0;
}
.thread-title-area {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  min-height: 264px;
  padding: 48px var(--pad) 40px;
  box-sizing: border-box;
}
.thread-head .thread-title-area > h1 {
  margin-top: 0;
  overflow-wrap: anywhere;
}
.thread-title-area > .title-edit { margin-top: 0; }
.thread-head > .head-side,
.profile-head > .head-side { grid-area: side; }
.thread-meta-row,
.profile-meta-row {
  grid-area: meta;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px var(--pad);
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}
.thread-meta-row .meta,
.profile-meta-row .meta {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
/* Wide Thread headers keep Back on the rail's 64px row while preserving the summary span. */
@media (min-width: 1024px) {
  .thread-head {
    grid-template-rows: 64px minmax(136px, auto) 72px minmax(68px, auto) auto auto;
    grid-template-areas:
      "back side"
      "main side"
      "main side"
      "meta side"
      ". side"
      ". side";
  }
  .thread-head > .head-side {
    display: grid;
    grid-template-rows: subgrid;
    min-width: 0;
    align-self: stretch;
  }
  .thread-head > .head-side > .stat {
    grid-row: 1 / span 2;
    align-self: stretch;
    border-bottom: 1px solid var(--line);
  }
  .thread-head > .head-side > .respond-cell:not(.save-cell) {
    grid-row: 3;
    align-self: stretch;
    height: auto;
    min-height: 72px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    box-sizing: border-box;
  }
  .thread-head > .head-side > .save-cell {
    grid-row: 4;
    align-self: stretch;
    height: auto;
    min-height: 68px;
    border-top: 0;
    box-sizing: border-box;
  }
  .thread-head > .head-side > .respond-cell + .save-cell { border-top: 0; }
  .thread-head > .head-side > .save-feedback { grid-row: 5; }
  .thread-head > .head-side > .thread-controls { grid-row: 6; }
  .thread-head > .thread-back-row {
    min-height: 64px;
    border-bottom: 1px solid var(--line);
  }
  .thread-head > .thread-title-area {
    min-height: 202px;
    padding: 40px var(--pad);
    border-bottom: 1px solid var(--line);
  }
  .thread-head > .thread-meta-row {
    min-height: 68px;
    border-top: 0;
  }
}

/* Profile context shares the Thread header's centre/utility-column grid. */
@media (min-width: 1024px) {
  .profile-head {
    grid-template-rows: 64px minmax(126px, auto) minmax(56px, auto) minmax(56px, auto) minmax(68px, auto);
    grid-template-areas:
      "back side"
      "main side"
      "main side"
      "main side"
      "meta side";
  }
  .profile-head:not(:has(.respond-cell[data-action="updates"])) {
    grid-template-rows: 64px minmax(162px, auto) minmax(68px, auto);
    grid-template-areas:
      "back side"
      "main side"
      "meta side";
  }
  .profile-head:not(:has(.respond-cell[data-action="updates"])):has([data-profile-message]):has([data-mute-member]) {
    grid-template-rows: 64px minmax(162px, auto) minmax(68px, auto) minmax(68px, auto);
    grid-template-areas:
      "back side"
      "main side"
      "meta side"
      ". side";
  }
  .profile-head:has(.respond-cell[data-action="admin"]) {
    grid-template-rows: 64px minmax(126px, auto) minmax(56px, auto) minmax(56px, auto) minmax(68px, auto) minmax(56px, auto);
    grid-template-areas:
      "back side"
      "main side"
      "main side"
      "main side"
      "meta side"
      ". side";
  }
  .profile-head > .head-side {
    display: grid;
    grid-template-rows: subgrid;
    min-width: 0;
    align-self: stretch;
  }
  .profile-head > .head-side > .stat {
    grid-row: 1 / span 2;
    align-self: stretch;
    border-bottom: 1px solid var(--line);
  }
  .profile-head > .head-side > .respond-cell {
    height: auto;
    align-self: stretch;
    box-sizing: border-box;
  }
  .profile-head:not(:has(.respond-cell[data-action="updates"])) > .head-side > .respond-cell {
    grid-row: 3;
    min-height: 68px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }
  .profile-head:not(:has(.respond-cell[data-action="updates"])) > .head-side > [data-mute-member] {
    grid-row: 4;
    border-top: 1px solid var(--line);
  }
  .profile-head:has(.respond-cell[data-action="updates"]) > .head-side > .respond-cell {
    min-height: 56px;
    border-top: 0;
    border-bottom: 0;
  }
  .profile-head:has(.respond-cell[data-action="updates"]) > .head-side > [data-action="updates"] {
    grid-row: 3;
    border-bottom: 1px solid var(--line);
  }
  .profile-head:has(.respond-cell[data-action="updates"]) > .head-side > [data-action="saved"] { grid-row: 4; }
  .profile-head:has(.respond-cell[data-action="updates"]) > .head-side > [data-action="settings"] {
    grid-row: 5;
    min-height: 68px;
    border-top: 1px solid var(--line);
  }
  .profile-head > .head-side > [data-action="admin"] {
    grid-row: 6;
    min-height: 56px;
    border-top: 0;
  }
  .profile-head:has(.respond-cell[data-action="admin"]) > .head-side > [data-action="settings"] {
    border-bottom: 1px solid var(--line);
  }
  .profile-head:has(.respond-cell[data-action="admin"]) > .profile-meta-row {
    border-bottom: 1px solid var(--line);
  }
  .profile-head > .profile-back-row {
    min-height: 64px;
    border-bottom: 1px solid var(--line);
  }
  .profile-head > .profile-main-area { padding: 46px var(--pad) 40px; }
  .profile-head > .profile-meta-row {
    min-height: 68px;
    border-top: 1px solid var(--line);
  }
}

/* Keep the compact desktop template while matching the rail row and preserving
   the visible title, profile identity, and side-control positions below it. */
@media (min-width: 861px) and (max-width: 1023px) {
  .thread-back-row,
  .profile-back-row { min-height: 64px; }
  .thread-title-area { min-height: 256px; }
  .profile-head > .profile-main-area { padding-top: 36px; }
  .thread-head > .head-side > .stat,
  .profile-head > .head-side > .stat { padding-top: 36px; }
  .thread-head > .head-side > .stat {
    min-width: 0;
    padding: 16px 4px 12px;
    text-align: center;
  }
  .profile-head > .head-side > .stat {
    min-width: 0;
    padding: 16px 4px 12px;
    text-align: center;
  }
  .thread-head > .head-side > .stat .n { font-size: 24px; }
  .thread-head > .head-side > .stat .l { margin-top: 6px; font-size: 11px; line-height: 1.15; }
  .thread-head > .head-side > .stat .l2 { font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
  .profile-head > .head-side > .stat .n { font-size: 24px; }
  .profile-head > .head-side > .stat .l { margin-top: 6px; font-size: 11px; line-height: 1.15; }
  .profile-head > .head-side > .stat .l2 { font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
  .thread-head > .head-side > .respond-cell {
    position: relative;
    justify-content: center;
    padding: 0;
  }
  .thread-head > .head-side > .respond-cell > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .profile-head > .head-side > .respond-cell {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    height: auto;
    min-height: 56px;
    padding: 8px 4px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .profile-head > .head-side > .respond-cell > span:first-child {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .profile-head > .head-side > .respond-cell > .icon { display: none; }
  .profile-head > .head-side > .respond-cell .cell-note {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--ink-2);
  transition: color .12s;
}
.crumb:hover { color: var(--ink); }
.head h1 {
  margin-top: 18px;
  max-width: 22em;
  font-size: clamp(34px, 3.1vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.meta {
  margin-top: 20px;
  font-size: 15px;
  color: var(--ink-2);
}
.meta .dot { margin: 0 8px; color: var(--ink-3); }
.read-state-status {
  max-width: 60em;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}
.read-state-status[hidden] { display: none; }

.head-side {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.profile-main-area {
  grid-area: main;
  padding: 44px var(--pad) 40px;
}
.profile-id { margin-top: 0; }
.profile-id > div { min-width: 0; }
.profile-id h1,
.profile-bio { overflow-wrap: anywhere; }
.stat {
  flex: 1;
  padding: 44px 32px 32px;
}
.stat .n {
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat .l { margin-top: 12px; font-size: 17px; }
.stat .l2 { margin-top: 2px; font-size: 15px; color: var(--ink-3); }

.respond-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--pad) 0 32px;
  border-top: 1px solid var(--line);
  background: var(--tint);
  font-size: 17px;
  transition: background .15s;
}
.respond-cell:hover { background: var(--tint-2); }
.save-cell .icon { fill: none; }
.save-cell.is-saved .icon { fill: currentColor; }
.save-cell:disabled { cursor: wait; }
.save-feedback { padding: 8px 32px 12px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.save-feedback:empty { display: none; }
.saved-head h1 { margin-top: 0; }
.saved-error p { margin: 0 0 10px; }

/* ----------------------------------------------------------
   Response rows
   AUTHOR | BODY | (optional) NOTE
   ---------------------------------------------------------- */
.post {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--bar) + 16px);
}
.post.is-new { animation: arrive 2.4s var(--ease); }
@keyframes arrive { 0% { background: var(--tint-2); } 100% { background: transparent; } }

.who {
  padding: 40px 16px 40px var(--pad);
  min-width: 0;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tint-2);
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1;
  padding-top: 1px;
}
.avatar.dark { background: var(--ink); color: var(--on-ink); }
/* Composer matches the 40px top-bar avatar; Notes keep .avatar.sm. */
.who .avatar { width: 40px; height: 40px; font-size: 14px; }
.post:not(.composer) .who .avatar { width: 48px; height: 48px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.who .name { margin-top: 14px; font-size: 16px; line-height: 1.3; }
.who .when { margin-top: 3px; font-size: 14px; color: var(--ink-3); }
.who .role { margin-top: 3px; font-size: 14px; color: var(--ink-3); }
.edited-indicator { color: var(--ink-3); font-size: inherit; white-space: nowrap; }
.edited-indicator .dot { margin: 0 5px; color: var(--ink-3); }
.edit-attempt-warning {
  margin: 8px 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}
.edit-attempt-warning[hidden],
#editCopyDraft[hidden],
#noteEditCopyDraft[hidden] { display: none !important; }
.edit-attempt-copy-status:empty { display: none; }

.body {
  padding: 36px var(--pad) 42px 8px;
  min-width: 0;
}
.body p {
  max-width: 33.5em;
  font-size: 19px;
  line-height: 1.62;
  letter-spacing: -0.003em;
  hyphens: manual;
}
.post:not(.composer) .body > p.authored-body {
  font-size: 18px;
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
}
.post.op:not(.composer) .body > p.authored-body { font-size: 19px; }
.authored-body { font-synthesis: weight style; }
.authored-body a.authored-text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
}
.authored-body a.authored-text-link:hover { text-decoration-color: var(--ink); }
.body p + p { margin-top: 0.85em; }
.post.op .body p { font-size: 20px; }


/* ----------------------------------------------------------
   Composer
   ---------------------------------------------------------- */
.post.composer .body { padding-top: 38px; }
.composer h3 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.composer .hint { margin-top: 10px; font-size: 15px; color: var(--ink-3); }
.pv-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 5px 0 6px;
  border-bottom: 1px solid var(--line);
}
.pv-format-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pv-format-bold { font-weight: 700; }
.pv-format-italic { font-style: italic; font-weight: 600; }
.pv-format-button:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pv-format-button:focus-visible,
.pv-format-input:focus-visible {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
}
.pv-format-link-editor {
  display: grid;
  grid-template-columns: minmax(100px, .9fr) minmax(140px, 1.4fr) auto auto;
  align-items: center;
  gap: 6px;
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  padding: 5px 0 2px;
}
.pv-format-link-editor[hidden] { display: none !important; }
.pv-format-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.pv-format-input[hidden] { display: none !important; }
.pv-format-error {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 12px;
}
.pv-format-error[hidden] { display: none !important; }
.composer textarea {
  display: block;
  width: 100%;
  max-width: calc(35em * 19 / 17 + 48px);
  min-height: 188px;
  margin-top: 26px;
  padding: 22px 24px;
  border: 0;
  border-radius: 0;
  background: var(--tint);
  font-size: 19px;
  line-height: 1.6;
  resize: none;
  overflow: hidden;
  transition: background .15s;
}
.composer textarea:focus { background: var(--tint-2); }
.composer textarea::placeholder { color: var(--ink-3); }
.composer input.title-input {
  display: block;
  width: 100%;
  max-width: calc(35em * 19 / 17 + 48px);
  margin-top: 26px;
  height: 64px;
  padding: 0 24px;
  border: 0;
  background: var(--tint);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.composer input.title-input:focus { background: var(--tint-2); }
.composer input.title-input::placeholder { color: var(--ink-3); }
.composer input.title-input + textarea { margin-top: 2px; }

.actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 16px;
}
.composer .actions { flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  height: 52px;
  padding: 0 20px 0 22px;
  font-size: 17px;
  transition: background .15s, color .15s, opacity .15s;
}
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-hover); }
.btn.primary[disabled] { background: var(--tint-2); color: var(--ink-3); cursor: default; }
.btn.quiet { color: var(--ink-2); background: transparent; }
.btn.quiet:hover { color: var(--ink); background: var(--tint); }
.actions .kbd { margin-left: auto; font-size: 14px; color: var(--ink-3); padding-right: 4px; }

.topic-select {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-2);
}

/* Foot */
.foot {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  height: 64px;
  align-items: center;
  font-size: 15px;
  color: var(--ink-3);
}
.foot button { padding-left: var(--pad); color: var(--ink-3); transition: color .12s; }
.foot button:hover { color: var(--ink); }
.foot span { padding-left: 8px; }
.conversation-load, .source-page-controls { display: grid; justify-items: center; gap: 8px; padding: 12px var(--pad); }
.conversation-load-button, .source-more-refs { border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink-2); padding: 8px 14px; font: inherit; cursor: pointer; }
.conversation-load-button:hover, .source-more-refs:hover { color: var(--ink); border-color: var(--ink-3); }
.conversation-load-button:disabled, .source-more-refs:disabled { cursor: wait; opacity: .65; }
.conversation-load-error, .source-page-error { color: var(--danger, #a33); font-size: 13px; }
.source-more-refs { margin-top: 10px; font-size: 13px; padding: 6px 12px; }
.source-page-controls { padding-bottom: 20px; }

/* ----------------------------------------------------------
   Narrower desktop: the post grid drops its third column; notes
   already sit below the post, inside its row.
   ---------------------------------------------------------- */
@media (max-width: 1340px) {
  :root { --author: 184px; --pad: 36px; --rail-pad: 28px; --rail: 300px; --note: 300px; }
  .post { grid-template-columns: var(--author) minmax(0, 1fr); }
  .foot { grid-template-columns: var(--author) 1fr; }
}

@media (min-width: 861px) {
  :root:not(.pv-wide-desktop) .bar {
    grid-template-columns: var(--rail) minmax(0, 1fr) auto auto auto var(--bar);
  }
  :root:not(.pv-wide-desktop) .account { grid-column: 5; grid-row: 1; }
  :root:not(.pv-wide-desktop) .bar-utility-cell { grid-column: 6; grid-row: 1; }
}

@media (min-width: 1024px) and (max-width: 1140px) {
  :root { --note: 260px; }
  .bar-context { padding: 0 8px; }
}

@media (min-width: 861px) and (max-width: 1023px) {
  :root { --rail: 260px; --note: 72px; --pad: 24px; --rail-pad: 24px; }
  .bar-context { padding: 0 12px; }
  .bar-action { width: var(--note); padding: 0; justify-content: center; }
  .bar-action-label { display: none; }
  :root:not(.pv-wide-desktop) .desktop-utility-panel.is-utility-drawer:not([hidden]) {
    width: min(300px, 100%);
  }
}

@media (max-width: 860px) {
  /* Tablet portrait and phones: the rail becomes a slide-over panel so the
     conversation leads. Same rail, same rows, same lines. */
  :root { --note: 0px; --pad: 20px; --rail-pad: 20px; }
  .bar { grid-template-columns: var(--bar) minmax(0, 1fr) auto auto auto var(--bar); }
  .menu-toggle { display: flex; }
  .bar-context { display: none; }
  .site-menu-control { display: none; }
  .brand { border-right: 0; padding: 0 16px; min-width: 0; }
  .bar-action { display: flex; width: var(--bar); padding: 0; justify-content: center; }
  .bar-action-label { display: none; }
  .rail-new-thread { display: none; }
  .shell { grid-template-columns: 1fr; }
  .home-mobile-switch {
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding: 0 var(--pad);
    border-bottom: 1px solid var(--line);
  }
  .home-mobile-switch button {
    min-height: 52px;
    border-bottom: 1px solid transparent;
    color: var(--ink-3);
    font-size: 16px;
    transition: color var(--motion-fast), border-color var(--motion-fast);
  }
  .home-mobile-switch button[aria-pressed="true"] {
    border-bottom-color: var(--ink);
    color: var(--ink);
  }
  .home-discovery-feed { display: none; }
  .home-discovery-feed.is-active { display: block; }
  .rail {
    position: fixed; z-index: 25; top: var(--bar); left: 0; bottom: 0;
    width: min(420px, 100%); height: auto;
    background: var(--paper);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform var(--motion-standard) var(--ease), visibility 0s linear var(--motion-standard);
  }
  :root:not(.pv-wide-desktop) .desktop-utility-panel.is-utility-drawer:not([hidden]) { width: 100%; }
  .rail-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .shell { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  :root.pv-rail-open .rail { transform: none; visibility: visible; transition: transform var(--motion-standard) var(--ease); }
  .scrim { position: fixed; z-index: 24; inset: var(--bar) 0 0 0; background: var(--scrim); }
  .head { grid-template-columns: 1fr; }
  .thread-head,
  .profile-head {
    grid-template-areas:
      "back"
      "main"
      "side"
      "meta";
  }
  .thread-title-area {
    min-height: 136px;
  }
  .head-main { padding: 30px var(--pad) 28px; }
  .thread-head .thread-title-area { padding: 20px var(--pad) 24px; }
  .profile-main-area { padding: 30px var(--pad) 28px; }
  .head h1 { font-size: 30px; }
  .head-side { border-left: 0; border-top: 1px solid var(--line); }
  .stat { display: none; }
  .post { grid-template-columns: 1fr; }
  .who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 24px var(--pad) 0; }
  .who-link { display: flex; align-items: center; gap: 10px; }
  .who .avatar { width: 40px; height: 40px; font-size: 14px; }
  .who .name, .who .when, .who .role { margin: 0; }
  .body { padding: 14px var(--pad) 28px; }
  .foot { grid-template-columns: 1fr; }
  .composer .actions { flex-wrap: wrap; }
  .actions .kbd { display: none; }
  .composer h3 { font-size: 26px; }
  .cblocks, .composer textarea { max-width: none; }
  .cb-attr { grid-template-columns: 1fr; gap: 4px; }
  .import-prompt { flex-wrap: wrap; gap: 12px; }
  .ip-excerpt { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-utility-panel.is-wide-transition,
  .desktop-utility-panel.is-utility-drawer {
    transition: none !important;
  }
}
@media (max-width: 600px) {
  :root { --bar: 60px; }
  .post:not(.composer) .who .avatar { width: 40px; height: 40px; }
  .brand-word { display: none; }
  .rail { width: 100%; border-right: 0; }
  .body p, .post.op .body p, .active-title { font-size: 18px; }
  .post:not(.composer) .body > p.authored-body,
  .post.op:not(.composer) .body > p.authored-body { font-size: 17px; }
  .notes-inner.has { flex-wrap: wrap; }
  .notes-inner.has .notes-cells { order: -1; margin-left: auto; }
  .notes-inner.has .notes-main { flex-basis: 100%; padding: 14px 20px 18px; }
  .note-meta { flex-wrap: wrap; row-gap: 4px; }
  .note-meta > span:not(.dot):not(.note-pos):not(.note-guard),
  .note-meta .note-pos { flex: none; white-space: nowrap; }
  .btn { padding: 0 16px; gap: 16px; }
  .profile-id { gap: 16px; }
  .avatar.xl { width: 64px; height: 64px; font-size: 20px; }
  .profile-bio { font-size: 17px; }
}

/* ==========================================================
   PV-0B — composition & attributed material
   ========================================================== */

.cblocks {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
  max-width: calc(33.5em * 19 / 17 + 48px);
}
.cblocks textarea.authored { margin-top: 0; max-width: none; }
.cb-authored + .cb-authored { margin-top: 2px; }
.post.composer .cblocks:not(.is-response-composer) .cb-authored {
  display: flex;
  flex-direction: column;
  min-height: 188px;
  background: var(--tint);
  transition: background .15s;
}
.post.composer .cblocks:not(.is-response-composer) .cb-authored:focus-within {
  background: var(--tint-2);
}
.post.composer .cblocks:not(.is-response-composer) .cb-authored > .pv-format-toolbar,
.cblocks.is-response-composer .response-writing-surface .cb-authored > .pv-format-toolbar {
  flex: 0 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}
.post.composer .cblocks:not(.is-response-composer) .cb-authored > textarea.authored {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 14px 24px 22px;
  background: transparent;
}
.post.composer .cblocks:not(.is-response-composer) .cb-authored > textarea.authored:focus {
  background: transparent;
}
.cblocks.is-response-composer .response-writing-surface {
  display: flex;
  flex-direction: column;
  min-height: 188px;
  padding: 0;
  background: var(--tint);
  transition: background .15s;
}
.cblocks.is-response-composer .response-writing-surface:focus-within { background: var(--tint-2); }
.cblocks.is-response-composer .response-writing-surface .cb-authored { margin: 0; }
.cblocks.is-response-composer .response-writing-surface .cb-authored {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.cblocks.is-response-composer textarea.authored.response-authored {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 14px 24px 22px;
  background: transparent;
  font-size: 19px;
  line-height: 1.6;
}
.cblocks.is-response-composer textarea.authored.response-authored:focus { background: transparent; }
.cblocks.is-response-composer textarea.authored.response-authored::placeholder { color: var(--ink-3); }
.cblocks.is-response-composer .response-authored-block + .response-authored-block { margin-top: 8px; }
.response-attached-links { margin-top: 14px; }
.response-attached-links .cb-link,
.response-attached-links .cb-embed { margin: 0 0 12px; }
.response-attached-links .cb-link:last-child,
.response-attached-links .cb-embed:last-child { margin-bottom: 0; }

/* Quotes (imported and internal): a quiet 1px frame with a heavier left rule as the anchor. No fill. */
.cb { position: relative; }
.cb-quote, .cb-link, .cb-image { margin: 22px 0; }
.cb-quote {
  padding: 14px 20px 16px 23px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ink);
  background: var(--tint);
}
.cb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-3);
}
.cb-head-image { justify-content: flex-end; }
.cb-remove { font-size: 14px; color: var(--ink-3); transition: color .12s; }
.cb-remove:hover { color: var(--ink); }
.cb-quote .quote-text {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.5;
  color: var(--quote-ink);
}
.cb-attr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
}
.cb-attr input {
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 15px;
  transition: border-color .15s;
}
.cb-attr input:focus { border-bottom-color: var(--ink); }
.cb-attr input::placeholder { color: var(--ink-3); }

.cb-link { padding: 14px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cb-link a, .lnk a {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  margin-top: 8px;
  font-size: 17px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.cb-link a > span, .lnk a > span { min-width: 0; overflow-wrap: anywhere; }
.cb-link a:hover, .lnk a:hover { text-decoration-color: var(--ink); }
.cb-link a .icon, .lnk a .icon { color: var(--ink-3); }
.cb-image img { display: block; margin-top: 10px; max-width: 100%; max-height: 280px; }
.cb-add-text {
  align-self: flex-start;
  margin: 2px 0;
  padding: 4px 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
}
.cb-add-text:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cb-add-text:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Inline prompt when imported text meets the authored surface */
.import-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  animation: promptIn .22s var(--ease);
}
@keyframes promptIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ip-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ip-excerpt { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-actions { display: flex; gap: 2px; flex: none; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 15px; gap: 12px; }
.actions .attach { gap: 10px; white-space: nowrap; }
.actions .attach > span { line-height: 1.1; white-space: nowrap; }
.actions .attach .icon { color: var(--ink-3); }

/* Historical structured quotations and explicit authored Quote formatting */
.body .q, .note-text .q {
  max-width: calc(33.5em * 19 / 18);
  margin: 1.2em 0;
  padding: 14px 20px 16px 23px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ink);
  background: var(--tint);
}
.body .q p, .post.op .body .q p { font-size: 18px; line-height: 1.5; color: var(--quote-ink); max-width: none; }
.note-text .q p { margin: 0; font-size: inherit; line-height: inherit; color: var(--quote-ink); max-width: none; }
.body .q p + p { margin-top: .7em; }
.body .q cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
  color: var(--ink-2);
}
.body .q cite a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.body .q cite a:hover { text-decoration-color: var(--ink-2); }
.body .q cite .dot { margin: 0 7px; color: var(--ink-3); }
.body .lnk { margin: .9em 0; }
.body .lnk a { margin-top: 0; }
.body .att { margin: 1.1em 0; }
.body .att img { display: block; max-width: 100%; max-height: 420px; }
.body .att figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.body > :first-child { margin-top: 0; }

.cb-embed {
  margin: 22px 0;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cb-embed-source, .embed-url-label, .embed-error { display: block; }
.cb-embed-source {
  margin-top: 8px;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.embed-url-label { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.embed-url {
  display: block;
  width: 100%;
  min-width: 0;
  height: 38px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.embed-url:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.embed-error, .embed-unavailable { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.embed-error:not([hidden]) { color: var(--danger, #9b302b); }

.body .att-embed, .body .att-link-card, .body .att-embed-fallback {
  max-width: 100%;
  overflow: hidden;
}
.att-embed .embed-frame {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tint);
}
.att-embed.is-video .embed-frame { aspect-ratio: 16 / 9; }
.att-embed.is-audio .embed-frame { height: 152px; }
.att-embed.embed-spotify-album .embed-frame,
.att-embed.embed-spotify-playlist .embed-frame,
.att-embed.embed-spotify-show .embed-frame { height: 352px; }
.att-embed.embed-soundcloud-playlist .embed-frame { height: 450px; }
.att-embed .embed-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
}
.att-embed figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.att-embed figcaption a, .att-embed-fallback a, .att-link-card a {
  color: inherit;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.att-embed figcaption a:hover, .att-embed-fallback a:hover, .att-link-card a:hover { text-decoration-color: var(--ink); }
.att-embed figcaption .dot { margin: 0 4px; }
.att-embed-fallback, .att-link-card {
  margin: 1.1em 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
}
.att-embed-fallback { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.att-link-card .link-card-title {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}
.att-link-card .link-card-title:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.cb-quote .quote-text, .cb-quote .quote-text:focus { min-height: 0; background: transparent; }
.cblocks textarea.authored:not([data-first]) { min-height: 104px; }
.body .q cite span.nw { white-space: nowrap; }
.body .q cite a { overflow-wrap: anywhere; }

/* Top-bar profile */
.account .bar-avatar { width: 40px; height: 40px; font-size: 14px; }
.account .bar-avatar.avatar-image-loading { background: var(--tint-2); }

/* PV-0B-R1 — quiet authored slots before/between attributed blocks */
.cblocks textarea.authored.slot:placeholder-shown {
  min-height: 0;
  height: 48px !important;
  padding-top: 12px;
  padding-bottom: 12px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.cblocks textarea.authored.slot:placeholder-shown:focus { background: var(--tint); border-bottom-color: var(--ink); }
.cb-authored.is-slot + .cb-quote,
.cb-authored.is-slot + .cb-link,
.cb-authored.is-slot + .cb-image { margin-top: 18px; }
.title-note { max-width: calc(33.5em * 19 / 17 + 48px); border-bottom: 1px solid var(--line); }
.title-note .ip-excerpt { white-space: normal; }
[hidden] { display: none !important; }

/* ==========================================================
   Notes — below the post, inside its row
   ========================================================== */
.post > .notes { grid-column: 2 / -1; min-width: 0; }
.post .body { padding-bottom: 34px; }
.notes-inner { display: flex; align-items: stretch; justify-content: flex-end; min-height: var(--note-cell); }
.notes-inner.has {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--tint);
}
.post > .notes .notes-main:has(.note-pos) { position: relative; }
.notes-main { flex: 1; min-width: 0; padding: 21px 28px 22px; }
.notes-cells {
  position: relative;
  display: flex;
  align-self: flex-end;
  border-top: 1px solid var(--line);
}
.notes-cells::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
.notes-inner.has .notes-cells::after { content: none; }
.note-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--note-cell);
  height: var(--note-cell);
  border-left: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.note-cell:hover { background: var(--tint-2); color: var(--ink); }
.notes-inner.has .note-cell { background: transparent; }
.notes-inner.has .note-cell:hover { background: var(--tint-2); }
.unread-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 18px 0;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}
.unread-divider::before, .unread-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notes > .unread-divider { margin: 0 0 10px; padding: 10px 24px 0; }

.note-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.note-meta .dot { color: var(--ink-3); margin: 0 -2px; }
.note-meta > span:not(.dot):not(.note-pos):not(.note-guard) { flex: none; white-space: nowrap; }
.note-meta .note-by { color: var(--ink); }
.note-pos-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.note-pos { color: var(--ink-3); font-size: 14px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-text { margin-top: 10px; max-width: 42em; color: var(--text-soft); overflow-wrap: anywhere; }
.note-text,
.note-body {
  font-size: 16px;
  line-height: 1.55;
}
.note-text > p.authored-body { margin: 0; }
.note-text > p.authored-body + p.authored-body { margin-top: .65em; }
.note-view { scroll-margin-top: calc(var(--bar) + 16px); }
.note-text a { color: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.mention-link { color: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.mention-link:hover { text-decoration-color: var(--ink); }
.mention-link:focus-visible { outline: 1px solid var(--ink-2); outline-offset: 2px; }

.pv-mention-menu {
  position: fixed;
  z-index: 120;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
}
.pv-mention-menu[hidden] { display: none; }
.pv-mention-option {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
}
.pv-mention-option:last-child { border-bottom: 0; }
.pv-mention-option:hover, .pv-mention-option.is-active {
  background: var(--tint);
  color: var(--ink);
}
.pv-mention-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-mention-option .avatar { flex: none; }

.note-compose textarea {
  display: block;
  width: 100%;
  max-width: 42em;
  padding: 12px 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--ink-2);
  border-bottom-color: color-mix(in srgb, var(--ink) 60%, transparent);
  background: transparent;
  resize: none;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.55;
}
.note-compose textarea::placeholder { color: var(--ink-3); }
.note-compose .pv-format-toolbar {
  font-size: 16px;
  max-width: 42em;
  padding-right: 8px;
  padding-left: 8px;
}
.authored-body a, .note-text a { overflow-wrap: anywhere; word-break: break-word; }
.authored-body a:focus-visible, .note-text a:focus-visible {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
  border-radius: 2px;
}
.note-foot { display: flex; align-items: center; gap: 16px; max-width: 42em; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.note-chars { margin-left: auto; font-variant-numeric: tabular-nums; }
.note-chars.near { color: var(--ink-2); }
.note-chars.over { color: var(--ink); }
.note-guard { color: var(--ink); }
@media (max-width: 860px) { .post > .notes { grid-column: 1 / -1; } }
.note-cell:focus-visible { outline: 1px solid var(--ink-3); outline-offset: -1px; }
@media (max-width: 600px) {
  .pv-format-link-editor {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .pv-format-link-editor .pv-format-input { font-size: 16px; }
}

/* The shared strip wrapper owns the top rule; cells stay flush with its lower edge. */
.notes-inner.has .note-cell { border-top: 0; border-bottom: 0; }
.note-cell.is-blank { cursor: default; }
.note-cell.is-blank:hover { background: transparent; }
.notes-inner.has .note-cell.is-blank:hover { background: transparent; }

/* Notes with content share one stable top-right control row at every width.
   The Note body and its counter remain in normal flow below the author row. */
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  justify-content: stretch;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .notes-main { display: contents; }
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-view {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1 / span 2;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has([data-note-swipe]) .note-swipe-viewport {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1 / span 2;
  min-width: 0;
  overflow: hidden;
}
:root:not([data-pv-nonotes]) .note-swipe-slide {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  width: 100%;
  min-width: 0;
  transform: translate3d(calc(var(--note-slide-x, 0%) + var(--note-drag-x, 0px)), 0, 0);
}
:root:not([data-pv-nonotes]) .note-swipe-slide.is-active { position: relative; }
:root:not([data-pv-nonotes]) .note-swipe-viewport.is-settling .note-swipe-slide {
  transition: transform .18s ease-out;
}
:root[data-pv-still] .note-swipe-viewport.is-settling .note-swipe-slide {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-pv-nonotes]) .note-swipe-viewport.is-settling .note-swipe-slide {
    transition: none;
  }
}
:root:not([data-pv-nonotes]) .note-swipe-viewport.is-dragging .note-swipe-slide {
  pointer-events: none;
}
.home-conversation-note-panel [data-note-swipe] { touch-action: pan-y; }
:root.pv-note-dragging, :root.pv-note-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-meta {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding: 21px 12px 0 28px;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-text {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  margin: 10px 28px 22px;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .notes-cells {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  border-top: 0;
  padding-top: 1px;
}
:root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .notes-cells::after { content: ""; }
:root:not([data-pv-nonotes]) .notes-inner.has:has(.staff-remove-cell) .note-text { grid-column: 1 / -1; }

@media (min-width: 861px) and (max-width: 1340px) {
  :root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-text { margin-top: 18px; }
}

@media (max-width: 600px) {
  :root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) {
    grid-template-rows: auto auto auto;
  }
  :root:not([data-pv-nonotes]) .notes-inner.has:has([data-note-swipe]) .note-swipe-viewport {
    grid-row: 1 / span 3;
  }
  :root:not([data-pv-nonotes]) .note-swipe-slide { grid-template-rows: auto auto auto; }
  :root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-view {
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
  }
  :root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 14px 20px 0;
  }
  :root:not([data-pv-nonotes]) .notes-inner.has:has(.note-view) .note-text {
    grid-row: 3;
    margin: 10px 20px 18px;
  }
}

/* ==========================================================
   Theme palettes — light is the default.
   Uses its own attribute (data-pv-theme) so a host page's
   theme setting can never override the user's choice here.
   ========================================================== */
:root[data-pv-theme="warm"] {
  --ink: #111111;
  --ink-2: #66594e;
  --ink-3: #74624f;
  --line: #d6c1aa;
  --tint: #f8e9da;
  --tint-2: #f9efe4;
  --paper: #f4dfc9;
  --text-soft: #262626;
  --quote-ink: #3a3a3a;
  --on-ink: #ffffff;
  --ink-hover: #333333;
  --scroll: #c7ad92;
  --scrim: rgba(36, 21, 8, 0.32);
  color-scheme: light;
}

:root[data-pv-typography="serif"] {
  --font-ui: 'Sentient', Georgia, 'Times New Roman', serif;
  --font-body: 'Sentient', Georgia, 'Times New Roman', serif;
  --font-body-weight: 300;
  font-synthesis: none;
}

:root[data-pv-theme-swapping] { transition: none !important; }

:root[data-pv-theme="dark"] {
  --ink: #f2f2f2;
  --ink-2: #a1a1a1;
  --ink-3: #6e6e6e;
  --line: #222222;
  --tint: #161616;
  --tint-2: #1f1f1f;
  --paper: #0e0e0e;
  --text-soft: #d9d9d9;
  --quote-ink: #c7c7c7;
  --on-ink: #0e0e0e;
  --ink-hover: #d4d4d4;
  --scroll: #333333;
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
.theme-toggle {
  width: var(--bar);
  justify-content: center;
  border-left: 1px solid var(--line);
  color: var(--ink-2);
  transition: color .15s, background .15s;
}
.theme-toggle:hover { color: var(--ink); background: var(--tint); }
.theme-toggle .icon { width: 22px; height: 22px; }
.theme-toggle .i-moon,
.theme-toggle .i-sun { display: none; }
:root[data-pv-theme="dark"] .theme-toggle .i-sun,
:root:not([data-pv-theme="dark"]) .theme-toggle .i-moon { display: block; }

/* ==========================================================
   People links
   ========================================================== */
.who-link { display: block; text-align: left; }
.who-link .name { display: block; }
.who-link:hover .name, .note-person:hover .note-by { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.note-person { display: inline-flex; align-items: center; gap: 10px; }
.account { transition: background .15s; }
.account:hover { background: var(--tint); }

/* ==========================================================
   Custom dropdown (topic picker)
   ========================================================== */
.topic-select { display: flex; align-items: center; gap: 8px; }
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 2px 3px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: border-color .15s;
}
.dd-btn .icon { color: var(--ink-3); transition: transform .15s; }
.dd-btn:hover, .dd.is-open .dd-btn { border-bottom-color: var(--ink); }
.dd.is-open .dd-btn .icon { transform: rotate(180deg); }
.dd-list {
  position: absolute; z-index: 30; top: calc(100% + 10px); left: -1px;
  width: 300px; max-height: 372px; overflow-y: auto;
  margin: 0; padding: 0; list-style: none;
  background: var(--paper);
  border: 1px solid var(--ink-3);
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent;
  animation: ddIn .16s var(--ease);
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-list li {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  font-size: 17px; color: var(--ink); cursor: pointer;
}
.dd-list li:last-child { border-bottom: 0; }
.dd-list li:hover, .dd-list li:focus { background: var(--tint); outline: none; }
.dd-list li .icon { visibility: hidden; color: var(--ink); }
.dd-list li[aria-selected="true"] { background: var(--tint-2); }
.dd-list li[aria-selected="true"] .icon { visibility: visible; }

/* ==========================================================
   Profile
   ========================================================== */
.crumb .icon { margin-left: -3px; }
.profile-id { display: flex; align-items: center; gap: 24px; margin-top: 0; }
.profile-id h1 { margin-top: 0; }
.profile-username { margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--ink-3); }
.profile-id .meta { margin-top: 10px; }
.avatar.xl { width: 88px; height: 88px; font-size: 26px; flex: none; }
.profile-avatar-trigger {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.profile-avatar-trigger:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 4px; }
.profile-bio { margin-top: 26px; max-width: 34em; font-size: 19px; line-height: 1.55; }

.list-label {
  display: flex; justify-content: space-between;
  padding: 26px var(--pad) 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink-3);
}
.profile-activity-label { align-items: center; padding-block: 19px; }
.list-empty { padding: 28px var(--pad); font-size: 15px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-row {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  width: 100%;
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.act-row:hover { background: var(--tint); }
.act-when { padding: 30px 16px 30px var(--pad); font-size: 14px; color: var(--ink-3); }
.act-main { display: flex; flex-direction: column; gap: 6px; padding: 28px var(--pad) 30px 8px; min-width: 0; }
.act-kind { font-size: 14px; color: var(--ink-3); }
.act-title { font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; }
.act-excerpt { max-width: 38em; font-size: 16px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-topic { padding: 30px 32px; font-size: 15px; color: var(--ink-2); border-left: 1px solid var(--line); }
/* In conversation — the contributions themselves. One reading column: who wrote it,
   what they wrote (in the authored-prose face), then where it lives. Images sit beside
   the words on wide screens and below them on narrow ones. */
.home-conversation-list { list-style: none; margin: 0; padding: 0; }
.home-conversation-list > li {
  margin: 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.home-conversation-list > li.home-conversation-burst-row > a {
  display: block;
  max-width: 100%;
  padding: 10px var(--pad);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.home-conversation-list > li.home-conversation-burst-row > a:hover {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.home-conversation-list > li.home-conversation-burst-row > a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.home-conversation-list > li > .home-conversation-entry {
  border-top: 0;
  border-bottom: 0;
}
.home-conversation-list > li:has(> .home-conversation-entry.is-contextual-note):not(:last-child) {
  margin-bottom: 30px;
}
.home-discovery-conversation .home-conversation-list > li:has(> .home-conversation-entry.is-contextual-note):not(:last-child) {
  margin-bottom: 0;
  padding-bottom: 30px;
}
.home-conversation-entry {
  --conversation-media: clamp(220px, 21vw, 300px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: 14px;
  padding: 26px var(--pad) 25px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--motion-fast);
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note):hover,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row:hover {
  background: color-mix(in srgb, var(--paper) 50%, var(--tint) 50%);
}
.home-conversation-entry.has-inline-media { grid-template-rows: auto auto auto auto; }
.home-conversation-entry.has-inline-media > .home-conversation-media-inline {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
}
.home-conversation-entry.has-inline-media:not(.home-discovery-conversation *) > .home-conversation-context { grid-row: 4; }
.home-conversation-by {
  display: flex;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink-3);
}
.home-conversation-by.has-burst { flex-wrap: wrap; }
.home-conversation-burst {
  flex: none;
  margin-left: auto;
  color: var(--ink-3);
  font-size: 13px;
  line-height: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.home-conversation-burst:hover { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.home-conversation-burst:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.home-conversation-person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
}
.home-conversation-person .home-conversation-avatar { width: 28px; height: 28px; flex: none; font-size: 11px; }
.home-conversation-username { min-width: 0; overflow-wrap: anywhere; }
.home-conversation-person:hover .home-conversation-username {
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
}
.home-conversation-when { flex: none; font-variant-numeric: tabular-nums; }
.home-conversation-content {
  display: grid;
  grid-template-columns: minmax(0, 36em);
  align-items: start;
  gap: 18px 40px;
  min-width: 0;
  min-height: 0;
}
.home-conversation-excerpt { min-width: 0; min-height: 0; overflow: hidden; overflow-wrap: anywhere; }
.home-conversation-entry.has-clamped-excerpt .home-conversation-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--home-conversation-lines);
  align-self: start;
}
.home-conversation-entry.has-clamped-excerpt:not(.has-media):not(.has-inline-media) {
  height: var(--conversation-media);
  max-height: var(--conversation-media);
}
.home-conversation-entry.has-clamped-excerpt > .home-conversation-content {
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}
.home-conversation-continues { display: none; }
.home-conversation-entry.has-clamped-excerpt .home-conversation-continues { display: inline; }
.home-conversation-excerpt > :first-child { margin-top: 0; }
.home-conversation-excerpt .authored-body {
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  color: var(--ink);
}
.home-conversation-excerpt .authored-body + .authored-body { margin-top: .7em; }
.home-conversation-entry.is-short .home-conversation-excerpt .authored-body { font-size: 20px; line-height: 1.5; }
.home-conversation-entry.is-note:not(.is-contextual-note) .home-conversation-excerpt {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.home-conversation-entry.is-note:not(.is-contextual-note) .home-conversation-excerpt .authored-body { font-size: 17px; color: var(--text-soft); }
.home-conversation-entry.is-note:not(.is-contextual-note).is-short .home-conversation-excerpt .authored-body { font-size: 19px; }
.home-conversation-entry.is-contextual-note {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  cursor: default;
}
.home-conversation-entry.is-contextual-note > .home-conversation-parent-cell {
  display: block;
  min-width: 0;
  min-height: 0;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row {
  --conversation-media: clamp(220px, 21vw, 300px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: 14px;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 26px var(--pad) 25px;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--motion-fast);
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media {
  grid-template-rows: auto auto auto auto;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media > .home-conversation-media-inline {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media:not(.home-discovery-conversation *) > .home-conversation-context {
  grid-row: 4;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt .home-conversation-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--home-conversation-lines);
  align-self: start;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt:not(.has-media):not(.has-inline-media) {
  height: var(--conversation-media);
  max-height: var(--conversation-media);
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt > .home-conversation-content {
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt .home-conversation-continues {
  display: inline;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
  grid-template-columns: minmax(0, 1fr) var(--conversation-media);
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: 0;
  min-height: var(--conversation-media);
  height: var(--conversation-media);
  max-height: var(--conversation-media);
  padding: 0;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-by {
  grid-column: 1;
  grid-row: 1;
  padding: 26px var(--pad) 0;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-content {
  grid-column: 1;
  grid-row: 2;
  padding: 0 var(--pad);
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:not(.home-discovery-conversation *) > .home-conversation-context {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  padding: 0 var(--pad) 25px;
}
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
  grid-column: 2;
  grid-row: 1 / -1;
}
.home-conversation-entry.is-contextual-note .home-conversation-parent-cell :focus-visible,
.home-conversation-entry.is-contextual-note .notes :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.home-conversation-list .home-conversation-entry.is-contextual-note > .notes {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
}
.home-conversation-list .home-conversation-entry.is-contextual-note .notes-inner.has {
  border-left: 0;
}
.home-conversation-placeholder { font-size: 16px; color: var(--ink-3); }
/* Quotes keep the Thread page's imported/internal quotation frame, at feed size. */
.home-conversation-excerpt .q {
  margin: 14px 0;
  padding: 12px 18px 13px 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ink);
  background: var(--tint);
}
.home-conversation-excerpt .q p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--quote-ink);
}
.home-conversation-excerpt .q p + p { display: none; }
.home-conversation-excerpt .q cite {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
  color: var(--ink-2);
}
.home-conversation-excerpt .q cite .dot { margin: 0 7px; color: var(--ink-3); }
.home-conversation-excerpt .q cite a,
.home-conversation-excerpt .q .pvq-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.home-conversation-excerpt .lnk { margin: 12px 0 0; }
.home-conversation-excerpt .lnk a { margin-top: 0; font-size: 15px; }
.home-conversation-excerpt .lnk .dot { color: var(--ink-3); }
.home-conversation-excerpt .att-link-card { margin: 12px 0 0; }
/* Images: a square cell flush to the row's top, right and bottom edges, cropped with
   object-fit; the existing gallery viewer opens the original image uncropped. The words
   keep the row's usual padding on the left. */
.home-conversation-entry.has-media {
  grid-template-columns: minmax(0, 1fr) var(--conversation-media);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: var(--conversation-media);
  height: var(--conversation-media);
  max-height: var(--conversation-media);
  padding: 0;
}
.home-conversation-entry.has-media > .home-conversation-by { grid-column: 1; grid-row: 1; padding: 26px var(--pad) 0; }
.home-conversation-entry.has-media > .home-conversation-content { grid-column: 1; grid-row: 2; padding: 0 var(--pad); }
.home-conversation-entry.has-media:not(.home-discovery-conversation *) > .home-conversation-context { grid-column: 1; grid-row: 3; align-self: end; padding: 0 var(--pad) 25px; }
.home-conversation-entry.has-media > .home-conversation-media { grid-column: 2; grid-row: 1 / -1; }
.home-conversation-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--tint);
}
/* The picture fills the cell without sizing it: the row's height comes from the words,
   with the cell's width as its minimum, so the cell stays square. */
.home-conversation-media .pv-image-gallery { position: absolute; inset: 0; display: block; width: auto; max-width: none; margin: 0; }
.home-conversation-media .pv-image-gallery-item {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.home-conversation-media .pv-image-gallery-item:focus-visible { outline-offset: -3px; }
.home-conversation-media .pv-image-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.home-conversation-media-inline .att-ext { margin: 0; }
.home-conversation-media-inline .att-ext img { max-height: 260px; }
.home-conversation-media-inline .att-ext.is-gif img { max-width: min(100%, 320px); max-height: 280px; }
.home-conversation-media-hidden { font-size: 13px; color: var(--ink-3); }
.home-conversation-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
}
.home-conversation-thread {
  min-width: 0;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.home-conversation-entry:hover .home-conversation-thread { color: var(--ink); text-decoration-color: var(--ink-3); }
.home-discovery-conversation .home-conversation-entry:hover .home-conversation-thread:not(:hover):not(:focus-visible) {
  color: var(--ink-2);
  text-decoration-color: var(--line);
}
.home-conversation-thread:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.home-conversation-more::before { content: '·'; margin-right: 8px; color: var(--ink-3); }
.home-conversation-more-notes {
  align-self: flex-start;
  color: var(--ink-3);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.home-conversation-more-notes:hover { color: var(--ink-2); }
.home-conversation-more-notes:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 860px) {
  .home-conversation-entry { row-gap: 12px; padding: 22px var(--pad) 21px; }
  .home-conversation-content { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .home-conversation-entry.has-media { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; min-height: 0; height: auto; max-height: none; }
  .home-conversation-entry.has-media.has-clamped-excerpt > .home-conversation-content { height: var(--conversation-media); max-height: var(--conversation-media); }
  .home-conversation-entry.has-media > .home-conversation-by { padding-top: 22px; }
  .home-conversation-entry.has-media > .home-conversation-media { grid-column: 1; grid-row: 3; aspect-ratio: 1; border-left: 0; }
  .home-conversation-entry.has-media:not(.home-discovery-conversation *) > .home-conversation-context { grid-row: 4; padding-bottom: 21px; }
  .home-conversation-excerpt .authored-body { font-size: 17px; }
  .home-conversation-entry.is-short .home-conversation-excerpt .authored-body { font-size: 19px; }
  .home-conversation-entry.is-note:not(.is-contextual-note) .home-conversation-excerpt .authored-body { font-size: 16px; }
  .home-conversation-entry.is-note:not(.is-contextual-note).is-short .home-conversation-excerpt .authored-body { font-size: 17px; }
  .home-conversation-entry.is-contextual-note {
    display: block;
    padding: 0;
  }
  .home-conversation-entry.is-contextual-note > .home-conversation-parent-cell {
    min-height: 0;
    padding: 0;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row {
    row-gap: 12px;
    padding: 22px var(--pad) 21px;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    min-height: 0;
    height: auto;
    max-height: none;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media.has-clamped-excerpt > .home-conversation-content {
    height: var(--conversation-media);
    max-height: var(--conversation-media);
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-by {
    padding-top: 22px;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 1;
    border-left: 0;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:not(.home-discovery-conversation *) > .home-conversation-context {
    grid-row: 4;
    padding-bottom: 21px;
  }
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt:not(.has-media):not(.has-inline-media) {
    height: var(--conversation-media);
    max-height: var(--conversation-media);
  }
}
/* Attributed quotations are a preview exception: preserve the quote's own
   three-line paragraph preview, but let its attribution and the surrounding
   row determine the natural height. */
.home-conversation-entry:not(.is-contextual-note):has(.home-conversation-excerpt .q),
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row:has(.home-conversation-excerpt .q) {
  height: auto;
  max-height: none;
  grid-template-rows: auto auto auto;
}
.home-conversation-entry:not(.is-contextual-note).has-inline-media:has(.home-conversation-excerpt .q),
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media:has(.home-conversation-excerpt .q) {
  grid-template-rows: auto auto auto auto;
}
.home-conversation-entry:not(.is-contextual-note).has-media:has(.home-conversation-excerpt .q),
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:has(.home-conversation-excerpt .q) {
  grid-template-rows: auto auto auto;
  min-height: var(--conversation-media);
  height: auto;
  max-height: none;
}
.home-conversation-entry:not(.is-contextual-note):has(.home-conversation-excerpt .q) > .home-conversation-content,
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-content {
  grid-template-rows: auto;
  align-items: start;
  height: auto;
  max-height: none;
}
.home-conversation-entry.has-clamped-excerpt:has(.home-conversation-excerpt .q) .home-conversation-excerpt,
.home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt:has(.home-conversation-excerpt .q) .home-conversation-excerpt {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  align-self: auto;
  overflow: visible;
}
.home-conversation-excerpt .q cite,
.home-conversation-excerpt .q cite *,
.home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-context,
.home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-context a,
.home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-context .nw {
  white-space: normal;
  overflow-wrap: anywhere;
}
.home-conversation-excerpt .q cite { min-width: 0; }
.home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-context .home-conversation-continues { display: inline; }
/* Home-only context-first placement; shared row styles below remain legacy for
   the profile masonry, which continues to render its context as a footer. */
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note),
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row {
  grid-template-rows: auto auto auto;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note) > .home-conversation-context,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row > .home-conversation-context {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  margin-inline: calc(-1 * var(--pad));
  padding: 0 var(--pad) 8px;
  border-bottom: 1px solid var(--line);
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note) > .home-conversation-by,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row > .home-conversation-by {
  grid-column: 1;
  grid-row: 2;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note) > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row > .home-conversation-content {
  grid-column: 1;
  grid-row: 3;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note).has-inline-media,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media {
  grid-template-rows: auto auto auto auto;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note).has-inline-media > .home-conversation-media-inline,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media > .home-conversation-media-inline {
  grid-column: 1;
  grid-row: 4;
}
.home-discovery-conversation .home-conversation-entry.has-clamped-excerpt:not(.has-media):not(.has-inline-media),
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt:not(.has-media):not(.has-inline-media) {
  max-height: none;
}
.home-discovery-conversation .home-conversation-context .home-conversation-continues {
  display: inline;
}
.home-discovery-conversation .home-conversation-entry.has-media,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
  grid-template-columns: minmax(0, 1fr) var(--conversation-media);
  grid-template-rows: auto;
  align-content: start;
  max-height: none;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-context,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-context {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 26px var(--pad) 8px;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-by,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-by {
  grid-column: 1;
  grid-row: 2;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-content {
  grid-column: 1;
  grid-row: 3;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-media,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: start;
  width: var(--conversation-media);
  height: var(--conversation-media);
}
@media (max-width: 860px) {
  .home-discovery-conversation .home-conversation-entry:not(.is-contextual-note),
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row {
    grid-template-rows: auto auto auto;
  }
  .home-discovery-conversation .home-conversation-entry.has-media,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-context,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-context {
    grid-column: 1;
    grid-row: 1;
    padding-top: 22px;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-by,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-by {
    grid-column: 1;
    grid-row: 2;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-content,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-content {
    grid-column: 1;
    grid-row: 3;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-media,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
    grid-column: 1;
    grid-row: 4;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-left: 0;
  }
  /* The Home grid row gap owns spacing before media at every content length. */
  .home-conversation-entry:not(.is-contextual-note):has(.home-conversation-excerpt .q),
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row:has(.home-conversation-excerpt .q) {
    grid-template-rows: auto auto auto;
  }
  .home-conversation-entry:not(.is-contextual-note).has-inline-media:has(.home-conversation-excerpt .q),
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media:has(.home-conversation-excerpt .q) {
    grid-template-rows: auto auto auto auto;
  }
  .home-conversation-entry:not(.is-contextual-note).has-media:has(.home-conversation-excerpt .q),
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:has(.home-conversation-excerpt .q) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }
  .home-conversation-entry:not(.is-contextual-note):has(.home-conversation-excerpt .q) > .home-conversation-content,
  .home-conversation-list .home-conversation-parent-cell > .home-conversation-row:has(.home-conversation-excerpt .q) > .home-conversation-content {
    grid-template-rows: auto;
    height: auto;
    max-height: none;
  }
}

.home-conversation-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.home-conversation-error p { margin: 0; }

/* ==========================================================
   Settings
   ========================================================== */
.set-section {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--bar) + 16px);
}
.set-title { padding: 34px 16px 34px var(--pad); font-size: 17px; }
.set-items { grid-column: 2 / -1; min-width: 0; }
.set-item {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 26px var(--pad) 26px 8px;
  border-top: 1px solid var(--line);
}
.set-item:first-child { border-top: 0; }
.set-item.stack { display: block; }
.set-text { min-width: 0; max-width: 34em; }
.set-label { font-size: 18px; line-height: 1.35; }
.set-hint { margin-top: 5px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.set-control { flex: none; }
.set-text-size-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.set-text-size-feedback {
  max-width: 28em;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}
.set-text-size-feedback.is-error { color: var(--danger, #a33); }
.set-static { font-size: 17px; color: var(--ink-2); }
.set-profile-save { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 var(--pad) 22px 8px; }
.set-profile-save .btn[disabled] { cursor: default; }
.set-profile-feedback { font-size: 14px; color: var(--ink-2); }

/* Square switch */
.switch {
  position: relative; width: 48px; height: 26px;
  border: 1px solid var(--ink-3);
  background: transparent;
  transition: background .15s, border-color .15s;
}
.switch span {
  position: absolute; top: 4px; left: 4px; width: 16px; height: 16px;
  background: var(--ink-3);
  transition: transform .18s var(--ease), background .15s;
}
.switch[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked="true"] span { transform: translateX(22px); background: var(--paper); }

/* Segmented choice */
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button {
  height: 44px; padding: 0 18px;
  font-size: 15px; color: var(--ink-2);
  border-left: 1px solid var(--line);
  transition: background .12s, color .12s;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--tint); color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }

.set-input {
  width: 320px; height: 44px; padding: 0;
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent; font-size: 17px;
  transition: border-color .15s;
}
.set-input:focus { border-bottom-color: var(--ink); }
.set-bio {
  display: block; width: 100%; max-width: 34em; margin-top: 16px;
  padding: 16px 18px; border: 0; background: var(--tint);
  font-size: 17px; line-height: 1.55; resize: vertical;
}
.set-bio:focus { background: var(--tint-2); }
.set-bio-foot { display: flex; gap: 16px; max-width: 34em; margin-top: 8px; font-size: 13px; color: var(--ink-3); }

.mute-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); max-width: 44em; }
.mute {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 16px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 16px; color: var(--ink-2);
  transition: background .12s, color .12s;
}
.mute:hover { background: var(--tint); color: var(--ink); }
.mute .box { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--ink-3); flex: none; }
.mute .box .icon { width: 12px; height: 12px; visibility: hidden; color: var(--on-ink); }
.mute[aria-checked="true"] { color: var(--ink); }
.mute[aria-checked="true"] .box { background: var(--ink); border-color: var(--ink); }
.mute[aria-checked="true"] .box .icon { visibility: visible; }

.set-action { display: flex; align-items: center; gap: 16px; }
.btn.line { border: 1px solid var(--line); color: var(--ink); }
.btn.line:hover { background: var(--tint); border-color: var(--ink-3); }
.btn.line.danger { color: var(--ink-2); }

.rail-muted {
  display: flex; justify-content: space-between; width: 100%;
  padding: 18px var(--rail-pad); font-size: 14px; color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.rail-muted span { color: var(--ink-2); }
.rail-muted:hover span { color: var(--ink); }

/* Images hidden by setting */
.body .att.is-hidden .att-show {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 33.5em; height: 120px;
  border: 1px solid var(--line); font-size: 15px; color: var(--ink-2);
}
.body .att.is-hidden .att-show:hover { background: var(--tint); color: var(--ink); }

/* Settings applied at root */
:root[data-pv-large] .body p { font-size: 21px; }
:root[data-pv-large] .active-title { font-size: 22px; }
:root[data-pv-large] .post.op .body p { font-size: 22px; }
:root[data-pv-large] .post:not(.composer) .body > p.authored-body { font-size: 20px; }
:root[data-pv-large] .post.op:not(.composer) .body > p.authored-body { font-size: 21px; }
:root[data-pv-large] .body .q p { font-size: 20px; }
:root[data-pv-large] .note-text,
:root[data-pv-large] .note-body { font-size: 18px; }
:root[data-pv-text-size="standard"] .post:not(.composer) .body p,
:root[data-pv-text-size="standard"] .note-text,
:root[data-pv-text-size="standard"] .note-body { font-size: 18px; }
:root[data-pv-text-size="small"] .post:not(.composer) .body p,
:root[data-pv-text-size="small"] .note-text,
:root[data-pv-text-size="small"] .note-body { font-size: 16px; }
:root[data-pv-nonotes] .notes-inner.has .notes-main { display: none; }
:root[data-pv-nonotes] .notes-inner.has { background: transparent; border: 0; }
:root[data-pv-nonotes] .notes-inner.has .note-cell:not([data-note-act="add"]), :root[data-pv-nonotes] .notes-inner.has .note-cell.is-blank { display: none; }
:root[data-pv-nonotes] .notes-inner.has .note-cell[data-note-act="add"] { border-top: 0; border-bottom: 0; }
:root[data-pv-nonotes] .notes-inner.has .notes-cells { align-self: flex-end; }
:root[data-pv-nonotes] .notes-inner.has .notes-cells { border-top: 1px solid var(--line); padding-top: 0; }
:root[data-pv-nonotes] .notes.has-unread-target .notes-inner.has .notes-main { display: block; }
:root[data-pv-nonotes] .notes.has-unread-target .notes-inner.has { background: var(--tint); border-left: 1px solid var(--line); }
:root[data-pv-nonotes] .notes.has-unread-target .notes-inner.has .note-cell:not([data-note-act="add"]) { display: flex; }
:root[data-pv-still] *, :root[data-pv-still] *::before, :root[data-pv-still] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 1340px) {
  .act-row, .set-section { grid-template-columns: var(--author) minmax(0, 1fr); }
  .act-topic { display: none; }
}

/* Feed */
.cell-count { margin-left: 8px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.head-side .respond-cell + .respond-cell { border-top: 1px solid var(--line); }
.updates-bar { align-items: center; padding-top: 18px; padding-bottom: 18px; }
.updates-bar .seg button { height: 40px; }
.update-kind { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.update-kind b { font-weight: inherit; color: var(--ink); }
.act-excerpt.is-note { padding-left: 14px; border-left: 1px solid var(--line); }

/* Menu toggle (narrow screens only) */
.menu-toggle { display: none; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--ink-2); }
.menu-toggle:hover { color: var(--ink); background: var(--tint); }
:root.pv-rail-open .menu-toggle { color: var(--ink); background: var(--tint-2); }

@media (max-width: 860px) {
  .act-row { grid-template-columns: 1fr; }
  .act-when { padding: 20px var(--pad) 0; }
  .act-main { padding: 6px var(--pad) 22px; }
  .act-topic { display: none; }
  .list-label { padding-left: var(--pad); padding-right: var(--pad); }
  .updates-bar { flex-wrap: wrap; gap: 12px; }
  .set-section { grid-template-columns: 1fr; }
  .set-title { padding: 26px var(--pad) 4px; font-size: 20px; }
  .set-items { grid-column: 1; }
  .set-item { flex-wrap: wrap; gap: 14px; padding: 18px var(--pad); }
  .set-control { max-width: 100%; }
  .set-input { width: 100%; }
  .set-control:has(.set-input) { flex: 1 1 100%; }
  .seg { flex-wrap: wrap; }
  .mute-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .dd-list { width: min(300px, calc(100vw - 40px)); }
}
@media (max-width: 860px) { .menu-toggle { display: flex; } }
@media (max-width: 860px) {
  .who-link { display: flex; align-items: center; gap: 10px; }
  .who-link .name { display: inline; }
}

/* ==========================================================
   Post states, actions and inline panels
   ========================================================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.post-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.post-actions button { color: var(--ink-3); transition: color .12s; }
.post-actions button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.who-gone { display: block; padding-top: 6px; font-size: 14px; color: var(--ink-3); }
.post.is-gone .body { padding-top: 38px; }
.gone { font-size: 16px !important; line-height: 1.5 !important; color: var(--ink-3); }
.gone-action, .inline-link { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; font: inherit; cursor: pointer; }
.gone-action:hover, .inline-link:hover { color: var(--ink); }
.post-panel {
  max-width: 36em; margin-top: 26px; padding: 20px 0 4px;
  border-top: 1px solid var(--ink);
  font-size: 16px; line-height: 1.5; color: var(--ink-2);
}
.post-panel b { font-weight: inherit; color: var(--ink); }
.post-panel p { font-size: 16px !important; line-height: 1.5 !important; max-width: none !important; }
.post-panel .actions { margin-top: 18px; }
.choice-list { margin-top: 16px; border-top: 1px solid var(--line); }
.choice {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  text-align: left; transition: background .12s;
}
.choice:hover { background: var(--tint); }
.choice .radio { flex: none; width: 16px; height: 16px; margin-top: 3px; border: 1px solid var(--ink-3); border-radius: 50%; }
.choice[aria-checked="true"] .radio { border: 5px solid var(--ink); }
.choice-l { display: block; font-size: 16px; color: var(--ink); }
.choice-h { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.choice.check { border: 0; padding: 10px 0; align-items: center; }
.choice.check:hover { background: transparent; }
.choice.check .box { display: flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; border: 1px solid var(--ink-3); }
.choice.check .box .icon { width: 12px; height: 12px; visibility: hidden; color: var(--on-ink); }
.choice.check[aria-checked="true"] .box { background: var(--ink); border-color: var(--ink); }
.choice.check[aria-checked="true"] .box .icon { visibility: visible; }
.choice.check .choice-l { font-size: 15px; color: var(--ink-2); }
.field-block { display: block; margin-top: 18px; }
.field-block > span { display: block; font-size: 14px; color: var(--ink-2); }
.field-block textarea { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 0; background: var(--tint); font-size: 16px; line-height: 1.5; resize: vertical; }
.field-block textarea:focus { background: var(--tint-2); }
.field-block .set-input { width: 100%; max-width: 420px; }
.field-error { display: block; min-height: 0; margin-top: 6px; font-size: 14px; font-style: normal; color: var(--ink); }
.field-error:empty { display: none; }
.field-error::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; background: var(--ink); vertical-align: middle; }
.compose-status { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.compose-status:empty { display: none; }
.edit-area .cblocks { margin-top: 0; }
.edit-area .actions { flex-wrap: wrap; }
.title-edit { display: block; margin-top: 18px; max-width: 30em; }
.title-edit .title-input { margin-top: 0; font-size: 26px; height: 68px; }
.composer.is-paused .hint { padding: 0; }
.lnk.is-bad span { font-size: 15px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.att-missing { display: flex; align-items: center; justify-content: center; max-width: 33.5em; height: 120px; border: 1px solid var(--line); font-size: 15px; color: var(--ink-3); }

/* Rail pagination and normal-flow mobile site links */
.row.thread.is-removed .t { color: var(--ink-3); }
.empty-action { display: block; margin-top: 10px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.rail-bottom {
  color: var(--ink);
  background: var(--paper);
  margin-top: auto;
}
.rail-bottom-row { display: block; }
.rail-page-viewport .list > li:last-child > .row.thread { border-bottom: 0; }
.home-discovery-latest .active-list > li:last-child > .active-row { border-bottom: 0; }
.rail-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 0;
  padding: 0;
  color: var(--ink-2);
  transition: color var(--motion-fast), background var(--motion-fast);
}
.rail-pagination button:not(:disabled):hover { color: var(--ink); background: var(--tint); }
.rail-pagination button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}
.rail-pagination .icon { width: 20px; height: 20px; }
.rail-pagination .icon-mirror-x { transform: scaleX(-1); }
.rail-pagination {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-width: 0;
  width: 100%;
  height: 49px;
  border-top: 1px solid var(--line);
}
.rail-pagination button:first-child { border-right: 1px solid var(--line); }
.rail-pagination button:last-child { border-left: 1px solid var(--line); }
.rail-pagination button:disabled { color: var(--ink-3); cursor: default; }
.rail-page-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rail-page-viewport > .empty {
  padding: 20px var(--rail-pad);
  color: var(--ink-3);
}
.home-global-links { display: none; }

@media (max-width: 860px) {
  .home-layout {
    display: flex;
    min-height: calc(100vh - var(--bar));
    min-height: calc(100dvh - var(--bar) - env(safe-area-inset-bottom));
  }
  .home-center { display: flex; flex: 1; flex-direction: column; min-width: 0; }
  .home-center > .foot { display: none; }
  .home-discovery-feed.is-active { display: flex; flex: 1; flex-direction: column; }
  .home-global-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--line);
  }
  .home-global-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 0 3px;
    border-right: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }
  .home-global-links a:last-child { border-right: 0; }
  .home-global-links a:hover { background: var(--tint); color: var(--ink); }
  .home-global-links a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -3px;
  }
  .shell { padding-bottom: env(safe-area-inset-bottom); }
}

/* Settings additions */
.set-empty { margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.member-list { list-style: none; margin: 14px 0 0; padding: 0; max-width: 44em; border-top: 1px solid var(--line); }
.member-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-action .set-static { margin-right: 6px; }
.set-feedback-line { padding: 0 var(--pad) 22px 8px; margin-top: -8px; font-size: 14px; color: var(--ink-2); max-width: 44em; }
.set-item .set-feedback-line { padding: 0; margin-top: 10px; flex-basis: 100%; }
.acct-form { max-width: 36em; margin-top: 8px; }
.acct-form .actions { margin-top: 22px; }
.btn.danger.primary { background: var(--ink); }
.cell-note { font-size: 13px; color: var(--ink-3); }
.respond-cell[data-mute-member] { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 12px; padding-bottom: 12px; row-gap: 2px; }
.respond-cell[data-mute-member] .cell-note { flex-basis: 100%; }

/* Account screens */
.auth-section {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  border-bottom: 1px solid var(--line);
}
.auth-main { padding: 26px var(--pad) 40px 8px; min-width: 0; }
.auth-form { max-width: 420px; }
.auth-form .field-block:first-child, .auth-lead + .field-block { margin-top: 8px; }
.auth-form .actions { margin-top: 26px; flex-wrap: wrap; gap: 16px; }
.auth-lead, .auth-copy p { font-size: 18px; line-height: 1.55; max-width: 32em; color: var(--ink); }
.auth-copy p + p { margin-top: 12px; }
.auth-copy .set-hint { font-size: 15px; }
.auth-copy .actions { margin-top: 26px; flex-wrap: wrap; gap: 16px; }
.auth-copy b { font-weight: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.auth-provider-hint {
  max-width: 36em; margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--line); color: var(--ink-2);
  font-size: 14px; line-height: 1.5;
}
.auth-recovery .auth-lead { max-width: 34em; }
.auth-links { margin-top: 18px; font-size: 15px; }
.auth-status { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.auth-status:empty { display: none; }
.auth-aside { padding: 32px 32px 40px; border-left: 1px solid var(--line); background: var(--tint); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.auth-aside p + .inline-link, .auth-aside .inline-link { display: inline-block; margin-top: 6px; }
.aside-rule { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.proto-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin-top: 36px; padding-top: 16px; max-width: 36em;
  border-top: 1px dashed var(--line);
}
.proto-row > span:first-child { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.proto-note { font-size: 14px; color: var(--ink-3); }

/* Public pages */
.page-nav { padding: 20px 0; }
.page-nav-item {
  display: block;
  width: 100%;
  padding: 9px 32px;
  color: var(--ink-2);
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  transition: color .12s, background .12s;
}
.page-nav-item:hover { color: var(--ink); background: var(--tint); }
.page-nav-item.is-current { color: var(--ink); }
.page-nav-item.is-current::before { content: ''; display: inline-block; width: 12px; height: 1px; margin: 0 10px 4px 0; background: var(--ink); }
.page-nav-item:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.page-section {
  display: grid;
  grid-template-columns: var(--author) minmax(0, 1fr) var(--note);
  border-bottom: 1px solid var(--line);
}
.page-section .set-title { margin: 0; font-weight: inherit; line-height: 1.35; }
.page-body { grid-column: 2 / -1; padding: 30px var(--pad) 34px 8px; max-width: calc(33.5em * 18 / 17 + var(--pad)); }
.page-body p, .page-body li { font-size: 18px; line-height: 1.6; }
.info-hub-section { scroll-margin-top: calc(var(--bar) + 16px); }
.head h1#about-public-voice { scroll-margin-top: calc(var(--bar) + 16px); }
.info-hub-section:focus-visible,
.head h1#about-public-voice:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.info-subsection + .info-subsection { margin-top: 26px; }
.info-subsection h3 {
  margin: 0 0 9px;
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
.info-hub-lead { margin-bottom: 22px; color: var(--ink-2); }
.page-body p + p, .page-body ul + p, .page-body p + ul { margin-top: .8em; }
.page-body ul { margin: 0; padding-left: 1.1em; }
.page-body li + li { margin-top: .35em; }
.page-body .mail { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ink-3); }
.page-body .mail:hover { border-bottom-color: var(--ink); }
.contact-form { width: 100%; max-width: 34em; }
.contact-field { display: grid; gap: 7px; margin: 0 0 22px; }
.contact-field label { color: var(--ink-2); font-size: 15px; }
.contact-field input, .contact-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  line-height: 1.5;
}
.contact-field input:focus-visible, .contact-field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}
.contact-field textarea { min-height: 180px; max-height: 50vh; resize: vertical; }
.contact-field [aria-invalid="true"] { border-color: var(--ink-2); }
.contact-error { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.contact-error[hidden] { display: none; }
.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  transition: opacity .12s;
}
.contact-submit:hover { opacity: .82; }
.contact-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.contact-submit:disabled { cursor: wait; opacity: .55; }
.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.contact-status { max-width: 34em; margin-top: 18px; color: var(--ink-2); font-size: 15px; }
.contact-status:empty { display: none; }
.contact-status:focus { outline: none; }
.contact-direct { margin-top: 26px; }

@media (max-width: 860px) {
  .auth-section, .page-section { grid-template-columns: 1fr; }
  .auth-section .set-title { display: none; }
  .auth-main { padding: 22px var(--pad) 32px; }
  .auth-aside { border-left: 0; border-top: 1px solid var(--line); padding: 22px var(--pad) 28px; }
  .page-section .set-title { padding: 26px var(--pad) 0; font-size: 20px; }
  .page-body { grid-column: 1; padding: 12px var(--pad) 28px; }
  .head-side.page-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    padding: 0 var(--pad);
    border-top: 1px solid var(--line);
  }
  .page-nav-item {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 46px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    line-height: 1.35;
  }
  .page-nav-item:last-child { grid-column: 1 / -1; }
  .page-nav-item.is-current::before { flex: none; }
  .info-hub-section .set-title { padding-top: 26px; }
  .info-subsection + .info-subsection { margin-top: 22px; }
  .post-actions { margin-top: 0; margin-left: auto; flex-basis: 100%; }
  .post.is-gone .body { padding-top: 12px; }
}

/* Editing a response uses the same writing surface as Respond */
.edit-area .cblocks { max-width: calc(33.5em * 19 / 17 + 48px); }
.edit-area textarea.authored {
  display: block; width: 100%; padding: 22px 24px;
  border: 0; border-radius: 0; background: var(--tint);
  font-size: 19px; line-height: 1.6; resize: none; overflow: hidden;
  transition: background .15s;
}
.edit-area textarea.authored:focus { background: var(--tint-2); }
.edit-area textarea.authored::placeholder { color: var(--ink-3); }
.edit-area .actions { margin-top: 16px; }

/* Long thread titles step down so they never swamp the page */
.head h1.is-long { font-size: clamp(26px, 2.2vw, 32px); line-height: 1.2; max-width: 30em; }
@media (max-width: 860px) { .head h1.is-long { font-size: 24px; } }

/* Profile activity rows carry topic context in the kind line, so no side column */
.act-row.no-side .act-main { grid-column: 2 / -1; }
.act-kind b, .update-kind b { font-weight: inherit; color: var(--ink); }
.stat .active-in { margin-top: 8px; line-height: 1.5; }
.stat .active-in .inline-link { color: var(--ink-2); }
@media (max-width: 860px) { .act-row.no-side .act-main { grid-column: 1; } }

/* Post actions (Edit · Delete / Report) sit bottom-left of the post, in the author column */
.post > .post-foot { grid-column: 1; grid-row: 2; align-self: end; padding: 0 16px 23px var(--pad); min-width: 0; }
.post > .notes { grid-row: 2; }
.post-foot .post-actions { margin: 0; }
@media (max-width: 860px) {
  .post > .post-foot { grid-row: auto; padding: 0 var(--pad) 18px; }
  .post > .notes { grid-row: auto; }
  .post-foot .post-actions { margin: 0; flex-basis: auto; }
}

/* ==========================================================
   Quote + Reply, Sources, note edit
   ========================================================== */
.icon.icon-fill { fill: currentColor; stroke: none; }

/* Internal Public Voice quote — same 1px rule as other quotes, attribution names the member */
.cb-pvquote .pvq-text { margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--quote-ink); }
.cb-pvquote .pvq-text p + p { margin-top: .6em; }
.body .q.pvq cite .pvq-link { color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.body .q.pvq cite .pvq-link:hover { text-decoration-color: var(--ink-2); }

/* Subtle Sources control on the thread meta line */
.sources-link { font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color .12s, text-decoration-color .12s; }
.sources-link:hover { color: var(--ink); text-decoration-color: var(--ink-3); }
.sources-link .sources-n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.latest-link { margin-left: 0; }

/* Note edit (only while the 60-second window is open) */
.note-edit { margin-left: 4px; font-size: 13px; color: var(--ink-3); transition: color .12s; }
.note-edit:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.note-meta .note-edit + .note-pos { margin-left: auto; }

/* Contextual staff actions stay within the conversation's existing square-cell system. */
.thread-controls {
  display: grid;
  justify-items: start;
  gap: 3px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.head-side .thread-controls {
  justify-items: stretch;
  gap: 0;
  margin-top: 0;
  padding-top: 0;
}
.head-side .thread-controls-label { padding: 12px 32px 5px; }
.head-side .thread-control {
  display: flex;
  align-items: center;
  min-height: var(--note-cell);
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink-2);
  text-decoration: none;
}
.head-side .thread-control:hover,
.head-side .thread-control:focus-visible {
  background: var(--tint-2);
  color: var(--ink);
}
.thread-controls-label {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .04em;
}
.thread-control,
.staff-text-action {
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.thread-control:hover,
.staff-text-action:hover { color: var(--ink); text-decoration-color: var(--ink-2); }
.staff-text-action { display: inline-block; margin-top: 8px; }
.staff-remove-cell { color: var(--ink-2); }
.staff-remove-cell:hover { color: var(--ink); }
.staff-remove-cell svg { width: 18px; height: 18px; }
.staff-note-action { white-space: nowrap; }
.moderation-redacted {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
}
.staff-flow {
  max-width: 760px;
  margin: 18px 0 20px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.head + .staff-flow { padding-left: var(--pad); }
.staff-flow-title { font-size: 15px; }
.staff-flow-title b { font-weight: 400; }
.staff-flow-help { margin-top: 5px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.staff-field,
.redact-source { display: grid; gap: 6px; margin-top: 14px; color: var(--ink-2); font-size: 13px; }
.staff-field em { color: var(--ink-3); font-style: normal; }
.staff-field select,
.staff-field textarea,
.redact-source textarea {
  display: block;
  width: min(100%, 600px);
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--tint);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.staff-field textarea { resize: vertical; }
.redact-source textarea {
  min-height: 64px;
  max-height: 200px;
  user-select: text;
  cursor: text;
}
.staff-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}
.staff-confirm input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--ink); }
.redact-selection { display: grid; gap: 3px; color: var(--ink-2); font-size: 12px; }
.redact-selection q { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.staff-flow .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.staff-flow-error { margin-top: 10px; color: var(--ink); font-size: 13px; }
.staff-flow :focus-visible,
.thread-control:focus-visible,
.staff-text-action:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 2px; }
:root[data-pv-nonotes] .notes-inner.has .note-cell[data-note-act="staff-remove"] { display: flex; }
@media (max-width: 860px) {
  .thread-controls { margin-top: 10px; }
  .staff-flow { margin-top: 14px; }
  .staff-flow .actions > button { min-height: 40px; }
}

/* Sources page */
.src-list { list-style: none; margin: 0; padding: 0; }
.src-row {
  display: block;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}
.src-type { margin-bottom: 8px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.src-main { padding: 24px var(--pad) 28px; min-width: 0; max-width: calc(33.5em * 19 / 17 + var(--pad)); }
.src-title { display: inline-block; font-size: 20px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
a.src-title { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
a.src-title:hover { text-decoration-color: var(--ink-2); }
.src-facts { margin-top: 6px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.src-facts .dot, .src-ref .dot { margin: 0 7px; color: var(--ink-3); }
.src-excerpt { margin-top: 14px; padding-left: 16px; border-left: 1px solid var(--line); font-size: 16px; line-height: 1.55; color: var(--quote-ink); overflow-wrap: anywhere; }
.src-thumb { display: block; margin-top: 14px; max-width: 220px; max-height: 140px; }
.src-refs-label { margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.src-refs { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 36em; }
.src-refs li { border-bottom: 1px solid var(--line); }
.src-ref { display: flex; align-items: center; width: 100%; padding: 10px 0; font-size: 15px; color: var(--ink-2); transition: color .12s, background .12s; }
.src-ref-copy { min-width: 0; overflow-wrap: anywhere; }
.src-ref-arrow { flex: none; margin-left: auto; color: var(--ink-3); }
.src-ref-arrow .icon { width: 16px; height: 16px; }
.src-ref:hover { color: var(--ink); background: var(--tint); }

/* ==========================================================
   Join / onboarding (unified auth)
   ========================================================== */
.join-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.join-btn { min-width: 232px; justify-content: flex-start; gap: 14px; }
.join-g { fill: currentColor; stroke: none; }
.join-panel .hint { margin-bottom: 0; }
.auth-copy .join-actions + .actions { margin-top: 18px; }

.mock-provider { max-width: 30em; border: 1px dashed var(--line); padding: 18px 20px 8px; }
.proto-tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.auth-copy p.mock-title { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.gid-list { list-style: none; margin: 14px 0 0; padding: 0; }
.gid-list li + li { border-top: 1px solid var(--line); }
.gid { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; width: 100%; padding: 14px 0; text-align: left; }
.gid:hover .gid-name, .gid:focus-visible .gid-name { text-decoration: underline; text-underline-offset: 3px; }
.gid-name { font-size: 16px; color: var(--ink); }
.gid-mail { grid-column: 1; font-size: 14px; color: var(--ink-3); overflow-wrap: anywhere; }
.gid-kind { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; color: var(--ink-2); }
.gid-wait { padding: 14px 0; font-size: 15px; color: var(--ink-3); }

.code-input { letter-spacing: .3em; font-variant-numeric: tabular-nums; max-width: 11em !important; }
.mock-code { letter-spacing: .12em; color: var(--ink-2); }

.req, .opt { font-style: normal; margin-left: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.req { color: var(--ink-2); }
.field-block > .handle-field { display: flex; align-items: center; max-width: 420px; margin-top: 8px; border-bottom: 1px solid var(--line); transition: border-color .15s; }
.field-block > .handle-field:focus-within { border-bottom-color: var(--ink); }
.field-block > .handle-field .set-input { margin-top: 0; border-bottom: 0; }
.handle-at { flex: none; padding-right: 4px; font-size: 16px; color: var(--ink-3); }
.handle-field .set-input { flex: 1; min-width: 0; }
.ob-status { min-height: 1.4em; margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.ob-status.is-ok { color: var(--ink-2); }
.ob-status.is-bad { color: var(--ink); }
.ob-status.is-bad::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; background: var(--ink); vertical-align: middle; }
.ob-avatar { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.ob-avatar legend { padding: 0; font-size: 14px; color: var(--ink-2); }
.ob-avatar-row { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.ob-avatar-assigned { display: block; flex: none; width: 72px; height: 72px; }
.ob-avatar-details { min-width: 0; }
.ob-avatar-picked { margin: 0; color: var(--ink-2); font-size: 15px; }
.ob-upload-action { min-height: 46px; margin-top: 10px; padding: 0 18px; gap: 10px; }
.ob-upload-action .icon { width: 18px; height: 18px; }
.ob-avatar-note { max-width: 34em; margin-top: 12px; }
.ob-avatar-custom-preview { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ob-avatar-custom-preview .avatar { flex: none; width: 40px; height: 40px; }
.ob-avatar-custom-copy p { margin: 0; color: var(--ink-2); font-size: 14px; }
.ob-avatar-custom-copy .inline-link { margin-top: 4px; }
.avatar-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.avatar-choice { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid transparent; cursor: pointer; }
.avatar-choice .avatar { width: 40px; height: 40px; }
.avatar-choice:hover { background: var(--tint); }
.avatar-choice[aria-checked="true"] { border-color: var(--ink); }
.avatar-choice:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 2px; }
.profile-avatar-editor { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.profile-avatar-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.profile-avatar-panel {
  position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
}
.profile-avatar-panel h2 { margin: 0; padding-right: 38px; font-size: 25px; line-height: 1.2; }
.profile-avatar-panel > p:not(.profile-avatar-status) { margin-top: 10px; color: var(--ink-2); line-height: 1.5; }
.profile-avatar-close {
  position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0;
  background: transparent; color: var(--ink-2); font-size: 26px; line-height: 1; cursor: pointer;
}
.profile-avatar-close:hover { background: var(--tint); color: var(--ink); }
.profile-avatar-close:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 2px; }
.profile-avatar-choices { margin: 18px 0; }
.profile-avatar-choice .avatar { width: 40px; height: 40px; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-avatar-status { min-height: 1.4em; margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.up-icon { background: var(--tint-2); color: var(--ink-2); }
.up-icon .icon { width: 18px; height: 18px; }
.ob-terms { margin-top: 16px; }

.avatar.has-img { background: transparent; padding: 0; overflow: hidden; }
.avatar.has-img > svg, .avatar.has-img > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.has-img > img { border-radius: 50%; }

@media (max-width: 600px) {
  .join-actions { flex-direction: column; gap: 10px; margin-top: 18px; }
  .join-btn { width: 100%; min-width: 0; min-height: 48px; }
  .gid { grid-template-columns: 1fr; }
  .gid-kind { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .avatar-choices { gap: 4px; }
  .avatar-choice { width: 44px; height: 44px; }
  .avatar-choice .avatar { width: 34px; height: 34px; }
  .set-avatar-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .set-avatar-choices > .settings-avatar-choice { width: min(44px, 100%); }
  .ob-avatar-row { align-items: flex-start; gap: 12px; }
  .ob-avatar-assigned { width: 64px; height: 64px; }
  .ob-upload-action { min-height: 44px; padding: 0 14px; }
}

/* ==========================================================
   Avatar crop (circular window over a square workspace)
   ========================================================== */
.avc-open, .avc-open body { overflow: hidden; }
.avc-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.avc-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.avc {
  position: relative; width: min(400px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 24px 24px 22px; background: var(--paper); border: 1px solid var(--line); color: var(--ink);
}
.avc h2 { font-size: 22px; line-height: 1.25; font-weight: inherit; }
.avc-help { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.avc-stage {
  position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 18px auto 0; overflow: hidden;
  background: var(--tint-2); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.avc-stage.is-dragging { cursor: grabbing; }
.avc-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.avc-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.avc-mask {
  position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -1px;
}
.avc-zoom { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); margin: 16px auto 0; }
.avc-z { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); color: var(--ink-2); }
.avc-z:hover { background: var(--tint); color: var(--ink); }
.avc-z:focus-visible, .avc-range:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.avc-range { flex: 1; min-width: 0; accent-color: var(--ink); height: 44px; }
.avc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* Settings: keep the avatar description, active controls, and defaults together. */
.set-item-avatar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}
.set-item-avatar > .set-text { width: 100%; max-width: 34em; }
.set-avatar-control { width: 100%; min-width: 0; }
.set-avatar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.set-avatar-row .avatar { flex: none; width: 56px; height: 56px; }
.set-avatar-defaults {
  min-width: 0;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.set-avatar-defaults > .set-label { color: var(--ink-2); font-size: 15px; }
.set-avatar-choices { margin-top: 8px; }
.ob-avatar-note { margin-top: 10px; }

/* External image by URL (inline, where it was placed) */
.body .att-ext .att-open { display: inline-block; max-width: 100%; vertical-align: top; }
.body .att-ext img { width: auto; height: auto; max-width: 100%; max-height: 520px; }
.body .att-ext.is-gif img { max-width: min(100%, 420px); max-height: 420px; }
.body .att-ext figcaption a, .cb-src { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; overflow-wrap: anywhere; }
.body .att-ext figcaption a:hover, .cb-src:hover { color: var(--ink-2); text-decoration-color: var(--ink-3); }
.body .att-ext figcaption .dot { margin: 0 7px; }
.cb-extimg img { width: auto; height: auto; }
.cb-attr.cb-attr-one { grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
.cb-src { display: inline-block; margin-top: 8px; font-size: 13px; }
.src-main .att-missing { margin-top: 12px; }

/* ----------------------------------------------------------
   Member profile (profile-masonry.js)
   CENTRE: pictures and videos on one shelf, then the member's writing in one reading
   column | RIGHT: the existing panel, then View all contributions.
   1px rules, no gaps, no cards. Images and video posters are flush squares.
   ---------------------------------------------------------- */
.profile-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--note);
  align-items: stretch;
}
.profile-collection { min-width: 0; }
.profile-section-label { align-items: center; padding-top: 16px; padding-bottom: 16px; }
.profile-section-meta { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.profile-section-meta .inline-link { font-size: 14px; }

/* Pictures and videos: one row of squares; "See all" adds rows in place. */
.profile-shelf { overflow: hidden; border-bottom: 1px solid var(--line); }
.profile-shelf-grid {
  display: grid;
  grid-template-columns: repeat(var(--shelf-cols, 4), minmax(0, 1fr));
  margin: -1px -1px 0 0;            /* cell rules sit on the label's rule and the column edge */
  padding: 0;
  list-style: none;
}
.profile-shelf-cell {
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--tint);
}
.profile-shelf-cell .pv-image-gallery { position: absolute; inset: 0; display: block; width: auto; max-width: none; margin: 0; }
.profile-shelf-cell .pv-image-gallery-item {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}
.profile-shelf-cell .pv-image-gallery-item[hidden] { display: none; }
.profile-shelf-cell .pv-image-gallery-item img {
  display: block; width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: cover;
}
.profile-shelf-cell .pv-image-gallery-item:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.profile-shelf-count,
.profile-shelf-host {
  position: absolute;
  padding: 3px 7px;
  background: #161616;            /* labels on pictures stay dark in both themes */
  font-size: 11px; line-height: 1.3; color: #fff;
  pointer-events: none;
}
.profile-shelf-count { top: 0; right: 0; font-variant-numeric: tabular-nums; }
.profile-shelf-video {
  position: absolute; inset: 0;
  display: block;
  background: #161616;
  color: #fff;
}
.profile-shelf-thumb { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.profile-shelf-host { left: 0; bottom: 0; color: #a3a3a3; }
.profile-shelf-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); }
.profile-shelf-play svg { display: block; width: 100%; height: 100%; }
.profile-shelf-play circle { fill: #fff; opacity: .94; }
.profile-shelf-play path { fill: #111; }
.profile-shelf-video:focus-visible { outline: 2px solid var(--ink-3); outline-offset: -3px; }
/* Where it was posted: revealed on hover or focus (the words are also in the list below). */
.profile-shelf-where {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 10px 9px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .12s;
}
.profile-shelf-cell:hover .profile-shelf-where,
.profile-shelf-cell:focus-within .profile-shelf-where { opacity: 1; }
@media (hover: none) { .profile-shelf-where { display: none; } }

/* Writing: the In conversation rows themselves (see .home-conversation-entry). */
.profile-writing-bar.updates-bar { padding-top: 14px; padding-bottom: 14px; }
.profile-writing-bar .seg button { height: 36px; padding: 0 14px; font-size: 14px; }
.profile-tab-count { margin-left: 8px; opacity: .6; font-variant-numeric: tabular-nums; }
.profile-thread-link {
  color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
}
.profile-shelf-where .profile-thread-link:hover { color: var(--ink); text-decoration-color: var(--ink-3); }
.profile-thread-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.profile-writing-more {
  display: block; width: 100%;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 15px; color: var(--ink-2);
  transition: background .12s;
}
.profile-writing-more:hover { background: var(--tint); color: var(--ink); }

/* Right column: the existing panel above, then View all contributions. */
.profile-aside { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.profile-view-all { border-top: 0; border-bottom: 1px solid var(--line); }

/* Narrower desktops: the right column would squeeze the centre, so its link follows. */
@media (max-width: 1140px) {
  .profile-body { grid-template-columns: minmax(0, 1fr); }
  .profile-aside { border-left: 0; }
  .profile-view-all { padding-left: var(--pad); }
}
@media (max-width: 860px) {
  .profile-writing-bar .seg { flex-wrap: nowrap; }
  .profile-shelf-play { width: 32px; height: 32px; }
}

/* ----------------------------------------------------------
   Homepage: In conversation / In pictures (home-pictures.js)
   The centre header has two tabs, like the phone tabs; In pictures is a masonry of
   whole pictures in closed 1px cells, newest first.
   ---------------------------------------------------------- */
.bar-context.is-home-switch { padding: 0 var(--pad); }    /* lines up with the feed below */
.home-centre-switch { display: flex; align-self: stretch; align-items: stretch; gap: 24px; }
.home-centre-switch button {
  position: relative;
  display: flex; align-items: center;
  padding: 2.25px 0 0;            /* optical centre: the label's ink sits on the cell's centre line */
  color: var(--ink-3);
  font: inherit;
  transition: color var(--motion-fast);
}
/* The underline sits on the cell's bottom edge without moving the label off centre. */
.home-centre-switch button::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: transparent;
  transition: background var(--motion-fast);
}
.home-centre-switch button:hover { color: var(--ink-2); }
.home-centre-switch button[aria-pressed="true"] { color: var(--ink); }
.home-centre-switch button[aria-pressed="true"]::after { background: var(--ink); }
.home-centre-switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

.home-discovery-pictures { display: none; }
@media (min-width: 861px) {
  .home-center.is-pictures .home-discovery-conversation { display: none; }
  .home-center.is-pictures .home-discovery-pictures { display: block; }
}
.home-pictures-grid { display: flex; align-items: stretch; }   /* column rules run to the longest */
.home-pictures-col { flex: 1 1 0; min-width: 0; }
.home-pictures-col + .home-pictures-col { border-left: 1px solid var(--line); }
.home-picture {
  position: relative;
  display: block;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.home-picture-frame { display: block; width: 100%; max-width: 100%; overflow: hidden; background: var(--tint); }
.home-picture-frame img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.home-picture-frame.is-tall img { object-fit: contain; }    /* very tall pictures stay whole */
.home-picture-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 14px 10px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px; line-height: 1.3; color: var(--ink-3);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion-fast);
}
.home-picture-user { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.home-picture-thread { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-picture:hover .home-picture-caption,
.home-picture:focus-visible .home-picture-caption { opacity: 1; }
.home-picture:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.home-pictures-note { margin: 0; padding: 22px var(--pad); font-size: 15px; color: var(--ink-3); }
.home-pictures-sentinel { height: 1px; }
/* Phones (and touch screens): who and where sit in a line beneath each picture. */
@media (max-width: 860px), (hover: none) {
  .home-picture-caption {
    position: static;
    flex-direction: column; gap: 1px;
    padding: 8px 12px 10px;
    border-top: 0;
    font-size: 12px;
    opacity: 1;
  }
  .home-picture-user,
  .home-picture-thread { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* In conversation: one Home-only spacing system. Keep Thread and Profile
   presentation native, and let the existing grid gaps own the visible rhythm. */
.home-discovery-conversation {
  --home-conversation-cell-padding: 40px;
  --home-conversation-section-gap: 20px;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note),
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row {
  row-gap: var(--home-conversation-section-gap);
  height: auto;
  max-height: none;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note):not(.has-media) {
  padding: var(--home-conversation-cell-padding) var(--pad);
}
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row:not(.has-media) {
  padding: var(--home-conversation-cell-padding) var(--pad);
}
.home-discovery-conversation .home-conversation-entry.has-media {
  grid-template-rows: auto;
  row-gap: 0;
  align-items: start;
  min-height: unset;
  padding: 0;
}
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
  grid-template-rows: auto;
  row-gap: 0;
  align-items: start;
  min-height: unset;
  padding: 0;
}
.home-discovery-conversation .home-conversation-entry.has-clamped-excerpt:not(.has-media):not(.has-inline-media),
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-clamped-excerpt:not(.has-media):not(.has-inline-media) {
  height: auto;
  max-height: none;
}
.home-discovery-conversation .home-conversation-entry.has-media.has-clamped-excerpt > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media.has-clamped-excerpt > .home-conversation-content {
  height: auto;
  max-height: none;
}
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note) > .home-conversation-context,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row > .home-conversation-context {
  margin: 0;
  padding: 0;
  border: 0;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  grid-column: 1;
  grid-row: 1;
  row-gap: var(--home-conversation-section-gap);
  align-content: start;
  min-width: 0;
  padding-block: var(--home-conversation-cell-padding);
}
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack {
  padding-block: var(--home-conversation-cell-padding);
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-context,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-context {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  border: 0;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-by,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-by {
  grid-column: 1;
  grid-row: 2;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-content {
  grid-column: 1;
  grid-row: 3;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-context,
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-by,
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-context,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-by,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack > .home-conversation-content {
  padding-inline: var(--pad);
  padding-block: 0;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-media,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack:has(> .home-conversation-content > .home-conversation-excerpt:empty),
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack:has(> .home-conversation-content > .home-conversation-excerpt:empty) {
  grid-template-rows: auto auto;
}
.home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-text-stack:has(> .home-conversation-content > .home-conversation-excerpt:empty) > .home-conversation-content,
.home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-text-stack:has(> .home-conversation-content > .home-conversation-excerpt:empty) > .home-conversation-content {
  display: none;
}
.home-discovery-conversation .home-conversation-list > li:has(> .home-conversation-entry.is-contextual-note):not(:last-child) {
  padding-bottom: 0;
}
.home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .notes-main {
  padding: 21px var(--pad) var(--home-conversation-cell-padding);
}

@media (max-width: 860px) {
  .home-discovery-conversation .home-conversation-entry.has-media,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    height: auto;
    max-height: none;
    row-gap: var(--home-conversation-section-gap);
  }
  .home-discovery-conversation .home-conversation-entry.has-media {
    padding: 0;
  }
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media {
    padding: 0;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-context,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-context {
    grid-column: 1;
    grid-row: 1;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-by,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-by {
    grid-column: 1;
    grid-row: 2;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-content,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-content {
    grid-column: 1;
    grid-row: 3;
  }
  .home-discovery-conversation .home-conversation-entry.has-media > .home-conversation-media,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media > .home-conversation-media {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-left: 0;
    margin-top: 0;
  }
  .home-discovery-conversation .home-conversation-entry.has-media:has(> .home-conversation-text-stack > .home-conversation-content > .home-conversation-excerpt:empty),
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:has(> .home-conversation-text-stack > .home-conversation-content > .home-conversation-excerpt:empty) {
    grid-template-rows: auto auto;
  }
  .home-discovery-conversation .home-conversation-entry.has-media:has(> .home-conversation-text-stack > .home-conversation-content > .home-conversation-excerpt:empty) > .home-conversation-media,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:has(> .home-conversation-text-stack > .home-conversation-content > .home-conversation-excerpt:empty) > .home-conversation-media {
    grid-row: 2;
  }
  .home-discovery-conversation .home-conversation-entry:not(.is-contextual-note).has-media:has(> .home-conversation-text-stack):has(.home-conversation-excerpt .q),
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-media:has(> .home-conversation-text-stack):has(.home-conversation-excerpt .q) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .home-discovery-conversation .home-conversation-entry.has-inline-media > .home-conversation-media-inline,
  .home-discovery-conversation .home-conversation-list .home-conversation-parent-cell > .home-conversation-row.has-inline-media > .home-conversation-media-inline {
    margin-top: 0;
  }
  .home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .notes-main {
    padding: 14px var(--pad) var(--home-conversation-cell-padding);
  }
}

@media (min-width: 861px) and (max-width: 1340px) {
  .home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .note-meta {
    padding-left: var(--pad);
    padding-right: 12px;
  }
  .home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .note-text {
    margin-left: var(--pad);
    margin-right: var(--pad);
    margin-bottom: 0;
    padding-bottom: var(--home-conversation-cell-padding);
  }
}

.home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .note-meta {
  padding-left: var(--pad);
}
.home-discovery-conversation .home-conversation-entry.is-contextual-note > .notes .note-text {
  margin-left: var(--pad);
  margin-right: var(--pad);
  margin-bottom: 0;
  padding-bottom: var(--home-conversation-cell-padding);
}

.new-thread-sticky {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
}

.new-thread-sticky input {
  margin: 0;
}

.pv-public-preview-banner {
  min-height: 26px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

/* Private messaging: the same paper, ink and quiet rules as public discussion. */
.pv-messages-active #main { min-width: 0; padding: 0; overflow: hidden; }
.pv-messages-active #rail { background: var(--paper); }
.pv-messages-layout { min-width: 0; min-height: calc(100dvh - var(--bar)); }
.pv-desktop-inbox,
.pv-mobile-inbox { display: none; }
.pv-messages-rail .pv-rail-heading {
  height: 64px;
  padding: 0 var(--rail-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
}
.pv-rail-heading > span:last-child { color: var(--ink-2); font-size: 12px; }
.pv-rail-content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.pv-inbox-list { list-style: none; margin: 0; padding: 0; }
.pv-inbox-item { border-bottom: 1px solid var(--line); }
.pv-inbox-row {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 13px;
  padding: 13px var(--rail-pad);
  color: var(--ink);
  transition: background var(--motion-fast);
}
.pv-inbox-row:hover,
.pv-inbox-row.is-selected { background: var(--tint); }
.pv-inbox-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.pv-inbox-row .pv-message-avatar { width: 38px; height: 38px; }
.pv-inbox-copy { display: block; min-width: 0; }
.pv-inbox-top { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; }
.pv-inbox-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pv-inbox-top time { flex: none; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.pv-inbox-preview {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-inbox-row.has-unread .pv-inbox-name,
.pv-inbox-row.has-unread .pv-inbox-preview { color: var(--ink); }
.pv-unread-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.pv-unread-error { padding: 10px var(--rail-pad); color: var(--ink-2); font-size: 12px; }
.pv-unread-error button { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pv-inbox-refresh-error,
.pv-read-state-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px var(--rail-pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}
.pv-inbox-refresh-error span,
.pv-read-state-error span { min-width: 0; overflow-wrap: anywhere; }
.pv-inbox-refresh-error button,
.pv-read-state-error button {
  flex: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pv-inbox-refresh-error button:disabled,
.pv-read-state-error button:disabled { opacity: .55; cursor: default; }
.pv-inbox-more { padding: 18px var(--rail-pad) 24px; }
.pv-inbox-more button,
.pv-older button,
.pv-message-retry {
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.pv-inbox-more button:hover,
.pv-older button:hover,
.pv-message-retry:hover { color: var(--ink); text-decoration-color: currentColor; }
.pv-inbox-more button:disabled,
.pv-older button:disabled { color: var(--ink-3); cursor: wait; }
.pv-message-state,
.pv-message-empty { padding: 28px var(--rail-pad); color: var(--ink-2); }
.pv-message-state h2,
.pv-message-empty h2 { margin-bottom: 8px; color: var(--ink); font-size: 17px; font-weight: 400; }
.pv-message-state p,
.pv-message-empty p { max-width: 32em; font-size: 14px; overflow-wrap: anywhere; }
.pv-message-state a,
.pv-message-state [data-pv-signin],
.pv-message-state > button,
.pv-message-state .pv-message-retry { display: inline-block; margin-top: 14px; }
.pv-message-state a,
.pv-message-state [data-pv-signin] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pv-message-empty { padding-top: 48px; padding-bottom: 48px; }
.pv-message-index { display: block; margin-bottom: 18px; color: var(--ink-3); font: 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.pv-message-skeleton { padding: 26px var(--rail-pad); }
.pv-message-skeleton span {
  display: block;
  height: 11px;
  margin: 0 0 19px;
  background: var(--tint);
  animation: pv-message-pulse 1.4s ease-in-out infinite alternate;
}
.pv-message-skeleton span:nth-child(1) { width: 76%; }
.pv-message-skeleton span:nth-child(2) { width: 91%; }
.pv-message-skeleton span:nth-child(3) { width: 61%; }
@keyframes pv-message-pulse { from { opacity: .48; } to { opacity: 1; } }
.pv-messages-layout { display: block; }
.pv-conversation-host { min-width: 0; }
.pv-empty-selection { display: none; }
.pv-conversation { height: calc(100dvh - var(--bar)); min-height: 400px; display: flex; flex-direction: column; min-width: 0; }
.pv-conversation-head {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 20px clamp(24px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}
.pv-message-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--ink-2);
  font-size: 14px;
}
.pv-message-back:hover { color: var(--ink); }
.pv-message-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pv-thread-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pv-thread-person > div { min-width: 0; }
.pv-thread-person .pv-message-avatar { width: 40px; height: 40px; }
.pv-eyebrow { margin-bottom: 4px; color: var(--ink-3); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pv-thread-username { color: var(--ink); font-size: 17px; overflow-wrap: anywhere; }
.pv-thread-username:hover { text-decoration: underline; text-underline-offset: 3px; }
.pv-message-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(24px, 8vw, 120px) 64px; scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
.pv-older { max-width: 680px; margin: 0 auto 28px; text-align: center; }
.pv-message-entry { max-width: 680px; margin: 0 auto; padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.pv-message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; margin-bottom: 10px; }
.pv-message-author { min-width: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.pv-message-author:hover { text-decoration: underline; text-underline-offset: 3px; }
.pv-message-meta time { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.pv-message-text { color: var(--text-soft); font-family: var(--font-body); font-weight: var(--font-body-weight); font-size: 16px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.pv-message-text p { margin: 0; max-width: none; white-space: inherit; overflow-wrap: anywhere; }
.pv-message-text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; overflow-wrap: anywhere; }
.pv-message-text a:hover { text-decoration-color: currentColor; }
.pv-message-composer {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 14px clamp(24px, 8vw, 120px) 18px;
  background: var(--paper);
}
.pv-message-compose-inner { max-width: 680px; margin: 0 auto; }
.pv-message-compose-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pv-message-compose-heading label { color: var(--ink-2); font-size: 13px; }
.pv-message-character-count { flex: none; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.pv-message-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  max-height: 180px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  overflow-wrap: anywhere;
}
.pv-message-composer textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.pv-message-composer textarea:disabled { background: var(--tint); cursor: wait; }
.pv-message-compose-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; margin-top: 9px; }
.pv-message-compose-help { flex: 1 1 12em; margin: 0; color: var(--ink-3); font-size: 11px; line-height: 1.4; }
.pv-message-compose-actions { display: flex; flex: 1 1 20em; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; }
.pv-message-feedback { flex: 1 1 12em; min-width: 0; margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.pv-message-feedback.is-error { color: var(--ink); }
.pv-message-check { color: var(--ink-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.pv-message-check:hover { color: var(--ink); }
.pv-message-send {
  flex: none;
  min-width: 72px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  transition: opacity var(--motion-fast);
}
.pv-message-send:hover:not(:disabled) { opacity: .82; }
.pv-message-send:focus-visible,
.pv-message-check:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pv-message-send:disabled { opacity: .45; cursor: not-allowed; }
.pv-empty-selection { max-width: 580px; margin: 16vh auto 0; padding: 32px; }
.pv-empty-selection h1 { margin: 8px 0 10px; color: var(--ink); font-family: var(--font-body); font-size: clamp(24px, 3vw, 36px); line-height: 1.2; }
.pv-empty-selection > p:last-child { max-width: 28em; color: var(--ink-2); font-size: 15px; }
.pv-message-signed-out { max-width: 34em; margin: 10vh auto; padding: 30px; }
.pv-message-signed-out h1 { margin: 8px 0 20px; font-size: 28px; }
.pv-message-signed-out [data-pv-signin] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.pv-profile-message-open,
.pv-profile-message-open body { overflow: hidden; }
.pv-profile-message-layer {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}
.pv-profile-message-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .48);
}
.pv-profile-message-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
}
.pv-profile-message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pv-profile-message-head h2 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.25;
}
.pv-profile-message-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin: -8px -8px 0 0;
  color: var(--ink-2);
}
.pv-profile-message-close:hover { background: var(--tint); color: var(--ink); }
.pv-profile-message-label {
  display: block;
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 13px;
}
.pv-profile-message-dialog textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 108px;
  max-height: 240px;
  margin-top: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  overflow-wrap: anywhere;
}
.pv-profile-message-dialog textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
}
.pv-profile-message-help {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.4;
}
.pv-profile-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
}
.pv-profile-message-footer .pv-message-feedback { flex: 1 1 12em; margin: 0; }
.pv-profile-message-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.pv-profile-message-dialog :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (min-width: 861px) {
  .pv-messages-active #rail { display: block; }
  .pv-messages-rail .pane { position: absolute; }
  .pv-messages-active .pv-conversation { border-left: 0; }
  .pv-messages-active .pv-empty-selection { display: block; }
}
@media (max-width: 860px) {
  .pv-messages-active #rail { display: none; }
  .pv-messages-layout { min-height: calc(100dvh - var(--bar)); }
  .pv-desktop-inbox { display: none; }
  .pv-messages-active .pv-mobile-inbox { display: block; }
  .pv-mobile-inbox-head {
    padding: 22px var(--pad) 18px;
    border-bottom: 1px solid var(--line);
  }
  .pv-mobile-inbox-head h1 { font-size: 30px; line-height: 1.15; }
  .pv-unread-count { display: block; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
  .pv-mobile-inbox .pv-inbox-row { min-height: 82px; padding-inline: var(--pad); }
  .pv-messages-active:not(.pv-messages-selected) .pv-conversation-host { display: none; }
  .pv-messages-selected .pv-mobile-inbox { display: none; }
  .pv-messages-selected .pv-conversation-host { display: block; }
  .pv-conversation { height: calc(100dvh - var(--bar)); min-height: 0; }
  .pv-conversation-head { min-height: 82px; gap: 18px; padding: 12px var(--pad); }
  .pv-message-back { min-height: 44px; padding-right: 8px; }
  .pv-thread-person .pv-message-avatar { width: 36px; height: 36px; }
  .pv-message-scroll { padding: 12px var(--pad) 40px; }
  .pv-message-composer { padding: 12px var(--pad) max(12px, env(safe-area-inset-bottom)); }
  .pv-message-compose-bottom { display: block; }
  .pv-message-compose-help { margin-bottom: 8px; }
  .pv-message-compose-actions { justify-content: space-between; }
  .pv-message-entry { padding: 19px 0 22px; }
  .pv-empty-selection { display: none; }
}
@media (max-width: 380px) {
  .pv-inbox-row { grid-template-columns: 34px minmax(0, 1fr) 7px; gap: 9px; }
  .pv-inbox-row .pv-message-avatar { width: 34px; height: 34px; }
  .pv-inbox-top { align-items: flex-start; flex-direction: column; gap: 1px; }
  .pv-inbox-top time { font-size: 10px; }
  .pv-message-scroll { padding-inline: 16px; }
}

/* Home YouTube previews are isolated from the existing square-image and text rows. */
.home-discovery-conversation .home-conversation-entry:not(.is-contextual-note):not(.has-media).has-youtube-video {
  grid-template-columns: minmax(0, 1fr) var(--conversation-media);
  grid-template-rows: auto;
  column-gap: 0;
  row-gap: 0;
  align-content: start;
  align-items: start;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0;
}
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  grid-column: 1;
  grid-row: 1;
  row-gap: var(--home-conversation-section-gap);
  align-content: start;
  min-width: 0;
  padding-block: var(--home-conversation-cell-padding);
}
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-context,
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-by,
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-content {
  grid-column: 1;
  padding-inline: var(--pad);
  padding-block: 0;
}
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-context { grid-row: 1; }
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-by { grid-row: 2; }
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-text-stack > .home-conversation-content { grid-row: 3; }
.home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-video-column {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  width: 100%;
  border-left: 0;
  background: transparent;
}
.home-conversation-video-preview { flex: none; padding: 30px 30px 30px 0; }
.home-conversation-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.home-conversation-video-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.home-conversation-video-trigger:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.home-conversation-video-thumbnail {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.home-conversation-video-play {
  position: relative;
  z-index: 1;
  display: block;
  width: 66px;
  height: 46px;
  border-radius: 10px;
  background: #e62117;
  transition: background-color var(--motion-fast), transform var(--motion-fast);
}
.home-conversation-video-play::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  content: "";
  transform: translate(-40%, -50%);
}
.home-conversation-video-trigger:hover .home-conversation-video-play {
  background: #f12b22;
  transform: scale(1.05);
}
.home-conversation-video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.home-conversation-video-column > .home-conversation-media {
  flex: none;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  border-left: 0;
}
@media (max-width: 860px) {
  .home-discovery-conversation .home-conversation-entry:not(.is-contextual-note):not(.has-media).has-youtube-video {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .home-discovery-conversation .home-conversation-entry.has-youtube-video > .home-conversation-video-column {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    border-left: 0;
  }
}
