:root {
  --bg: #f4efe6;
  --paper: rgba(255, 250, 242, 0.85);
  --ink: #1d1a17;
  --muted: #6a6258;
  --line: rgba(29, 26, 23, 0.12);
  --accent: #b34b2d;
  --accent-2: #1b5c73;
  --shadow: 0 24px 80px rgba(42, 33, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(179, 75, 45, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(27, 92, 115, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f1e7 0%, #ece2d5 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 1px, transparent 1px);
  background-size: 24px 24px;
}

.page {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 40px 40px 36px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  font-family: "IBM Plex Serif", Georgia, serif;
  line-height: 1.08;
}

.lead {
  margin: 0 0 20px;
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.hero-link {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 92, 115, 0.25);
}

.hero-link:hover {
  color: var(--ink);
  border-bottom-color: rgba(29, 26, 23, 0.25);
}

/* ── About grid ────────────────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.about-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.about-card-wide {
  grid-column: span 3;
}

.about-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-family: "IBM Plex Serif", Georgia, serif;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.about-card p + p,
.detail-card p + p {
  margin-top: 12px;
}

.section-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.about-note {
  margin-top: 14px !important;
  font-size: 14px;
}

.about-note a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 92, 115, 0.25);
}

.about-note a:hover {
  color: var(--ink);
  border-bottom-color: rgba(29, 26, 23, 0.25);
}

.about-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.about-list li + li {
  margin-top: 8px;
}

/* ── Details grid ──────────────────────────────────────────────────────────── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.detail-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.detail-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-family: "IBM Plex Serif", Georgia, serif;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-card-accent {
  background:
    linear-gradient(180deg, rgba(27, 92, 115, 0.08), rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.76);
}

/* ── Corner icon ───────────────────────────────────────────────────────────── */
.corner-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 230, 0.9));
  border: 1px solid rgba(29, 26, 23, 0.08);
  box-shadow: 0 10px 24px rgba(29, 26, 23, 0.08);
}

.corner-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-2);
}

/* ── Channels / release cards ──────────────────────────────────────────────── */
.channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.card.production {
  border-top: 6px solid var(--accent);
}

.card.test {
  border-top: 6px solid var(--accent-2);
}

.card h2 {
  margin: 0;
  font-size: 28px;
  font-family: "IBM Plex Serif", Georgia, serif;
}

.card .subtitle {
  margin: 8px 0 18px;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin-bottom: 18px;
  font-size: 14px;
}

.meta-grid dt {
  color: var(--muted);
}

.meta-grid dd {
  margin: 0;
  word-break: break-word;
}

/* ── Download list ─────────────────────────────────────────────────────────── */
.download-list {
  display: grid;
  gap: 12px;
}

.download-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.7);
  border: 1px solid rgba(29, 26, 23, 0.08);
}

.download-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.download-top strong {
  font-size: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(29, 26, 23, 0.08);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.download-meta code,
.card code {
  word-break: break-all;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ── Command details ───────────────────────────────────────────────────────── */
.command-details {
  margin-top: 14px;
  border-top: 1px solid rgba(29, 26, 23, 0.08);
  padding-top: 12px;
}

.command-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  user-select: none;
}

.command-details[open] summary {
  color: var(--ink);
}

.command-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.command-row {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(29, 26, 23, 0.08);
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.command-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.command-row code {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 12px;
  color: var(--ink);
}

.copy-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(29, 26, 23, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.copy-button:hover {
  background: rgba(29, 26, 23, 0.05);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.checksums-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  transition: transform 160ms ease, background 160ms ease;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button:hover {
  transform: translateY(-1px);
}

/* ── States ────────────────────────────────────────────────────────────────── */
.empty {
  color: var(--muted);
  font-size: 15px;
}

.error {
  padding: 20px;
  border-radius: 18px;
  background: rgba(179, 75, 45, 0.1);
  border: 1px solid rgba(179, 75, 45, 0.2);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 36px 24px 34px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-logo {
  width: min(140px, 42vw);
  height: auto;
  display: block;
}

.footer-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.72);
  text-align: center;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding: 20px 0 40px;
  }

  .hero,
  .card {
    padding: 20px;
    border-radius: 20px;
  }

  .brand-row {
    gap: 12px;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-card-wide {
    grid-column: auto;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .download-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer {
    padding: 20px;
  }
}
