/* LAT-642 — static port of the Tailwind Plus Commit release-notes layout.
   Hand-translated from the template's Tailwind classes into plain CSS so the
   public site stays framework-free. Breakpoints: sm 640px, lg 1024px,
   xl 1280px. The right boundary of the fixed intro pane is
   calc(max(2rem, 50% - 38rem) + 40rem), kept in --pane-right. */

:root {
  --pane-right: calc(max(2rem, 50% - 38rem) + 40rem);
  --white: #f6f6f3;
  --gray-50: #f8f7f2;
  --gray-100: #f0eee7;
  --gray-200: #ddd9cd;
  --gray-300: #b8b8b2;
  --gray-400: #8e8e88;
  --gray-500: #7a7a74;
  --gray-600: #555550;
  --gray-800: #1b2221;
  --gray-900: #161c1b;
  --gray-950: #0e1312;
  --accent: #ffd700;
  --accent-dim: #d9b800;
  --accent-soft: rgba(255, 215, 0, 0.18);
  --accent-on: #0e1312;
  --timeline-ink: rgba(14, 19, 18, 0.58);
  --timeline-rule: rgba(14, 19, 18, 0.58);
  --font-display: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --font-sans:
    "Geist", "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-serif:
    "DM Serif Display", "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono:
    "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html.dark {
  --timeline-rule: rgba(255, 255, 255, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  background: var(--white);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

body::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-size: 200px 200px;
  filter: contrast(170%) brightness(700%);
  mix-blend-mode: soft-light;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.14) 44px,
    rgba(0, 0, 0, 0.58) 108px,
    #000 184px,
    #000 calc(100% - 184px),
    rgba(0, 0, 0, 0.58) calc(100% - 108px),
    rgba(0, 0, 0, 0.14) calc(100% - 44px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.14) 44px,
    rgba(0, 0, 0, 0.58) 108px,
    #000 184px,
    #000 calc(100% - 184px),
    rgba(0, 0, 0, 0.58) calc(100% - 108px),
    rgba(0, 0, 0, 0.14) calc(100% - 44px),
    transparent 100%
  );
}

body::after {
  background: radial-gradient(
    ellipse at center,
    transparent 22%,
    rgba(14, 19, 18, 0.34) 90%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.14) 44px,
    rgba(0, 0, 0, 0.58) 108px,
    #000 184px,
    #000 calc(100% - 184px),
    rgba(0, 0, 0, 0.58) calc(100% - 108px),
    rgba(0, 0, 0, 0.14) calc(100% - 44px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.14) 44px,
    rgba(0, 0, 0, 0.58) 108px,
    #000 184px,
    #000 calc(100% - 184px),
    rgba(0, 0, 0, 0.58) calc(100% - 108px),
    rgba(0, 0, 0, 0.14) calc(100% - 44px),
    transparent 100%
  );
}

html.dark body {
  background: var(--gray-950);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

/* ---------- Persistent navigation ---------- */

.release-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 19, 18, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.release-nav-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 76rem;
  min-height: 68px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
}

.release-nav-brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  line-height: 1;
}

.release-nav-wordmark {
  height: 36px;
  width: auto;
}

.release-nav-links {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 1rem;
  margin-inline: -1.25rem;
  overflow-x: auto;
  padding: 0.15rem 1.25rem 0.35rem;
  color: var(--gray-300);
  font-size: 13px;
  scrollbar-width: none;
  white-space: nowrap;
}

.release-nav-links::-webkit-scrollbar {
  display: none;
}

.release-nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.release-nav-links a:hover {
  color: var(--white);
}

.release-nav-right {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.release-nav-cta {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-on);
  font: 500 14px/1 var(--font-sans);
  letter-spacing: -0.005em;
  padding: 0.78rem 1.15rem;
  text-decoration: none;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.release-nav-cta:hover {
  box-shadow: 0 12px 30px -8px rgba(255, 215, 0, 0.42);
  transform: translateY(-1px);
}

@media (min-width: 980px) {
  .release-nav-inner {
    display: flex;
    min-height: 68px;
    padding-block: 0;
  }

  .release-nav-links {
    grid-column: auto;
    gap: clamp(1rem, 1.6vw, 1.5rem);
    margin-inline: 0;
    overflow: visible;
    padding: 0;
    font-size: 13.5px;
  }
}

/* ---------- Fixed intro sidebar ---------- */

.fixed-sidebar {
  position: relative;
  flex: none;
  overflow: hidden;
  padding: 0 1.5rem;
}

.glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #ffd700;
  background-image:
    linear-gradient(to right, rgba(14, 19, 18, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 19, 18, 0.08) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
}

.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-size: 420px 420px;
  filter: grayscale(1) contrast(180%) brightness(70%);
  opacity: 0.18;
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) {
  body::before {
    background-size: 280px 280px;
    filter: grayscale(1) contrast(145%) brightness(95%);
    mix-blend-mode: normal;
    opacity: 0.1;
  }

  body::after {
    background: radial-gradient(
      ellipse at center,
      transparent 28%,
      rgba(14, 19, 18, 0.22) 94%
    );
  }

  .glow::before {
    background-size: 520px 520px;
    filter: grayscale(1) contrast(160%) brightness(66%);
    opacity: 0.2;
  }
}

.sidebar-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
}

.sidebar-inner {
  margin: 0 auto;
  max-width: 32rem;
}

.sidebar-main {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.sidebar-main-rel {
  position: relative;
}

.sidebar-footer {
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

@media (min-width: 640px) {
  .sidebar-main {
    padding-top: 8rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .fixed-sidebar {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    padding: 0;
  }

  .glow {
    right: var(--pane-right);
    min-width: 32rem;
  }

  .glow::before {
    inset: 0;
  }

  .sidebar-scroll {
    pointer-events: auto;
    margin-right: var(--pane-right);
    min-width: 32rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding-left: max(4rem, calc(50% - 38rem));
  }

  .sidebar-inner {
    margin: 0;
    display: flex;
    width: 24rem;
    max-width: none;
    flex-direction: column;
  }

  .sidebar-inner::before {
    content: "";
    flex: 1;
    padding-top: 1.5rem;
  }

  .sidebar-main {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .sidebar-footer {
    justify-content: flex-start;
    padding-bottom: 1.5rem;
  }
}

/* ---------- Intro content ---------- */

.logo-link {
  display: inline-block;
}

.logo {
  height: 36px;
  width: auto;
}

.intro-title {
  margin: 3.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gray-950);
  text-wrap: balance;
}

.intro-accent {
  color: var(--gray-950);
  font-family: var(--font-serif);
  font-style: italic;
}

.intro-copy {
  margin: 1.5rem 0 0;
  max-width: 40em;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.55;
  color: #2a2f2e;
  text-wrap: pretty;
}

.footer-line {
  margin: 0;
  display: flex;
  align-items: baseline;
  column-gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5rem;
  color: #4d524f;
}

.release-footer {
  display: grid;
  gap: 0.45rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5rem;
}

.footer-link {
  font-weight: 500;
  color: var(--gray-950);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--gray-950);
}

/* ---------- Starfield ---------- */

.starfield {
  display: none;
  pointer-events: none;
  position: absolute;
  top: 3.5rem;
  right: -11rem;
  width: 55.0625rem;
  transform: rotate(30deg);
  transform-origin: top right;
  overflow: visible;
  opacity: 0.34;
  mix-blend-mode: multiply;
}

.starfield [fill="white"] {
  fill: rgba(14, 19, 18, 0.4);
}

.starfield [stroke="white"] {
  stroke: rgba(14, 19, 18, 0.36);
}

.star {
  opacity: 0;
  animation: rn-star-in 4s ease var(--d, 0s) forwards;
}

.star circle {
  animation: rn-twinkle var(--t, 3s) ease-in-out var(--d, 0s) infinite alternate;
}

.star .star-dim {
  --o-from: 0.2;
  --o-to: 0.5;
  --s-from: 1;
  --s-to: 1.2;
}

.star .star-bright {
  --o-from: 1;
  --o-to: 0.6;
  --s-from: 1.2;
  --s-to: 1;
}

.constellation {
  visibility: hidden;
  animation: rn-draw 5s ease var(--d, 2s) forwards;
}

.constellation-filled {
  animation: rn-draw 5s ease var(--d, 2s) forwards,
    rn-fill 1s ease var(--df, 7s) forwards;
}

@keyframes rn-star-in {
  to {
    opacity: 1;
  }
}

@keyframes rn-twinkle {
  from {
    opacity: var(--o-from);
    transform: scale(var(--s-from));
  }

  to {
    opacity: var(--o-to);
    transform: scale(var(--s-to));
  }
}

@keyframes rn-draw {
  from {
    visibility: visible;
    stroke-dashoffset: 1;
  }

  to {
    visibility: visible;
    stroke-dashoffset: 0;
  }
}

@keyframes rn-fill {
  to {
    fill: rgba(14, 19, 18, 0.04);
  }
}

/* ---------- Content pane + timeline ---------- */

.content {
  position: relative;
  flex: auto;
}

.timeline {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: max(0px, calc(50% - 18.125rem));
  height: 100%;
  width: 0.375rem;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--timeline-rule) 0,
    var(--timeline-rule) 1px,
    transparent 1px,
    transparent 8px
  );
}

.entries {
  display: block;
  padding: 5rem 0;
}

.entries > * + * {
  margin-top: 5rem;
}

@media (min-width: 640px) {
  .entries {
    padding: 8rem 0;
  }

  .entries > * + * {
    margin-top: 8rem;
  }
}

@media (min-width: 1024px) {
  .timeline {
    right: var(--pane-right);
    min-width: 32rem;
    overflow: visible;
  }

  .timeline-line {
    left: 100%;
    margin-left: 0.25rem;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .timeline-line {
    left: 100%;
    width: 1px;
    margin-left: 0;
    background: var(--timeline-rule);
  }

  .entry-tick {
    display: block;
  }
}

@media (min-width: 1280px) {
  html.dark {
    --timeline-rule: rgba(14, 19, 18, 0.58);
  }

  .timeline-line {
    right: 0.25rem;
    left: auto;
    margin-left: 0;
  }
}

/* ---------- Content wrappers ---------- */

.cw {
  margin: 0 auto;
  max-width: 80rem;
  padding: 0 1.5rem;
}

.cw-prose {
  margin: 0 auto;
  max-width: 32rem;
}

@media (min-width: 1024px) {
  .cw {
    padding: 0 2rem;
  }

  .cw-prose {
    margin: 0 0 0 auto;
    width: min(36rem, calc(100% - 32rem));
    max-width: none;
  }
}

/* ---------- Entry header (date + version + timeline tick) ---------- */

.entry {
  scroll-margin-top: 4rem;
}

.entry-header {
  position: relative;
  margin-bottom: 2.5rem;
}

.entry-pointer {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: max(-0.5rem, calc(50% - 18.625rem));
  z-index: 50;
  display: flex;
  height: 1rem;
  align-items: center;
  justify-content: flex-end;
  column-gap: 0.5rem;
}

.entry-tick {
  height: 1px;
  width: 0.875rem;
  background: var(--timeline-rule);
}

.entry-meta {
  display: flex;
  align-items: baseline;
  column-gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.entry-meta-timeline {
  pointer-events: auto;
  display: none;
  color: var(--timeline-ink);
}

.entry-meta-inline {
  color: var(--gray-500);
}

html.dark .entry-meta-inline {
  color: rgba(255, 255, 255, 0.5);
}

.entry-version {
  font-weight: 600;
}

@media (min-width: 1024px) {
  .entry-pointer {
    right: var(--pane-right);
    left: 0;
    min-width: 32rem;
  }

  .entry-tick {
    margin-right: -0.875rem;
  }
}

@media (min-width: 1280px) {
  .entry-header {
    margin-bottom: 0;
  }

  .entry-pointer {
    height: 2rem;
  }

  .entry-meta-timeline {
    display: flex;
  }

  .entry-tick {
    margin-right: 0;
  }
}

/* ---------- Entry media ---------- */

.entry-media {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 215, 0, 0.2), transparent 34%),
    linear-gradient(135deg, var(--gray-900), var(--gray-950) 58%, rgba(217, 184, 0, 0.18));
}

html.dark .entry-media {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 215, 0, 0.16), transparent 34%),
    linear-gradient(135deg, var(--gray-900), var(--gray-950) 58%, rgba(217, 184, 0, 0.16));
}

.entry-media > img {
  width: 100%;
  height: auto;
}

.entry-media--placeholder img {
  opacity: 0.78;
  filter: grayscale(1) sepia(0.36) saturate(1.28) contrast(1.08) brightness(0.82);
  mix-blend-mode: luminosity;
}

.entry-media::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  box-shadow:
    inset 0 0 0 1px rgba(14, 19, 18, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html.dark .entry-media::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------- Typography (port of the template's typography.css) ---------- */

.typography {
  --typography-body: var(--gray-600);
  --typography-headings: var(--gray-900);
  --typography-links: var(--accent-dim);
  --typography-link-hover: var(--accent-on);
  --typography-link-underline: rgba(217, 184, 0, 0.4);
  --typography-link-hover-underline: rgba(14, 19, 18, 0.4);
  --typography-bold: var(--gray-900);

  color: var(--typography-body);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.6;
  text-wrap: pretty;
}

html.dark .typography {
  --typography-body: var(--gray-300);
  --typography-headings: var(--white);
  --typography-links: var(--accent);
  --typography-link-hover: var(--white);
  --typography-link-underline: rgba(255, 215, 0, 0.45);
  --typography-link-hover-underline: rgba(255, 255, 255, 0.4);
  --typography-bold: var(--white);
}

.typography h2 {
  color: var(--typography-headings);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.typography h3 {
  color: var(--typography-headings);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  column-gap: 0.75rem;
}

.typography h3 > svg {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.typography a {
  font-weight: 600;
  color: var(--typography-links);
  text-decoration: underline;
  text-decoration-color: var(--typography-link-underline);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.typography a:hover {
  color: var(--typography-link-hover);
  text-decoration-color: var(--typography-link-hover-underline);
}

.typography strong {
  font-weight: 600;
  color: var(--typography-bold);
}

.typography ul {
  padding-left: 1.375rem;
  list-style-type: disc;
}

.typography li {
  padding-left: 0.625rem;
}

.typography li::marker {
  color: var(--gray-400);
}

/* Vertical rhythm */

.typography > * {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.typography :is(h2, h3) {
  margin-top: 2.25rem;
}

.typography li {
  margin-top: 1rem;
}

.typography :is(h2, h3) + * {
  margin-top: 1rem;
}

.typography > :first-child {
  margin-top: 0;
}

/* The inline date/version row above each entry's prose. */

.entry-header .cw-prose {
  display: flex;
}

@media (min-width: 1280px) {
  .entry-meta-inline {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .star,
  .constellation,
  .constellation-filled {
    animation: none;
    opacity: 1;
    visibility: visible;
  }

  .star circle {
    animation: none;
  }
}
