:root {
  --bg: #ffffff;
  --fg: #3a4656;
  --heading: #1f2a37;
  --muted: #5b6878;
  --primary: #2f5548;
  --accent: #eff5f3;
  --border: #e2e8f0;
  --code-bg: #1f2a37;
  --code-fg: #e8eef4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161d;
    --fg: #cdd6e0;
    --heading: #f1f5f9;
    --muted: #94a3b4;
    --primary: #7cc4ab;
    --accent: #18242a;
    --border: #2a3644;
    --code-bg: #0a0f14;
    --code-fg: #e8eef4;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--primary); }

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

.name { font-weight: 600; color: var(--heading); }

.badge {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  white-space: nowrap;
}

.hero { padding: 40px 0 8px; }

h1 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 { margin: 0 0 8px; color: var(--heading); font-size: 22px; }

h3 { margin: 0; color: var(--heading); font-size: 16px; }

.lead { margin: 0; font-size: 19px; }

section { margin-top: 44px; }

.hero { margin-top: 0; }

/* One file in the middle, readers on both sides. */
.hub {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  grid-template-areas:
    "r1 file r3"
    "r2 file r4";
  gap: 16px 36px;
  align-items: stretch;
}

.r1 { grid-area: r1; }
.r2 { grid-area: r2; }
.r3 { grid-area: r3; }
.r4 { grid-area: r4; }

.reader {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  background: var(--accent);
  border-radius: 10px;
}

.reader p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--muted); }

/* Connector from each reader to the file. */
.reader::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  border-top: 2px solid var(--primary);
}

.r1::after, .r2::after { left: 100%; }
.r3::after, .r4::after { right: 100%; }

.file {
  grid-area: file;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--code-bg);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}

.file figcaption {
  font-size: 12px;
  color: #9fb0c0;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.file pre { margin: 0; overflow-x: auto; }

.file code {
  color: var(--code-fg);
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { font-size: 14px; color: var(--muted); font-weight: 600; }

.foot {
  margin-top: 56px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hub {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "file file"
      "r1 r2"
      "r3 r4";
    gap: 12px;
  }

  .reader::after { display: none; }
}
