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

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist/webfonts/Geist[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist/webfonts/Geist-Italic[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono/webfonts/GeistMono[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono/webfonts/GeistMono-Italic[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel/webfonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel Grid";
  src: url("fonts/GeistPixel/webfonts/GeistPixel-Grid.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel Line";
  src: url("fonts/GeistPixel/webfonts/GeistPixel-Line.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel Square";
  src: url("fonts/GeistPixel/webfonts/GeistPixel-Square.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel Triangle";
  src: url("fonts/GeistPixel/webfonts/GeistPixel-Triangle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --border: #e4e0d8;
  --text-primary: #1e1c18;
  --text-secondary: #6a6760;
  --text-muted: #a09c94;
  --accent: #1e1c18;
  --clay: #c0604a;
  --clay-bg: #f5ece9;
  --clay-border: #deb8af;
  --teal: #4a8c84;
  --teal-bg: #e6f0ef;
  --highlight: #f0c94a;
  --col-gap: 12px;
  --row-unit: 180px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

header {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  align-items: baseline;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.wordmark {
  font-family: "Geist Pixel Line", sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-primary);
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "calt" 1;
}

.header-meta {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  border-color: var(--clay-border);
  color: var(--clay);
}
.btn-danger:hover {
  border-color: var(--clay);
  color: var(--clay);
}
.btn-icon {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  padding: 0;
}
.btn-icon .source-icon {
  width: 14px;
  height: 14px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.highlighted,
.modal-avatar.highlighted {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.source-icon {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: block;
}

.source-stack {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
}
.source-stack .source-icon { color: currentColor; }

.primary-text {
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.primary-text,
.person-link {
  color: var(--text-primary);
  text-decoration: none;
}
a.primary-text:hover,
.person-link:hover .primary-text {
  color: var(--clay);
}

.secondary-text {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Empty-state and error messages rendered as a lone paragraph in place of a
   list (e.g. "No sources configured.", "Couldn't load refresh settings.")
   need padding so they align with the table rows around them. These paragraphs
   are injected as the sole child of a list container. */
#status-activity > p.secondary-text:only-child,
#people-list > p.secondary-text:only-child,
#streams-list > p.secondary-text:only-child,
#cadence-rows > p.secondary-text:only-child,
#refresh-status-list > p.secondary-text:only-child,
#threshold-rows > p.secondary-text:only-child {
  padding: 14px;
}

.muted {
  color: var(--text-muted);
  font-size: 12px;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
}

.panel-note {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}
.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.person-cell,
.source-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}
.status-pill.good {
  color: var(--teal);
  background: var(--teal-bg);
  border-color: #bad7d2;
}
.status-pill.warn {
  color: var(--clay);
  background: var(--clay-bg);
  border-color: var(--clay-border);
}
.source-state-line {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.source-state {
  color: var(--text-secondary);
}
.source-state.good {
  color: var(--teal);
}
.source-state.manual {
  color: #b58a00;
}
.source-state.paused,
.source-state.disabled {
  color: var(--clay);
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.toggle input {
  appearance: none;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.toggle input::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.16);
}
.toggle input:checked { background: var(--teal); }
.toggle input:checked::after { transform: translateX(16px); }

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}
.toggle-list .primary-text { font-size: 10px; }
.toggle-list--descriptive .toggle {
  justify-content: space-between;
  gap: 12px;
  white-space: normal;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label,
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="search"],
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  height: 34px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  vertical-align: top;
}
.panel-search {
  max-width: 220px;
  height: 30px;
  font-size: 12px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

input:focus,
select:focus {
  outline: 2px solid var(--teal-bg);
  border-color: var(--teal);
}

.mobile-label {
  display: none;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Home grid */
.feed {
  padding: 20px 24px;
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--col-gap);
  grid-auto-flow: dense;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.card[data-span="2"] { grid-row: span 2; }
.card[data-span="3"] { grid-row: span 3; grid-column: span 2; }

.card-image {
  width: 100%;
  display: block;
  background: var(--border);
}
.card[data-span="1"] .card-image { height: calc(var(--row-unit) - 64px); object-fit: cover; }
.card[data-span="2"] .card-image { height: calc(var(--row-unit) * 2 - 64px); object-fit: cover; }
.card[data-span="3"] .card-image { height: calc(var(--row-unit) * 3 - 80px); object-fit: cover; }
.card.text-post .card-image { display: none; }

.card-body { padding: 10px 12px 12px; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.card-meta .avatar {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.person-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-meta .source-icon {
  width: 16px;
  height: 16px;
}

.card-snippet {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card[data-span="1"] .card-snippet { -webkit-line-clamp: 2; }
.card[data-span="3"] .card-snippet,
.card[data-span="4"] .card-snippet,
.card[data-span="5"] .card-snippet,
.card[data-span="6"] .card-snippet {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-primary);
}
.card-time-row {
  margin-top: 6px;
}
.card-time {
  font-size: 10px;
  color: var(--text-muted);
}

/* Time elements swap relative <-> absolute on hover. Both strings live in the DOM; only
   one is shown at a time. The absolute form replaces the relative in place. */
.time-toggle {
  cursor: default;
}
.time-toggle .time-abs {
  display: none;
}
.time-toggle:hover .time-rel {
  display: none;
}
.time-toggle:hover .time-abs {
  display: inline;
}

.badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-popular {
  background: var(--clay-bg);
  color: var(--clay);
  border: 1px solid var(--clay-border);
}

/* Count badge over the card image for multi-image posts (collapsed Flickr sets, embeds). */
.badge-count {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(12, 10, 6, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.card.text-post .card-body { padding: 14px; }
.card.text-post .card-snippet {
  font-size: 13px;
  -webkit-line-clamp: 5;
  color: var(--text-primary);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-image-pane {
  flex: 1.2;
  background: #0c0a06;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-image-pane img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Multiple images: stack vertically at natural aspect ratio and scroll. */
.modal-image-pane.multi {
  display: block;
  align-items: stretch;
  overflow-y: auto;
}
.modal-image-pane.multi img {
  height: auto;
  object-fit: contain;
}
.modal-image-pane.multi img + img { margin-top: 4px; }
.modal-image-pane.no-image { display: none; }
.modal.text-only { max-width: 550px; }

.modal-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px;
  gap: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  flex-shrink: 0;
}
.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.modal-person { font-weight: 600; font-size: 14px; }
.modal-handle { font-size: 12px; color: var(--text-muted); }
.modal-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-source-row .source-icon {
  width: 18px;
  height: 18px;
}
.modal-time {
  font-size: 11px;
  color: var(--text-muted);
}
.modal-caption {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}
.modal-caption p {
  margin-bottom: 0.75em;
}
.modal-caption p:last-child {
  margin-bottom: 0;
}
.modal-hashtags {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}
.modal-link {
  display: inline-block;
  font-size: 12px;
  color: var(--clay);
  text-decoration: none;
  border-bottom: 1px solid var(--clay-border);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.modal-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.modal-comments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.modal-comments-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}
.comment-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}
.comment-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  z-index: 101;
}

/* Settings */
.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
  max-width: 1500px;
  margin: 0 auto;
}

.settings-nav {
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.45);
  padding: 18px 12px;
  position: sticky;
  top: 58px;
  align-self: start;
  height: calc(100vh - 58px);
}

.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.nav-button:hover { background: var(--surface); color: var(--text-primary); }
.nav-button.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.settings-main {
  padding: 28px 32px 48px;
  width: 100%;
}
.section { display: none; }
.section.active { display: block; }
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.section-kicker {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.people-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 0.8fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.people-list-row:last-child { border-bottom: 0; }
.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.status-summary {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.status-summary strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
}
.status-work-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 120px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.status-work-row:last-child { border-bottom: 0; }
.status-issue-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 90px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.status-issue-row:last-child { border-bottom: 0; }
.status-activity-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.status-activity-row:last-child { border-bottom: 0; }
.write-account-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(140px, 0.6fr) minmax(140px, 0.7fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.write-account-row:last-child { border-bottom: 0; }
.rule-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 130px;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}
.rule-row:last-child { border-bottom: 0; }
.threshold-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 120px 54px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.threshold-row .toggle,
.threshold-row-labels span:last-child {
  justify-self: center;
}
.threshold-row-labels {
  padding-top: 9px;
  padding-bottom: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.threshold-row:last-child { border-bottom: 0; }
.cadence-row {
  display: grid;
  grid-template-columns: 160px 1fr 120px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.cadence-row:last-child { border-bottom: 0; }
.refresh-status-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 120px 110px 120px 28px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.refresh-status-row .btn-icon,
.refresh-status-labels span:last-child {
  justify-self: center;
}
.refresh-status-row:last-child { border-bottom: 0; }
.refresh-status-labels {
  padding-top: 9px;
  padding-bottom: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Person settings */
.person-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}
.person-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.person-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 14px;
}
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.source-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.source-list-row:last-child { border-bottom: 0; }
.source-list-row .source-icon {
  width: 18px;
  height: 18px;
}
.source-list-row.stream-row {
  grid-template-columns: minmax(240px, 1.2fr) 160px auto auto;
}
.source-list-row.manual-refresh-row {
  grid-template-columns: minmax(240px, 1fr) 120px 120px auto;
}
.actions-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
}
.avatar-option {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.avatar-option.selected {
  border-color: var(--teal);
  background: var(--teal-bg);
}
.avatar-option-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.avatar-option-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 800px) {
  header {
    align-items: center;
    gap: 12px;
  }

  .settings-shell {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: sticky;
    top: 58px;
    z-index: 9;
    display: flex;
    gap: 6px;
    height: auto;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
  }
  .nav-button {
    width: auto;
    flex-shrink: 0;
  }
  .settings-main {
    padding: 22px 16px 36px;
  }
  .section-header {
    flex-direction: column;
    gap: 12px;
  }
  .field-grid,
  .status-summary-grid,
  .people-list-row,
  .status-work-row,
  .status-issue-row,
  .status-activity-row,
  .write-account-row,
  .rule-row,
  .threshold-row,
  .cadence-row,
  .refresh-status-row {
    grid-template-columns: 1fr;
  }

  .person-main {
    padding: 22px 16px 36px;
  }
  .person-header,
  .page-grid {
    display: block;
  }
  .person-header {
    padding-bottom: 16px;
  }
  .source-list-row {
    grid-template-columns: 1fr;
  }
  .source-list-row.stream-row {
    grid-template-columns: 1fr;
  }

  .mobile-label {
    display: block;
  }
}

@media (max-width: 700px) {
  .modal { flex-direction: column; max-height: 95vh; }
  .modal-image-pane { min-height: 220px; flex: none; }
  .modal-image-pane.multi { min-height: 0; max-height: 60vh; }
  .feed { grid-template-columns: 1fr; }
  .card { grid-column: 1 / -1; grid-row: auto; }
}

/* Font exploration */
.font-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.font-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.font-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 11px;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0;
  cursor: pointer;
}

.font-control input {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
}

.font-control input:checked {
  border-color: var(--teal);
  background: var(--teal);
}

.font-antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-geometric {
  text-rendering: geometricPrecision;
}

.font-kerned {
  font-kerning: normal;
}

.font-ligatures {
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "calt" 1;
}

body:not(.font-kerned) .font-word,
body:not(.font-kerned) .font-chip {
  font-kerning: none;
}

body:not(.font-ligatures) .font-word,
body:not(.font-ligatures) .font-chip {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.font-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.font-kicker {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  max-width: 680px;
}

.font-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.font-sample {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.font-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.font-word {
  font-size: 58px;
  line-height: 0.9;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: 0;
}

.font-word.small {
  font-size: 34px;
}

.font-word.geist { font-family: "Geist", sans-serif; }
.font-word.mono { font-family: "Geist Mono", monospace; }
.font-word.pixel-circle { font-family: "Geist Pixel Circle", sans-serif; }
.font-word.pixel-grid { font-family: "Geist Pixel Grid", sans-serif; }
.font-word.pixel-line { font-family: "Geist Pixel Line", sans-serif; }
.font-word.pixel-square { font-family: "Geist Pixel Square", sans-serif; }
.font-word.pixel-triangle { font-family: "Geist Pixel Triangle", sans-serif; }

.font-weight-300 { font-weight: 300; }
.font-weight-400 { font-weight: 400; }
.font-weight-500 { font-weight: 500; }
.font-weight-600 { font-weight: 600; }
.font-italic { font-style: italic; }

.font-meta {
  color: var(--text-secondary);
  font-size: 11px;
}

.font-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.font-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-secondary);
  font-size: 12px;
}

.font-chip.geist { font-family: "Geist", sans-serif; }
.font-chip.mono { font-family: "Geist Mono", monospace; }
.font-chip.pixel-circle { font-family: "Geist Pixel Circle", sans-serif; }
.font-chip.pixel-grid { font-family: "Geist Pixel Grid", sans-serif; }
.font-chip.pixel-line { font-family: "Geist Pixel Line", sans-serif; }
.font-chip.pixel-square { font-family: "Geist Pixel Square", sans-serif; }
.font-chip.pixel-triangle { font-family: "Geist Pixel Triangle", sans-serif; }

@media (max-width: 1000px) {
  .font-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .font-controls {
    justify-content: flex-start;
    margin-top: 12px;
  }
  .font-main {
    padding: 22px 16px 40px;
  }
  .font-header {
    display: block;
  }
  .font-grid {
    grid-template-columns: 1fr;
  }
  .font-word {
    font-size: 48px;
  }
}

/* Reply composer (prds/bluesky-replies.md) */
.reply-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.reply-composer-note {
  font-size: 11px;
  color: var(--text-muted);
}
.reply-composer textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-primary);
}
.reply-composer textarea:focus {
  outline: 2px solid var(--teal-bg);
  border-color: var(--teal);
}
.reply-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reply-error {
  font-size: 12px;
  color: var(--clay);
}
.comment--pending { opacity: 0.6; }
.comment--failed .comment-text { color: var(--clay); }

.reply-count { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.reply-count--over { color: var(--clay); font-weight: 600; }
.comment-reply-btn {
  border: none;
  background: none;
  padding: 0;
  margin-left: auto;
  font-size: 11px;
  color: var(--clay);
  cursor: pointer;
}
.comment-reply-btn:hover { text-decoration: underline; }
