/* ==========================================================================
   THE GHIFFARI GAZETTE — vintage broadsheet stylesheet
   ========================================================================== */

:root {
  --paper: #fbf7ee;
  --paper-shadow: #f1e7d0;
  --paper-dark: #f6ecd4;
  --ink: #262019;
  --ink-soft: #4a4030;
  --ink-faint: #6b6045;
  --rule: #3a2f20;
  --accent: #7a1f1f;
  --accent-soft: #9c4a3a;
  --gold: #93731f;
  --focus: #1d5c8a;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Old Standard TT', 'Georgia', serif;
  --font-type: 'Special Elite', 'Courier New', monospace;

  --max-width: 1180px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(58, 47, 32, 0.03) 0,
      transparent 45%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(58, 47, 32, 0.035) 0,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 95%,
      rgba(58, 47, 32, 0.03) 0,
      transparent 50%
    ),
    url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC44NSIgbnVtT2N0YXZlcz0iMiIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAuMTUgIDAgMCAwIDAgMC4xMiAgMCAwIDAgMCAwLjA4ICAwIDAgMCAwLjUgMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIvPjwvc3ZnPg==');
  background-size: auto, auto, auto, 180px 180px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* OUTLINE SHADOW TEXTURE & ENHANCED VIGNETTE */
body::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 999;

  /* Deep vignette shadows + multi-layered textured border outline */
  box-shadow: inset 0 0 5vw rgba(30, 25, 20, 0.13),
    /* Soft ambient vignette — lightened further for a brighter, more optimistic feel */
      inset 0 0 12vw rgba(30, 25, 20, 0.08),
    /* Wide spread vignette */ inset 0 0 0 8px rgba(58, 47, 32, 0.04),
    /* Inner soft outline band */ inset 0 0 0 2px rgba(40, 30, 20, 0.16); /* Outer sharp outline frame */

  /* Subtle radial gradient adding texture specifically at the margins */
  background: radial-gradient(
    circle,
    transparent 65%,
    rgba(30, 20, 10, 0.02) 100%
  );
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
  /* A good vintage newspaper filter: sepia tint, print contrast */
  filter: sepia(0.3) grayscale(0.6) contrast(1.1) brightness(0.95);
}

/* Specific boundaries for inserted images */
article.lead-story .headline-photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

aside.sidebar .mini-me-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%; /* Ensuring the circular shape is maintained */
}

.working-desk .telegram-card img,
.article-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ------------------------------ image placeholders -------------------------------- */
/* Generic "photo goes here" component, reused with size/shape modifiers throughout. */

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--ink-faint);
  background: repeating-linear-gradient(
      45deg,
      rgba(58, 47, 32, 0.07) 0 10px,
      transparent 10px 20px
    ),
    var(--paper-dark);
  color: var(--ink-faint);
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  padding: 0.5rem;
  overflow: hidden;
  flex: none;
}
.img-placeholder span {
  max-width: 92%;
}

.landscape-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.square-placeholder {
  aspect-ratio: 1 / 1;
}
.portrait-placeholder {
  aspect-ratio: 3 / 4;
}

/* ---------------------------- utility bar -------------------------------- */

.utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-type);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--ink);
  padding: 0.4rem 1.2rem;
  flex-wrap: wrap;
}
.utility-item {
  white-space: nowrap;
}
.utility-center {
  opacity: 0.85;
}

/* ------------------------------ masthead ---------------------------------- */

.masthead {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.4rem 0.5rem;
  text-align: center;
}

.masthead-eyebrow {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0 0 0.25rem;
}

.masthead-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
  color: var(--ink);
}

.masthead-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0.3rem 0 0.5rem;
}

.masthead-flourish {
  width: 200px;
  height: 26px;
  margin: 0 auto 0.5rem;
  display: block;
}

.masthead-rule-thick {
  height: 5px;
  background: var(--ink);
  background-image: linear-gradient(
    to bottom,
    var(--ink) 0 2px,
    transparent 2px 3px,
    var(--ink) 3px 5px
  );
  margin: 0 auto;
}

.masthead-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--font-type);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.1rem 0;
  flex-wrap: wrap;
}
.masthead-meta-center {
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

/* --------------------------------- nav ------------------------------------ */

.section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--paper-dark);
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 0 0.5rem;
}

.nav-tab {
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-shadow: 0.4px 0 0 currentColor, -0.4px 0 0 currentColor;
  background: none;
  border: none;
  border-right: 1px solid var(--paper-shadow);
  color: var(--ink-soft);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}
.nav-tab:hover {
  color: var(--ink);
  background: var(--paper-shadow);
}
.nav-tab.active {
  color: var(--paper);
  background: var(--ink);
}

.unfold-btn {
  margin-left: auto;
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: var(--paper);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.unfold-btn:hover {
  background: var(--ink);
}

/* -------------------------------- layout ----------------------------------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.4rem;
}

.paper-section {
  padding: 1.5rem 0 1.1rem;
  border-bottom: 1px solid var(--paper-shadow);
}

.section-masthead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 0;
  color: var(--ink);
}

.section-subhead {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.15rem 0 0;
}

.section-rule {
  height: 3px;
  background: var(--rule);
  margin: 0.5rem 0 1.1rem;
}

/* ------------------------------ front page --------------------------------- */

.front-page {
  padding-top: 0.8rem;
}

.front-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.2rem;
  align-items: start;
}

.headline-news-label {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--accent);
  display: inline-block;
  padding: 0.25rem 0.7rem;
  margin: 0 0 0.5rem;
}

.headline-photo-frame {
  margin: 0 0 1.2rem;
}

.headline-photo-frame .img-placeholder {
  font-size: 0.78rem;
}

.headline-caption {
  font-family: var(--font-type);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--paper-shadow);
  padding: 0.4rem 0 0.9rem;
  margin: 0;
}

.mini-me-box {
  text-align: center;
}

.mini-me-frame {
  width: 68%;
  margin: 0 auto;
}

.mini-me-frame .img-placeholder {
  border-radius: 50%;
  font-size: 0.62rem;
}

.mini-me-caption {
  width: 100%;
  margin: 0.5rem 0 0;
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-soft);
  min-height: 2.6em;
}

.kicker {
  font-family: var(--font-type);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0 0 0.3rem;
}

.headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.08;
  margin: 0 0 0.5rem;
}

.byline {
  font-family: var(--font-type);
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--paper-shadow);
  padding-bottom: 0.8rem;
  margin: 0 0 1rem;
}

.lead-columns {
  column-count: 2;
  column-gap: 2rem;
  column-rule: 1px solid var(--paper-shadow);
}
.lead-columns p {
  margin: 0 0 1em;
  max-width: 42ch;
}

.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.6rem;
  line-height: 0.78;
  float: left;
  padding: 0.05em 0.08em 0 0;
  color: var(--accent);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.ad-box {
  border: 2px solid var(--ink);
  padding: 1rem 1.1rem;
  background: var(--paper-dark);
}

.ad-box-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  margin: 0 0 0.6rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.3rem;
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stat-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--ink-faint);
}
.stat-list li:last-child {
  border-bottom: none;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--accent);
  min-width: 2.4em;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.quote-box {
  text-align: center;
  position: relative;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.5;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.quote-text {
  font-style: italic;
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}
.quote-attr {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 0;
}

.weather-line {
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.stop-press-box {
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 1.1rem;
  text-align: center;
}
.stop-press-title {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 0.4rem;
}
.stop-press-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ------------------------------- story cards -------------------------------- */

.story-card {
  padding: 1.2rem 0;
  border-top: 1px solid var(--paper-shadow);
}
.story-card:first-of-type {
  border-top: none;
}

.story-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.9rem;
}

.story-photo {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  font-size: 0.4rem;
  flex: none;
}

.story-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  flex: 1 1 55%;
  min-width: 240px;
}

.dateline {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0.15rem 0 0;
  flex: 1 1 100%;
}

.story-dates {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 0.15rem 0 0;
  margin-left: auto;
}

.story-teaser {
  margin: 0.6rem 0 0;
}

.read-more {
  font-family: var(--font-type);
  font-size: 0.75rem;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.read-more:hover {
  color: var(--ink);
}

.story-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
[data-expandable].open .story-body {
  max-height: 900px;
}
.story-body ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}
.story-body li {
  margin: 0 0 0.5rem;
}
.story-body p {
  margin: 0.8rem 0 0;
}

.editor-note {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-style: normal;
  border-top: 1px dotted var(--ink-faint);
  padding-top: 0.6rem;
}

/* -------------------------------- article cards ------------------------------- */

.article-card {
  background: var(--paper-dark);
  border: 1px solid var(--ink);
  padding: 1.2rem 1.3rem;
  margin: 0 0 1.6rem;
}
.article-card:last-child {
  margin-bottom: 0;
}

.article-top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.4rem;
  align-items: start;
}

.article-media .img-placeholder {
  font-size: 0.68rem;
}

.article-caption {
  font-family: var(--font-type);
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin: 0.4rem 0 0;
  line-height: 1.4;
}

.article-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.org-favicon {
  border-radius: 3px;
  flex: none;
}
.inline-favicon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  border-radius: 2px;
}

.article-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 0.2rem;
}

.article-byline {
  font-family: var(--font-type);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}

.article-lede {
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

@media (max-width: 640px) {
  .article-top {
    grid-template-columns: 1fr;
  }
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-type);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.5rem 0.95rem;
  text-decoration: none;
}
.cta-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.cta-button:active {
  transform: scale(0.97);
}

.detail-link-wrap {
  margin: 0.7rem 0 0;
  clear: both;
}

/* ----------------------------------- gossip column -------------------------------- */

.gossip-column {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gossip-entry {
  padding: 1.1rem 0;
  border-top: 1px dotted var(--ink-faint);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.7;
}
.gossip-entry:first-child {
  border-top: none;
  padding-top: 0;
}

.gossip-entry .gossip-mark {
  font-family: var(--font-type);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.gossip-mark .org-favicon {
  border-radius: 2px;
}

.gossip-entry strong {
  font-style: normal;
  font-weight: 700;
}

.gossip-photo {
  float: right;
  width: 76px;
  height: 92px;
  margin: 0 0 0.6rem 1rem;
  transform: rotate(-3deg);
  box-shadow: 2px 4px 8px rgba(20, 15, 10, 0.22);
  font-family: var(--font-type);
  font-style: normal;
  font-size: 0.48rem;
  padding-bottom: 0.9rem;
}
.gossip-entry:nth-child(even) .gossip-photo {
  transform: rotate(3deg);
  float: left;
  margin: 0 1rem 0.6rem 0;
}

/* -------------------------------------- postcard ----------------------------------- */

.postcard {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.4rem;
  border: 2px solid var(--ink);
  background: var(--paper-dark);
  padding: 1.2rem 1.4rem;
  position: relative;
}

.postcard-photo {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 0 0.9rem;
  font-size: 0.68rem;
}

.postcard-message {
  font-family: var(--font-type);
  font-size: 0.92rem;
  line-height: 1.85;
  margin: 0 0 0.6rem;
}

.postcard-sign {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.postcard-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-left: 1px dashed var(--ink-faint);
  padding-left: 1.2rem;
  min-width: 120px;
}

.postcard-stamp {
  width: 64px;
  height: 76px;
  border: 2px dashed var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--paper);
  transform: rotate(3deg);
}

.postmark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-type);
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--ink-faint);
  transform: rotate(-8deg);
}

@media (max-width: 620px) {
  .postcard {
    grid-template-columns: 1fr;
  }
  .postcard-side {
    flex-direction: row;
    justify-content: center;
    border-left: none;
    border-top: 1px dashed var(--ink-faint);
    padding-left: 0;
    padding-top: 1rem;
  }
}

/* -------------------------------- honor roll --------------------------------- */

.honor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.honor-card {
  border: 2px solid var(--ink);
  padding: 1.1rem 1.2rem;
  background: var(--paper-dark);
  position: relative;
}

.honor-rank {
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--accent);
  display: inline-block;
  padding: 0.2rem 0.5rem;
  margin: 0 0 0.6rem;
}

.honor-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}

.honor-meta {
  font-family: var(--font-type);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}

.honor-body {
  font-size: 0.9rem;
  margin: 0;
}

/* ------------------------------ scroll reveal ------------------------------ */
/* Applied via JS (script.js) to existing cards — no markup changes needed.
         Elements start slightly lowered and faded, then settle into place. */

.reveal-init {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-init.revealed {
  opacity: 1;
  transform: none;
}

/* The award ribbon "stamps" into place once its card has revealed. */
.honor-card .honor-rank {
  transform: scale(0.4) rotate(-10deg);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s,
    opacity 0.25s ease 0.2s;
}
.honor-card.revealed .honor-rank {
  transform: scale(1) rotate(-2deg);
  opacity: 1;
}

/* -------------------------------- classifieds --------------------------------- */

.classifieds-search {
  margin: 0 0 1.4rem;
  font-family: var(--font-type);
  font-size: 0.8rem;
}
.classifieds-search label {
  display: block;
  margin-bottom: 0.4rem;
}
.classifieds-search input {
  width: 100%;
  max-width: 360px;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

.classifieds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.4rem;
}

.classified-ad {
  border: 3px dashed var(--ink-faint);
  padding: 0.9rem 1rem;
  background: var(--paper);
  position: relative;
  transform: rotate(var(--tilt, -1deg));
  box-shadow: 3px 3px 0 rgba(38, 32, 25, 0.08);
}
.classified-ad:nth-child(odd) {
  --tilt: 1.2deg;
}
.classified-ad:nth-child(even) {
  --tilt: -1.2deg;
}

.classified-heading {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

.classified-body {
  font-size: 0.88rem;
  margin: 0;
}

.classified-ad.is-hidden {
  display: none;
}

.classifieds-empty {
  font-family: var(--font-type);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------------------------------- letters ------------------------------------ */

.letters-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.6rem;
  align-items: center;
}

.letter-box {
  border: 2px solid var(--ink);
  padding: 1.2rem 1.4rem;
  background: var(--paper-dark);
}

.letter-line {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.letter-line:last-child {
  margin-bottom: 0;
}
.letter-label {
  font-family: var(--font-type);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-right: 0.4rem;
}

.stamp-box {
  text-align: center;
}
.wax-stamp {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    var(--accent-soft),
    var(--accent) 70%
  );
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3),
    inset 0 0 0 3px rgba(255, 255, 255, 0.15);
  transform: rotate(-6deg);
}
.stamp-caption {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ----------------------------------- footer -------------------------------------- */

.masthead-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.4rem 1.4rem 2.4rem;
  text-align: center;
}
.footer-line {
  font-family: var(--font-type);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}
.footer-small {
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.back-to-top {
  margin-top: 1.1rem;
  font-family: var(--font-type);
  font-size: 0.72rem;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.back-to-top:hover {
  background: var(--ink);
  color: var(--paper);
}

/* one orchestrated load-in moment for the masthead: the title types itself
         out (see script.js), with a blinking cursor while it's mid-line */
.typewriter-typing::after {
  content: '';
  display: inline-block;
  width: 0.05em;
  border-right: 3px solid var(--ink);
  margin-left: 2px;
  animation: typewriter-cursor-blink 0.8s step-end infinite;
}
@keyframes typewriter-cursor-blink {
  0%,
  100% {
    border-color: var(--ink);
  }
  50% {
    border-color: transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  .typewriter-typing::after {
    animation: none;
  }
}

/* ------------------------------------ responsive ---------------------------------- */

@media (max-width: 860px) {
  .front-grid {
    grid-template-columns: 1fr;
  }
  .lead-columns {
    column-count: 1;
  }
  .letters-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .utility-bar {
    font-size: 0.56rem;
    padding: 0.3rem 0.7rem;
  }
  .masthead {
    padding: 0.6rem 1rem 0.35rem;
  }
  .masthead-tagline {
    margin: 0.2rem 0 0.35rem;
  }
  .masthead-flourish {
    width: 150px;
    margin-bottom: 0.35rem;
  }
  .masthead-meta {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding-top: 0.25rem;
  }
  .story-dates {
    margin-left: 0;
  }

  /* The section nav becomes one horizontally-scrollable strip instead of
           wrapping into several rows — a stack of nav rows was eating most of
           the screen before any content appeared. Swipe sideways to see more. */
  .section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    mask-image: linear-gradient(
      to right,
      #000 0,
      #000 calc(100% - 22px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      #000 0,
      #000 calc(100% - 22px),
      transparent 100%
    );
  }
  .section-nav::-webkit-scrollbar {
    height: 3px;
  }
  .section-nav::-webkit-scrollbar-thumb {
    background: var(--ink-faint);
  }
  .nav-tab,
  .unfold-btn {
    flex: none;
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 0.5rem 0.65rem;
    font-size: 0.66rem;
  }
  .unfold-btn {
    margin-left: 0;
  }
  .ticker-item {
    font-size: 0.62rem;
    padding: 0.28rem 1.1rem;
  }
}

/* -------------------------------- data ticker -------------------------------- */

.ticker-tape {
  overflow: hidden;
  background: var(--ink);
  border-bottom: 3px double var(--rule);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 44s linear infinite;
  will-change: transform;
}
.ticker-tape:hover .ticker-track,
.ticker-tape:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-shadow: 0.4px 0 0 currentColor, -0.4px 0 0 currentColor;
  padding: 0.35rem 1.6rem;
  border-right: 1px solid rgba(236, 227, 205, 0.25);
}
.ticker-item strong {
  color: var(--gold);
}

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

/* ---------------------------------- data chart --------------------------------- */

.chart-box {
  text-align: center;
}
.engraved-chart {
  width: 100%;
  height: auto;
  margin-top: 0.2rem;
}
.chart-bar {
  opacity: 1;
}
.chart-label {
  font-family: var(--font-type);
  font-size: 8px;
  fill: var(--ink-soft);
  text-anchor: middle;
}
.chart-caption {
  font-family: var(--font-type);
  font-size: 0.65rem;
  color: var(--ink-faint);
  margin: 0.4rem 0 0;
}

/* ------------------------------ interactive polish ------------------------------- */

.nav-tab,
.unfold-btn,
.read-more,
.back-to-top,
.radio-toggle {
  transition: transform 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}
.nav-tab:active,
.unfold-btn:active,
.read-more:active,
.back-to-top:active {
  transform: scale(0.96);
}

.nav-tab {
  position: relative;
}
.nav-tab::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.35rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-tab:hover::after {
  transform: scaleX(1);
}
.nav-tab.active::after {
  display: none;
}

.honor-card,
.classified-ad,
.ad-box,
.story-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.honor-card:hover,
.classified-ad:hover {
  transform: translateY(-3px);
  box-shadow: 4px 6px 0 rgba(38, 32, 25, 0.18);
}
.classified-ad:hover {
  transform: translateY(-3px) rotate(0deg);
}

.read-more::after {
  content: '';
  display: inline-block;
  width: 0;
}

/* ------------------------------- radio on/off switch -------------------------------- */

.radio-switch {
  position: fixed;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(160deg, #2c2118 0%, #17130f 60%, #0d0a08 100%);
  color: var(--paper);
  border: 1px solid #4a3a26;
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 3px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s ease;
}
.radio-switch:has(.radio-toggle.on) {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 3px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(201, 166, 66, 0.35);
}

.radio-switch-caption {
  font-family: var(--font-type);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  margin-right: 0.05rem;
}

.radio-switch-state {
  font-family: var(--font-type);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint-on-dark, #9b9182);
  transition: color 0.15s ease, font-weight 0.15s ease, text-shadow 0.2s ease;
}
.radio-switch-state.active {
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(201, 166, 66, 0.55);
}

/* The button itself is now a round dial framing the real radio artwork,
       with sound-wave rings that ping outward while music is genuinely playing
       (driven by the <audio> element's real play/pause state in script.js —
       not just the on/off intent, so it never animates on a blocked autoplay). */
.radio-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #4a3a26;
  background: radial-gradient(circle at 35% 30%, #3a2c1e 0%, #14100c 75%);
  padding: 4px;
  cursor: pointer;
  overflow: visible;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s ease, filter 0.15s ease, transform 0.12s ease;
}
.radio-toggle:hover {
  filter: brightness(1.12);
}
.radio-toggle:active {
  transform: scale(0.94);
}
.radio-toggle.on {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1), 0 0 10px rgba(201, 166, 66, 0.5);
}

.radio-toggle-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.15s ease;
}
.radio-toggle.on .radio-toggle-image {
  transform: scale(1.04);
}
/* Rhythmic "alive" breathing while the track is genuinely audible. */
.radio-toggle.audio-active .radio-toggle-image {
  animation: radio-breathe 2.2s ease-in-out infinite;
}

/* Simple emoji fallback if the artwork fails to load — never a broken icon.
       script.js swaps the <img> for this span directly, so no advanced CSS
       selector support is needed for the fallback to actually show. */
.radio-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}

/* Sound-wave rings: hidden and still by default, only ping outward while
       .audio-active is present (i.e. audio is actually, verifiably playing). */
.radio-toggle-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.radio-toggle.audio-active .radio-toggle-pulse-ring {
  animation: radio-pulse-ring 1.8s ease-out infinite;
}
.radio-toggle.audio-active .radio-toggle-pulse-ring-delay {
  animation-delay: 0.9s;
}

@keyframes radio-breathe {
  0%,
  100% {
    transform: scale(1.04);
  }
  50% {
    transform: scale(1.12);
  }
}
@keyframes radio-pulse-ring {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .radio-toggle.audio-active .radio-toggle-image,
  .radio-toggle.audio-active .radio-toggle-pulse-ring {
    animation: none;
  }
}

@media (max-width: 560px) {
  .radio-switch-caption {
    display: none;
  }
  .radio-switch {
    padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  }
  .radio-toggle {
    width: 48px;
    height: 48px;
  }
}

/* ------------------------------------ detail pages --------------------------------- */
/* Standalone pages under /pages/ — the "read more, in full" destination for each entry. */

.detail-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 1rem;
}

.detail-back {
  display: inline-block;
  font-family: var(--font-type);
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.detail-kicker {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

.detail-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.detail-meta {
  font-family: var(--font-type);
  font-size: 0.75rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--paper-shadow);
  padding-bottom: 1rem;
  margin: 0;
}

.detail-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.4rem 2rem;
}

.detail-photo {
  width: 100%;
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
}

.detail-caption {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 0 0 1.6rem;
}

.detail-text p {
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 1.1rem;
}

.detail-text ul {
  padding-left: 1.3rem;
}
.detail-text li {
  margin: 0 0 0.6rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

.detail-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.2rem 1.4rem 3rem;
  text-align: center;
}

/* ------------------------------------ print --------------------------------------- */

@media print {
  .section-nav,
  .unfold-btn,
  .back-to-top,
  .utility-bar,
  .ticker-tape,
  .radio-switch {
    display: none;
  }
  .story-body {
    max-height: none !important;
  }
  body {
    background: #fff;
  }
}

/* ==========================================================================
   NIKKI TICKER — subtle data-paper polish
   These overrides preserve the original broadsheet layout while tightening
   the front-page proportions and adding restrained data-themed ornament.
   ========================================================================== */

/* A quiet background engraving: grid + data points, intentionally faint. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-image: radial-gradient(
      circle at 12% 18%,
      var(--ink-soft) 0 1px,
      transparent 1.5px
    ),
    radial-gradient(circle at 82% 28%, var(--ink-soft) 0 1px, transparent 1.5px),
    radial-gradient(circle at 67% 82%, var(--ink-soft) 0 1px, transparent 1.5px),
    linear-gradient(rgba(58, 47, 32, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 47, 32, 0.11) 1px, transparent 1px);
  background-size: 170px 170px, 230px 230px, 290px 290px, 42px 42px, 42px 42px;
  background-position: 8% 15%, 78% 25%, 65% 78%, 0 0, 0 0;
}

.utility-bar,
.masthead,
.ticker-tape,
main,
.masthead-footer {
  position: relative;
  z-index: 1;
}

/* Keep the two front-page columns proportional rather than creating a huge
                     visual void beneath the shorter left story. */
.front-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 1.5rem;
}

.lead-story {
  min-width: 0;
}

/* Real headline image. */
.headline-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink);
}

/* ============================================================================
                   HEADLINE NEWS — HORIZONTAL OLD TV SIGNAL BUZZ
                   Scoped ONLY to the Headline News photograph.
                   ============================================================================ */
.headline-tv-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}

.headline-tv-screen .headline-photo {
  height: 100%;
  border: 2px solid var(--ink);
  transform-origin: center center;
  will-change: transform, filter;
}

/* Vertical signal bars moving LEFT → RIGHT.
                   This is intentionally horizontal, rather than a vertical scan. */
.headline-tv-screen::before {
  content: '';
  position: absolute;
  inset: 2px;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 2px,
    rgba(0, 0, 0, 0.075) 2px,
    rgba(0, 0, 0, 0.075) 5px,
    transparent 5px,
    transparent 11px
  );
  opacity: 0;
  mix-blend-mode: multiply;
  transform: translateX(-18px);
}

/* A narrow vertical interference bar sweeps horizontally across the image. */
.headline-tv-screen::after {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: -30%;
  width: 26%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0.03) 75%,
    transparent 100%
  );
  opacity: 0;
}

/* JS adds this class briefly every few seconds. */
.headline-tv-screen.headline-tv-buzz .headline-photo {
  /* Keep the photograph perfectly still; the signal effect is layered over it. */
  animation: headline-tv-horizontal-flicker 0.72s steps(2, end) both;
}

.headline-tv-screen.headline-tv-buzz::before {
  animation: headline-tv-horizontal-scan 0.72s steps(7, end) both;
  opacity: 0.74;
}

.headline-tv-screen.headline-tv-buzz::after {
  animation: headline-tv-horizontal-interference 0.72s steps(8, end) both;
}

/* Fast horizontal CRT flicker — NO shake, NO vertical movement, NO ripple. */
@keyframes headline-tv-horizontal-flicker {
  0%,
  100% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(1.1) brightness(0.95);
  }
  15% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(1.28) brightness(1.06);
  }
  30% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(0.9) brightness(0.9);
  }
  45% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(1.32) brightness(1.09);
  }
  60% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(0.94) brightness(0.91);
  }
  75% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(1.22) brightness(1.04);
  }
  90% {
    transform: none;
    filter: sepia(0.3) grayscale(0.6) contrast(1.06) brightness(0.97);
  }
}

/* The signal texture itself travels horizontally. */
@keyframes headline-tv-horizontal-scan {
  0% {
    transform: translateX(-26px);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(14px);
  }
  75% {
    transform: translateX(32px);
  }
  100% {
    transform: translateX(50px);
  }
}

/* Bright interference travels LEFT → RIGHT. */
@keyframes headline-tv-horizontal-interference {
  0% {
    left: -30%;
    opacity: 0;
  }
  10% {
    opacity: 0.26;
  }
  35% {
    opacity: 0.58;
  }
  60% {
    opacity: 0.3;
  }
  100% {
    left: 115%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .headline-tv-screen.headline-tv-buzz .headline-photo,
  .headline-tv-screen.headline-tv-buzz::before,
  .headline-tv-screen.headline-tv-buzz::after {
    animation: none;
  }
}

/* Real avatar images use the same circular treatment as the original
                     placeholder. */
.mini-me-frame .mini-me-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

/* A newspaper-style data engraving that occupies some of the otherwise empty
                     lower-left front-page area. */
.data-engraving {
  margin-top: 1.2rem;
  border-top: 1px solid var(--paper-shadow);
  border-bottom: 1px solid var(--paper-shadow);
  padding: 0.7rem 0 0.55rem;
  opacity: 0.72;
}

.data-engraving-label,
.data-engraving-code {
  font-family: var(--font-type);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
}

.data-engraving-grid {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  height: 42px;
  margin: 0.45rem 0;
}

.data-engraving-grid i {
  display: block;
  width: 13px;
  height: calc(12px + (var(--n, 1) * 4px));
  border: 1px solid var(--ink-soft);
  background: repeating-linear-gradient(
    135deg,
    transparent 0 4px,
    rgba(58, 47, 32, 0.22) 4px 5px
  );
}

.data-engraving-grid i:nth-child(1) {
  height: 17px;
}
.data-engraving-grid i:nth-child(2) {
  height: 28px;
}
.data-engraving-grid i:nth-child(3) {
  height: 22px;
}
.data-engraving-grid i:nth-child(4) {
  height: 36px;
}
.data-engraving-grid i:nth-child(5) {
  height: 25px;
}
.data-engraving-grid i:nth-child(6) {
  height: 31px;
}
.data-engraving-grid i:nth-child(7) {
  height: 19px;
}
.data-engraving-grid i:nth-child(8) {
  height: 34px;
}
.data-engraving-grid i:nth-child(9) {
  height: 27px;
}

.data-engraving-line {
  height: 1px;
  background: var(--ink-soft);
  margin-bottom: 0.35rem;
}

/* The old proficiency chart is now a process graphic, not a self-rating. */
.data-flow .flow-label {
  font-family: var(--font-type);
  font-size: 8px;
  fill: var(--ink-soft);
  text-anchor: middle;
  letter-spacing: 0.02em;
}

.data-flow .flow-stat {
  font-family: var(--font-type);
  font-size: 7px;
  fill: var(--ink-faint);
  text-anchor: middle;
}

.data-desk-box .chart-caption {
  line-height: 1.45;
}

/* Occasional tiny data marks in the paper margins — deliberately subtle. */
.paper-section:nth-of-type(3n) {
  position: relative;
}

.paper-section:nth-of-type(3n)::after {
  content: '01 · 10 · 11  /  DATA NOTE';
  position: absolute;
  right: 0;
  top: 1.5rem;
  font-family: var(--font-type);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  opacity: 0.28;
  pointer-events: none;
}

/* Sound-effect gain was raised (see script.js) so the paper-flip and click
                     sounds keep presence over the music without feeling like a loud UI click. */

@media (max-width: 860px) {
  .front-grid {
    grid-template-columns: 1fr;
  }

  .data-engraving {
    display: none;
  }
}

/* ==========================================================================
                 THE PROJECT DESK — newspaper-style project cards + case-file dossier
                 Cards show only the essentials; the "Open Case File" button reveals the
                 full write-up in a focused note, inspired by the document/journal screens
                 in games like Resident Evil — the page stays visible behind a dimmed,
                 blurred backdrop while the note itself takes full attention.

                 Browsing between cards is a card-catalog drawer, not a slideshow: drag or
                 swipe the row, or press the printer's-manicule stamps (☜ ☞) at either
                 side — a nod to the pointing-hand ornament old typesetters used in the
                 margins to say "see here."
                 ========================================================================== */

.project-carousel {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.project-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.project-track {
  display: flex;
  gap: 1.6rem;
  cursor: grab;
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.project-track.dragging {
  transition: none;
  cursor: grabbing;
}

.project-track .project-card {
  flex: none;
  user-select: none;
}
.project-track .project-card img {
  pointer-events: none;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-dark);
  border: 2px solid var(--ink);
  padding: 1.1rem 1.2rem 1.3rem;
}

.project-tag {
  font-family: var(--font-type);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--accent);
  display: inline-block;
  padding: 0.2rem 0.55rem;
  margin: 0 0 0.7rem;
  align-self: flex-start;
}

.project-photo {
  margin: 0 0 0.8rem;
  font-size: 0.68rem;
}

.project-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.project-teaser {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}

.project-card .dossier-open-btn {
  align-self: flex-start;
  cursor: pointer;
}

/* The full write-up lives here in the markup (so it's easy to author) but
                   stays out of the flow until cloned into the dossier note by script.js. */
.dossier-content[hidden] {
  display: none;
}

/* ------------------------------ manicule nav stamps ------------------------------ */

.project-nav {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper-dark);
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.project-nav:hover {
  opacity: 1;
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  transform: scale(1.08);
}
.project-nav:active {
  transform: scale(0.94);
}
.project-nav-prev span {
  transform: translateX(-1px);
}
.project-nav-next span {
  transform: translateX(1px);
}

/* ------------------------------ punch-hole page dots ------------------------------ */

.project-dots {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.project-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink-faint);
  background: var(--paper);
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--paper);
}
.project-dot:hover {
  border-color: var(--ink);
}
.project-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

/*
  NOTE: the old rule here shrank the project cards' padding, tag, headline
  and teaser sizing behind `@media (max-width: 640px)`. That's replaced
  below by `.project-desk-single` (a class JS applies whenever it decides
  the carousel should show one card at a time) so the "compact card"
  styling always matches whatever JS actually rendered — even on devices
  that report an unusual viewport width.
*/
.project-desk-single .project-nav {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
}

.project-desk-single .project-carousel {
  gap: 0.4rem;
}

.project-desk-single .project-track {
  gap: 1rem;
}

.project-desk-single .project-card {
  padding: 0.85rem 0.9rem 1rem;
}

.project-desk-single .project-tag {
  font-size: 0.6rem;
  padding: 0.16rem 0.45rem;
  margin-bottom: 0.5rem;
}

.project-desk-single .project-photo {
  margin-bottom: 0.6rem;
}

.project-desk-single .project-headline {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.project-desk-single .project-teaser {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* ------------------------------ case-file dossier overlay ------------------------------ */

.dossier-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1.2rem;
}

.dossier-overlay[hidden] {
  display: none;
}

.dossier-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.72);
  backdrop-filter: blur(3px) saturate(0.9);
  -webkit-backdrop-filter: blur(3px) saturate(0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dossier-overlay.open .dossier-backdrop {
  opacity: 1;
}

.dossier-note {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 0 18px 40px rgba(10, 8, 5, 0.45);
  padding: 2.4rem 1.8rem 2rem;
  transform: scale(0.88) translateY(24px) rotate(-1.2deg);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
}

/* A couple of "papers" peeking out behind the focused note. */
.dossier-note::before,
.dossier-note::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper-dark);
  border: 2px solid var(--ink-faint);
  z-index: -1;
}
.dossier-note::before {
  transform: rotate(-3deg) translate(6px, 8px);
}
.dossier-note::after {
  transform: rotate(2.4deg) translate(-8px, 6px);
}

.dossier-overlay.open .dossier-note {
  transform: scale(1) translateY(0) rotate(0deg);
  opacity: 1;
}

.dossier-stamp {
  position: absolute;
  top: 1rem;
  right: 1.6rem;
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0.2rem 0.5rem;
  margin: 0;
  transform: rotate(6deg);
  opacity: 0.75;
  pointer-events: none;
}

.dossier-close {
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper-dark);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.dossier-close:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.dossier-note-content .dossier-tag {
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}
.dossier-note-content .dossier-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 0.4rem;
}
.dossier-note-content .dossier-meta {
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--ink-faint);
  padding-bottom: 0.8rem;
  margin: 0 0 1rem;
}
.dossier-note-content .dossier-photo {
  margin: 0 0 1rem;
  font-size: 0.72rem;
}
.dossier-note-content .dossier-body p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 0.8rem;
}
.dossier-note-content .dossier-body p:last-child {
  margin-bottom: 0;
}

body.dossier-lock {
  overflow: hidden;
}

@media (max-width: 640px) {
  .dossier-note {
    padding: 2.2rem 1.2rem 1.6rem;
  }
}

/* Keep project buttons clickable without starting the drag gesture. */
#projects .dossier-open-btn {
  position: relative;
  z-index: 5;
  touch-action: manipulation;
}

#projects .project-track {
  touch-action: pan-y;
}

/* ============================================================
           SOCIETY PAGE — clearer organization names + readable body
           ============================================================ */

.gossip-entry {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1rem;
  line-height: 1.65;
}

/* Organization name */
.gossip-entry strong {
  display: inline-block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: 1.18em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0.12em;
}

/* Keep the date/location as the newspaper metadata */
.gossip-entry .gossip-mark {
  font-family: var(--font-type);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

/* Make the main organization title slightly more prominent */
.gossip-entry strong:hover {
  color: var(--accent);
}

.old-website-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.old-website-link:hover {
  color: var(--ink);
}


/* ============================================================
   FINAL MOBILE FIXES
   Keep desktop styling unchanged.
   ============================================================ */
@media screen and (max-width: 640px) {
  /* Completely disable the viewport/body vignette on mobile.
     !important is intentional so this remains the final authority. */
  body::after {
    content: none !important;
    display: none !important;
    box-shadow: none !important;
    background: none !important;
  }

  /* Keep the data engraving from creating unnecessary horizontal overflow. */
  .data-engraving {
    max-width: 100%;
    overflow: hidden;
  }
}


#projects.project-desk-single .project-viewport {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

#projects.project-desk-single .project-track {
  gap: 1rem;
}

#projects.project-desk-single .project-track .project-card {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
}
