/* FLINZ — shared styles for story pages and stories index */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: #0a0a0a; color: #fff; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Header (mirrors home) ─────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand img { height: 32px; width: auto; }
nav.primary {
  display: flex;
  gap: 36px;
  font-size: 13px;
  font-weight: 500;
}
nav.primary a {
  color: var(--fg);
  padding: 6px 0;
  position: relative;
  transition: color .15s ease;
}
nav.primary a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease-out;
}
nav.primary a:hover::after { transform: scaleX(1); }
nav.primary a.current::after { transform: scaleX(1); }
.signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--fg-on-dark);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background .15s ease, color .15s ease;
}
.signin:hover { background: transparent; color: var(--fg); }

/* ── Breadcrumb / back row ─────────────────── */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 32px 0 0;
}
.crumb a { color: var(--fg-muted); }
.crumb a:hover { color: var(--fg); }
.crumb .sep { opacity: 0.4; }

/* ── Story header ─────────────────────────── */
.story-header {
  padding: 56px 0 80px;
  border-bottom: 1px solid var(--border);
}
.story-meta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 32px;
}
.story-meta-row .pill {
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 12px;
  color: var(--fg);
}
.story-meta-row .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--fg-muted); }

.story-title {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 32px;
  text-wrap: balance;
  max-width: 22ch;
}
.story-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
  max-width: 56ch;
}

/* ── Story body (long-form prose) ─────────── */
.story-body {
  padding: 80px 0 96px;
}
.story-body h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 64px 0 20px;
  text-wrap: balance;
}
.story-body h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
}
.story-body p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 24px;
  color: var(--fg);
}
.story-body p.muted-p, .story-body em { color: var(--fg-muted); font-style: normal; }
.story-body strong { font-weight: 600; }
.story-body blockquote {
  margin: 40px 0;
  padding: 24px 0 24px 32px;
  border-left: 2px solid var(--fg);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: balance;
}
.story-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}
.story-body ul {
  padding: 0; margin: 0 0 24px;
  list-style: none;
}
.story-body ul li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 16px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.story-body ul li:last-child { border-bottom: none; }
.story-body ul li::before {
  content: "—";
  position: absolute;
  left: 0; top: 8px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* ── Reusable display title / pullquote / cells ─── */
.display-title {
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 800; letter-spacing: -0.05em; line-height: 0.9;
  margin: 16px 0 16px; text-transform: uppercase;
}
.display-sub {
  font-size: clamp(28px, 3.6vw, 44px); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.15; color: var(--fg-muted);
  margin: 0 0 32px; max-width: 22ch; text-wrap: balance;
}
.story-body .pullquote {
  font-size: clamp(28px, 3vw, 40px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2; margin: 64px 0;
  padding: 0; border: none; text-wrap: balance; color: var(--fg);
}
.story-body .pullquote em { font-style: normal; color: var(--fg-muted); }
.three-up, .stages {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin: 48px 0;
}
.three-up .cell, .stages .cell { background: #fff; padding: 28px 24px; }
.three-up h4, .stages h4 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-muted); font-weight: 500; margin: 0 0 12px;
}
.three-up p, .stages p { font-size: 14px; line-height: 1.55; color: var(--fg); margin: 0; }
.stages .cell strong {
  display: block; font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
@media (max-width: 880px) {
  .three-up, .stages { grid-template-columns: 1fr; }
}

/* ── Read next / footer block ─────────────── */
.read-next {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
  background: #fafafa;
}
.read-next .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.read-next a.next-link {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  padding: 8px 0;
  border-top: 1px solid var(--fg);
  padding-top: 24px;
}
.read-next .next-title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.read-next .arrow {
  font-size: 28px;
  font-weight: 300;
  flex: 0 0 auto;
}
.read-next a.next-link:hover .next-title { text-decoration: underline; text-underline-offset: 4px; }

/* ── Stories index ─────────────────────────── */
.index-hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--border);
}
.index-hero .eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.index-hero h1 {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  max-width: 18ch;
  text-wrap: balance;
}
.index-hero p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 0;
}

.index-list {
  padding: 32px 0 96px;
}
.index-list a.row {
  display: grid;
  grid-template-columns: 160px 1fr 200px 32px;
  gap: 32px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.index-list a.row:hover { background: #fafafa; }
.index-list a.row:hover .row-title { text-decoration: underline; text-underline-offset: 4px; }
.row-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  padding-top: 4px;
  letter-spacing: 0.02em;
}
.row-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 8px;
  text-wrap: balance;
}
.row-excerpt {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 56ch;
}
.row-cat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 6px;
  text-align: right;
}
.row-arrow { font-size: 22px; color: var(--fg-muted); padding-top: 0; }
.index-list a.row:hover .row-arrow { color: var(--fg); }

/* ── Footer ──────────────────────────────── */
.site-footer {
  background: #0a0a0a;
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}
.site-footer .legal-links { display: flex; gap: 24px; }
.site-footer a:hover { color: #fff; }

/* ── Mobile ──────────────────────────────── */
@media (max-width: 880px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  nav.primary { display: none; }
  .index-list a.row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .row-cat { text-align: left; padding-top: 0; }
  .row-arrow { display: none; }
  .read-next a.next-link { flex-direction: column; align-items: start; }
}
