:root {
  color-scheme: light dark;
  --ink: light-dark(#1f2328, #f0f6fc);
  --ink2: light-dark(#59636e, #9198a1);
  --muted: light-dark(#6e7681, #7d8590);
  --line: light-dark(#d1d9e0, #3d444d);
  --box: light-dark(#f6f8fa, #151b23);
  --surface: light-dark(#ffffff, #0d1117);
  --accent: light-dark(#2a78d6, #3987e5);
  --accent-soft: light-dark(rgba(42, 120, 214, 0.07), rgba(57, 135, 229, 0.10));
  --shadow-1: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent);
  --shadow-2: 0 8px 24px color-mix(in srgb, var(--ink) 5%, transparent);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 5.5rem) 1.5rem 6rem;

  & > header.hero {
    margin-bottom: 4rem;
    animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;

    & h1 {
      font-size: clamp(2.4rem, 5vw + 1rem, 3.4rem);
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.05;
      margin: 0 0 0.7rem;
    }

    & .tagline {
      font-size: 1.25rem;
      font-weight: 500;
      color: var(--ink2);
      margin: 0 0 1.25rem;
      max-width: 46ch;
    }

    & .lede {
      font-size: 1.05rem;
      color: var(--ink2);
      max-width: 58ch;
    }
  }

  & section {
    margin-bottom: 3.5rem;

    & h2 {
      font-size: 1.4rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      margin: 0 0 1rem;
    }

    & > p { color: var(--ink2); max-width: 66ch; }
  }

  & section ul {
    padding-left: 1.2rem;
    margin: 1rem 0;
    max-width: 66ch;

    & li {
      color: var(--ink2);
      margin-bottom: 0.6rem;
    }
  }

  & section ol {
    padding-left: 1.2rem;
    margin: 1rem 0;
    max-width: 66ch;

    & li { margin-bottom: 1.1rem; }
    & strong { color: var(--ink); }
  }

  & figure {
    margin: 0;
    padding: 1rem;
    background: var(--box);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-1), var(--shadow-2);

    & img { display: block; width: 100%; height: auto; }

    & figcaption {
      margin-top: 0.75rem;
      max-width: 66ch;
      font-size: 0.85rem;
      color: var(--muted);
    }
  }

  & .status-line {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--ink2);
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);

    & .status-dot {
      width: 0.5rem;
      height: 0.5rem;
      margin-top: 0.4rem;
      border-radius: 50%;
      background: var(--accent);
      flex: none;
    }
  }

  & .compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;

    & > div:first-child {
      padding-right: 2.5rem;
      border-right: 1px solid var(--line);
    }

    & p:first-child {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
      margin: 0 0 1rem;
    }

    & > div:last-child p:first-child { color: var(--accent); }

    & ul {
      list-style: none;
      padding: 0;
      margin: 0;
      max-width: none;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    & li {
      position: relative;
      padding-left: 1.15rem;
      margin-bottom: 0;
      font-size: 0.95rem;
    }

    & li::before {
      content: "–";
      position: absolute;
      left: 0;
      color: var(--muted);
    }

    & > div:last-child li::before {
      content: "→";
      color: var(--accent);
    }

    @media (max-width: 640px) {
      grid-template-columns: 1fr;
      gap: 1.75rem;

      & > div:first-child {
        padding-right: 0;
        padding-bottom: 1.75rem;
        border-right: none;
        border-bottom: 1px solid var(--line);
      }
    }
  }

  & .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;

    & a {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.6rem 1.05rem;
      border-radius: 8px;
      border: 1px solid var(--line);
      color: var(--ink);
      text-decoration: none;
      font-size: 0.92rem;
      font-weight: 600;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;

      & svg { transition: transform 0.15s ease; }

      &:hover {
        border-color: var(--accent);
        color: var(--accent);
      }

      &.primary {
        background: var(--ink);
        color: var(--surface);
        border-color: var(--ink);
        box-shadow: var(--shadow-1);

        &:hover {
          background: color-mix(in srgb, var(--ink) 85%, var(--accent));
          color: var(--surface);
          border-color: color-mix(in srgb, var(--ink) 85%, var(--accent));
          transform: translateY(-1px);
          box-shadow: var(--shadow-1), var(--shadow-2);

          & svg { transform: translateX(2px); }
        }

        &:active { transform: translateY(0); }
      }
    }
  }

  & footer {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;

    & a { color: var(--muted); }
    & a:hover { color: var(--accent); }
  }

  & code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    background: var(--box);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.9em;
  }

  & a { color: var(--accent); }
}
