/* ============================================================
   שולחן המערכת — Newsroom Design Direction
   Tactile editor's desk: papers, stamps, tape, pins, thread
   ============================================================ */

/* ---- Reset + root vars ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --desk:       #ccc8bc;
  --desk-dark:  #b8b3a5;
  --paper:      #f4f0e8;
  --paper-warm: #efe8d8;
  --paper-aged: #e8dfc8;
  --ink:        #1f2a44;
  --ink-light:  #3d4a60;
  --ink-faded:  #6a7085;
  --red:        #c0392b;
  --red-stamp:  #a93226;
  --mustard:    #f5d684;
  --mustard-dk: #e8c050;
  --sage:       #a8c89c;
  --sky:        #a0bcd0;
  --lavender:   #c0a8cc;
  --tape:       rgba(240,228,180,0.55);
  --tape-dark:  rgba(210,198,150,0.65);
  --pin-red:    #e74c3c;
  --pin-gold:   #d4a017;
  --thread:     #c0392b;
  --mono:       'JetBrains Mono', monospace;
  --serif:      'Frank Ruhl Libre', Georgia, serif;
  --sans:       'Heebo', 'Arial Hebrew', sans-serif;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.07), 0 2px 6px rgba(40,35,25,.10);
  --shadow-md:  0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(40,35,25,.18);
  --shadow-lg:  0 2px 4px rgba(0,0,0,.10), 0 16px 48px rgba(40,35,25,.22);
  --shadow-pin: 0 2px 8px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.18);
}

html { direction: rtl; }
body {
  font-family: var(--sans);
  background-color: var(--desk);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---- Paper grain overlay (SVG feTurbulence) ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---- Desk vignette ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 60%, rgba(30,26,20,.18) 100%);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--ink); }
p { line-height: 1.75; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); letter-spacing: 0.05em; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.desk-surface {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px 80px;
  z-index: 2;
}

/* ============================================================
   PAPER BASE — shared for all paper elements
   ============================================================ */
.paper {
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.paper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E") repeat;
  opacity: 0.025;
  pointer-events: none;
}

/* ============================================================
   MASKING TAPE
   ============================================================ */
.tape {
  position: absolute;
  background: var(--tape);
  border-left: 1px solid var(--tape-dark);
  border-right: 1px solid var(--tape-dark);
  z-index: 10;
  pointer-events: none;
}
.tape::before, .tape::after {
  content: '';
  position: absolute;
  background: inherit;
  /* torn edge effect */
}
.tape-h {
  height: 22px;
  left: 50%;
  top: -11px;
  transform: translateX(-50%);
  width: 80px;
  border-radius: 1px;
  clip-path: polygon(2% 0%, 98% 0%, 100% 40%, 97% 100%, 3% 100%, 0% 60%);
}
.tape-h-small { width: 52px; height: 18px; top: -9px; }
.tape-corner {
  width: 55px;
  height: 20px;
  border-radius: 1px;
  clip-path: polygon(2% 0%, 98% 0%, 100% 40%, 97% 100%, 3% 100%, 0% 60%);
}
.tape-tl { top: -10px; right: 12px; transform: rotate(-8deg); }
.tape-tr { top: -10px; left: 12px; transform: rotate(8deg); }

/* ============================================================
   RUBBER STAMPS
   ============================================================ */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2.5px solid currentColor;
  border-radius: 3px;
  padding: 4px 10px;
  opacity: 0.82;
  position: relative;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  /* Uneven ink: slight box-shadow */
  filter: url(#stamp-roughen);
}
.stamp::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.2;
}
.stamp-urgent {
  color: var(--red-stamp);
  transform: rotate(-3deg);
  border-radius: 50% / 30%;
  font-size: 13px;
  letter-spacing: 0.22em;
  padding: 6px 14px;
}
.stamp-exclusive {
  color: #1a5f8a;
  transform: rotate(1.5deg);
  border-radius: 3px;
}
.stamp-checked {
  color: #2d6a30;
  transform: rotate(-1deg);
}
.stamp-floating {
  position: absolute;
  z-index: 12;
}

/* ============================================================
   PUSH PINS
   ============================================================ */
.pin {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 20;
  pointer-events: none;
}
.pin-red  { color: var(--pin-red); }
.pin-gold { color: var(--pin-gold); }
.pin-blue { color: #3a78c0; }

/* ============================================================
   SECTION 1 — MASTHEAD
   ============================================================ */
.masthead {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.masthead-sheet {
  width: 680px;
  padding: 36px 48px 28px;
  transform: rotate(-0.6deg);
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  position: relative;
  border-top: 4px solid var(--ink);
}

.masthead-letterhead-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(31,42,68,.18);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.masthead-org {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-faded);
  text-transform: uppercase;
  line-height: 1.4;
}

.masthead-date-line {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-faded);
  letter-spacing: 0.08em;
  text-align: left;
}

.masthead-name {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}

.masthead-tagline {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faded);
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(31,42,68,.12);
  padding-top: 10px;
  margin-top: 10px;
}

.masthead-stamp-zone {
  position: absolute;
  left: 36px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

/* ============================================================
   SECTION 2 — TELEPRINTER TICKER
   ============================================================ */
.teleprinter-section {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  height: 64px;
}

.teleprinter-body {
  flex-shrink: 0;
  width: 72px;
  height: 58px;
  position: relative;
  z-index: 5;
}

.ticker-strip {
  flex: 1;
  height: 38px;
  background: var(--paper-aged);
  border-top: 1px solid rgba(40,35,25,.16);
  border-bottom: 1px solid rgba(40,35,25,.16);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08), inset 0 -1px 3px rgba(0,0,0,.06);
}

/* holes along the ticker paper edges */
.ticker-strip::before,
.ticker-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 18px;
  background-image: radial-gradient(circle 3px at center, var(--desk) 100%, transparent 100%);
  background-size: 18px 18px;
  background-repeat: repeat-y;
  background-position: center;
  z-index: 2;
  pointer-events: none;
}
.ticker-strip::before { right: 0; }
.ticker-strip::after  { left: 0; }

.ticker-track-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  /* RTL marquee pattern */
  direction: ltr;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  direction: ltr;
  will-change: transform;
  animation: ticker-scroll 48s linear infinite;
}

.ticker-track:hover,
.ticker-track.paused { animation-play-state: paused; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

.ticker-item {
  direction: rtl;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ticker-item-time {
  color: var(--ink-faded);
  font-size: 10px;
}
.ticker-sep {
  color: var(--ink-faded);
  font-size: 10px;
  opacity: 0.5;
}

.ticker-controls {
  flex-shrink: 0;
  margin-right: 12px;
}

.ticker-pause-btn {
  background: none;
  border: 1.5px solid rgba(31,42,68,.25);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faded);
  transition: border-color .15s, color .15s;
  font-size: 10px;
}
.ticker-pause-btn:hover { border-color: var(--ink); color: var(--ink); }
.ticker-pause-btn:focus-visible {
  outline: 2px solid var(--mustard-dk);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ============================================================
   SECTION 3 — LEAD STORY (main paper)
   ============================================================ */
.lead-story-section {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.lead-manuscript {
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  padding: 48px 52px 44px;
  position: relative;
  transform: rotate(0.3deg);
}

/* Typed manuscript ruled lines */
.lead-manuscript::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(1.75em * 1px + 27px),
    rgba(31,42,68,.05) calc(1.75em * 1px + 28px)
  );
  background-size: 100% 28px;
  background-position: 0 64px;
  pointer-events: none;
}

.lead-category-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.category-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faded);
  border-bottom: 1px solid var(--ink-faded);
  padding-bottom: 2px;
}

.lead-headline {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
  position: relative;
}

/* SVG red underline drawn on scroll — rendered in app.js */
.headline-underline-svg {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: -2px;
  margin-bottom: 16px;
  overflow: visible;
}

.lead-byline {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faded);
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
}

.lead-excerpt {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink-light);
  margin-bottom: 20px;
  border-right: 3px solid var(--mustard-dk);
  padding-right: 16px;
}

.lead-paragraphs p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 14px;
}

.lead-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.lead-more-link:hover { color: var(--red); border-color: var(--red); text-decoration: none; }
.lead-more-link:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 3px; }

/* Margin annotations (SVG scribbles) */
.margin-note {
  position: absolute;
  left: -48px;
  width: 40px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--red);
  transform: rotate(-90deg);
  transform-origin: right center;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================================
   SECTION 4 — CORKBOARD NEWS BOARD
   ============================================================ */
.corkboard-section {
  margin-top: 40px;
}

.corkboard-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.corkboard {
  background: #c8a86e;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.04) 8px, rgba(0,0,0,.04) 9px),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(0,0,0,.03) 8px, rgba(0,0,0,.03) 9px);
  border-radius: 4px;
  padding: 32px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.12);
  border: 3px solid #a88850;
  position: relative;
  min-height: 280px;
}

/* Red thread SVG overlay — injected by JS */
.corkboard-thread-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
}
/* Ensure thread is clearly visible — override inline opacity from JS */
.corkboard-thread-svg path {
  opacity: 0.8 !important;
  stroke-width: 2.5 !important;
}
.corkboard-thread-svg circle {
  opacity: 0.8 !important;
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.news-index-card {
  background: #fffef8;
  border-radius: 2px;
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  transform-origin: center top;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  border-top: 3px solid var(--desk-dark);
  direction: rtl;
  overflow: hidden;
}
.news-index-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px) rotate(0deg) !important;
  z-index: 5;
}
.news-index-card:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 3px; }
/* Keep stamps from overflowing narrow cards */
.news-index-card .stamp {
  position: static !important;
  display: inline-flex;
  margin-bottom: 6px;
}

.news-card-source {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--ink-faded);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.news-card-headline {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 8px;
}

.news-card-dek {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-light);
  margin-bottom: 10px;
}

.news-card-time {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-faded);
}

.news-card-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.corkboard-more {
  text-align: center;
  margin-top: 20px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink);
  border: 1.5px solid rgba(31,42,68,.3);
  border-radius: 2px;
  padding: 8px 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-link:hover { background: var(--paper-warm); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-link:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 2px; }

/* ============================================================
   SECTION 5 — ARTICLES DRAWER (manila folders)
   ============================================================ */
.drawer-section {
  margin-top: 40px;
}

.drawer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.drawer-nav {
  display: flex;
  gap: 8px;
}

.drawer-nav-btn {
  background: var(--paper);
  border: 1.5px solid rgba(31,42,68,.22);
  border-radius: 2px;
  width: 36px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faded);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: background .15s, color .15s;
}
.drawer-nav-btn:hover { background: var(--paper-warm); color: var(--ink); }
.drawer-nav-btn:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 2px; }

.folders-container {
  position: relative;
  height: 340px;
}

.folder {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: #e8c878;
  border-radius: 2px 2px 0 0;
  box-shadow: var(--shadow-lg);
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  cursor: pointer;
}

/* folder tab */
.folder-tab {
  position: absolute;
  top: -28px;
  right: 24px;
  background: inherit;
  border-radius: 4px 4px 0 0;
  padding: 6px 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(31,42,68,.7);
  box-shadow: -2px -2px 6px rgba(0,0,0,.08), 2px 0 6px rgba(0,0,0,.06);
  white-space: nowrap;
}

/* Individual folder colors by category */
.folder-opinion  { background: #ecd87a; }
.folder-deep     { background: #d4e4a0; }
.folder-guide    { background: #a8ccdc; }
.folder-tools    { background: #dcc8e4; }
.folder-bench    { background: #f4c8a0; }

.folder-active {
  height: 300px;
  z-index: 10;
  transform: translateY(0) rotate(0deg);
}

.folder-back1 {
  height: 296px;
  z-index: 8;
  transform: translateY(8px) rotate(-1.2deg);
  opacity: 0.9;
}
.folder-back2 {
  height: 292px;
  z-index: 6;
  transform: translateY(16px) rotate(1.8deg);
  opacity: 0.75;
}
.folder-back3 {
  height: 288px;
  z-index: 4;
  transform: translateY(24px) rotate(-0.8deg);
  opacity: 0.6;
}
.folder-hidden {
  opacity: 0;
  transform: translateY(60px);
  z-index: 2;
  pointer-events: none;
}

.folder-content {
  padding: 24px 32px 20px;
  height: 100%;
  overflow: hidden;
}

.folder-article-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.25;
}

.folder-article-excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-light);
  margin-bottom: 14px;
}

.folder-meta {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-faded);
}

.folder-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
  border-bottom: 1.5px solid rgba(31,42,68,.4);
  padding-bottom: 2px;
  transition: color .15s;
}
.folder-read-link:hover { color: var(--red); text-decoration: none; }
.folder-read-link:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 3px; }

/* ============================================================
   SECTION 6 — POST-IT NOTES (draggable)
   ============================================================ */
.postits-section {
  position: relative;
  min-height: 360px;
  margin-top: 40px;
  pointer-events: none; /* allow child pointer events only */
}

.postit-area {
  position: relative;
  width: 100%;
  height: 400px;
  min-height: 400px;
}

.postit {
  position: absolute;
  width: 190px;
  min-height: 160px;
  padding: 18px 16px 16px;
  border-radius: 1px;
  box-shadow:
    0 1px 2px rgba(0,0,0,.10),
    0 8px 20px rgba(40,35,25,.16),
    0 1px 0 rgba(255,255,255,.4) inset;
  cursor: grab;
  pointer-events: all;
  user-select: none;
  transition: box-shadow .15s;
  z-index: 10;
}
.postit:active { cursor: grabbing; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 20px 48px rgba(40,35,25,.28); }
.postit.dragging { z-index: 200; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 24px 56px rgba(40,35,25,.32); }

/* Post-it "fold" bottom-right corner */
.postit::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.08) 50%);
  border-radius: 0 0 0 1px;
}

.postit-mustard  { background: var(--mustard); }
.postit-sage     { background: var(--sage); }
.postit-sky      { background: var(--sky); }
.postit-lavender { background: var(--lavender); }
.postit-warm     { background: var(--paper-warm); border-top: 5px solid var(--mustard-dk); }

/* Pin variants */
.postit-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

/* Tape variant — no pin, tape across top */
.postit-tape-bar {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 18px;
  background: var(--tape);
  clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
  pointer-events: none;
  z-index: 3;
}

.postit-tag {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(31,42,68,.5);
  margin-bottom: 8px;
}

.postit-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 8px;
}

.postit-excerpt {
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-light);
}

.postit a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.postit a:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 2px; border-radius: 1px; }
.postit a:hover .postit-title { text-decoration: underline; }

/* Reduced motion: no dragging inertia animation */
@media (prefers-reduced-motion: reduce) {
  .postit { transition: none; cursor: default; }
}

/* ============================================================
   SECTION 7 — CHANNEL / PHONE
   ============================================================ */
.channel-section {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: center;
}

.channel-intro {
  max-width: 440px;
}

.channel-intro-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}

.channel-intro-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: 24px;
}

.skin-switcher {
  display: flex;
  gap: 0;
  border: 1.5px solid rgba(31,42,68,.2);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: fit-content;
}

.skin-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  background: var(--paper);
  color: var(--ink-faded);
  transition: background .15s, color .15s;
}
.skin-btn:not(:last-child) { border-left: 1.5px solid rgba(31,42,68,.15); }
.skin-btn.active { background: var(--ink); color: #fff; }
.skin-btn:hover:not(.active) { background: var(--paper-warm); }
.skin-btn:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: -2px; }

/* Phone device */
.phone-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone {
  width: 280px;
  height: 540px;
  border-radius: 36px;
  box-shadow:
    0 2px 4px rgba(0,0,0,.12),
    0 20px 60px rgba(40,35,25,.28),
    inset 0 0 0 1.5px rgba(255,255,255,.25);
  background: #1a1a1e;
  position: relative;
  transform: rotate(2.5deg) perspective(800px) rotateY(-6deg);
  overflow: hidden;
  flex-shrink: 0;
}

.phone::before {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 26px;
  background: #0d0d10;
  border-radius: 20px;
  z-index: 10;
}

.phone-screen {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-statusbar {
  height: 44px;
  flex-shrink: 0;
  padding: 8px 16px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.phone-chat-header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.phone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.phone-chat-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.phone-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* hide scrollbar */
  scrollbar-width: none;
}
.phone-messages::-webkit-scrollbar { display: none; }

.msg-bubble {
  max-width: 88%;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.5;
  direction: rtl;
  /* Default: visible so no-JS, print, Playwright see all messages */
  opacity: 1;
  transform: translateY(0);
  transition: opacity .3s, transform .3s;
  position: relative;
  align-self: flex-end;
  word-break: break-word;
}
/* JS sequential-reveal: app.js marks bubbles .anim-hidden, then adds .visible */
.msg-bubble.anim-hidden {
  opacity: 0;
  transform: translateY(8px);
}
.msg-bubble.anim-hidden.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .msg-bubble.anim-hidden,
  .msg-bubble.anim-hidden.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
.msg-bubble.urgent::before {
  content: '🔴';
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 8px;
}

.msg-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  margin-bottom: 3px;
  opacity: 0.7;
}

.msg-time {
  font-size: 9px;
  opacity: 0.6;
  text-align: left;
  margin-top: 2px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 18px;
  width: 56px;
  opacity: 0;
  transition: opacity .3s;
  align-self: flex-end;
}
.typing-indicator.visible { opacity: 1; }
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: typing-bounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(.8); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}

/* WhatsApp skin */
.skin-wa .phone { background: #1a1a1e; }
.skin-wa .phone-screen { background: #0d1117; }
.skin-wa .phone-statusbar { background: #075E54; }
.skin-wa .phone-chat-header { background: #075E54; }
.skin-wa .phone-messages { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M10,30 Q20,10 30,30 T50,30' stroke='%2325D366' stroke-width='.3' fill='none' opacity='.08'/%3E%3C/svg%3E"); background-color: #ECE5DD; }
.skin-wa .msg-bubble { background: #25D366; color: #fff; border-radius: 8px 8px 2px 8px; }
.skin-wa .typing-indicator { background: #fff; }
.skin-wa .typing-dot { background: #25D366; }

/* Telegram skin */
.skin-tg .phone { background: #1a1a1e; }
.skin-tg .phone-screen { background: #0d1117; }
.skin-tg .phone-statusbar { background: #2AABEE; }
.skin-tg .phone-chat-header { background: #2AABEE; }
.skin-tg .phone-messages { background: #1e2a38; }
.skin-tg .msg-bubble { background: #2AABEE; color: #fff; border-radius: 14px 14px 4px 14px; }
.skin-tg .typing-indicator { background: #2a3a4a; }
.skin-tg .typing-dot { background: #2AABEE; }

/* Messenger skin */
.skin-ms .phone { background: #1a1a1e; }
.skin-ms .phone-screen { background: #0d1117; }
.skin-ms .phone-statusbar { background: linear-gradient(135deg, #0099FF 0%, #A033FF 100%); }
.skin-ms .phone-chat-header { background: linear-gradient(135deg, #0099FF 0%, #A033FF 100%); }
.skin-ms .phone-messages { background: #16181f; }
.skin-ms .msg-bubble { background: linear-gradient(135deg, #0099FF 0%, #A033FF 100%); color: #fff; border-radius: 18px 18px 4px 18px; }
.skin-ms .typing-indicator { background: rgba(255,255,255,.1); }
.skin-ms .typing-dot { background: #a033ff; }

/* ============================================================
   FOOTER
   ============================================================ */
.desk-footer {
  margin-top: 56px;
  padding: 28px 0 24px;
  border-top: 1px dashed rgba(31,42,68,.2);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-quote-slip {
  background: var(--paper-warm);
  border-radius: 2px;
  padding: 20px 24px;
  max-width: 500px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-0.4deg);
  position: relative;
}

.footer-quote-text {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer-quote-author {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-faded);
  text-transform: uppercase;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-faded);
  line-height: 2;
  text-align: left;
}

/* Coffee ring stain */
.coffee-ring {
  position: absolute;
  bottom: -20px;
  left: 60px;
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0.22;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-manuscript {
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  padding: 56px 64px 52px;
  position: relative;
  margin-top: 36px;
}

/* Ruled lines on article page */
.article-manuscript::before {
  content: '';
  position: absolute;
  inset: 56px 0 0 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 27px,
    rgba(31,42,68,.05) 28px
  );
  background-size: 100% 28px;
  pointer-events: none;
  border-radius: 0 0 2px 2px;
}

.article-tldr-note {
  background: var(--mustard);
  border-radius: 1px;
  padding: 14px 18px;
  margin-bottom: 28px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transform: rotate(-0.3deg);
}

.tldr-staple {
  position: absolute;
  top: -3px;
  right: 30px;
  font-size: 14px;
  color: var(--ink-faded);
  pointer-events: none;
}

.tldr-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-faded);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.tldr-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}

.article-takeaways {
  background: var(--paper-warm);
  border-radius: 2px;
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.takeaway-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-faded);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.takeaway-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

.takeaway-checkbox {
  flex-shrink: 0;
  margin-top: 2px;
}

.sources-slip {
  background: #fffef6;
  border-radius: 2px;
  padding: 18px 22px;
  margin-top: 28px;
  box-shadow: var(--shadow-sm);
  border-right: 3px solid var(--sky);
  position: relative;
}

.sources-paperclip {
  position: absolute;
  top: -12px;
  right: 20px;
}

.sources-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-faded);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sources-list a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #1a5f8a;
  text-decoration: underline;
}

.article-prevnext {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  justify-content: space-between;
}

.prevnext-tab {
  flex: 1;
  background: var(--paper-aged);
  border-radius: 2px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 3px solid var(--desk-dark);
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.prevnext-tab:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.prevnext-tab:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 2px; }

.prevnext-dir {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--ink-faded);
  text-transform: uppercase;
}

.prevnext-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* ============================================================
   NEWS PAGE — CORKBOARD TIMELINE
   ============================================================ */
.news-page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.news-timeline {
  position: relative;
  padding-top: 40px;
}

/* Red thread spine */
.news-timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: 30px;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0, var(--thread) 40px, var(--thread) calc(100% - 40px), transparent 100%);
  opacity: 0.55;
  z-index: 0;
}

.timeline-date-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
}

.tape-date {
  background: var(--tape);
  border-radius: 2px;
  padding: 5px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-light);
  clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
}

.timeline-card {
  background: var(--paper);
  border-radius: 2px;
  padding: 20px 24px 18px;
  margin-right: 64px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.timeline-card:hover { box-shadow: var(--shadow-lg); transform: translateX(-3px); }
.timeline-card:focus-visible { outline: 2px solid var(--mustard-dk); outline-offset: 2px; }

/* Pin connecting card to thread */
.timeline-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -38px;
  transform: translateY(-50%);
  width: 36px;
  height: 1.5px;
  background: var(--thread);
  opacity: 0.5;
}

.timeline-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.timeline-meta {
  flex-shrink: 0;
  text-align: left;
}

.timeline-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faded);
  white-space: nowrap;
}

.timeline-source {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faded);
  text-transform: uppercase;
  margin-top: 4px;
}

.timeline-headline {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 6px;
  flex: 1;
}

.timeline-dek {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-light);
  flex: 1;
}

/* ============================================================
   PAGE-SPECIFIC HEADER (article + news pages)
   ============================================================ */
.page-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 1px solid rgba(31,42,68,.14);
  margin-bottom: 8px;
}

.page-masthead-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.page-masthead-name:hover { text-decoration: underline; }

.page-masthead-back {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faded);
  border-bottom: 1px solid var(--ink-faded);
  padding-bottom: 1px;
  text-decoration: none;
  transition: color .15s;
}
.page-masthead-back:hover { color: var(--ink); text-decoration: none; }

/* ============================================================
   SCROLL-ENTRY ANIMATION
   Default: fully visible so no-JS, print, Playwright full-page
   all show content. JS adds .anim-ready before observing to
   enable the hidden start state for real browser scroll.
   ============================================================ */
.land-on-desk {
  opacity: 1;
  transform: rotate(var(--settled-rot, 0deg));
  transition: opacity .55s cubic-bezier(.22,.68,0,1.2),
              transform .55s cubic-bezier(.22,.68,0,1.2);
}
.land-on-desk.anim-ready {
  opacity: 0;
  transform: translateY(-20px) rotate(var(--land-rot, 0deg));
}
.land-on-desk.anim-ready.landed {
  opacity: 1;
  transform: translateY(0) rotate(var(--settled-rot, 0deg));
}

@media (prefers-reduced-motion: reduce) {
  .land-on-desk,
  .land-on-desk.anim-ready {
    opacity: 1 !important;
    transform: rotate(var(--settled-rot, 0deg)) !important;
    transition: none !important;
  }
}

/* Float animation on pinned notes */
@keyframes float-note {
  0%, 100% { transform: rotate(var(--settled-rot, 0deg)) translateY(0); }
  50%       { transform: rotate(var(--settled-rot, 0deg)) translateY(-4px); }
}
.float-note {
  animation: float-note 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .float-note { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .desk-surface { padding: 0 28px 60px; }
  .lead-story-section { grid-template-columns: 1fr; }
  .channel-section { grid-template-columns: 1fr; }
  .news-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .news-cards-grid .news-index-card:nth-child(n+4) { display: none; }
}

@media (max-width: 768px) {
  .desk-surface { padding: 0 16px 48px; }
  .masthead-sheet { width: 100%; max-width: 460px; padding: 24px 28px 20px; }
  .masthead-name { font-size: 36px; }
  .lead-manuscript { padding: 28px 24px 24px; transform: rotate(0); }
  .lead-headline { font-size: 26px; }
  .news-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .news-cards-grid .news-index-card:nth-child(n+3) { display: none; }
  .folders-container { height: 280px; }
  .folder-active { height: 240px; }
  .folder-back1 { height: 236px; }
  .folder-back2 { height: 232px; }
  .folder-back3 { height: 228px; }
  .postit-area { height: auto; min-height: 280px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px; position: static; }
  .postit { position: static !important; transform: none !important; width: auto; cursor: default; }
  .channel-section { grid-template-columns: 1fr; }
  .article-manuscript { padding: 32px 24px 28px; }
  .timeline-card { margin-right: 48px; }
}

@media (max-width: 480px) {
  .news-cards-grid { grid-template-columns: 1fr; }
  .news-cards-grid .news-index-card:nth-child(n+3) { display: none; }
  .postit-area { grid-template-columns: repeat(2, 1fr); }
  .article-prevnext { flex-direction: column; }
  .masthead { margin-top: 20px; }

  /* Phone at 390px: smaller + straight angle so it fits without clipping */
  .phone {
    width: 240px;
    height: 440px;
    transform: rotate(1deg) perspective(600px) rotateY(-2deg);
  }
  .phone-wrap {
    padding: 8px 0;
  }
  /* Skin tabs below phone on mobile */
  .skin-switcher-mobile { display: flex !important; }
}

/* Mobile skin switcher (shown only at <=480px, inline with phone) */
.skin-switcher-mobile {
  display: none;
  margin-top: 12px;
  justify-content: center;
}

