/* ── INVERTED TOKENS ─────────────────────────────────────── */
:root {
  --paper:      #0e0d0c;
  --paper-2:    #161412;
  --ink:        #f0ebe0;
  --ink-dim:    #968e82;
  --ink-faint:  #504a44;
  --rule:       rgba(240,235,224,0.10);
  --rule-heavy: rgba(240,235,224,0.55);
  --red:        #d12828;
  --signal:     #22c55e;
  --warn:       #f0a500;

  --serif: 'Playfair Display', Georgia, serif;
  --body:  'Source Serif 4', Georgia, serif;
  --mono:  'JetBrains Mono', monospace;

  --strip-h: 26px;
  --max-w:   1480px;
  --pad-x:   40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  padding-top: var(--strip-h);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── GRAIN (screen blend — light speckles on dark) ───────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

/* ── LIVE STRIP ──────────────────────────────────────────── */
.strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--strip-h);
  background: var(--paper);
  z-index: 1000;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  overflow: hidden;
}
.strip-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 0;
  height: 100%;
  flex-shrink: 0;
}
.strip-cell:first-child { padding-left: 16px; }
.strip-label { color: rgba(240,235,224,0.35); }
.strip-val   { color: rgba(240,235,224,0.80); }
.strip-pop   { color: var(--warn); font-weight: 700; }
.strip-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background 0.4s, box-shadow 0.4s;
  flex-shrink: 0;
}
.strip-dot.live {
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
}
.strip-id {
  margin-left: auto;
  padding-right: 16px;
  color: rgba(240,235,224,0.30);
}

/* ── MASTHEAD HERO ───────────────────────────────────────── */
.masthead-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px var(--pad-x) 52px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

/* animated top rule */
.mast-top-rule {
  position: absolute;
  top: 36px; left: var(--pad-x); right: var(--pad-x);
  height: 4px;
  background: var(--ink);
  transform-origin: left center;
  animation: rule-print 0.7s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes rule-print {
  from { transform: scaleX(0); opacity: 0.4; }
  to   { transform: scaleX(1); opacity: 1; }
}

.mast-kicker-row {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  gap: 36px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fade-up 0.5s ease forwards 0.45s;
}

.mast-title {
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 66px);
  font-weight: 900;
  line-height: 0.875;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 32px;
  opacity: 0;
  animation: press-in 0.8s cubic-bezier(0.16,1,0.3,1) forwards 0.75s;
  text-wrap: balance;
}
@keyframes press-in {
  from { opacity: 0; filter: blur(10px); transform: scale(1.015); }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}

.mast-sub-row {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  gap: 36px;
  opacity: 0;
  animation: fade-up 0.5s ease forwards 1.1s;
}
.mast-sub-row a:hover { color: var(--ink); }

.mast-bot-rule {
  width: 100%;
  max-width: var(--max-w);
  height: 2px;
  background: var(--ink);
  margin-top: 28px;
  opacity: 0;
  animation: fade-in 0.5s ease forwards 1.2s;
}

.mast-scroll-cue {
  position: absolute;
  bottom: 32px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  animation: fade-in 0.6s ease forwards 1.8s;
}

@keyframes fade-up  { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fade-in  { from { opacity:0; } to { opacity:1; } }

/* ── FOLD CREASE ─────────────────────────────────────────── */
.fold-crease {
  position: relative;
  height: 48px;
  overflow: hidden;
}
.fold-crease::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(240,235,224,0.04) 40%,
    rgba(240,235,224,0.07) 50%,
    rgba(240,235,224,0.04) 60%,
    transparent 100%
  );
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.4), inset 0 -4px 12px rgba(0,0,0,0.4);
}
.fold-crease::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(240,235,224,0.14);
}

/* ── CONTAINER ───────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── SCROLL REVEAL — "UNFOLD" ────────────────────────────── */
.fold-section {
  opacity: 0;
  transform: perspective(1400px) rotateX(-5deg) translateY(22px);
  transition:
    transform 0.85s cubic-bezier(0.25,0.46,0.45,0.94),
    opacity   0.85s ease;
}
.fold-section.unfolded {
  opacity: 1;
  transform: perspective(1400px) rotateX(0deg) translateY(0);
}
.fold-d1 { transition-delay: 0.10s; }
.fold-d2 { transition-delay: 0.20s; }

/* ── LEAD BANNER ─────────────────────────────────────────── */
.lead-banner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  padding: 44px 0;
  border-bottom: 1px solid var(--rule);
}
.lead-sidebar { border-left: 1px solid var(--rule); padding-left: 28px; }

.lead-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.lead-kicker em { font-style: italic; text-transform: none; }

.lead-hed {
  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 92px);
  min-height: 2em;
  font-weight: 900;
  line-height: 0.87;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 22px;
}

.lead-deck {
  font-family: var(--body);
  font-size: 16px;
  font-style: italic;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-top: 16px;
}
.lead-deck strong { color: var(--ink); font-style: normal; }

.sidebar-lbl {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.sidebar-also {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.sidebar-also li {
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
}
.sidebar-also li:last-child { border-bottom: none; }
.also-name { font-style: italic; color: var(--ink); }

/* ── COLUMN LAYOUTS ──────────────────────────────────────── */
.col-2 {
  display: grid;
  grid-template-columns: 1fr 320px;
  border-bottom: 1px solid var(--rule);
}
.col-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
}
.col-2 > * + *, .col-3 > * + * { border-left: 1px solid var(--rule); }

/* ── ARTICLES ────────────────────────────────────────────── */
.article { padding: 32px 28px; }
.article-wide { padding: 32px 28px 32px 0; }

.art-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.art-hed {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  text-wrap: pretty;
}

.art-deck {
  font-family: var(--body);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-dim);
  margin-bottom: 0;
}

.art-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.art-body {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.82;
  color: var(--ink);
}
.art-body p + p { margin-top: 12px; }

/* dropcap — wide article only */
.article-wide .art-body > p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 4em;
  font-weight: 900;
  float: left;
  line-height: 0.75;
  margin: 4px 6px -2px 0;
  color: var(--ink);
}

.art-pull {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-dim);
  border-left: 2px solid var(--ink-dim);
  padding-left: 16px;
  margin: 20px 0;
}

.iname { font-style: italic; }

.art-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}
.chip {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid rgba(240,235,224,0.12);
  background: var(--paper-2);
  padding: 3px 7px;
}

.art-link-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.art-link {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
}
.art-link:hover { text-decoration: underline; }

.tel-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.pulse-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.pulse-dot.live {
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  animation: blink 2.4s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.art-note {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 14px;
}

/* ── LIVE STAT PANEL ─────────────────────────────────────── */
.art-live {
  margin-top: 24px;
  border: 1px solid rgba(240,235,224,0.12);
  background: var(--paper-2);
}
.art-live-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(240,235,224,0.10);
  background: rgba(0,0,0,0.25);
}
.art-live-lbl {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.art-live-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.live-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "major-a major-a major-b"
    "minor-a minor-b minor-c";
}
.live-stat {
  padding: 14px;
  border-right: 1px solid rgba(240,235,224,0.08);
  border-bottom: 1px solid rgba(240,235,224,0.08);
}
.live-stat:last-child { border-right: none; }
.live-stat-major {
  padding: 18px 16px 16px;
  background: rgba(240,235,224,0.025);
}
.live-stat-major:nth-of-type(1) { grid-area: major-a; border-right: 1px solid rgba(240,235,224,0.10); }
.live-stat-major:nth-of-type(2) { grid-area: major-b; border-right: none; }
.live-stat-grid > .live-stat:nth-of-type(3) { grid-area: minor-a; }
.live-stat-grid > .live-stat:nth-of-type(4) { grid-area: minor-b; }
.live-stat-grid > .live-stat:nth-of-type(5) { grid-area: minor-c; border-right: none; }
.live-stat-grid > .live-stat:not(.live-stat-major) { border-bottom: none; }
.live-stat-k {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.live-stat-v {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: 0.02em;
}
.live-stat-xl {
  font-size: 26px;
  letter-spacing: 0;
}
.live-stat-sm { font-size: 11px; }
.live-stat-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(240,235,224,0.10);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(0,0,0,0.18);
}
.live-stat-footer strong {
  color: var(--ink);
  font-weight: 700;
}
@media (max-width: 800px) {
  .live-stat-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "major-a major-a"
      "major-b major-b"
      "minor-a minor-b"
      "minor-c minor-c";
  }
  .live-stat-major:nth-of-type(2) { border-right: none; border-bottom: 1px solid rgba(240,235,224,0.10); }
  .live-stat-grid > .live-stat:nth-of-type(5) { border-top: 1px solid rgba(240,235,224,0.08); }
  .live-stat-footer { flex-direction: column; gap: 4px; }
}

/* ── PROFILE BLOCK ───────────────────────────────────────── */
.profile-block {
  margin-top: 24px;
  border: 1px solid rgba(240,235,224,0.10);
}
.pb-row {
  display: flex;
  border-bottom: 1px solid rgba(240,235,224,0.07);
}
.pb-row:last-child { border-bottom: none; }
.pb-k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 8px 10px;
  min-width: 80px;
  background: rgba(240,235,224,0.03);
  border-right: 1px solid rgba(240,235,224,0.07);
  display: flex;
  align-items: center;
}
.pb-v {
  font-family: var(--body);
  font-size: 11px;
  color: var(--ink-dim);
  padding: 8px 12px;
  display: flex;
  align-items: center;
}

/* ── CONTACT ─────────────────────────────────────────────── */
.sig-hed a { color: var(--ink); }
.sig-hed a:hover { color: var(--red); }
.sig-links { display: flex; flex-direction: column; margin-top: 8px; }
.sig-link {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.sig-link:last-child { border-bottom: none; }
.sig-link:hover .sig-v { text-decoration: underline; }
.sig-k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  min-width: 52px;
  flex-shrink: 0;
}
.sig-v {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-dim);
}

/* ── EDITOR'S NOTE / SIGLINE ─────────────────────────────── */
.sigline {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
}
.footer-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.footer-mono {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── TYPEWRITER CONTAINER ────────────────────────────────── */
.tc {
  white-space: pre-wrap;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.82;
  color: var(--ink);
  min-height: 1em;
}

/* ── CURSOR BLINK ────────────────────────────────────────── */
.type-cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  background: var(--ink);
  margin-left: 6px;
  vertical-align: middle;
  animation: cursor-blink 0.9s step-end infinite;
  position: relative;
  top: -0.05em;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── ARTICLE HOVER ───────────────────────────────────────── */
.article, .article-wide {
  transition: background 0.3s ease;
}
.article:hover  { background: rgba(240,235,224,0.025); }
.article-wide:hover { background: rgba(240,235,224,0.025); }
.article:hover .art-kicker { color: var(--red); opacity: 1; }
.article-wide:hover .art-kicker { color: var(--red); opacity: 1; }

/* count-up number flash */
.live-stat-v.counting { color: var(--signal); transition: color 0.3s; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 800px) {
  :root { --pad-x: 18px; }
  .lead-banner  { grid-template-columns: 1fr; }
  .lead-sidebar { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 20px; }
  .col-2, .col-3 { grid-template-columns: 1fr; }
  .col-2 > * + *, .col-3 > * + * { border-left: none; border-top: 1px solid var(--rule); }
  .article-wide { padding-left: 0; }
  .mast-kicker-row, .mast-sub-row { flex-direction: column; gap: 6px; align-items: center; }
  .strip-cell:nth-child(n+4) { display: none; }
  .site-footer { flex-direction: column; gap: 10px; text-align: center; }
  /* Operator before Rocky on narrow viewports */
  .col-2 { display: flex; flex-direction: column; }
  .col-2 #operator { order: 0; border-top: none; }
  .col-2 #sys-rocky { order: 1; border-top: 1px solid var(--rule); }
  /* Editor's Note before RedMen / Morpheus on narrow viewports */
  .col-3 { display: flex; flex-direction: column; }
  .col-3 #editors-note { order: 0; border-top: none; }
  .col-3 #sys-redmen   { order: 1; border-top: 1px solid var(--rule); }
  .col-3 #sys-morpheus { order: 2; border-top: 1px solid var(--rule); }
}

/* ── /TOOLS — STATE OF THE FLEET ──────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--rule);
}
.hero-stat {
  padding: 56px 36px 48px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  background: linear-gradient(180deg, rgba(240,235,224,0.018), transparent 60%);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-v {
  font-family: var(--serif);
  font-size: clamp(48px, 5.6vw, 84px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-stat-k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--red);
}
.hero-stat-d {
  font-family: var(--body);
  font-size: 12px;
  font-style: italic;
  color: var(--ink-dim);
}

@media (max-width: 800px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stat:nth-child(2) { border-right: none; }
  .hero-stat:nth-child(1), .hero-stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .hero-stat { padding: 32px 22px 28px; }
}

/* ── TOOL GALLERY ─────────────────────────────────────────── */
.tool-gallery {
  padding: 48px 0 32px;
}
.gallery-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 32px;
}
.gallery-hed {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 8px 0 12px;
}
.gallery-deck {
  font-family: var(--body);
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 680px;
}
.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tool-card {
  padding: 26px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  transition: background 0.3s ease;
}
.tool-card:hover { background: rgba(240,235,224,0.025); }
.tool-card:hover .tool-kicker { color: var(--red); }
.tool-card-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.tool-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
  transition: color 0.3s;
}
.tool-name {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--warn);
  margin-bottom: 6px;
}
.tool-deck {
  font-family: var(--body);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .tool-card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .tool-card-grid { grid-template-columns: 1fr; }
}

/* ── BACK NAV ─────────────────────────────────────────────── */
.back-nav {
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 12px;
}

/* ── TOP OF THE STACK (top-tools list) ────────────────────── */
.top-stack { padding: 32px 0 16px; }
.stack-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}
.stack-row {
  display: grid;
  grid-template-columns: 36px 130px 1fr 70px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "rank name bar count"
    "rank blurb blurb blurb";
  align-items: center;
  gap: 0 16px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--rule);
}
.stack-rank {
  grid-area: rank;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.stack-name {
  grid-area: name;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: -0.005em;
}
.stack-bar {
  grid-area: bar;
  height: 4px;
  background: rgba(240,235,224,0.05);
  position: relative;
  overflow: hidden;
}
.stack-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--red) 0%, var(--warn) 100%);
  opacity: 0.82;
}
.stack-count {
  grid-area: count;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  letter-spacing: 0.02em;
}
.stack-blurb {
  grid-area: blurb;
  font-family: var(--body);
  font-size: 12px;
  font-style: italic;
  color: var(--ink-dim);
  margin-top: 4px;
}

@media (max-width: 700px) {
  .stack-row {
    grid-template-columns: 30px 1fr 70px;
    grid-template-areas:
      "rank name count"
      "rank bar bar"
      "rank blurb blurb";
  }
  .stack-name { font-size: 14px; }
}

/* ── A→Z TOOL GRID ────────────────────────────────────────── */
.tool-grid-az {
  grid-template-columns: repeat(4, 1fr) !important;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tool-grid-az .tool-card {
  position: relative;
  padding: 22px 18px 18px 70px;
  min-height: 200px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.tool-grid-az .tool-card-head { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.tool-letter {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink-faint);
  pointer-events: none;
  transition: color 0.3s ease;
}
.tool-card:hover .tool-letter { color: var(--ink); }
.tool-card .tool-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.tool-card .tool-name {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.tool-card .tool-deck {
  font-family: var(--body);
  font-size: 12px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 8px;
}
.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}
.tool-chips .chip {
  font-size: 7px;
  padding: 2px 6px;
}

/* ── WORKHORSE HIGHLIGHT ──────────────────────────────────── */
.tool-card-workhorse {
  background: linear-gradient(90deg, rgba(208,40,40,0.08) 0%, rgba(208,40,40,0) 30%, var(--paper) 60%) !important;
}
.tool-card-workhorse::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
}
.tool-card-workhorse .tool-letter { color: var(--red); }
.tool-card-workhorse:hover .tool-letter { color: var(--ink); }
.tool-card-workhorse .tool-name { color: var(--warn); }
.tool-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(240,165,0,0.10);
  border: 1px solid rgba(240,165,0,0.35);
  padding: 3px 7px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .tool-grid-az { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 800px) {
  .tool-grid-az { grid-template-columns: repeat(2, 1fr) !important; }
  .tool-letter { font-size: 44px; }
  .tool-grid-az .tool-card { padding-left: 56px; min-height: 170px; }
}
@media (max-width: 480px) {
  .tool-grid-az { grid-template-columns: 1fr !important; }
}

/* ── STRIP — centered evening-edition mode ───────────────── */
.strip { justify-content: center; }
.strip-edition {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,235,224,0.55);
}

/* ── ROCKY ARTICLE — three featured tools ───────────────── */
.rocky-tools {
  margin-top: 24px;
  border: 1px solid rgba(240,235,224,0.10);
  background: var(--paper-2);
}
.rocky-tools-head {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(240,235,224,0.10);
  background: rgba(0,0,0,0.25);
}
.rocky-tools-lbl {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.rocky-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.rocky-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 20px;
  aspect-ratio: 1 / 1;
  border-right: 1px solid rgba(240,235,224,0.08);
  overflow: hidden;
  transition: background 0.3s ease;
}
.rocky-tool:hover { background: rgba(240,235,224,0.025); }
.rocky-tool:last-child { border-right: none; }
.rocky-tool-letter {
  display: block;
  font-family: var(--serif);
  font-size: clamp(72px, 7.5vw, 104px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: -4px 0 -10px -4px;
  transition: color 0.3s ease;
}
.rocky-tool:hover .rocky-tool-letter { color: var(--warn); }
.rocky-tool > div { display: flex; flex-direction: column; gap: 6px; }
.rocky-tool-name {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: -0.005em;
}
.rocky-tool-deck {
  display: block;
  font-family: var(--body);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}
.rocky-tool-body {
  font-family: var(--body);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}

@media (max-width: 800px) {
  .rocky-tools-grid { grid-template-columns: 1fr; }
  .rocky-tool {
    aspect-ratio: auto;
    border-right: none;
    border-bottom: 1px solid rgba(240,235,224,0.08);
    padding: 22px;
  }
  .rocky-tool:last-child { border-bottom: none; }
  .rocky-tool-letter { font-size: 80px; }
}

/* ── CONTINUED-ON LINK ───────────────────────────────────── */
.continued-link {
  display: block;
  margin-top: 26px;
  padding: 18px 0 4px;
  border-top: 2px solid var(--rule-heavy);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}
.continued-link:hover { color: var(--red); }
.continued-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.continued-link:hover .continued-arrow { transform: translateX(4px); }
.continued-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-left: 6px;
}
.continued-link:hover .continued-title { color: var(--red); }

/* ── INLINE LINK ─────────────────────────────────────────── */
.inline-link {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  font-style: italic;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.inline-link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ── HASH FLASH (when arriving from a deep link) ─────────── */
.tool-card.tool-card-flash {
  animation: tool-card-flash 1.4s ease-out;
}
@keyframes tool-card-flash {
  0%   { background: rgba(240,165,0,0.22); box-shadow: inset 0 0 0 2px var(--warn), 0 0 28px rgba(240,165,0,0.45); }
  60%  { background: rgba(240,165,0,0.12); box-shadow: inset 0 0 0 2px rgba(240,165,0,0.55), 0 0 18px rgba(240,165,0,0.25); }
  100% { background: var(--paper); box-shadow: none; }
}
.tool-card.tool-card-flash .tool-letter { color: var(--warn) !important; transition: none; }
.tool-card.tool-card-flash .tool-name { color: var(--warn); }

/* Make rocky-tool a clickable link without underline drift */
a.rocky-tool { text-decoration: none; cursor: pointer; }
