/* ============================================
   LOGOI — the journal
   Same ground as the portfolio: near-black, Inter 900 headlines with
   solid/outline pairs, italic Greek glyphs. Literata carries long reading.
   ============================================ */

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

:root {
  --bg:      #06060d;
  --bg2:     #09091a;
  --panel:   #0c0c1a;
  --ink:     #ffffff;
  --ink-2:   rgba(236,240,255,.78);
  --muted:   rgba(255,255,255,.46);
  --faint:   rgba(255,255,255,.26);
  --border:  rgba(255,255,255,.07);
  --card:    rgba(255,255,255,.022);
  --accent:  #4fc3f7;
  --accent2: #7c3aed;
  --font:    'Inter', sans-serif;
  --serif:   'Literata', Georgia, serif;
  --mono:    ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h:   68px;
  --ch:      var(--accent);
}

[data-ch="poiesis"]  { --ch: #3987e5; --ch-rgb: 57,135,229; }
[data-ch="aletheia"] { --ch: #e66767; --ch-rgb: 230,103,103; }
[data-ch="techne"]   { --ch: #9085e9; --ch-rgb: 144,133,233; }
[data-ch="theoria"]  { --ch: #199e70; --ch-rgb: 25,158,112; }
[data-ch="kairos"]   { --ch: #c98500; --ch-rgb: 201,133,0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 70px); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.reader-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.jcontainer { max-width: 1240px; margin: 0 auto; padding: 0 56px; position: relative; }

/* ============================================
   NAV
   ============================================ */
.jnav {
  position: fixed; inset: 0 0 auto; z-index: 700; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 56px;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.jnav.scrolled { background: rgba(6,6,13,.82); backdrop-filter: blur(20px); border-color: var(--border); }
.jnav-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .25s ease;
}
.jnav-arrow { display: inline-block; transition: transform .35s var(--ease); }
.jnav-back:hover { color: var(--ink); }
.jnav-back:hover .jnav-arrow { transform: translateX(-5px); }
.jnav-mark {
  font-family: var(--serif); font-style: italic; font-size: 20px;
  color: var(--ink); text-decoration: none; opacity: 0;
  transform: translateY(6px); transition: opacity .4s ease, transform .4s var(--ease);
}
.jnav.scrolled .jnav-mark { opacity: .9; transform: none; }
.jnav-follow {
  justify-self: end;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  padding: 10px 20px; border: 1px solid rgba(79,195,247,.28); border-radius: 6px;
  transition: background .25s ease, border-color .25s ease;
}
.jnav-follow:hover { background: rgba(79,195,247,.08); border-color: var(--accent); }
.jnav-follow-short { display: none; }

/* ============================================
   MASTHEAD
   ============================================ */
.masthead {
  position: relative; min-height: max(640px, 92vh);
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 60px) 0 120px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgba(91,75,255,.08), transparent 38%),
    radial-gradient(circle at 12% 80%, rgba(79,195,247,.06), transparent 34%),
    var(--bg);
}
#heroCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none; filter: saturate(1.25) contrast(1.06);
}
.mast-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,6,13,.35) 0%, transparent 30%, transparent 55%, var(--bg) 100%),
    radial-gradient(ellipse 70% 60% at 22% 70%, rgba(6,6,13,.45), transparent 70%);
}
.mast-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 56px;
}

.concept-row { display: flex; align-items: center; gap: 16px; }
.concept-symbol {
  font-size: 22px; font-weight: 900; font-style: italic; line-height: 1;
  color: var(--accent); text-shadow: 0 0 20px rgba(79,195,247,.5);
}
.concept-name { font-size: 11px; font-weight: 800; letter-spacing: .35em; text-transform: uppercase; color: var(--accent); }
.concept-rule { height: 1px; width: 80px; background: rgba(79,195,247,.22); }
.concept-quote { font-size: 13px; font-weight: 300; font-style: italic; color: var(--muted); }
.mast-concept { margin-bottom: 36px; opacity: 0; transform: translateY(14px); }

.mast-title {
  display: flex; flex-direction: column;
  font-size: clamp(84px, 16.5vw, 236px); font-weight: 900;
  letter-spacing: -.045em; line-height: .8;
  margin: 0 0 40px -.04em;
}
.mast-solid, .mast-outline { display: block; }
.mast-solid { color: var(--ink); text-shadow: 0 18px 60px rgba(0,0,0,.6); }
.mast-outline {
  letter-spacing: -.02em; /* looser than the solid line so the outlined strokes never touch */
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.92);
  /* A light band sweeps through the outlined Greek once it has settled. */
  background: linear-gradient(100deg, transparent 38%, rgba(79,195,247,.95) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%; background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text;
  padding-bottom: .06em;
}
.mast-title .ch { display: inline-block; opacity: 0; transform: translateY(55%); }

.mast-sub {
  max-width: 560px; font-size: 17px; font-weight: 300; line-height: 1.7;
  color: var(--ink-2); margin-bottom: 48px;
  opacity: 0; transform: translateY(14px);
}
.mast-stats {
  display: flex; flex-wrap: wrap; gap: 14px 56px;
  opacity: 0; transform: translateY(14px);
}
.mast-stat dt {
  font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); margin-top: 8px;
}
.mast-stat dd {
  font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; order: -1;
}
.mast-stat { display: flex; flex-direction: column; }

.mast-scroll {
  position: absolute; right: 56px; bottom: 44px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; opacity: 0;
}
.mast-scroll i { width: 1px; height: 56px; background: var(--border); position: relative; overflow: hidden; }
.mast-scroll i::after {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  transform: translateY(-100%); animation: scrollCue 1.9s ease-in-out infinite;
}
@keyframes scrollCue { to { transform: translateY(100%); } }

/* Arriving through the warp the page is already finished on its first frame
   (the transition is the entrance); otherwise it animates in. */
.arrived .mast-concept, .arrived .mast-title .ch, .arrived .mast-sub, .arrived .mast-scroll {
  opacity: 1; transform: none; animation: none !important;
}

/* entrance — started by .is-live on <body> */
.is-live .mast-concept { animation: rise .8s var(--ease) .05s forwards; }
.is-live .mast-title .ch { animation: letterIn .95s var(--ease) forwards; animation-delay: calc(.12s + var(--i) * 55ms); }
.is-live .mast-outline { animation: sweep 1.6s ease-in-out 1.25s forwards; }
.is-live .mast-sub { animation: rise .8s var(--ease) .75s forwards; }
.is-live .mast-stats { animation: rise .8s var(--ease) .9s forwards; }
.is-live .mast-scroll { animation: fadeTo .8s ease 1.4s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes letterIn { to { opacity: 1; transform: none; } }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -30% 0; } }
@keyframes fadeTo { to { opacity: 1; } }

/* ============================================
   SECTION PRIMITIVES
   ============================================ */
.jsection { position: relative; padding: 140px 0 0; }
.section-label {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.38); margin-bottom: 18px;
}
.numeral {
  font-family: var(--serif); font-style: italic; font-size: 15px; letter-spacing: 0;
  color: var(--accent); text-transform: none;
}
.section-title {
  font-size: clamp(46px, 6.2vw, 92px); font-weight: 900;
  letter-spacing: -.035em; line-height: .93; margin-bottom: 64px;
}
/* Outlines need looser tracking than solid type, or neighbouring strokes cross. */
.title-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.72); letter-spacing: .02em; }

/* An animation, not a transition: cards that reveal also own hover transitions,
   and 'backwards' fill hands transform back to them once the entrance ends. */
.js-reveal:not(.visible) { opacity: 0; }
.js-reveal.visible { animation: revealUp .9s var(--ease) var(--delay, 0s) backwards; }
@keyframes revealUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* shared chapter mark: glyph + name */
.chmark { display: inline-flex; align-items: center; gap: 9px; }
.chmark-glyph {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; font-weight: 900; font-style: italic; line-height: 1;
  color: #fff; background: var(--ch);
}
.chmark-name { font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); }

/* ============================================
   I · FEATURED
   ============================================ */
.featured { padding-top: 110px; }
.featured-grid { display: grid; gap: 22px; }

.feat {
  position: relative; display: grid; text-decoration: none;
  border: 1px solid var(--border); border-radius: 26px; overflow: hidden;
  background: var(--card);
  transition: border-color .4s ease, transform .5s var(--ease), box-shadow .5s var(--ease);
}
.feat:hover {
  border-color: rgba(var(--ch-rgb), .38); transform: translateY(-4px);
  box-shadow: 0 40px 90px rgba(0,0,0,.5), 0 0 60px rgba(var(--ch-rgb), .07);
}
.feat-latest { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 520px; }
.feat-media { position: relative; overflow: hidden; background: #000; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feat:hover .feat-media img { transform: scale(1.035); }
.feat-body {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 64px 60px;
}
.feat-body::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 90% 10%, rgba(var(--ch-rgb), .1), transparent 60%);
}
.feat-kicker {
  display: flex; align-items: center; gap: 14px; margin-bottom: 30px;
  font-size: 10px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
}
.feat-kicker .sep { width: 28px; height: 1px; background: rgba(79,195,247,.35); }
.feat-title {
  font-size: clamp(32px, 3.5vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  margin: 22px 0 22px;
}
.feat-excerpt { font-family: var(--serif); font-size: 18px; line-height: 1.7; color: var(--ink-2); margin-bottom: 36px; }
.feat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 12px; color: var(--muted); }
.feat-cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.feat-cta i { font-style: normal; transition: transform .35s var(--ease); }
.feat:hover .feat-cta i { transform: translateX(6px); }

/* most read — text beside the cover */
.feat-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 380px; }
.feat-top .feat-body { padding: 56px 60px; }
.feat-top .feat-title { font-size: clamp(26px, 2.4vw, 36px); margin: 18px 0 14px; }
.feat-top .feat-excerpt { font-size: 16px; margin-bottom: 26px; }
.feat-mat {
  display: grid; place-items: center; padding: 34px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.05), transparent 70%), #0a0a15;
  border-left: 1px solid var(--border);
}
.feat-mat > img { max-height: 200px; width: auto; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }

/* Stage — a dark set for logo-only covers, lit in the brand's own colour */
.stage {
  position: relative; width: 100%; height: 100%; min-height: 100%;
  display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse 50% 55% at 50% 50%, rgba(var(--glow), .2), transparent 72%),
    radial-gradient(ellipse 80% 50% at 50% 115%, rgba(79,195,247,.07), transparent 65%),
    linear-gradient(180deg, #0c0c18, #07070f);
}
.stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 30px 30px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 72%);
}
.stage-mark {
  position: relative; z-index: 1; display: block; width: 64%; max-width: 380px;
  transition: transform 1s var(--ease);
}
.stage-mark img { display: block; width: 100%; height: auto; }
.stage-mark::after { /* a hairline horizon just under the mark, at any size */
  content: ''; position: absolute; left: -14%; right: -14%; top: calc(100% + 20px); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--glow), .5), transparent);
}
.feat:hover .stage-mark, .card:hover .stage-mark { transform: scale(1.04); }
/* The stage's own light does the glowing: a blurred drop-shadow on the mark
   renders as a visible box around it. */
.stage { transition: background-color .6s ease; }
.stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 42% 46% at 50% 50%, rgba(var(--glow), .16), transparent 70%);
  opacity: 0; transition: opacity .7s ease;
}
.feat:hover .stage::after, .card:hover .stage::after { opacity: 1; }
.feat-mat.feat-stage { padding: 0; background: none; place-items: stretch; }

/* ============================================
   II · CHAPTERS
   ============================================ */
.chapter-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.chapter {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 34px 26px 28px; min-height: 330px;
  border: 1px solid var(--border); border-radius: 22px; background: var(--card);
  overflow: hidden; text-decoration: none;
  transition: border-color .4s ease, transform .5s var(--ease), background .4s ease;
}
.chapter::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ch), transparent);
  opacity: .35; transition: opacity .4s ease;
}
.chapter::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 0%, rgba(var(--ch-rgb), .16), transparent 60%);
  opacity: 0; transition: opacity .5s ease;
}
.chapter:hover, .chapter.is-on { border-color: rgba(var(--ch-rgb), .45); transform: translateY(-8px); }
.chapter:hover::before, .chapter.is-on::before { opacity: 1; }
.chapter:hover::after, .chapter.is-on::after { opacity: 1; }
.chapter-glyph {
  font-size: 76px; font-weight: 900; font-style: italic; line-height: .9;
  color: var(--ch); text-shadow: 0 0 44px rgba(var(--ch-rgb), .5);
  margin-bottom: auto; transition: transform .6s var(--ease);
}
.chapter:hover .chapter-glyph { transform: translateY(-4px) scale(1.06); }
.chapter-count {
  position: absolute; top: 30px; right: 24px;
  font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
}
.chapter-name {
  margin-top: 40px; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
}
.chapter-greek { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink); margin: 10px 0 4px; }
.chapter-gloss { font-size: 13px; color: var(--muted); font-style: italic; }
.chapter-label {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: center;
}
.chapter-label i { font-style: normal; color: var(--ch); transition: transform .35s var(--ease); }
.chapter:hover .chapter-label i { transform: translateX(4px); }

/* ============================================
   III · CHRONICLE (swim-lane dot plot)
   ============================================ */
.chron {
  border: 1px solid var(--border); border-radius: 24px; background: var(--card);
  padding: 34px 34px 22px;
}
.chron-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.chron-plot { position: relative; min-width: 860px; padding-bottom: 34px; }
.chron-lane {
  display: grid; grid-template-columns: 172px 1fr; align-items: center;
  height: 68px;
}
.chron-lane + .chron-lane { border-top: 2px solid var(--bg); }
.chron-label { display: flex; align-items: center; gap: 12px; }
.chron-label b { font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.chron-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chron-track { position: relative; height: 100%; }
.chron-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(255,255,255,.1); transform-origin: left; transform: scaleX(0);
  transition: transform 1.2s var(--ease);
}
.chron.visible .chron-track::before { transform: scaleX(1); }
.chron-grid { position: absolute; left: 172px; right: 0; top: 0; bottom: 0; pointer-events: none; }
.chron-year {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.08) calc(100% - 34px), transparent calc(100% - 34px));
}
.chron-year span {
  position: absolute; bottom: 6px; left: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums;
}
.chron-dot {
  position: absolute; top: 50%; left: var(--x);
  width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%; background: var(--ch);
  box-shadow: 0 0 0 2px var(--bg);
  transform: scale(0); opacity: .9;
  transition: transform .6s var(--ease), opacity .3s ease, box-shadow .3s ease;
  transition-delay: calc(var(--k) * 22ms);
}
.chron-dot::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; } /* larger hit target */
.chron.visible .chron-dot { transform: scale(1); }
.chron-dot:hover, .chron-dot:focus-visible {
  transform: scale(1.3); opacity: 1; z-index: 3; transition-delay: 0s;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ch-rgb), .55), 0 0 26px rgba(var(--ch-rgb), .6);
  outline: none;
}
.chron-key {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.chron-key-item { display: inline-flex; align-items: center; gap: 8px; }
.chron-key-dot { display: inline-block; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); }
.chron-key-dot.sm { width: 10px; height: 10px; }
.chron-key-dot.lg { width: 22px; height: 22px; margin-right: 4px; }

/* The chronicle lives off-page: typing "showmetime" summons it as a popup. */
.chron-modal {
  position: fixed; inset: 0; z-index: 950;
  display: grid; place-items: center; padding: 40px 24px;
}
.chron-modal[hidden] { display: none !important; }
.chron-backdrop {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(4,4,10,.74); backdrop-filter: blur(14px);
  animation: fadeTo .45s ease both; opacity: 0;
}
.chron-panel {
  position: relative; width: min(1200px, 100%); max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 46px 46px 30px; border-radius: 28px;
  background:
    radial-gradient(ellipse 70% 60% at 85% 0%, rgba(124,58,237,.1), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(79,195,247,.08), transparent 60%),
    var(--bg);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 60px 140px rgba(0,0,0,.7), 0 0 0 1px rgba(79,195,247,.05), 0 0 80px rgba(79,195,247,.06);
  animation: panelIn .7s var(--ease) both;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.chron-close {
  position: absolute; top: 24px; right: 24px; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--border);
  font-size: 14px; color: var(--ink); transition: border-color .25s ease, background .25s ease;
}
.chron-close:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
.chron-kicker .numeral { font-size: 16px; }
.chron-title {
  font-size: clamp(38px, 4.6vw, 68px); font-weight: 900; letter-spacing: -.035em; line-height: .95;
  margin-bottom: 36px;
}
.chron-panel .chron { border: 0; background: none; padding: 0; }

.chron-tip {
  position: fixed; z-index: 1000; pointer-events: none; max-width: 300px;
  padding: 14px 16px 13px; border-radius: 14px;
  background: rgba(14,14,28,.96); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  transform: translate(-50%, calc(-100% - 16px));
}
.chron-tip-title { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 9px 0 8px; color: var(--ink); }
.chron-tip-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============================================
   IV · ARCHIVE
   ============================================ */
.archive { padding-bottom: 140px; }
.filterbar {
  position: sticky; top: var(--nav-h); z-index: 60;
  padding: 14px 0; margin-bottom: 24px;
  background: rgba(6,6,13,.82); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.filterbar-inner { display: flex; align-items: center; gap: 20px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 12px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(255,255,255,.02);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.chip:hover { color: var(--ink); border-color: rgba(255,255,255,.18); }
.chip-glyph { font-style: italic; font-weight: 900; font-size: 14px; color: var(--ch); width: 14px; text-align: center; }
.chip-n { font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.is-on { color: var(--ink); border-color: rgba(var(--ch-rgb, 79,195,247), .6); background: rgba(var(--ch-rgb, 79,195,247), .12); }
.chip.is-on .chip-n { color: var(--ink-2); }
.chip[data-ch="all"] .chip-glyph { color: var(--accent); font-style: normal; }

.sort { display: inline-flex; padding: 4px; border: 1px solid var(--border); border-radius: 100px; flex: 0 0 auto; }
.sort-btn {
  padding: 7px 14px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  transition: color .25s ease, background .25s ease;
}
.sort-btn.is-on { color: var(--bg); background: var(--ink); }

.archive-note { min-height: 20px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.archive-note b { color: var(--ink); font-weight: 600; }

.masonry { position: relative; }
.card {
  position: absolute; top: 0; left: 0; width: var(--w, 100%);
  display: flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012));
  transform: translate(var(--x, 0), var(--y, 0));
  transition: transform .75s var(--ease), opacity .45s ease, border-color .35s ease, box-shadow .45s var(--ease);
  isolation: isolate;
}
.card.no-anim { transition: none; }
.card.is-out { opacity: 0; pointer-events: none; }
.card.is-entering { opacity: 0; }
.card:hover {
  border-color: rgba(var(--ch-rgb), .42);
  box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(var(--ch-rgb), .08);
}
.card::after { /* pointer-follow glow */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--ch-rgb), .13), transparent 60%);
  opacity: 0; transition: opacity .4s ease;
}
.card:hover::after { opacity: 1; }
.card-media { position: relative; overflow: hidden; background: var(--tone, #0b0b16); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  opacity: 0; transition: opacity .6s ease, transform 1s var(--ease);
}
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .stage-mark { width: 54%; }
.card-media .stage-mark img { height: auto; object-fit: contain; opacity: 1; transform: none; }
.card-media .play {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 100px;
  background: rgba(6,6,13,.72); backdrop-filter: blur(8px);
  font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.card-media .multi {
  position: absolute; right: 14px; top: 14px; padding: 5px 10px; border-radius: 100px;
  background: rgba(6,6,13,.72); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.card-body { padding: 22px 24px 22px; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-meta time { margin-left: auto; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.card-title {
  font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.22;
  margin-bottom: 10px; color: var(--ink);
}
.card-badge {
  align-self: flex-start; margin-bottom: 12px; padding: 4px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #fbbf24; border: 1px solid rgba(251,191,36,.3); background: rgba(251,191,36,.06);
}
.card-excerpt {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.65; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--faint); font-variant-numeric: tabular-nums;
}
.card-foot .read { margin-left: auto; color: var(--ink-2); transition: color .25s ease; }
.card:hover .card-foot .read { color: var(--ch); }

/* quotes: typographic, no cover */
.card-quote { padding: 34px 30px 28px; background: radial-gradient(ellipse at 0% 0%, rgba(var(--ch-rgb), .12), transparent 60%), rgba(255,255,255,.015); }
.card-quote .q-mark {
  font-family: var(--serif); font-size: 96px; line-height: .6; height: 42px; color: var(--ch); opacity: .9;
}
.card-quote blockquote {
  font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.45; color: var(--ink);
  margin: 10px 0 20px;
}
.card-quote cite { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.card-quote .card-meta { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }

/* ============================================
   READER
   ============================================ */
.reader {
  position: fixed; inset: 0; z-index: 900;
  overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(var(--ch-rgb, 79,195,247), .07), transparent 70%), var(--bg);
}
.reader[hidden] { display: none !important; }
.reader.is-opening { animation: readerIn .55s var(--ease); }
@keyframes readerIn { from { opacity: 0; } }
.reader-bar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(6,6,13,.86); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.reader-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--ch); box-shadow: 0 0 14px rgba(var(--ch-rgb), .7);
  transform-origin: left; transform: scaleX(var(--p, 0));
}
.reader-bar-inner {
  max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 56px;
  display: flex; align-items: center; gap: 14px;
}
/* left: where you are — chapter mark, a hairline, the title */
.reader-crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; overflow: hidden; }
.reader-crumb .crumb-sep { flex: 0 0 22px; height: 1px; background: rgba(var(--ch-rgb), .5); }
.reader-crumb .crumb-title {
  font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* right: one pill that pages through the journal */
.reader-pager {
  display: inline-flex; align-items: center; height: 40px; padding: 3px;
  border: 1px solid var(--border); border-radius: 100px; background: rgba(255,255,255,.025);
}
.reader-nav {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; color: var(--ink-2);
  transition: color .25s ease, background .25s ease;
}
.reader-nav:hover:not(:disabled) { color: var(--ink); background: rgba(var(--ch-rgb), .18); }
.reader-nav:disabled { opacity: .22; cursor: default; }
.reader-count {
  min-width: 64px; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.reader-count b { color: var(--ink); font-weight: 800; }

.reader-close {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px 0 14px; border-radius: 100px;
  background: var(--ink); color: var(--bg);
  transition: transform .3s var(--ease), background .25s ease;
}
.reader-close:hover { background: var(--ch); color: #fff; transform: scale(1.04); }
.reader-close-x { font-size: 13px; font-weight: 700; }
.reader-close-hint {
  font-size: 10px; font-weight: 800; letter-spacing: .16em;
  padding: 3px 6px; border-radius: 5px; background: rgba(6,6,13,.12);
}
/* the reader focuses its close button for keyboard users; no ring on open */
.reader :focus:not(:focus-visible) { outline: none; }

.reader-article { max-width: 1240px; margin: 0 auto; padding: 56px 56px 140px; }
.r-cover {
  max-width: 900px; margin: 0 auto 64px;
  border-radius: 22px; overflow: hidden; background: var(--tone, #0b0b16);
  box-shadow: 0 50px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}
.r-cover img { width: 100%; height: auto; }
.r-stage { aspect-ratio: 16 / 9; }
.r-cover .stage-mark { width: 44%; max-width: 420px; }
.r-cover-video { position: relative; display: block; text-decoration: none; }
.r-cover-video .play-big {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(6,6,13,.2), rgba(6,6,13,.55));
  font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
}
.r-cover-video .play-big span {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 100px;
  background: rgba(6,6,13,.75); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), border-color .3s ease;
}
.r-cover-video:hover .play-big span { transform: scale(1.05); border-color: var(--ch); }

.r-head, .r-body, .r-foot { max-width: 720px; margin: 0 auto; }
.r-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 26px; }
.r-greek { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.r-title {
  font-size: clamp(34px, 4.4vw, 58px); font-weight: 800; letter-spacing: -.035em; line-height: 1.03;
  margin-bottom: 26px;
}
.r-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; padding-bottom: 34px; margin-bottom: 46px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.r-meta b { color: var(--ink-2); font-weight: 600; }
.r-body { font-family: var(--serif); font-size: 19px; line-height: 1.8; color: rgba(236,240,255,.86); }
.r-body p { margin: 0 0 1.15em; }
.r-body > p.lead { display: flow-root; }
.r-body > p.lead::first-letter {
  float: left; font-weight: 600; font-size: 3.15em; line-height: .84;
  padding: .06em .1em 0 0; color: var(--ch);
}
.r-body a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(79,195,247,.35); text-underline-offset: 3px; word-break: break-word; }
.r-body a:hover { text-decoration-color: var(--accent); }
.r-body pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.7; color: #d6e2ff;
  margin: 6px 0 1.6em; padding: 20px 22px; overflow-x: auto;
  background: rgba(255,255,255,.035); border: 1px solid var(--border); border-left: 2px solid var(--ch);
  border-radius: 12px; white-space: pre;
}
.r-quote { text-align: center; padding: 30px 0 10px; }
.r-quote blockquote {
  font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.3;
  color: var(--ink); margin-bottom: 26px;
}
.r-quote cite { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ch); }
.r-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 10px 0 40px; }
.r-gallery img { width: 100%; height: 260px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); }
.r-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 44px 0 36px; }
.r-tags span {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted);
  padding: 6px 12px; border-radius: 100px; border: 1px solid var(--border);
}
.r-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 32px 0 48px; border-top: 1px solid var(--border); }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-decoration: none;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.r-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.r-next a {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; min-height: 130px;
  border: 1px solid var(--border); border-radius: 16px; text-decoration: none;
  transition: border-color .3s ease, transform .4s var(--ease), background .3s ease;
}
.r-next a:hover { border-color: rgba(var(--ch-rgb), .5); transform: translateY(-4px); background: rgba(255,255,255,.02); }
.r-next small { font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.r-next strong { font-size: 16px; font-weight: 700; line-height: 1.35; }
.r-next .older { text-align: right; align-items: flex-end; }

/* View-transition choreography: the card's cover grows into the reader's. */
::view-transition-group(post-cover) { animation-duration: .62s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
::view-transition-old(post-cover), ::view-transition-new(post-cover) { height: 100%; object-fit: cover; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

/* ============================================
   FOOTER
   ============================================ */
.jfooter { border-top: 1px solid var(--border); padding: 30px 0; font-size: 12px; color: var(--muted); }
.jfooter-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.jfooter-back { color: var(--ink-2); text-decoration: none; font-weight: 700; letter-spacing: .04em; transition: color .25s ease; }
.jfooter-back:hover { color: var(--accent); }
.jfooter-quote { font-family: var(--serif); font-style: italic; color: rgba(255,255,255,.34); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .chapter-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .jcontainer, .mast-inner { padding: 0 24px; }
  .jnav { padding: 0 20px; }
  .jnav-follow-long { display: none; }
  .jnav-follow-short { display: inline; }
  .jnav-follow { padding: 8px 14px; }
  .mast-scroll { display: none; }
  .concept-quote, .concept-rule { display: none; }
  .jsection { padding-top: 100px; }
  .feat-latest { grid-template-columns: 1fr; min-height: 0; }
  .feat-latest .feat-media { aspect-ratio: 1 / 1; }
  .feat-body { padding: 36px 28px 34px; }
  .feat-top { grid-template-columns: 1fr; min-height: 0; }
  .feat-top .feat-mat { order: -1; aspect-ratio: 16 / 9; border-left: 0; border-bottom: 1px solid var(--border); }
  .feat-top .feat-body { padding: 36px 28px 34px; }
  .chapter-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%;
    overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -24px; padding: 6px 24px 14px;
    scrollbar-width: none;
  }
  .chapter-grid::-webkit-scrollbar { display: none; }
  .chapter { scroll-snap-align: start; min-height: 290px; }
  .chron-modal { padding: 0; place-items: stretch; }
  .chron-panel { max-height: 100vh; border-radius: 0; padding: 72px 0 24px; }
  .chron-close { top: 16px; right: 16px; }
  .chron-kicker, .chron-title { padding: 0 22px; }
  .chron-key { padding: 14px 22px 0; }
  .chron-scroll { padding: 0 22px; }
  .chron-lane { grid-template-columns: 124px 1fr; }
  .chron-grid { left: 124px; }
  .chron-count { display: none; }
  .filterbar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .sort { align-self: flex-start; }
  .reader-bar-inner, .reader-article { padding-left: 20px; padding-right: 20px; }
  .reader-close-hint { display: none; }
  .reader-close { width: 40px; padding: 0; justify-content: center; }
  .reader-crumb .chmark-name, .reader-crumb .crumb-sep { display: none; }
  .reader-count { min-width: 50px; }
  .reader-bar-inner { gap: 10px; }
  .r-body { font-size: 18px; }
  .r-next { grid-template-columns: 1fr; }
  .r-next .older { text-align: left; align-items: flex-start; }
}
@media (max-width: 560px) {
  .mast-title { font-size: clamp(72px, 24vw, 120px); }
  .mast-stats { gap: 18px 32px; }
  .section-title { margin-bottom: 44px; }
  .jfooter-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mast-concept, .mast-title .ch, .mast-sub, .mast-stats, .mast-scroll { opacity: 1 !important; transform: none !important; animation: none !important; }
  .js-reveal:not(.visible) { opacity: 1; }
  .js-reveal.visible { animation: none; }
  .chron-dot { transform: scale(1); transition: none; }
  .chron-panel, .chron-backdrop { animation: none; opacity: 1; }
  .chron-track::before { transform: scaleX(1); transition: none; }
  .card { transition: opacity .2s ease; }
  .mast-scroll i::after { animation: none; }
}
