/* Family Brief Writers
   A calm publication studio inside the louder political command center. */
:root {
  --ink: #151515;
  --muted: #686865;
  --faint: #8b8b86;
  --rule: #deded8;
  --soft: #f2f2ee;
  --paper: #fff;
  --desk: #f7f7f4;
  --red: #c90000;
  --red-dark: #970000;
  --gold: #ffcc00;
  --green: #176b4d;
  --rail: #111;
  --link: #111;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-ui: Arial, Helvetica, sans-serif;
  --font-body: Georgia, "Times New Roman", Times, serif;
  --sidebar: 15rem;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { font-size: 18px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--link); }
a:hover { color: var(--red); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.75rem;
}
.skip-link:focus { top: 0.5rem; }
.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;
}

/* Publication studio shell */
.writer-desk {
  background: var(--desk);
  font-family: var(--font-ui);
}
.desk-app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.desk-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.35rem 1rem 1rem;
  background: var(--paper);
  border-right: 1px solid var(--rule);
}
.desk-brand {
  display: inline-block;
  color: var(--red);
  font: 400 1.65rem/0.95 var(--font-display);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.desk-brand span { color: var(--ink); }
.desk-kicker {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font: 700 0.68rem/1 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.desk-create,
.desk-new,
.desk-quiet {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 4px;
  padding: 0.65rem 0.95rem;
  font: 700 0.84rem/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.desk-create,
.desk-new {
  border: 1px solid var(--red);
  background: var(--red);
  color: var(--paper);
}
.desk-create { width: 100%; }
.desk-create span { font-size: 1.15rem; line-height: 0; }
.desk-create:hover,
.desk-new:hover,
.desk-create:focus-visible,
.desk-new:focus-visible { background: var(--red-dark); color: var(--paper); }
.desk-quiet {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.desk-quiet:hover,
.desk-quiet:focus-visible { border-color: var(--ink); color: var(--ink); }
.desk-create:focus-visible,
.desk-new:focus-visible,
.desk-quiet:focus-visible,
.format-toolbar button:focus-visible,
.format-toolbar select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[contenteditable]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.desk-create:active,
.desk-new:active { transform: translateY(1px); }
.desk-nav,
.desk-secondary {
  display: grid;
  gap: 0.25rem;
}
.desk-nav a,
.desk-secondary a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 0.7rem;
  border-radius: 5px;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  font: 700 0.82rem/1.2 var(--font-ui);
  text-decoration: none;
}
.desk-nav a span {
  width: 1.15rem;
  color: var(--muted);
  text-align: center;
}
.desk-nav a:hover,
.desk-nav a.on { background: var(--soft); color: var(--ink); }
.desk-nav a.on span { color: var(--red); }
.desk-account {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  min-width: 0;
}
.desk-avatar {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 800 0.72rem/1 var(--font-ui);
}
.desk-avatar.large {
  width: 3rem;
  height: 3rem;
  flex-basis: 3rem;
  background: var(--red);
  font-size: 1rem;
}
.desk-account p {
  min-width: 0;
  margin: 0;
}
.desk-account strong,
.desk-account span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desk-account strong { font-size: 0.78rem; }
.desk-account p span { color: var(--muted); font-size: 0.66rem; }
.desk-secondary { gap: 0; }
.desk-secondary a {
  min-height: 32px;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.7rem;
}
.desk-workspace { min-width: 0; }
.desk-mobilebar,
.desk-mobile-nav { display: none; }
.desk-workspace > main {
  width: min(100%, 59rem);
  margin: 0 auto;
  padding: 3rem 2.25rem 5rem;
}
.desk-flash {
  position: relative;
  z-index: 5;
  list-style: none;
  margin: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  text-align: center;
  font: 700 0.78rem/1.3 var(--font-ui);
}
.desk-flash .ok { color: var(--green); }
.desk-flash .error { color: var(--red); }

/* Posts home */
.posts-header { margin-bottom: 2rem; }
.desk-section-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--red);
  font: 800 0.65rem/1 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.posts-header h1 {
  margin: 0;
  font: 700 clamp(2rem, 5vw, 3.25rem)/1.05 var(--font-body);
  letter-spacing: -0.045em;
}
.posts-header p {
  max-width: 38rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font: 0.95rem/1.5 var(--font-ui);
}
.writer-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
}
.writer-identity div { min-width: 0; }
.writer-identity div > span,
.writer-identity strong,
.writer-identity small { display: block; }
.writer-identity div > span,
.writer-identity small { color: var(--muted); font-size: 0.72rem; }
.writer-identity strong {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.writer-identity a { font-size: 0.75rem; font-weight: 700; }
.post-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.post-tabs a {
  position: relative;
  padding: 0.7rem 0;
  color: var(--muted);
  font: 700 0.8rem/1 var(--font-ui);
  text-decoration: none;
}
.post-tabs a.on { color: var(--ink); }
.post-tabs a.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--red);
}
.post-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
}
.post-tools label { flex: 1; }
.post-tools input {
  width: min(100%, 22rem);
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
  padding: 0.6rem 0.75rem;
  color: var(--ink);
  font: 0.8rem var(--font-ui);
}
.desk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.desk-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-row-main { min-width: 0; color: var(--ink); text-decoration: none; }
.post-row-main strong,
.post-row-main em,
.post-row-main span { display: block; }
.post-row-main strong {
  overflow-wrap: anywhere;
  font: 700 1.05rem/1.25 var(--font-body);
}
.post-row-main em {
  margin-top: 0.15rem;
  overflow: hidden;
  color: var(--muted);
  font: normal 0.78rem/1.3 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-row-main span {
  margin-top: 0.35rem;
  color: var(--faint);
  font: 0.68rem/1.2 var(--font-ui);
}
.post-row-main:hover strong { color: var(--red); }
.post-row-state { text-align: right; }
.post-row-state b,
.post-row-state a { display: block; font: 700 0.68rem/1.3 var(--font-ui); }
.post-row-state a { margin-top: 0.25rem; }
.status-draft,
.status-unpublished { color: var(--muted); }
.status-published { color: var(--green); }
.status-scheduled { color: #8a6400; }
.desk-error,
.desk-empty { color: var(--muted); font: 0.85rem/1.5 var(--font-ui); }
.desk-empty-card {
  padding: 4rem 1rem;
  border: 1px dashed #cfcfc8;
  border-radius: 8px;
  background: var(--paper);
  text-align: center;
}
.desk-empty-card > span { display: block; color: var(--red); font-size: 2rem; }
.desk-empty-card h2 { margin: 0.35rem 0 0; font: 700 1.35rem var(--font-body); }
.desk-empty-card p { max-width: 28rem; margin: 0.45rem auto 1rem; color: var(--muted); font-size: 0.8rem; }

/* Distraction-free composer */
.endpoint-writer-editor .desk-app { grid-template-columns: minmax(0, 1fr); }
.endpoint-writer-editor .desk-sidebar,
.endpoint-writer-editor .desk-mobilebar { display: none; }
.endpoint-writer-editor .desk-workspace > main {
  width: 100%;
  max-width: none;
  padding: 0 1rem 5rem;
}
.writer-canvas { min-width: 0; }
.composer-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  margin: 0 -1rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.composer-bar > a {
  justify-self: start;
  color: var(--ink);
  font: 700 0.75rem var(--font-ui);
  text-decoration: none;
}
.composer-bar > span {
  color: var(--muted);
  font: 0.7rem var(--font-ui);
}
.composer-bar > span[data-tone="error"] { color: var(--red); font-weight: 700; }
.composer-bar > span[data-tone="saved"] { color: var(--green); }
.composer-bar > div {
  display: flex;
  justify-self: end;
  gap: 0.5rem;
}
.composer-paper {
  width: min(100%, 46rem);
  margin: 0 auto;
  padding: 3rem 0 2rem;
}
.composer-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 2rem;
  font-family: var(--font-ui);
}
.composer-author > span:last-child { min-width: 0; }
.composer-author strong,
.composer-author small { display: block; }
.composer-author strong { font-size: 0.78rem; }
.composer-author small { color: var(--muted); font-size: 0.66rem; }
.canvas-title,
.canvas-dek,
.canvas-byline {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  resize: none;
}
.canvas-title {
  min-height: 3.5rem;
  padding: 0;
  color: var(--ink);
  font: 700 clamp(2.4rem, 7vw, 4.25rem)/0.98 var(--font-body);
  letter-spacing: -0.055em;
}
.canvas-dek {
  min-height: 2.5rem;
  margin-top: 0.7rem;
  padding: 0;
  color: var(--muted);
  font: 400 1.2rem/1.35 var(--font-body);
}
.canvas-byline {
  margin-top: 1.2rem;
  padding: 0.55rem 0 0.45rem;
  border-bottom: 0;
  color: var(--muted);
  font: 700 0.72rem/1.2 var(--font-ui);
}
.canvas-byline-field {
  display: block;
  margin-top: 1.15rem;
  padding: 0.7rem 0 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
}
.canvas-byline-label {
  display: block;
  color: var(--ink);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.canvas-byline-field small { display: block; color: var(--muted); font-size: 0.68rem; }
.format-toolbar {
  position: sticky;
  top: 64px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0 -0.55rem;
  padding: 0.55rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.97);
  scrollbar-width: thin;
}
.format-toolbar-label { display: none; }
.format-toolbar button,
.format-toolbar select {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.55rem;
  font: 700 0.72rem/1 var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
}
.format-toolbar select { min-width: 6.4rem; font-weight: 400; }
.format-toolbar button:hover,
.format-toolbar select:hover { background: var(--soft); }
.toolbar-rule { width: 1px; height: 24px; flex: 0 0 1px; margin: 0 0.25rem; background: var(--rule); }
.body-field { position: relative; }
.canvas-body {
  min-height: 28rem;
  padding: 1.8rem 0 4rem;
  color: #242421;
  font: 400 1.12rem/1.75 var(--font-body);
  outline: 0;
}
.canvas-body:empty::before {
  content: attr(data-placeholder);
  color: #aaa9a3;
  pointer-events: none;
}
.canvas-body p { margin: 0 0 1.15rem; }
.canvas-body h2,
.canvas-body h3 { margin: 1.8rem 0 0.55rem; line-height: 1.18; letter-spacing: -0.025em; }
.canvas-body h2 { font-size: 1.6rem; }
.canvas-body h3 { font-size: 1.28rem; }
.canvas-body blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 4px solid var(--red);
  color: #4d4d49;
  font-size: 1.15rem;
  font-style: italic;
}
.canvas-body ul,
.canvas-body ol { margin: 0 0 1.2rem; padding-left: 1.5rem; }
.canvas-body hr { margin: 2rem auto; width: 30%; border: 0; border-top: 3px solid var(--ink); }
.writer-editor-embed {
  display: grid;
  gap: 0.2rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-left: 5px solid var(--red);
  border-radius: 5px;
  background: var(--soft);
  font-family: var(--font-ui);
}
.writer-editor-embed strong { font-size: 0.78rem; }
.writer-editor-embed span { overflow: hidden; color: var(--muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.writer-editor-image {
  position: relative;
  margin: 1.5rem 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.writer-editor-image img {
  display: block;
  width: 100%;
  max-height: 34rem;
  object-fit: contain;
  background: var(--soft);
}
.writer-editor-image figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font: 0.72rem/1.4 var(--font-ui);
  text-align: center;
}
.writer-image-remove {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  background: rgba(17, 17, 17, 0.9);
  color: #fff;
  padding: 0.45rem 0.65rem;
  font: 700 0.68rem var(--font-ui);
  cursor: pointer;
}
.composer-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font: 0.65rem/1.2 var(--font-ui);
}
.live-post-card {
  display: flex;
  width: min(100%, 46rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper);
  font-family: var(--font-ui);
}
.live-post-card div > * { display: block; }
.live-post-card div strong { margin: 0.2rem 0; font-size: 0.85rem; }
.live-post-card div a { font-size: 0.68rem; }

/* Continue → Publish */
body.publish-open { overflow: hidden; }
.publish-sheet,
.photo-sheet { position: fixed; inset: 0; z-index: 80; }
.publish-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(15, 15, 15, 0.58);
  backdrop-filter: grayscale(1) blur(2px);
  cursor: default;
}
.publish-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 34rem);
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.18);
}
.publish-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem;
  border-bottom: 1px solid var(--rule);
}
.publish-panel h2 { margin: 0; font: 700 1.8rem/1.1 var(--font-body); letter-spacing: -0.035em; }
.publish-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}
.publish-summary {
  display: flex;
  gap: 0.8rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--soft);
}
.publish-cover-mini {
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 4.5rem;
  overflow: hidden;
  border-radius: 5px;
  background: var(--rule);
}
.publish-cover-mini img { width: 100%; height: 100%; object-fit: cover; }
.publish-cover-mini.empty { display: flex; align-items: center; justify-content: center; background: transparent; }
.publish-summary div { min-width: 0; }
.publish-summary-copy > strong,
.publish-summary-copy > span,
.publish-summary-copy > small { display: block; overflow-wrap: anywhere; }
.publish-summary-copy > strong { font: 700 1.05rem/1.25 var(--font-body); }
.publish-summary-copy > span { margin-top: 0.2rem; color: var(--muted); font-size: 0.75rem; }
.publish-summary-copy > small { margin-top: 0.45rem; color: var(--faint); font-size: 0.66rem; }
.publish-settings { padding: 1rem 2rem 7rem; }
.publish-settings h3 {
  margin: 1.3rem 0 0.55rem;
  font: 800 0.68rem/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.publish-choice,
.publish-destination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--rule);
  font: 0.78rem/1.25 var(--font-ui);
}
.publish-choice { border-radius: 6px; cursor: pointer; }
.publish-choice.selected { border-color: var(--red); background: #fff8f8; }
.publish-choice input { accent-color: var(--red); }
.publish-choice strong,
.publish-choice small,
.publish-destination strong,
.publish-destination small { display: block; }
.publish-choice small,
.publish-destination small { margin-top: 0.12rem; color: var(--muted); }
.publish-destination { border-width: 0 0 1px; }
.publish-destination > span:first-child { color: var(--green); font-weight: 800; }
.publish-destination.future { color: var(--muted); }
.publish-destination.future > span:first-child { color: var(--faint); }
.timing-choice + .timing-choice { margin-top: 0.45rem; }
.schedule-field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 0.8rem;
  border-left: 4px solid var(--gold);
  background: #fffbea;
  font: 700 0.72rem/1.2 var(--font-ui);
}
.schedule-field input,
.post-detail-fields input,
.post-detail-fields textarea,
.cover-setting input,
.photo-fields input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 0.7rem;
  font: 0.78rem/1.3 var(--font-ui);
}
.cover-setting {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.cover-setting > div:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.cover-setting label,
.post-detail-fields label,
.photo-fields > label:not(.photo-cover-choice) {
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font: 700 0.7rem/1.2 var(--font-ui);
}
.cover-preview {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: var(--soft);
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview.empty { display: flex; align-items: center; justify-content: center; color: var(--faint); font: 0.72rem var(--font-ui); }
.text-button {
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 0.4rem 0;
  font: 700 0.7rem var(--font-ui);
  text-decoration: underline;
  cursor: pointer;
}
.post-detail-fields { display: grid; gap: 0.85rem; }
.post-detail-fields label > small { color: var(--muted); font-weight: 400; }
.post-detail-fields textarea { min-height: 5.5rem; resize: vertical; }
.slug-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--soft);
  overflow: hidden;
}
.slug-field b { display: flex; align-items: center; padding: 0 0.6rem; color: var(--muted); font-size: 0.68rem; white-space: nowrap; }
.slug-field input { min-width: 0; border: 0; border-left: 1px solid var(--rule); border-radius: 0; }
.slug-field input[readonly] { color: var(--muted); background: #f7f7f4; }
.publish-panel > footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 1rem 2rem;
  border-top: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.photo-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 2rem), 34rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
}
.photo-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.photo-panel h2 { margin: 0; font: 700 1.6rem/1.1 var(--font-body); }
.photo-fields { display: grid; gap: 0.85rem; padding: 1.25rem; }
.photo-picker {
  min-height: 7rem;
  align-content: center;
  border: 2px dashed #c8c8c1;
  border-radius: 7px;
  background: var(--desk);
  text-align: center;
  cursor: pointer;
}
.photo-picker:hover { border-color: var(--red); }
.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-picker small { color: var(--muted); font-weight: 400; }
.photo-preview { overflow: hidden; max-height: 18rem; border-radius: 6px; background: var(--soft); }
.photo-preview img { display: block; width: 100%; max-height: 18rem; object-fit: contain; }
.photo-cover-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font: 0.72rem/1.25 var(--font-ui);
}
.photo-cover-choice input { width: 20px; min-height: 20px; flex: 0 0 20px; accent-color: var(--red); }
.photo-cover-choice strong,
.photo-cover-choice small { display: block; }
.photo-cover-choice small { margin-top: 0.15rem; color: var(--muted); }
.photo-error { margin: 0; color: var(--red); font: 700 0.72rem/1.3 var(--font-ui); }
.photo-panel > footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

/* Preview and public publication */
.writer-site { background: var(--paper); }
.desk-masthead,
.site-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 1rem;
  padding: 0.9rem 1rem 0.7rem;
  border-bottom: 3px double var(--ink);
}
.site-masthead .desk-brand { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.site-masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font: 700 0.82rem var(--font-ui);
}
.site-masthead nav a { color: var(--ink); text-decoration: none; }
.writer-site main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
}
.site-rail {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
  background: var(--rail);
  color: var(--paper);
  padding: 0.45rem 1rem;
  border-bottom: 2px solid var(--red);
  font-family: var(--font-ui);
}
.site-rail strong { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.site-rail span { font-size: 0.82rem; }
.site-rail a {
  margin-left: auto;
  background: var(--red);
  color: var(--paper);
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  text-decoration: none;
}
.letter h1,
.archive-hed {
  margin: 0.2rem 0 0.5rem;
  overflow-wrap: anywhere;
  font: 400 clamp(2rem, 8vw, 3.2rem)/0.96 var(--font-display);
}
.letter-kicker {
  font: 700 0.7rem var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.letter-dek,
.archive-lede { color: var(--muted); font-size: 1.12rem; }
.letter-by {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
  font: 0.75rem var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.letter-body { font-size: 1.05rem; line-height: 1.65; }
.letter-body p { margin: 0 0 1rem; }
.letter-body h2,
.letter-body h3 { margin: 1.4rem 0 0.5rem; font-family: var(--font-display); line-height: 1; }
.letter-body blockquote { margin: 1.3rem 0; padding-left: 1rem; border-left: 4px solid var(--red); font-style: italic; }
.letter-body ul,
.letter-body ol { padding-left: 1.4rem; }
.letter-body hr { width: 30%; margin: 2rem auto; border: 0; border-top: 3px solid var(--ink); }
.letter-cover { margin: 1.2rem 0 1.7rem; }
.letter-cover img { display: block; width: 100%; max-height: 34rem; object-fit: cover; }
.letter-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0.75rem 0 1rem; padding: 0; }
.letter-tags li { padding: 0.25rem 0.5rem; border: 1px solid var(--rule); border-radius: 99px; color: var(--muted); font: 700 0.64rem var(--font-ui); }
.writer-image { margin: 1.5rem 0; }
.writer-image img { display: block; width: 100%; max-height: 38rem; object-fit: contain; }
.writer-image figcaption { margin-top: 0.4rem; color: var(--muted); font: 0.72rem/1.4 var(--font-ui); text-align: center; }
.writer-yt { position: relative; padding-top: 56.25%; margin: 1rem 0; }
.writer-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.writer-x { border-left: 3px solid var(--red); padding-left: 0.8rem; }
.writer-embed-error { padding: 0.75rem; border: 1px solid var(--red); color: var(--red); font-family: var(--font-ui); }
.letter-response {
  margin-top: 2.5rem;
  padding: 1.2rem;
  border-top: 5px solid var(--red);
  background: var(--rail);
  color: var(--paper);
}
.letter-response span { color: var(--gold); font: 800 0.68rem var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; }
.letter-response h2 { margin: 0.25rem 0 0.45rem; font: 400 clamp(1.7rem, 7vw, 2.5rem)/0.95 var(--font-display); text-transform: uppercase; }
.letter-response p { margin: 0 0 1rem; color: #e6e6e6; }
.letter-response a { display: inline-flex; min-height: 48px; align-items: center; padding: 0.65rem 0.9rem; background: var(--gold); color: var(--ink); font: 800 0.8rem var(--font-ui); text-decoration: none; text-transform: uppercase; }
.archive-list { list-style: none; margin: 1.4rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.archive-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.archive-list a { color: var(--ink); text-decoration: none; }
.archive-list a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; }
.archive-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.archive-copy { min-width: 0; }
.archive-list strong { display: block; overflow-wrap: anywhere; font-size: 1.3rem; }
.archive-list span,
.archive-list small { display: block; color: var(--muted); }

/* The complete publication front: originals, paid spots, and the daily brief. */
.writer-site.writer-publication main { max-width: 70rem; padding-top: 1.6rem; }
.writer-publication .site-foot { max-width: 70rem; }
.publication-front { display: grid; width: 100%; min-width: 0; gap: 2.5rem; }
.publication-front > * { min-width: 0; }
.publication-intro {
  position: relative;
  padding: 2.2rem clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  border-top: 7px solid var(--red);
  background: var(--ink);
  color: var(--paper);
}
.publication-intro::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.18;
}
.publication-intro > * { position: relative; z-index: 1; }
.publication-intro > span,
.publication-rubric,
.publication-section-head span,
.campaign-spot-copy > span,
.publication-member-callout > span {
  color: var(--red);
  font: 900 0.67rem/1.1 var(--font-ui);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.publication-intro > span { color: var(--gold); }
.publication-intro h1 {
  max-width: 50rem;
  margin: 0.35rem 0 0.65rem;
  font: 400 clamp(3rem, 9vw, 6.7rem)/0.85 var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.publication-intro p { max-width: 42rem; margin: 0; color: #ddd; font-size: 1.05rem; }
.publication-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.6fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 4px solid var(--ink);
}
.publication-section-head h2 {
  margin: 0.2rem 0 0;
  font: 400 clamp(2.1rem, 5vw, 3.8rem)/0.9 var(--font-display);
  text-transform: uppercase;
}
.publication-section-head p { margin: 0; color: var(--muted); font: 0.78rem/1.4 var(--font-ui); }
.publication-section-head > a {
  justify-self: end;
  color: var(--ink);
  font: 900 0.75rem var(--font-ui);
  text-transform: uppercase;
}
.publication-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  min-height: 17rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background: var(--soft);
  border-left: 8px solid var(--red);
}
.publication-lead.has-cover { grid-template-columns: minmax(18rem, 1.15fr) minmax(18rem, 0.85fr); padding: 0; }
.publication-lead.has-cover > div { padding: clamp(1.2rem, 3vw, 2.2rem) 1.5rem clamp(1.2rem, 3vw, 2.2rem) 0; }
.publication-lead-image { min-height: 100%; background: #ddd; }
.publication-lead-image img { display: block; width: 100%; height: 100%; min-height: 17rem; object-fit: cover; }
.publication-lead h3 { margin: 0.4rem 0 0.65rem; font: 400 clamp(2.3rem, 5vw, 4.5rem)/0.88 var(--font-display); text-transform: uppercase; }
.publication-lead h3 a { color: var(--ink); text-decoration: none; }
.publication-lead p { margin: 0 0 0.8rem; font-size: 1.08rem; }
.publication-lead small { display: block; color: var(--muted); font: 700 0.72rem var(--font-ui); text-transform: uppercase; }
.publication-read { display: inline-flex; min-height: 46px; align-items: center; margin-top: 1rem; padding: 0.6rem 0.8rem; background: var(--ink); color: #fff; font: 900 0.72rem var(--font-ui); text-decoration: none; text-transform: uppercase; }
.publication-read:hover { background: var(--red); color: #fff; }
.publication-original-grid,
.publication-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 1rem 0 0; padding: 0; border-top: 3px solid var(--ink); }
.publication-original-grid li,
.publication-news-grid li { min-width: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.publication-original-grid li:nth-child(3n),
.publication-news-grid li:nth-child(3n) { border-right: 0; }
.publication-original-grid a,
.publication-news-grid a { display: block; height: 100%; padding: 1rem; color: var(--ink); text-decoration: none; }
.publication-original-grid img,
.publication-news-grid img { display: block; width: calc(100% + 2rem); margin: -1rem -1rem 0.8rem; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.publication-original-grid strong,
.publication-news-grid strong { display: block; margin-top: 0.35rem; overflow-wrap: anywhere; font: 400 1.65rem/0.94 var(--font-display); text-transform: uppercase; }
.publication-original-grid em { display: block; margin-top: 0.45rem; color: var(--muted); font: normal 0.83rem/1.35 var(--font-body); }
.publication-original-grid small { display: block; margin-top: 0.7rem; color: var(--muted); font: 700 0.65rem var(--font-ui); text-transform: uppercase; }
.publication-empty { padding: 1.5rem; background: var(--soft); border-left: 6px solid var(--red); }
.publication-campaigns { margin-right: -1rem; margin-left: -1rem; padding: 1.5rem 1rem 2rem; background: var(--ink); color: #fff; }
.publication-campaigns .publication-section-head { border-bottom-color: #555; }
.publication-section-head.inverse span { color: var(--gold); }
.publication-section-head.inverse p { color: #bbb; }
.campaign-spot-grid { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.campaign-spot { min-width: 0; overflow: hidden; background: #202020; border-left: 6px solid var(--red); border-bottom: 5px solid var(--gold); }
.campaign-spot-disclosure { display: flex; min-height: 30px; align-items: center; gap: 0.4rem; margin: 0; padding: 0.35rem 0.6rem; border-bottom: 1px solid #444; color: #bbb; font: 800 0.56rem var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; }
.campaign-spot-disclosure i { width: 0.5rem; height: 0.5rem; flex: 0 0 auto; border-radius: 50%; background: var(--red); }
.campaign-spot-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.campaign-spot-media img,
.campaign-spot-media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.campaign-spot-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.75)); pointer-events: none; }
.campaign-spot-media:has(iframe)::after { display: none; }
.campaign-spot-media button {
  position: absolute;
  z-index: 2;
  left: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 0.45rem;
  border: 2px solid #fff;
  background: var(--gold);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  font: 900 0.72rem var(--font-ui);
  text-transform: uppercase;
  cursor: pointer;
}
.campaign-spot-copy { padding: 0.95rem; }
.campaign-spot-copy > span { color: var(--gold); }
.campaign-spot-copy h3 { margin: 0.35rem 0; font: 400 1.7rem/0.95 var(--font-display); text-transform: uppercase; }
.campaign-spot-copy p { margin: 0 0 0.75rem; color: #ccc; font-size: 0.88rem; line-height: 1.4; }
.campaign-spot-copy a { display: inline-flex; min-height: 44px; align-items: center; color: #fff; font: 800 0.68rem var(--font-ui); text-transform: uppercase; }
.publication-news-grid > li > a > span { display: flex; align-items: baseline; gap: 0.55rem; }
.publication-news-grid b { color: var(--red); font: 400 1.4rem var(--font-display); }
.publication-news-grid small { color: var(--muted); font: 800 0.63rem var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; }
.publication-news-grid p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.publication-member-callout { padding: 1.5rem clamp(1rem, 4vw, 2.5rem); border-top: 7px solid var(--red); background: var(--gold); }
.publication-member-callout > span { color: var(--red); }
.publication-member-callout h2 { margin: 0.25rem 0; font: 400 clamp(2.3rem, 6vw, 4.2rem)/0.9 var(--font-display); text-transform: uppercase; }
.publication-member-callout p { max-width: 42rem; margin: 0 0 1rem; }
.publication-member-callout a { display: inline-flex; min-height: 48px; align-items: center; padding: 0.65rem 0.9rem; background: var(--ink); color: #fff; font: 900 0.75rem var(--font-ui); text-decoration: none; text-transform: uppercase; }
.site-foot { max-width: 42rem; margin: 0 auto; padding: 1.4rem 1rem 3rem; color: var(--muted); font: 0.78rem var(--font-ui); }
.writer-home-rail { padding: 0.9rem 1rem 1.1rem; border-top: 3px double var(--ink); border-bottom: 1px solid var(--rule); background: var(--paper); }
.writer-home-rail > p { margin: 0 0 0.45rem; color: var(--red); font: 700 0.7rem var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; }
.writer-home-rail ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; list-style: none; margin: 0; padding: 0; }
.writer-home-rail a { display: block; min-width: 0; color: var(--ink); text-decoration: none; }
.writer-home-rail strong { display: block; overflow-wrap: anywhere; font: 400 1.35rem/0.98 var(--font-display); }
.writer-home-rail small { color: var(--muted); }

@media (min-width: 768px) {
  .writer-home-rail ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-list a.has-image { grid-template-columns: 10rem minmax(0, 1fr); align-items: center; }
}
@media (min-width: 860px) {
  .site-masthead { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; }
  .site-masthead .desk-kicker { grid-column: 1; }
}
@media (max-width: 760px) {
  html { font-size: 17px; }
  body { min-width: 0; }
  button,
  input,
  select,
  textarea { touch-action: manipulation; }
  .desk-app { display: block; }
  .desk-sidebar { display: none; }
  .desk-mobilebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 60px;
    align-items: center;
    gap: 0.75rem;
    padding: max(0.65rem, env(safe-area-inset-top)) 1rem 0;
    border-bottom: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
  }
  .desk-mobilebar .desk-brand { font-size: 1.55rem; }
  .desk-create.compact { width: auto; min-height: 46px; padding: 0.7rem 0.9rem; }
  .desk-mobile-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 -1rem;
    border-top: 1px solid var(--rule);
  }
  .desk-mobile-nav a {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font: 800 0.72rem/1 var(--font-ui);
    letter-spacing: 0.02em;
    text-decoration: none;
  }
  .desk-mobile-nav a.on { color: var(--ink); }
  .desk-mobile-nav a.on::after {
    content: "";
    position: absolute;
    right: 18%;
    bottom: -1px;
    left: 18%;
    height: 4px;
    background: var(--red);
  }
  .desk-workspace > main { padding: 1.35rem 1rem max(4rem, calc(3rem + env(safe-area-inset-bottom))); }
  .posts-header { margin-bottom: 1.15rem; }
  .posts-header h1 { font-size: 2.45rem; }
  .posts-header p { margin-top: 0.35rem; font-size: 0.92rem; line-height: 1.4; }
  .writer-identity {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem;
    border-left: 5px solid var(--red);
    border-radius: 0;
  }
  .writer-identity .desk-avatar.large { width: 2.65rem; height: 2.65rem; flex-basis: 2.65rem; }
  .writer-identity > a {
    grid-column: 1 / -1;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--rule);
    padding-top: 0.55rem;
  }
  .post-tabs { display: none; }
  .post-tools { align-items: stretch; padding: 0 0 0.9rem; }
  .post-tools label { min-width: 0; }
  .post-tools input { width: 100%; min-height: 48px; font-size: 16px; }
  .post-tools .desk-new { min-height: 48px; }
  .desk-list { border-top: 2px solid var(--ink); }
  .desk-list li {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    padding: 1rem 0.15rem;
  }
  .post-row-main { display: block; }
  .post-row-main strong { font-size: 1.16rem; line-height: 1.22; }
  .post-row-main em { margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.35; white-space: normal; }
  .post-row-main span { margin-top: 0.55rem; font-size: 0.72rem; }
  .post-row-state {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--rule);
    text-align: left;
  }
  .post-row-state b,
  .post-row-state a { font-size: 0.72rem; }
  .post-row-state a { display: inline-flex; min-height: 44px; align-items: center; margin: 0; padding-left: 1rem; }
  .desk-empty-card { padding: 2.5rem 1rem; }

  .endpoint-writer-editor .desk-workspace > main { padding: 0 1rem max(4rem, calc(3rem + env(safe-area-inset-bottom))); }
  .composer-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 60px;
    margin: 0 -1rem;
    padding: max(0.45rem, env(safe-area-inset-top)) 0.8rem 0.45rem;
  }
  .composer-bar > a { display: inline-flex; min-height: 44px; align-items: center; font-size: 0.72rem; }
  .composer-bar > span { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .composer-bar .desk-quiet { display: none; }
  .composer-bar .desk-new { min-height: 46px; padding: 0.65rem 0.8rem; }
  .composer-paper { padding: 1.25rem 0 1.5rem; }
  .composer-author { margin-bottom: 1.15rem; }
  .canvas-title { min-height: 3rem; font-size: clamp(2rem, 11vw, 2.8rem); line-height: 1; }
  .canvas-dek { min-height: 2rem; font-size: 1.08rem; line-height: 1.35; }
  .canvas-byline { margin-top: 1rem; font-size: 16px; }
  .format-toolbar-shell {
    position: sticky;
    top: 60px;
    z-index: 12;
    margin: 0 -1rem;
    border-top: 3px solid var(--red);
    border-bottom: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
  }
  .format-toolbar-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.42rem 0.85rem 0.18rem;
    color: var(--red);
    font: 900 0.62rem/1 var(--font-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .format-toolbar-label b { color: var(--muted); font-size: 0.57rem; letter-spacing: 0.04em; }
  .format-toolbar {
    position: static;
    top: auto;
    gap: 0.25rem;
    margin: 0;
    padding: 0.32rem 0.75rem 0.55rem;
    border: 0;
    background: transparent;
    scrollbar-width: none;
    scroll-padding-inline: 0.75rem;
    -webkit-overflow-scrolling: touch;
  }
  .format-toolbar::-webkit-scrollbar { display: none; }
  .format-toolbar button,
  .format-toolbar select { min-width: 46px; min-height: 46px; flex: 0 0 auto; border: 1px solid var(--rule); background: var(--paper); font-size: 0.76rem; }
  .format-toolbar select { min-width: 7rem; font-size: 16px; }
  .format-toolbar button:last-child { margin-right: 0.75rem; }
  .canvas-body { min-height: 24rem; padding: 1.25rem 0 4rem; font-size: 1.1rem; line-height: 1.7; }
  .canvas-body blockquote { margin-left: 0; margin-right: 0; }
  .composer-foot { display: block; font-size: 0.7rem; }
  .composer-foot span:last-child { display: none; }
  .writer-image-remove { min-height: 44px; }
  .live-post-card { align-items: stretch; flex-direction: column; }
  .live-post-card .desk-quiet { width: 100%; }

  .publish-panel {
    top: max(0.5rem, env(safe-area-inset-top));
    width: 100%;
    border-radius: 14px 14px 0 0;
    overscroll-behavior: contain;
  }
  .publish-panel > header { padding: 1rem; }
  .publish-panel h2 { font-size: 1.55rem; }
  .publish-summary { padding: 0.85rem 1rem; }
  .publish-cover-mini { width: 3.7rem; height: 3.7rem; flex-basis: 3.7rem; }
  .publish-summary-copy > strong { font-size: 1rem; }
  .publish-summary-copy > span { display: none; }
  .publish-settings { padding: 0.5rem 1rem calc(8.5rem + env(safe-area-inset-bottom)); }
  .publish-settings h3 { margin-top: 1.1rem; font-size: 0.72rem; }
  .publish-choice,
  .publish-destination { min-height: 58px; padding: 0.75rem; font-size: 0.82rem; }
  .publish-choice input { width: 22px; height: 22px; flex: 0 0 22px; }
  .schedule-field input,
  .post-detail-fields input,
  .post-detail-fields textarea,
  .cover-setting input,
  .photo-fields input { min-height: 48px; font-size: 16px; }
  .cover-setting > div:nth-child(2) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .cover-setting .desk-quiet { width: 100%; }
  .slug-field { display: grid; }
  .slug-field b { min-height: 34px; padding: 0 0.7rem; border-bottom: 1px solid var(--rule); }
  .slug-field input { border-left: 0; }
  .publish-panel > footer {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  }
  .publish-panel > footer button { width: 100%; min-height: 52px; white-space: normal; }

  .photo-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - max(0.5rem, env(safe-area-inset-top)));
    border-radius: 14px 14px 0 0;
    overscroll-behavior: contain;
    transform: none;
  }
  .photo-panel > header { padding: 1rem; }
  .photo-panel h2 { font-size: 1.45rem; }
  .photo-fields { gap: 0.75rem; padding: 1rem 1rem 6rem; }
  .photo-picker { min-height: 8rem; font-size: 0.82rem; }
  .photo-cover-choice { min-height: 58px; padding: 0.85rem; font-size: 0.78rem; }
  .photo-panel > footer {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  }
  .photo-panel > footer button { width: 100%; min-height: 52px; white-space: normal; }

  .site-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.1rem 0.65rem;
    padding: max(0.45rem, env(safe-area-inset-top)) 0.85rem 0.45rem;
  }
  .site-rail span { grid-column: 1; font-size: 0.76rem; }
  .site-rail a { grid-column: 2; grid-row: 1 / 3; display: inline-flex; min-height: 44px; align-items: center; margin: 0; padding: 0.45rem 0.8rem; }
  .site-masthead { padding: 0.85rem 1rem 0.7rem; }
  .site-masthead nav { display: grid; grid-template-columns: repeat(3, auto); gap: 0.25rem; }
  .site-masthead nav a { display: inline-flex; min-height: 44px; align-items: center; padding-right: 0.65rem; font-size: 0.76rem; }
  .writer-site main { padding: 1.15rem 1rem 3rem; }
  .writer-site.writer-publication main { padding: 0.75rem 0.65rem 2.5rem; }
  .publication-front { gap: 1.65rem; }
  .publication-intro { padding: 1.6rem 1rem; }
  .publication-intro h1 { font-size: clamp(3rem, 17vw, 4.7rem); }
  .publication-section-head { grid-template-columns: 1fr; padding: 0 0.35rem 0.65rem; }
  .publication-section-head p,
  .publication-section-head > a { justify-self: start; }
  .publication-lead.has-cover { grid-template-columns: 1fr; }
  .publication-lead.has-cover > div { padding: 1rem; }
  .publication-original-grid,
  .publication-news-grid { grid-template-columns: 1fr; }
  .publication-original-grid li,
  .publication-news-grid li { border-right: 0; }
  .publication-original-grid a,
  .publication-news-grid a { min-height: 48px; }
  .publication-original-grid strong,
  .publication-news-grid strong { font-size: 1.85rem; }
  .publication-campaigns { margin-right: -0.65rem; margin-left: -0.65rem; padding: 1.2rem 0.65rem 1.4rem; }
  .campaign-spot-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: none; }
  .campaign-spot-grid::-webkit-scrollbar { display: none; }
  .campaign-spot { flex: 0 0 min(88vw, 23rem); scroll-snap-align: start; }
  .campaign-spot-media button { min-height: 48px; }
  .publication-member-callout { margin: 0 -0.65rem; }
  .letter h1,
  .archive-hed { font-size: clamp(2.25rem, 12vw, 3.15rem); line-height: 0.94; }
  .letter-dek,
  .archive-lede { font-size: 1.08rem; line-height: 1.42; }
  .letter-by { line-height: 1.45; }
  .letter-tags { margin-top: 0.9rem; }
  .letter-tags li { display: inline-flex; min-height: 34px; align-items: center; font-size: 0.68rem; }
  .letter-cover { margin-right: -1rem; margin-left: -1rem; }
  .letter-body { font-size: 1.1rem; line-height: 1.72; }
  .letter-body blockquote { margin-left: 0; margin-right: 0; }
  .letter-body ul,
  .letter-body ol { padding-left: 1.2rem; }
  .writer-image { margin-right: -1rem; margin-left: -1rem; }
  .writer-image figcaption { padding: 0 1rem; font-size: 0.76rem; }
  .letter-response { margin: 2.25rem -1rem 0; padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); }
  .letter-response h2 { font-size: 2rem; }
  .letter-response a { width: 100%; min-height: 54px; justify-content: center; font-size: 0.85rem; }
  .archive-list li { padding: 1rem 0; }
  .archive-list strong { font-size: 1.25rem; line-height: 1.2; }
  .archive-list span { line-height: 1.4; }
  .site-foot { padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .desk-mobilebar { padding-right: 0.75rem; padding-left: 0.75rem; }
  .desk-mobile-nav { margin-right: -0.75rem; margin-left: -0.75rem; }
  .desk-create.compact { padding-right: 0.75rem; padding-left: 0.75rem; }
  .post-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .composer-bar { grid-template-columns: auto minmax(3.4rem, 1fr) auto; }
  .composer-bar .desk-new { padding-right: 0.65rem; padding-left: 0.65rem; }
  .canvas-title { font-size: clamp(1.9rem, 11vw, 2.45rem); }
  .format-toolbar-label b { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .publish-panel > footer,
  .photo-panel > footer { grid-template-columns: 1fr; }
  .publish-panel > footer .desk-quiet,
  .photo-panel > footer .desk-quiet { min-height: 44px; }
  .cover-setting > div:nth-child(2) { grid-template-columns: 1fr; }
  .cover-setting .text-button { min-height: 44px; }
  .site-masthead nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-masthead nav a { justify-content: center; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
