/*
  style.css — Full broadsheet newspaper styles.

  Design philosophy:
    - White background, dense text, minimal chrome
    - All column widths equal — visual weight comes from spanning MORE columns
    - Content-driven row heights (no square cells)
    - Articles are fully clickable — no individual links inside
    - Sub-column text flow via CSS column-count (capped at 3)
*/

/* ── 1. Reset & base ──────────────────────────────────────────────────────── */

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

:root {
  --ink: #111111;
  --ink-light: #666666;
  --rule: #333333;
  --rule-light: #aaaaaa;
  --bg: #ffffff;
  --bg-white: #ffffff;
  --accent: #8b0000;
  --font-headline: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-body: Georgia, 'Times New Roman', Times, serif;
  --font-ui: 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

/* ── 2. Navigation ────────────────────────────────────────────────────────── */

.site-nav {
  background: var(--ink);
  color: var(--bg-white);
  padding: 0.4rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav-left,
.site-nav-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a,
.nav-logout-btn {
  color: var(--bg-white);
  opacity: 0.85;
  transition: opacity 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
}

.site-nav a:hover,
.nav-logout-btn:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-signin {
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.2rem 0.6rem;
}

.site-footer {
  background: var(--bg-white);
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--rule-light);
  text-align: left;
}

/* ── 2b. Sticky header wrapper (nav + masthead on newspaper page) ──────── */

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
}

/* ── 3. Masthead ──────────────────────────────────────────────────────────── */

.masthead {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  background: var(--bg-white);
}

.masthead-inner {
  padding: 1.3125rem 0.5rem 0.656rem;
  text-align: center;
}

.masthead-meta {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rule-light);
  margin-bottom: 0.656rem;
}

.paper-name {
  font-family: var(--font-headline);
  font-size: clamp(4.375rem, 10.5vw, 8.75rem);
  font-weight: bold;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.4375rem;
}

.paper-name a,
.paper-name a:hover {
  color: inherit;
  text-decoration: none;
}

.dateline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6125rem 0;
  margin-top: 0.656rem;
  color: var(--ink);
}

/* ── 4. Newspaper body — 5-column grid ───────────────────────────────────── */

.newspaper-body {
  position: relative;
  background: var(--bg-white);
  max-width: 1400px;
  margin: 0 auto;
}

.newspaper-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 280px;
  column-gap: 1rem;
  row-gap: 0.5rem;
  padding-top: .5rem;
  padding-right: .5rem;
  padding-bottom: .5rem;
  /* padding-left intentionally omitted — set by dock clearance media query */
}

@media (min-height: 700px) {
  .newspaper-grid { grid-auto-rows: 340px; }
}

@media (min-height: 900px) {
  .newspaper-grid { grid-auto-rows: 420px; }
}

/* ── 5. Article cards ─────────────────────────────────────────────────────── */

.article {
  padding: 0.25rem 0.625rem 0.25rem;
  position: relative;
  overflow: visible;          /* allow ::after to extend into the gap */
  overflow-wrap: break-word;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  min-height: 0;              /* allow shrink in 1fr rows */
}

.article[data-article-url] {
  cursor: pointer;
  transition: background 0.1s;
}

/* Newspaper-style column dividers.
   Pseudo-element sits in the CENTER of the column-gap, equidistant
   from both articles. position: absolute prevents it from affecting
   the flex layout inside .article. */
.article::after {
  content: '';
  position: absolute;
  top: -0.25rem;
  bottom: -0.25rem;
  right: -0.5625rem;         /* -(column-gap/2 + 1px/2) to center the 1px rule in the 1rem gap */
  width: 1px;
  background: #999;           /* darker than --rule-light for newspaper-grade visibility */
  pointer-events: none;
  z-index: 1;
}

/* No rule on articles at the right edge of the grid */
.article--edge-right::after {
  display: none;
}


.article[data-article-url]:hover {
  background: #fafafa;
}

/* ── 6. Article images ────────────────────────────────────────────────────── */


/* ── 7. Article text elements ─────────────────────────────────────────────── */

.breaking-badge {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-white);
  background: #cc0000;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  margin-bottom: 0.35rem;
}

.article--breaking {
  padding-left: 0.5rem;
}

.article-source-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.article-source {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
}

.article-time {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  color: #999;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.2em;
}
.readtime-icon {
  width: 0.7rem;
  height: 0.7rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Headline levels — tier-driven (5 levels) */
.headline-1, .headline-2, .headline-3, .headline-4, .headline-5 {
  font-family: var(--font-headline);
  margin-bottom: 0.3rem;
}

/* 4-5 col span or hero tier */
.headline-1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.025em;
}

/* 3 col span or featured tier */
.headline-2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.1;
  font-weight: 800;
}

/* wide standards (3+ col) */
.headline-3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.15;
  font-weight: 700;
}

/* medium standards (2 col) */
.headline-4 {
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  line-height: 1.2;
  font-weight: 700;
}

/* narrow briefs (1 col) — distinct sans-serif uppercase */
.headline-5 {
  font-family: var(--font-ui);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  line-height: 1.25;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Anchor story: italic headline per broadsheet convention */
.tier-anchor .headline-2,
.tier-anchor .headline-3 {
  font-style: italic;
  letter-spacing: 0;
}

.article-author {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: italic;
  color: #666;
  margin-bottom: 0.4rem;
}

.tier-hero .article-author,
.tier-featured .article-author {
  font-size: 0.85rem;
}

.article-body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: left;
  color: #222;
  column-count: var(--article-text-cols, 1);
  column-gap: 1rem;
  column-fill: auto;
  hyphens: none;
  -webkit-hyphens: none;
  flex-grow: 1;
  min-height: 0;              /* allow shrink inside flex column */
  overflow: hidden;
}

/* Justify text only in articles wide enough for even word spacing */
.article[data-col-span="2"] .article-body,
.article[data-col-span="3"] .article-body,
.article[data-col-span="4"] .article-body,
.article[data-col-span="5"] .article-body {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.headline-4 ~ .article-body {
  text-align: left;
}

/* ── 8. Empty state ───────────────────────────────────────────────────────── */

.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  text-align: center;
  color: #666;
}

.empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.empty-state a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── 9. Reader view ──────────────────────────────────────────────────────── */

.reader {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1.5rem 4rem;
  background: var(--bg-white);
}

.reader-section {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.reader-headline {
  font-family: var(--font-headline);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.reader-deck {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  line-height: 1.4;
  color: #444;
  margin-bottom: 0.5rem;
}

.reader-lead-image {
  margin: 0 0 1.5em;
}

.reader-lead-image img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 2px;
}

.reader-lead-image .reader-caption {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #444;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.reader-lead-image .reader-credit {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
  font-style: italic;
}

.reader-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.reader-source {
  font-weight: bold;
}

.reader-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.reader-body p + p {
  margin-top: 1.25em;
  text-indent: 1.5em;
}

.reader-body h2,
.reader-body h3 {
  font-family: var(--font-headline);
  margin: 1.5em 0 0.5em;
}

.reader-body ul {
  margin: 1em 0;
  padding-left: 1.5em;
}

.reader-body li {
  margin-bottom: 0.4em;
}

.reader-body blockquote {
  border-left: 3px solid var(--rule-light);
  padding-left: 1em;
  margin: 1.25em 0;
  color: #444;
  font-style: italic;
}

.reader-body figure {
  margin: 1.5em 0;
}

.reader-body figure img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 2px;
}

.reader-body a {
  color: var(--accent);
  text-decoration: underline;
}

.reader-citations {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--rule-light);
}

.reader-citations h3 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.75em;
}

.reader-citations ol {
  padding-left: 1.5em;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

.reader-citations li {
  margin-bottom: 0.5em;
}

.reader-fallback {
  background: #f9f6ef;
  border-left: 4px solid var(--rule-light);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #444;
}

.reader-original-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--ink);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.reader-original-link:hover {
  background: var(--ink);
  color: var(--bg-white);
  text-decoration: none;
}

.reader-back {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 2rem;
  display: block;
}

/* ── 10. Feeds management page ────────────────────────────────────────────── */

.feeds-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.feeds-header h1 {
  font-family: var(--font-headline);
  font-size: 2rem;
  border-bottom: 3px double var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.feeds-subtitle {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.flash-message {
  background: #e8f4e8;
  border: 1px solid #6aaa6a;
  color: #2a5a2a;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.add-feed-form {
  background: var(--bg-white);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.add-feed-form h2 {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-field label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-field .optional {
  font-weight: normal;
  color: #999;
}

.form-field input {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  background: #f5f5f5;
}

.form-field input:focus {
  outline: 2px solid var(--ink);
  background: var(--bg-white);
}

.form-field small {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: #888;
}

.form-field small code {
  background: #eee;
  padding: 0 0.25rem;
  font-size: 0.65rem;
}

.btn-primary,
.btn-secondary,
.btn-delete {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  padding: 0.5rem 1.25rem;
  transition: background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg-white);
}

.btn-delete {
  background: transparent;
  color: #cc0000;
  border-color: #cc0000;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
}

.btn-delete:hover {
  background: #cc0000;
  color: white;
}

.refresh-form {
  margin-bottom: 1.5rem;
}

.feeds-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  background: var(--bg-white);
  border: 1px solid var(--rule);
}

.feeds-table th {
  background: var(--ink);
  color: var(--bg-white);
  text-align: left;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.feeds-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.feeds-table tr:last-child td {
  border-bottom: none;
}

.feed-row-error {
  background: #fff5f5;
}

.feed-url {
  color: #999;
  word-break: break-all;
  font-size: 0.7rem;
}

.status-ok { color: green; }
.status-error { color: #cc0000; cursor: help; }

.feeds-empty {
  background: var(--bg-white);
  border: 1px solid var(--rule);
  padding: 2rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.feeds-empty ul {
  margin: 0.75rem 0 0 1.5rem;
}

.feeds-empty code {
  background: #eee;
  padding: 0.1rem 0.35rem;
  font-size: 0.8rem;
}

/* ── 11. Article action buttons (reading activity) ───────────────────────── */

.article-actions { display: flex; gap: 0.25rem; align-items: center; opacity: 0; transition: opacity 0.15s; }
.article:hover .article-actions, .article:focus-within .article-actions { opacity: 1; }
.action-spacer { flex: 1; }
.action-btn { border: none; background: none; color: #999; padding: 0.3rem; border-radius: 4px; cursor: pointer; }
.action-btn:hover { color: #333; background: rgba(0,0,0,0.05); }
.action-btn svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action-btn--active svg { fill: currentColor; }
.article--muted { opacity: 0.08; transform: scale(0.98); transition: opacity 0.4s, transform 0.4s; pointer-events: none; }

.article--read {
  opacity: 0.6;
}
.article--read:hover {
  opacity: 1;
}

/* ── 12. v3 layout engine ────────────────────────────────────────────────── */

/* Applied by layout-engine.js after computing text regions */
.article-body--laid-out {
  position: relative;
  overflow: hidden;
}

.article-body--laid-out .article-image {
  position: absolute;
  object-fit: cover;
  object-position: center top;
  /* top, left, width, height set by JS */
}

.article-column {
  position: absolute;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: left;
  color: #222;
  hyphens: none;
  -webkit-hyphens: none;
  overflow: hidden;
  /* top, left, width, height set by JS */
}

/* Justify text columns only in articles wide enough */
.article[data-col-span="2"] .article-column,
.article[data-col-span="3"] .article-column,
.article[data-col-span="4"] .article-column,
.article[data-col-span="5"] .article-column {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Hide original text container after JS creates columns */
.article-body--laid-out .article-text {
  display: none;
}

/* Fallback: engine hasn't run yet or JS disabled */
.article-body:not(.article-body--laid-out) .article-image {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: center top;
  max-height: 50%;
  margin-bottom: 0.5rem;
}

.article-body:not(.article-body--laid-out) .article-text {
  overflow: hidden;
}

/* ── 13. Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .newspaper-grid {
    height: auto;                    /* no viewport constraint on mobile */
    grid-template-columns: 1fr;
    grid-auto-rows: auto !important;
    column-gap: 0;
    row-gap: 1rem;
  }

  .article {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .article-body {
    column-count: 1 !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .feeds-page {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .reader {
    margin: 1rem auto;
    padding: 0 1rem 3rem;
  }

  .dateline {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .newspaper-grid {
    height: auto;                    /* no viewport constraint on tablet */
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto !important;
  }

  .article {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .article-body {
    column-count: 1 !important;
  }
}

/* ── 14. Dev template FAB ──────────────────────────────────────────────────── */

.dev-template-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 9999;
  cursor: pointer;
  transition: background 0.15s;
}

.dev-template-fab:hover {
  background: #333;
  text-decoration: none;
}

/* ── 15. Settings pages ──────────────────────────────────────────────────── */

.settings-page {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
  font-family: var(--font-body);
  color: var(--ink);
}

.settings-title {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.5rem;
}

.settings-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.settings-section-heading {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.settings-feed-count {
  font-weight: 400;
  color: #888;
  font-size: 0.9rem;
}

/* ── Add source form ─────────────────────────────────────────────────────── */

.settings-add-source {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule-light);
}

.settings-add-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.settings-url-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s;
}

.settings-url-input:focus {
  border-color: var(--ink);
}

.settings-add-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--bg-white);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-add-btn:hover {
  background: #333;
}

.settings-add-hint {
  font-size: 0.8rem;
  color: #999;
}

.settings-message {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 3px;
}

.settings-message-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Feed list ───────────────────────────────────────────────────────────── */

.settings-feeds {
  list-style: none;
  padding: 0;
  margin: 0;
}

.settings-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.settings-feed-item:last-child {
  border-bottom: none;
}

.settings-feed-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.settings-feed-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 2px;
  white-space: nowrap;
  background: #f3f4f6;
  color: #555;
}

.settings-badge-substack { background: #f9e2c7; color: #92400e; }
.settings-badge-medium   { background: #e0e7ff; color: #3730a3; }
.settings-badge-ghost    { background: #d1fae5; color: #065f46; }
.settings-badge-rss      { background: #f3f4f6; color: #555; }

.settings-feed-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-feed-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-feed-url {
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-remove-btn {
  padding: 0.3rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  background: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.settings-remove-btn:hover {
  background: var(--accent);
  color: var(--bg-white);
}

.settings-empty {
  padding: 1.5rem 0;
  color: #888;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 600px) {
  .settings-page {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .settings-add-form {
    flex-direction: column;
  }

  .settings-feed-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .settings-remove-btn {
    align-self: flex-end;
  }
}

/* ── Preferences settings (print time, timezone) ─────────────────────────── */

.settings-pref-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-light);
}

.settings-pref-description {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.settings-pref-input {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s;
}

.settings-pref-input:focus {
  border-color: var(--ink);
}

.settings-pref-tz-display {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink);
  background: #f9f9f6;
  border: 1px solid #e5e5e0;
  border-radius: 3px;
  display: inline-block;
}

.settings-pref-actions {
  margin-top: 1.5rem;
}

.settings-message-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}


/* ── Legal pages ────────────────────────────────────────────────────────── */

.legal-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.7;
}

.legal-page h1 {
  font-family: var(--font-headline);
  font-size: 2rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.5rem;
}

.legal-page h2 {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal-page h3 {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.legal-page p {
  margin-bottom: 0.75rem;
}

.legal-page ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page a {
  color: var(--accent);
  text-decoration: underline;
}

.legal-effective {
  font-style: italic;
  color: var(--rule-light);
  margin-bottom: 1.5rem;
}

.site-footer a {
  color: var(--rule-light);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── 17. Landing page ──────────────────────────────────────────────────────── */

.landing {
  max-width: 540px;
  margin: 6rem auto 4rem;
  padding: 0 1.5rem;
  text-align: center;
}

.landing-masthead {
  margin-bottom: 2rem;
}

.landing-title {
  font-family: var(--font-headline);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.landing-tagline {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: #555;
  line-height: 1.5;
}

.landing-pitch {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  padding: 1rem 0;
}

.landing-form {
  text-align: left;
}

.landing-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #333;
}

.landing-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.landing-email-input {
  flex: 1;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  background: var(--bg-white);
}

.landing-email-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.landing-submit-btn {
  padding: 0.65rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-white);
  background: var(--ink);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.landing-submit-btn:hover {
  background: #333;
}

.landing-consent {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: #888;
  line-height: 1.4;
}

.landing-consent a {
  color: #666;
  text-decoration: underline;
}

.landing-consent a:hover {
  color: var(--ink);
}

/* ── 18. Onboarding pages ──────────────────────────────────────────────────── */

.onboarding-page {
  max-width: 540px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}

.onboarding-step-indicator {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 0.25rem;
}

.onboarding-heading {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.onboarding-subtext {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
}

.onboarding-url-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.onboarding-url-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
}

.onboarding-url-input:focus {
  outline: none;
  border-color: var(--ink);
}

.onboarding-add-btn {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-white);
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}

.onboarding-add-btn:hover {
  background: #f5f5f5;
}

.onboarding-source-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.onboarding-source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  word-break: break-all;
}

.onboarding-remove-btn {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.onboarding-remove-btn:hover {
  text-decoration: underline;
}

.onboarding-timing-row {
  margin-bottom: 1.25rem;
}

.onboarding-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  color: #333;
}

.onboarding-time-input,
.onboarding-tz-input {
  padding: 0.6rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  width: 100%;
  max-width: 280px;
}

.onboarding-time-input:focus,
.onboarding-tz-input:focus {
  outline: none;
  border-color: var(--ink);
}

.onboarding-nav {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.onboarding-continue-btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-white);
  background: var(--ink);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.onboarding-continue-btn:hover {
  background: #333;
  text-decoration: none;
}

.onboarding-continue-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.onboarding-secondary-link {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #555;
  text-decoration: underline;
}

.onboarding-secondary-link:hover {
  color: var(--ink);
}

.onboarding-summary {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid var(--rule-light);
  border-radius: 3px;
}

.onboarding-summary-line {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.onboarding-summary-line:last-child {
  margin-bottom: 0;
}

/* ── Onboarding: starter feed cards ──────────────────────────────────────── */

.onboarding-page--sources {
  max-width: 720px;
}

.starter-feeds-section {
  margin-bottom: 2.5rem;
}

.starter-feeds-heading {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-light);
}

.starter-feeds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.starter-feed-card {
  border: 1px solid var(--rule-light);
  padding: 1.25rem;
  background: #faf8f5;
  display: flex;
  flex-direction: column;
}

.starter-feed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e4df;
}

.starter-feed-category-name {
  font-family: var(--font-headline);
  font-variant: small-caps;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.starter-feed-count {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.starter-feed-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  flex: 1;
}

.starter-feed-item {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 1px dotted #ddd;
}

.starter-feed-item:last-child {
  border-bottom: none;
}

.starter-feed-add-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--rule);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.starter-feed-add-btn:hover {
  background: var(--ink);
  color: var(--bg-white);
}

.starter-feed-add-btn:disabled {
  cursor: default;
}

.starter-feed-added,
.starter-feed-add-btn.starter-feed-added {
  background: #f0ede8;
  border-color: #ccc;
  color: var(--ink-light);
  cursor: default;
}

.starter-feed-added:hover {
  background: #f0ede8;
  color: var(--ink-light);
}

/* Hide default browser disclosure triangle */
.starter-feed-card summary {
  list-style: none;
  cursor: pointer;
}
.starter-feed-card summary::-webkit-details-marker {
  display: none;
}

/* Summary IS the card header — override margin/border when collapsed */
.starter-feed-card summary.starter-feed-card-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.starter-feed-card details[open] summary.starter-feed-card-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e4df;
}

.starter-feed-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.starter-feed-chevron {
  display: inline-block;
  font-size: 11px;
  color: var(--ink-light);
  transition: transform 0.15s ease;
}
.starter-feed-card details[open] .starter-feed-chevron {
  transform: rotate(90deg);
}

/* Added badge (hidden by default via inline style, shown by JS) */
.starter-feed-added-badge {
  font-size: 11px;
  font-weight: 600;
  color: #3a7a4a;
  letter-spacing: 0.02em;
}

/* Mute added cards when collapsed */
.starter-feed-card.added .starter-feed-category-name {
  color: var(--ink-light);
}

.onboarding-page--sources .onboarding-continue-btn::after {
  content: ' \2192';
}

@media (max-width: 768px) {
  .starter-feeds-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-page--sources {
    max-width: 540px;
  }
}

@media (max-width: 600px) {
  .landing {
    margin-top: 3rem;
  }

  .landing-title {
    font-size: 2.5rem;
  }

  .landing-input-row {
    flex-direction: column;
  }

  .onboarding-url-row {
    flex-direction: column;
  }

  .onboarding-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .onboarding-continue-btn {
    text-align: center;
  }
}

/* ── Section page (LAYER-14a) ──────────────────────────────────────────────── */

.section-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.section-back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.section-back-link:hover {
  text-decoration: underline;
}

.section-heading {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule-dark);
}

.section-article-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-article-card {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  border-bottom: 1px solid var(--rule-light);
  transition: background-color 0.15s ease;
}

.section-article-card:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.section-article-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.section-article-content {
  flex: 1;
  min-width: 0;
}

.section-article-title {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.section-article-source {
  font-size: 0.8rem;
  color: var(--rule-light);
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-article-summary {
  font-size: 0.9rem;
  color: #444;
  margin: 0 0 0.25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-article-author {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin: 0;
}

.section-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
}

.section-empty p {
  font-size: 1.1rem;
}

/* ── Section masthead + pagination (PATCH-23) ────────────────────────────── */

.section-pagination {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 0.5px solid var(--rule-light);
  margin-top: 1.5rem;
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 0.05em;
}

.section-pagination a {
  color: var(--ink);
  text-decoration: none;
  margin: 0 1rem;
}

.section-pagination a:hover {
  text-decoration: underline;
}

.front-page-pagination {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 0.5px solid var(--rule-light);
  margin-top: 1.5rem;
  font-size: 13px;
  color: var(--ink-light);
  letter-spacing: 0.05em;
}

.front-page-pagination a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1rem;
}

.front-page-pagination a:hover {
  text-decoration: underline;
}

/* ── Completion banner ─────────────────────────────────────────────────────── */

.completion-banner {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.5rem;
  text-align: center;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  background: var(--bg);
}

.completion-banner p {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.01em;
}

/* Section navigation bar removed by PATCH-20 — replaced by fisheye dock */

/* ── Platform tiles (compact icon tiles, expand on click) ───────────────── */

/* ── Platform tiles (tabbed source selector) ──────────────────────────────── */
.platform-tiles-container {
  margin: 1.5rem 0;
}

.platform-tiles-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule-light);
}

.platform-tile {
  flex: 1 1 0;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--rule-light);
  border-bottom: none;
  border-right: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
  font-family: var(--font-ui);
}

.platform-tile:last-child {
  border-right: 1px solid var(--rule-light);
}

.platform-tile:hover {
  background: rgba(0,0,0,0.03);
}

.platform-tile--selected {
  background: var(--paper, #fafaf7);
  border-bottom: 2px solid var(--ink);
  margin-bottom: -1px;
}

.platform-tile-icon {
  width: 32px;
  height: 32px;
  display: block;
}

.platform-tile-label {
  font-size: 11px;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-family: var(--font-ui);
}

.platform-tiles-input-area {
  border: 1px solid var(--rule-light);
  border-top: none;
  padding: 1rem 1.25rem;
  background: var(--paper, #fafaf7);
}

.platform-input-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.platform-input-row {
  display: flex;
  gap: 0.5rem;
}

.platform-url-input {
  flex: 1;
  padding: 0.4rem 0.5rem;
  font-size: 14px;
  font-family: var(--font-body, Georgia, serif);
  border: 1px solid var(--rule-light);
  background: #fff;
}

.platform-url-input:focus {
  outline: none;
  border-color: var(--ink);
}

.platform-add-btn {
  padding: 0.4rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 12px;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
}

.platform-add-btn:hover {
  opacity: 0.85;
}

.platform-input-example {
  display: block;
  margin-top: 0.35rem;
  font-size: 12px;
  color: #888;
  font-family: var(--font-ui);
  font-style: italic;
}

.platform-source-groups {
  margin-top: 2rem;
}

.platform-source-group {
  margin-bottom: 1rem;
  border-bottom: 0.5px solid var(--rule-light);
}

.platform-group-heading {
  font-family: var(--font-ui);
  font-size: 13px;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
}

.platform-group-heading::before {
  content: "\25BE ";
  font-size: 10px;
}

details:not([open]) > .platform-group-heading::before {
  content: "\25B8 ";
}

.platform-group-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}

.platform-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-top: 0.5px solid var(--rule-light);
}

.platform-group-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.platform-group-item-title {
  font-family: var(--font-body, Georgia, serif);
  font-size: 14px;
  color: var(--ink);
}

.platform-group-item-url {
  font-size: 11px;
  color: #888;
  font-family: var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.platform-group-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.platform-group-item-count {
  font-size: 11px;
  color: #888;
  font-family: var(--font-ui);
}

.platform-group-item-status {
  font-size: 11px;
  font-family: var(--font-ui);
}

.platform-delete-form {
  display: inline;
}

.platform-delete-btn {
  font-size: 11px;
  font-family: var(--font-ui);
  color: #c00;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.platform-delete-btn:hover {
  text-decoration: underline;
}

/* ── Section dock (PATCH-20: absolute positioning + GSAP fisheye) ───────── */

.section-dock-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 100;
  overflow: hidden;
}

.section-dock {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem;
  z-index: 100;
}

.section-dock-item {
  display: block;
  padding: 0.25rem 0.5rem;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
  transform-origin: left center;
}

.section-dock-item:hover {
  color: #000;
}

.section-dock-item--active {
  font-weight: 500;
  text-decoration: underline;
}

.section-dock-cue {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 99;
  transition: opacity 0.2s;
}

.section-dock-glyph {
  font-size: 1.25rem;
  color: #ccc;
}

.section-dock-rule {
  width: 1px;
  height: 60px;
  background: #ccc;
  margin: 0.25rem auto 0;
}

/* ── Section dock responsive ─────────────────────────────────────────────── */

@media (min-width: 1280px) {
  .section-dock {
    /* Dock expands within margin, no content overlap */
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .section-dock {
    background: rgba(255,255,255,0.95);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }
}

@media (max-width: 1023px) {
  .section-dock-container,
  .section-dock,
  .section-dock-cue {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-dock-item {
    font-size: 14px !important;
  }
}

/* Dock clearance: symmetric padding so cue never overlaps body text */
@media (min-width: 1024px) {
  .newspaper-grid,
  .section-pagination {
    padding-left: 60px;
    padding-right: 60px;
  }
}
