/* ============================================================
   INDEX — hero, strata timeline (cross-section), entries
   ============================================================ */

/* ---- Hero ---- */
.hero {
  padding: var(--sp-7) 0 var(--sp-8);
  border-bottom: var(--hair) solid var(--rule);
}
.hero .kicker {
  margin-bottom: var(--sp-5);
}
.hero h1 {
  font-size: var(--t-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-ink);
}
.hero .dek {
  font-family: var(--font-serif);
  font-size: var(--t-body-lg);
  color: var(--ink-2);
  max-width: 56ch;
  margin-top: var(--sp-7);
  line-height: 1.5;
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  align-items: center;
  margin-top: var(--sp-6);
}
.hero-foot .stat {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--ink-3);
}
.hero-foot .stat b {
  color: var(--ink);
  font-weight: 600;
}

/* ---- Section heading ---- */
.sec {
  padding: var(--sp-8) 0;
}
.sec-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.sec-top h2 {
  font-family: var(--font-serif);
  font-size: var(--t-h2);
  font-weight: 500;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.sec-top .sec-note {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--ink-3);
  max-width: 38ch;
  text-align: right;
}

/* ============================================================
   STRATA GRID — shared time axis, one column per component
   Adding a new component = add a column to strataComponents in index.astro
   ============================================================ */
.sg-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.sg-grid {
  display: grid;
  /* columns + rows set inline from data in index.astro */
  min-width: 480px;
  border: var(--hair) solid var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-2);
}

/* ---- Header row ---- */
.sg-axis-hd {
  background: var(--paper-sunk);
  border-right: var(--hair) solid var(--rule-2);
  border-bottom: 2px solid var(--rule-2);
}

.sg-comp-hd {
  background: var(--paper-sunk);
  border-right: var(--hair) solid var(--rule-2);
  border-bottom: 2px solid var(--rule-2);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sg-comp-hd:last-child {
  border-right: none;
}

.sgh-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}

.sgh-pill {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pill-live {
  color: var(--accent-ink);
}
.pill-draft {
  color: var(--ink-4);
}

/* ---- Axis cells (year labels) ---- */
.sg-axis-cell {
  background: var(--paper-sunk);
  border-right: var(--hair) solid var(--rule-2);
  border-bottom: var(--hair) solid var(--rule-2);
  padding: var(--sp-3) var(--sp-2);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.sg-yr {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.2;
}

.sg-axis-cell.is-pre .sg-yr {
  color: var(--ink-4);
  font-style: italic;
}

/* ---- Data cells ---- */
.sg-cell {
  border-right: var(--hair) solid var(--rule-2);
  border-bottom: var(--hair) solid var(--rule-2);
  /* border-left: 3px solid var(--e); */
  background: var(--e-tint);
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: filter 0.12s;
}

.sg-cell:last-child,
.sg-grid > .sg-cell:nth-last-child(-n + 3) {
  /* bottom row — handled by overflow:hidden on container */
}

a.sg-cell:hover {
  filter: brightness(0.96) saturate(1.1);
}

[data-theme='dark'] a.sg-cell:hover {
  filter: brightness(1.1);
}

.sg-lib {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* Prefatory / context cells — hatched + dashed border + italic */
.sg-cell.is-pre {
  border-left-style: dashed;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 7px,
    color-mix(in oklab, var(--e) 18%, transparent) 7px 14px
  );
}

.sg-cell.is-pre .sg-lib {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
}

/* Empty / draft cells */
.sg-empty {
  border-left: 3px solid transparent;
  background: transparent;
}

.sg-empty.is-draft {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 8px,
    color-mix(in oklab, var(--rule-2) 60%, transparent) 8px 9px
  );
}

.sg-empty.is-pre.is-draft {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 8px,
    color-mix(in oklab, var(--rule-2) 40%, transparent) 8px 9px
  );
}

/* ---- Footer ---- */
.strata-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0 0;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.stf-label {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--ink-3);
}

.stf-label b {
  color: var(--ink-2);
  font-weight: 600;
}

.stf-link {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--accent-ink);
  text-decoration: none;
}

.stf-link:hover {
  text-decoration: underline;
}

/* ============================================================
   ENTRIES
   ============================================================ */
.entries {
  border-top: var(--hair) solid var(--rule-2);
}
.entry {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5);
  border-bottom: var(--hair) solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.entry:hover {
  background: var(--paper-2);
}
.entry-idx {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--ink-4);
}
.entry-main {
  min-width: 0;
}
.entry-main h3 {
  font-family: var(--font-serif);
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.entry-main .desc {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--ink-2);
  margin-top: 4px;
  max-width: 62ch;
  line-height: 1.45;
}
.entry-eras {
  display: flex;
  gap: 3px;
  margin-top: var(--sp-3);
}
.entry-eras i {
  width: 26px;
  height: 6px;
  border-radius: 2px;
  background: var(--e);
  display: block;
  opacity: 0.9;
}
.entry-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  text-align: right;
}
.entry-status {
  font-family: var(--font-sans);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
}
.status-live {
  color: var(--accent-ink);
  border: var(--hair) solid var(--accent);
}
.status-soon {
  color: var(--ink-3);
  border: var(--hair) solid var(--rule-2);
}
.entry-arrow {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--ink-3);
}
.entry:hover .entry-arrow {
  color: var(--accent-ink);
}
.entry.soon {
  cursor: default;
}
.entry.soon:hover {
  background: transparent;
}

@media (max-width: 640px) {
  .entry {
    grid-template-columns: 1fr auto;
    gap: var(--sp-3) var(--sp-4);
  }
  .entry-idx {
    display: none;
  }
  .entry-main .desc {
    display: none;
  }
  .sec-top .sec-note {
    text-align: left;
  }
}
