/* ==========================================================================
   Content pages: news, article, gallery, gazette (world), 404
   ========================================================================== */

/* Shared paper background ---------------------------------------------- */
.paper-bg {
  color: #1d1e24;
  background:
    radial-gradient(70% 50% at 15% 10%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(60% 50% at 90% 85%, rgba(160, 165, 185, 0.35), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.3 0 0 0 0 0.35 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #dcdee5, #cfd1d9);
  color-scheme: light;
}
.paper-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  /* Editorial guide lines; the vertical one starts below the horizontal rule so it never cuts through the header. */
  background:
    linear-gradient(90deg, transparent calc(40.8% - 0.5px), rgba(60, 65, 90, 0.12) 40.8%, transparent calc(40.8% + 0.5px)) 0 13.5% / 100% 86.5% no-repeat,
    linear-gradient(180deg, transparent calc(13.5% - 0.5px), rgba(60, 65, 90, 0.12) 13.5%, transparent calc(13.5% + 0.5px));
}

.section-title { position: relative; display: inline-block; }
.section-title h1 { font-family: var(--font-serif); font-weight: 900; font-size: calc(80 * var(--u)); line-height: 1.05; letter-spacing: -0.01em; }
.section-title--dark h1 { color: #0e0f13; }
.section-title--light h1 { color: #fff; font-weight: 700; font-size: calc(64 * var(--u)); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.section-title__rule { display: block; width: calc(320 * var(--u)); height: 14px; margin-top: 6px; color: #2c2e38; }
.section-title__rule .flourish { width: 100%; height: 100%; transform: scaleX(-1); }
.section-title__rings {
  position: absolute; left: calc(200 * var(--u)); top: calc(-20 * var(--u)); width: calc(130 * var(--u)); height: calc(130 * var(--u));
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 6px, rgba(40, 45, 70, 0.14) 6px 7px);
  -webkit-mask: linear-gradient(135deg, transparent 35%, #000 70%); mask: linear-gradient(135deg, transparent 35%, #000 70%);
  pointer-events: none;
}

/* News ------------------------------------------------------------------- */
.news-scroll, .article-scroll {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(39, 56, 185, 0.35) transparent;
}
.news-inner { width: var(--content-w); margin: 0 auto; padding: calc(150 * var(--u)) calc(4 * var(--u)) calc(90 * var(--u)); }
.news-head { display: grid; grid-template-columns: calc(380 * var(--u)) 1fr; gap: calc(150 * var(--u)); align-items: start; }
.news-featured { margin-top: calc(58 * var(--u)); }
.news-featured__item { border-bottom: 1px solid rgba(20, 22, 35, 0.14); opacity: 0; transform: translateX(-16px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), background 0.25s; }
.page-news.is-entered .news-featured__item { opacity: 1; transform: none; transition-delay: calc(var(--i) * 60ms + 150ms), calc(var(--i) * 60ms + 150ms), 0s; }
.news-featured__item a { position: relative; display: flex; align-items: center; gap: 10px; height: calc(49 * var(--u)); min-height: 44px; padding: 0 calc(12 * var(--u)); }
.news-featured__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(13px, calc(14.5 * var(--u))); font-weight: 500; color: #23242b; }
.news-featured__plus { flex: none; width: 14px; height: 14px; color: #23242b; transition: transform 0.3s var(--ease-out); }
.news-featured__dot { width: 0; height: 10px; border-radius: 50%; background: var(--navy-1); transition: width 0.3s var(--ease-out); flex: none; }
.news-featured__item.is-active { background: linear-gradient(90deg, rgba(140, 146, 190, 0.32), rgba(140, 146, 190, 0.12)); }
.news-featured__item.is-active .news-featured__dot { width: 10px; }
.news-featured__item.is-active .news-featured__plus { transform: rotate(90deg); }

.news-preview { position: relative; margin-top: calc(40 * var(--u)); opacity: 0; transform: translateY(20px) rotate(0.6deg); transition: opacity 0.8s var(--ease-out) 0.2s, transform 0.9s var(--ease-out) 0.2s; }
.page-news.is-entered .news-preview { opacity: 1; transform: none; }
.news-preview__plate { position: absolute; inset: calc(16 * var(--u)) calc(-14 * var(--u)) calc(-24 * var(--u)) calc(118 * var(--u)); background: linear-gradient(180deg, #c6c8d0, #b5b8c2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.news-preview__plate::before { content: ''; position: absolute; left: calc(-148 * var(--u)); top: calc(42 * var(--u)); width: calc(30 * var(--u)); height: 70%; background: linear-gradient(180deg, #363a52, #5d6280); }
.news-preview__card { position: relative; padding: calc(14 * var(--u)) calc(20 * var(--u)) calc(38 * var(--u)); background: linear-gradient(180deg, #ecedf1, #dfe0e6); border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 0 0 1px rgba(60, 65, 85, 0.25), 0 18px 40px rgba(20, 22, 40, 0.18); }
.news-preview__meta { display: grid; gap: 2px; margin-bottom: calc(14 * var(--u)); font-family: var(--font-serif); color: #4a4d5c; }
.news-preview__meta span { font-size: max(10px, calc(12 * var(--u))); font-weight: 700; letter-spacing: 0.08em; }
.news-preview__meta small { font-size: max(7px, calc(7 * var(--u))); letter-spacing: 0.12em; opacity: 0.8; }
.news-preview__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1a1b2c; }
.news-preview__frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.45s, transform 0.8s var(--ease-out); }
.news-preview__frame img.is-loaded { opacity: 1; transform: none; }

.news-tabs { display: flex; flex-wrap: wrap; gap: calc(9 * var(--u)); margin-top: calc(80 * var(--u)); scroll-margin-top: calc(110 * var(--u)); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(50 * var(--u)) calc(58 * var(--u)); margin-top: calc(56 * var(--u)); transition: opacity 0.3s; }
.news-grid.is-loading { opacity: 0.55; }
.news-card { position: relative; animation: card-in 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } }
.news-card__link { display: block; position: relative; }
.news-card__plate { position: absolute; left: calc(8 * var(--u)); top: calc(-12 * var(--u)); width: 60%; height: 40px; background: linear-gradient(180deg, #bfc1ca, #c9cbd3); clip-path: polygon(0 100%, 6% 0, 100% 0, 100% 100%); }
.news-card__frame { position: relative; padding: calc(14 * var(--u)) calc(14 * var(--u)) 0; background: linear-gradient(180deg, #ecedf1, #e3e4e9); border: 1px solid #c5c7cf; border-bottom: 0; border-radius: calc(10 * var(--u)) calc(10 * var(--u)) 0 0; }
.news-card__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: #232436; transition: transform 0.6s var(--ease-out), filter 0.4s; }
.news-card__body { position: relative; display: grid; gap: calc(8 * var(--u)); padding: calc(12 * var(--u)) calc(14 * var(--u)) calc(20 * var(--u)); background: linear-gradient(180deg, #e3e4e9, #dcdde3); border: 1px solid #c5c7cf; border-top: 0; border-radius: 0 0 calc(10 * var(--u)) calc(10 * var(--u)); box-shadow: 0 10px 22px rgba(20, 22, 40, 0.1); min-height: calc(150 * var(--u)); }
.news-card__meta { display: flex; justify-content: space-between; align-items: center; font-size: max(10px, calc(10 * var(--u))); font-weight: 700; color: #33343c; }
.news-card__badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: max(9px, calc(9 * var(--u))); font-weight: 700; color: #fff; background: linear-gradient(180deg, var(--navy-1), var(--navy-2)); }
.news-card__title { font-size: max(14px, calc(15.5 * var(--u))); font-weight: 700; line-height: 1.35; color: #1d1e24; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__summary { font-size: max(12px, calc(11.5 * var(--u))); line-height: 1.55; color: #8a8b95; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__link:hover .news-card__image { transform: scale(1.02); filter: brightness(1.06); }
.news-card__link:hover .news-card__title { color: var(--navy-1); }
.news-card--skeleton .news-card__frame { aspect-ratio: 16 / 10; background: linear-gradient(90deg, #d8d9df, #e9eaee, #d8d9df); background-size: 200% 100%; animation: skeleton 1.4s linear infinite; border-radius: 10px 10px 0 0; }
.news-card--skeleton .news-card__body i { display: block; height: 10px; border-radius: 4px; background: #d0d1d8; }
.news-card--skeleton .news-card__body i:nth-child(2) { width: 80%; }
.news-card--skeleton .news-card__body i:nth-child(3) { width: 60%; }
@keyframes skeleton { to { background-position: -200% 0; } }

.pagination { display: flex; justify-content: center; align-items: center; gap: calc(10 * var(--u)); margin-top: calc(56 * var(--u)); }
.pagination:empty { display: none; }
.pagination__num { min-width: 30px; height: 30px; border-radius: 50%; font-size: 13px; font-weight: 700; color: #3b3d4a; transition: background 0.2s, color 0.2s; }
.pagination__num:hover { background: rgba(39, 56, 185, 0.12); }
.pagination__num.is-active { color: #fff; background: var(--navy-2); }
.pagination__arrow { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: #2b2d3a; }
.pagination__arrow svg { width: 14px; height: 14px; }
.pagination__arrow:disabled { opacity: 0.35; }
.pagination__arrow:not(:disabled):hover { background: var(--navy-2); }
.pagination__gap { min-width: 22px; text-align: center; font-weight: 700; color: #6b6e7d; user-select: none; }
.news-grid > .state { grid-column: 1 / -1; justify-self: center; padding: 48px 16px; text-align: center; color: #4a4d5c; }
.page-news .state--error { color: #3a3b44; }

/* Article ---------------------------------------------------------------- */
.article-scroll { padding: calc(130 * var(--u)) 20px calc(90 * var(--u)); }
.article { width: min(100%, calc(760 * var(--u) + 120px)); margin: 0 auto; opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out); }
.page-article.is-entered .article { opacity: 1; transform: none; }
.article__header { text-align: center; }
.article__title { font-weight: 700; font-size: max(26px, calc(40 * var(--u))); line-height: 1.25; color: #343c4b; }
.article__meta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; font-weight: 700; color: #545a6a; }
.article__cover { margin: calc(36 * var(--u)) 0; padding: 12px; background: linear-gradient(180deg, #ecedf1, #e0e1e7); border: 1px solid #c5c7cf; box-shadow: 0 16px 36px rgba(20, 22, 40, 0.14); }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose { font-size: max(15px, calc(17 * var(--u))); line-height: 1.85; color: #3c4352; }
.prose p + p, .prose ul, .prose ol { margin-top: 0.9em; }
.prose h2 { position: relative; display: inline-block; margin: 1.6em 0 0.5em; padding: 0 calc(70 * var(--u)) 6px 0; font-family: var(--font-serif); font-size: 1.45em; font-weight: 700; color: #2b3346; border-bottom: 1px solid #2b3346; }
.prose h2::after { content: ''; position: absolute; right: 0; bottom: -7px; width: calc(60 * var(--u)); min-width: 40px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 14'%3E%3Cpath d='M0 13c10 0 14-10 22-10 6 0 8 6 3 7s-6-4-2-5c8-2 14 8 37 8' fill='none' stroke='%232b3346' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain; }
.prose h3 { margin: 1.2em 0 0.4em; font-size: 1.15em; color: #2b3346; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.3em; }
.prose strong { color: #232a3a; }
.prose a { color: var(--navy-1); text-decoration: underline; text-underline-offset: 3px; }
.prose code { padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.88em; background: rgba(39, 56, 185, 0.08); }
.article__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: calc(60 * var(--u)); padding-top: 24px; border-top: 1px solid rgba(40, 45, 70, 0.18); }
.article-close {
  position: fixed; z-index: 5; right: max(16px, calc((100vw - var(--content-w)) / 2 - 10 * var(--u))); top: calc(110 * var(--u));
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--cream-1); background: radial-gradient(circle at 40% 35%, #2a3366, #10142e);
  box-shadow: 0 0 0 3px rgba(16, 20, 46, 0.2), 0 8px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--ease-out);
}
.article-close svg { width: 22px; height: 22px; }
.article-close:hover { transform: rotate(90deg) scale(1.05); }

/* Gallery ---------------------------------------------------------------- */
.page-gallery { background: #08080c; --card-w: calc(640 * var(--u)); }
.gallery-bg { position: absolute; inset: -40px; }
.gallery-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(0.32) saturate(1.1); opacity: 0; transform: scale(1.1); transition: opacity 0.9s ease; }
.gallery-bg img.is-active { opacity: 1; }
.gallery-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 35%, transparent 70%, rgba(0, 0, 0, 0.6)); }
.gallery-head { position: absolute; left: 50%; top: calc(122 * var(--u)); width: var(--content-w); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 24px; z-index: 2; }
.gallery-head .section-title { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out); }
.page-gallery.is-entered .gallery-head .section-title { opacity: 1; transform: none; }
.gallery-thumbs { display: flex; align-items: center; gap: calc(14 * var(--u)); min-width: 0; }
.gallery-thumbs__track { position: relative; display: flex; gap: calc(10 * var(--u)); overflow-x: auto; scrollbar-width: none; padding: 6px 2px; max-width: calc(330 * var(--u) + 60px); }
.gallery-thumbs__track::-webkit-scrollbar { display: none; }
.gallery-thumb { flex: none; width: calc(54 * var(--u)); min-width: 44px; aspect-ratio: 16 / 10; overflow: hidden; opacity: 0.45; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); transition: opacity 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 0.8; }
.gallery-thumb.is-active { opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 1px var(--cream-2); }

.gallery-carousel { position: absolute; left: 0; right: 0; top: calc(348 * var(--u)); height: calc(var(--card-w) * 0.5625 + 50px); z-index: 1; touch-action: pan-y; }
.gallery-card {
  --offset: 0; --abs: 0;
  position: absolute; left: 50%; top: 0; width: var(--card-w);
  transform: translateX(calc(-50% + var(--offset) * (var(--card-w) + 14 * var(--u)))) scale(calc(1 - var(--abs) * 0.04));
  opacity: calc(1 - var(--abs) * 0.42);
  transition: transform 0.75s var(--ease-out), opacity 0.6s, filter 0.6s;
  filter: brightness(calc(1 - var(--abs) * 0.35));
}
.page-gallery:not(.is-entered) .gallery-card { opacity: 0; transform: translateX(calc(-50% + var(--offset) * (var(--card-w) + 14 * var(--u)) + 80px)); }
.gallery-card__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.gallery-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.gallery-card.is-active .gallery-card__media:hover img { transform: scale(1.03); }
.gallery-card__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; color: #1d1a16; background: rgba(251, 246, 234, 0.92); box-shadow: 0 0 0 6px rgba(251, 246, 234, 0.25); opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.gallery-card__play svg { width: 26px; height: 26px; margin-left: 4px; }
.gallery-card.is-active .gallery-card__media:hover .gallery-card__play, .gallery-card.is-active .gallery-card__media:focus-visible .gallery-card__play { opacity: 1; transform: none; }
.gallery-card__caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: max(32px, calc(36 * var(--u))); margin-top: 4px; padding: 0 12px; font-size: max(11px, calc(11.5 * var(--u))); font-weight: 700; color: #b6b6bf; background: rgba(70, 70, 82, 0.7); }
.gallery-card__caption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card__caption time { flex: none; font-size: max(9px, calc(9 * var(--u))); opacity: 0.8; }
.gallery-card.is-active .gallery-card__caption { color: #1d1a16; background: linear-gradient(180deg, var(--cream-1), var(--cream-2)); }

.modal--project .modal__dialog { width: min(980px, 100%); }
.project { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; background: #121219; border: 1px solid var(--gold-soft); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.project__media { background: #000; }
.project__media img, .project__media iframe { width: 100%; height: 100%; min-height: 280px; aspect-ratio: 16 / 9; object-fit: cover; border: 0; }
.project__body { display: grid; align-content: start; gap: 12px; padding: 28px; }
.project__body time { font-size: 12px; font-weight: 700; color: var(--cream-2); }
.project__body h2 { font-family: var(--font-serif); font-size: 22px; line-height: 1.3; }
.project__body p { font-size: 14px; line-height: 1.7; color: #c3c4cf; }
.project__body h3 { margin-top: 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #8e8f9c; }
.project__stack { display: flex; flex-wrap: wrap; gap: 8px; }
.project__stack li { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--cream-1); background: rgba(232, 215, 171, 0.1); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.project__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.project__actions .pill svg { width: 14px; height: 14px; }
.project__close { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, 0.6); }
.project__close svg { width: 16px; height: 16px; }

/* Gazette (world) -------------------------------------------------------- */
.page-world { background: #1d1611; }
.world-desk {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 70% at 50% 45%, transparent 30%, rgba(0, 0, 0, 0.75)),
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.12) 0 3px, transparent 3px 22px),
    repeating-linear-gradient(88deg, rgba(255, 220, 170, 0.04) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #3a2b1f, #24190f 60%, #160f09);
  filter: blur(1.5px);
}
.world-stack { position: absolute; inset: 0; pointer-events: none; }
.world-sheet { position: absolute; display: block; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.world-sheet--1 { left: calc(110 * var(--u)); top: 55%; width: calc(190 * var(--u)); height: 60%; transform: rotate(-4deg); background: repeating-linear-gradient(45deg, #b8b9bd 0 2px, #d2d3d6 2px 12px); }
.world-sheet--2 { left: calc(980 * var(--u)); top: 18%; width: calc(200 * var(--u)); height: 90%; transform: rotate(3deg); background: linear-gradient(180deg, #ede7da, #cfc6b4); }
.world-sheet--3 { left: calc(1000 * var(--u)); top: 72%; width: calc(70 * var(--u)); height: 30%; transform: rotate(8deg); background: linear-gradient(180deg, #1b3e8f, #8a1d2a); }

.world-paper {
  position: absolute; left: calc(245 * var(--u)); top: calc(110 * var(--u)); bottom: 0; width: calc(800 * var(--u)); min-width: 560px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  outline: none;
  opacity: 0; transform: translateY(40px) rotate(-0.4deg);
  transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out);
}
.world-paper::-webkit-scrollbar { display: none; }
.page-world.is-entered .world-paper { opacity: 1; transform: none; }
.world-paper.is-leaving { opacity: 0; transform: translateY(60px) rotate(1deg); transition-duration: 0.38s; }
.world-paper.is-arriving { animation: paper-in 0.5s var(--ease-out); }
@keyframes paper-in { from { opacity: 0; transform: translateY(-40px) rotate(-1deg); } }

.gazette {
  position: relative; min-height: 100%;
  padding: calc(28 * var(--u)) calc(34 * var(--u)) calc(60 * var(--u));
  color: #2a2116;
  background:
    radial-gradient(80% 60% at 30% 20%, rgba(255, 245, 215, 0.5), transparent 70%),
    radial-gradient(70% 50% at 80% 90%, rgba(120, 90, 40, 0.25), transparent 70%),
    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='.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #dccca3, #cdb98a);
  box-shadow: inset 0 0 0 10px rgba(220, 204, 163, 0.6), inset 0 0 0 11px rgba(60, 45, 25, 0.55), inset 0 0 0 14px rgba(220, 204, 163, 0.6), inset 0 0 0 15px rgba(60, 45, 25, 0.35), 0 30px 70px rgba(0, 0, 0, 0.6);
}
.gazette__masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 6px; }
.gazette__ear { display: grid; gap: 2px; font-family: var(--font-serif); font-size: max(8px, calc(8.5 * var(--u))); letter-spacing: 0.1em; line-height: 1.3; }
.gazette__ear b { font-size: max(9px, calc(10 * var(--u))); }
.gazette__ear--right { text-align: right; }
.gazette__crest { display: grid; justify-items: center; gap: 4px; }
.gazette__crest-icon { display: grid; width: calc(34 * var(--u)); height: calc(34 * var(--u)); min-width: 26px; min-height: 26px; color: #3a2c18; }
.gazette__kicker { font-family: var(--font-serif); font-weight: 900; font-size: max(13px, calc(19 * var(--u))); letter-spacing: 0.12em; }
.gazette__title { margin-top: 4px; text-align: center; font-family: var(--font-serif); font-weight: 900; font-style: italic; font-size: calc(62 * var(--u)); line-height: 1; letter-spacing: -0.01em; color: #1f170d; text-shadow: 1px 1px 0 rgba(255, 240, 200, 0.4), -0.5px -0.5px 0 rgba(0, 0, 0, 0.3); }
.gazette__rule { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; font-size: 10px; letter-spacing: 0.4em; }
.gazette__rule span { flex: 1; height: 3px; border-top: 1px solid #3b2d18; border-bottom: 1px solid #3b2d18; }
.gazette__rule i { display: flex; gap: 8px; }
.gazette__rule b { width: 6px; height: 6px; background: #3b2d18; transform: rotate(45deg); }
.gazette__layout { display: grid; grid-template-columns: calc(210 * var(--u)) 1fr; gap: calc(22 * var(--u)); }
.gazette__sidebar { padding-right: calc(18 * var(--u)); border-right: 1px solid rgba(59, 45, 24, 0.6); }
.gazette__sidebar h2 { font-family: var(--font-serif); font-weight: 900; font-size: max(15px, calc(20 * var(--u))); letter-spacing: 0.06em; text-align: center; padding-bottom: 8px; border-bottom: 2px solid #3b2d18; }
.gazette__sidebar-art { margin: 12px 0; border: 1px solid #3b2d18; padding: 4px; }
.gazette__sidebar-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: sepia(0.85) contrast(1.05) brightness(0.9); }
.gazette__sidebar li { padding: 8px 0; font-family: var(--font-serif); font-weight: 700; font-size: max(12px, calc(12.5 * var(--u))); border-bottom: 1px dotted rgba(59, 45, 24, 0.7); }
.gazette__headline { font-family: var(--font-serif); font-weight: 900; font-size: calc(30 * var(--u)); line-height: 1.1; letter-spacing: 0.01em; text-transform: uppercase; }
.gazette__deck { margin-top: 8px; padding: 6px 10px; font-weight: 700; font-size: max(12px, calc(12.5 * var(--u))); line-height: 1.45; color: #efe2bf; background: #3b2f22; }
.gazette__figure { margin-top: 12px; border: 1px solid #3b2d18; padding: 5px; background: rgba(255, 245, 220, 0.25); }
.gazette__figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: sepia(0.55) contrast(1.05) saturate(0.8); }
.gazette__columns { columns: 3 calc(180 * var(--u)); column-gap: calc(24 * var(--u)); column-rule: 1px solid rgba(59, 45, 24, 0.5); margin-top: calc(24 * var(--u)); padding-top: 14px; border-top: 2px solid #3b2d18; font-family: var(--font-serif); font-size: max(12.5px, calc(12.5 * var(--u))); line-height: 1.65; text-align: justify; hyphens: auto; }
.gazette__columns p { break-inside: avoid-column; margin-bottom: 0.9em; }
.gazette__columns p:first-child::first-letter { float: left; font-size: 3.2em; line-height: 0.85; padding: 4px 6px 0 0; font-weight: 900; }
.gazette__footer { display: flex; justify-content: center; gap: 12px; margin-top: 18px; padding-top: 10px; border-top: 1px solid #3b2d18; font-family: var(--font-serif); font-size: 10px; letter-spacing: 0.2em; }

.world-rail { position: absolute; right: calc(28 * var(--u)); top: calc(95 * var(--u)); bottom: 20px; display: flex; flex-direction: column; gap: calc(16 * var(--u)); overflow-y: auto; scrollbar-width: none; z-index: 2; }
.world-issue { display: grid; justify-items: center; align-content: start; gap: 4px; opacity: 0.6; transition: opacity 0.3s, transform 0.3s var(--ease-out); }
.world-issue:focus-visible { opacity: 1; }
.world-empty { position: absolute; inset: 0; display: grid; place-content: center; color: #f0e8d6; text-align: center; padding: 24px; }
.world-issue:hover { opacity: 0.9; }
.world-issue.is-active { opacity: 1; }
.world-issue__label { font-size: max(8px, calc(8.5 * var(--u))); font-weight: 700; color: #f0e8d6; max-width: calc(110 * var(--u)); min-width: 80px; text-align: center; }
.world-issue__thumb { position: relative; display: grid; align-content: start; gap: 3px; width: calc(78 * var(--u)); min-width: 64px; aspect-ratio: 1 / 1.9; padding: 5px; background: linear-gradient(180deg, #dccca3, #c5b081); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.world-issue.is-active .world-issue__thumb { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(255, 240, 200, 0.5); }
.world-issue__thumb b { font-family: var(--font-serif); font-size: 6px; line-height: 1.1; text-align: center; color: #2a2116; }
.world-issue__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(0.6); }
.world-issue__thumb i { display: block; height: 3px; background: rgba(59, 45, 24, 0.35); }

/* 404 -------------------------------------------------------------------- */
.page-404 { display: grid; place-items: center; text-align: center; background: radial-gradient(60% 60% at 50% 40%, #1b2050, #07080f); }
.page-404__inner { display: grid; justify-items: center; gap: 16px; padding: 24px; opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.7s var(--ease-out); }
.page-404.is-entered .page-404__inner { opacity: 1; transform: none; }
.page-404__slime { display: grid; width: 90px; height: 90px; color: var(--slime); animation: slime-hop 1.4s var(--ease-in-out) infinite; }
.page-404__code { font-family: var(--font-serif); font-weight: 900; font-size: 96px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--cream-2); }
.page-404 h1 { font-family: var(--font-serif); font-size: 28px; }
.page-404 p { max-width: 420px; color: var(--text-dim); line-height: 1.6; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) and (min-width: 769px) {
  .news-head { grid-template-columns: 1fr 1fr; gap: 40px; }
  .news-head > * { min-width: 0; }
  .news-preview__plate { left: 24px; }
  .news-preview__plate::before { display: none; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .world-paper { left: 4vw; width: auto; right: calc(140px + 4vw); min-width: 0; }
  .world-sheet { display: none; }
}

@media (max-width: 768px) {
  .paper-bg::before { display: none; }
  .news-inner { width: 100%; padding: calc(var(--header-h) + 32px) 18px calc(48px + env(safe-area-inset-bottom)); }
  .news-head { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .news-head > * { min-width: 0; }
  .news-preview { display: none; }
  .section-title h1 { font-size: 52px; }
  .section-title__rule { width: 220px; }
  .section-title__rings { left: 140px; width: 100px; height: 100px; }
  .news-featured { margin-top: 28px; }
  .news-tabs { margin-top: 36px; gap: 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
  .news-tabs .pill { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .news-grid { grid-template-columns: 1fr; gap: 34px; margin-top: 36px; }
  .news-card__body { min-height: 0; padding: 12px 14px 18px; }

  .article-scroll { padding: calc(var(--header-h) + 28px) 18px calc(96px + env(safe-area-inset-bottom)); }
  .article__title { font-size: 25px; }
  .article-close { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); right: 18px; width: 48px; height: 48px; }
  .prose { font-size: 15.5px; }
  .prose h2 { padding-right: 46px; }

  .page-gallery { --card-w: 84vw; }
  .gallery-head { top: calc(var(--header-h) + 24px); width: auto; left: 18px; right: 18px; transform: none; flex-direction: column; align-items: flex-start; }
  .section-title--light h1 { font-size: 36px; }
  .gallery-thumbs { width: 100%; }
  .gallery-thumbs__track { flex: 1; max-width: none; }
  .gallery-carousel { top: calc(var(--header-h) + 190px); }
  .project { grid-template-columns: 1fr; }
  .project__media img { min-height: 0; }
  .project__body { padding: 20px; }

  .world-sheet { display: none; }
  .world-paper { left: 10px; right: 10px; width: auto; min-width: 0; top: calc(var(--header-h) + 10px); bottom: calc(118px + env(safe-area-inset-bottom)); }
  .gazette { padding: 20px 18px 40px; }
  .gazette__masthead { grid-template-columns: 1fr; text-align: center; }
  .gazette__ear { display: none; }
  .gazette__title { font-size: 34px; }
  .gazette__layout { grid-template-columns: 1fr; }
  .gazette__sidebar { order: 2; padding: 0; border: 0; }
  .gazette__sidebar-art { display: none; }
  .gazette__headline { font-size: 22px; }
  .gazette__columns { columns: 1; }
  .world-rail { left: 0; right: 0; top: auto; bottom: 0; flex-direction: row; justify-content: space-around; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(10, 8, 6, 0.9); overflow-x: auto; }
  .world-issue__thumb { width: 44px; min-width: 44px; aspect-ratio: 1 / 1.4; }
  .world-issue__thumb b, .world-issue__thumb i { display: none; }
  .world-rail { justify-content: flex-start; gap: 4px; scroll-snap-type: x proximity; }
  .world-issue { flex: 1 0 84px; scroll-snap-align: center; }
  /* Fixed two-line label box so every thumbnail sits on the same baseline. */
  .world-issue__label {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    height: 2.5em; line-height: 1.25; font-size: 10px; min-width: 0; max-width: 84px;
  }
}

/* News: hand-off to the next section ------------------------------------- */
.section-footer { display: flex; justify-content: center; padding: calc(36 * var(--u)) 0 calc(64 * var(--u)); }
.section-footer__next {
  display: grid; justify-items: center; gap: 4px;
  padding: 14px 28px; border-radius: 16px; color: #1b1d29;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}
.section-footer__next:hover { background: rgba(20, 22, 34, 0.06); transform: translateY(-2px); }
.section-footer__next small { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #5c5f70; }
.section-footer__next strong { font-family: var(--font-serif); font-size: max(20px, calc(24 * var(--u))); }
.section-footer__next span { display: grid; width: 22px; height: 22px; color: var(--slime-deep); animation: hint-bounce 1.8s var(--ease-in-out) infinite; }

/* Gazette: closing call-to-action ---------------------------------------- */
.world-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  margin-top: 26px; padding: 20px 24px; border-radius: 4px;
  color: #f2efe6; background: linear-gradient(135deg, #14183a, #1d3fbf);
  box-shadow: 0 10px 30px rgba(20, 24, 58, 0.35);
}
.world-cta h2 { font-family: var(--font-serif); font-size: 20px; line-height: 1.25; }
.world-cta p { margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: #c8cbe8; max-width: 44ch; }
.world-cta .btn-navy { background: linear-gradient(180deg, #fbf6ea, #e8d7ab); color: #1b1b24; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .news-card { animation: none; }
  .news-featured__item, .news-preview, .article, .world-paper { transition-duration: 0.01ms !important; }
  .world-paper.is-arriving { animation: none; }
}
