:root {
  --bg: #e6edee;
  --surface: #f6f9f9;
  --ink: #16222b;
  --muted: #4d5f69;
  --teal: #1f7f82;
  --teal-dark: #155a5d;
  --line: #16222b;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131c22;
    --surface: #1b2830;
    --ink: #e4eef0;
    --muted: #9fb2ba;
    --teal: #4cc3c3;
    --teal-dark: #7fdada;
    --line: #4cc3c3;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 3px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: 600;
}

.brand img {
  height: 64px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  display: block;
}

.yt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.1s, box-shadow 0.1s;
}

.yt-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.yt-link svg { width: 1.25rem; height: 1.25rem; fill: #d62f2f; }

/* Intro */
.intro { padding: 3.5rem 0 2rem; }

.intro h1 {
  margin: 0 0 0.75rem;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.intro p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Tool list */
.tools {
  list-style: none;
  margin: 0;
  padding: 0 0 4rem;
  display: grid;
  gap: 1.25rem;
}

.tool {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.25rem 1.25rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 5px 5px 0 var(--line);
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

.tool:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--line);
}

.tool h2 {
  margin: 0;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal-dark);
}

.tool p {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
}

.tool .open {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-weight: 700;
  color: var(--teal-dark);
  white-space: nowrap;
}

.tool:hover .open { text-decoration: underline; }

/* Footer */
.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 30rem) {
  .brand span { font-size: 1.1rem; }
  .yt-link span { display: none; }
  .tool { grid-template-columns: 1fr; }
  .tool .open { grid-column: 1; grid-row: auto; margin-top: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool, .yt-link { transition: none; }
}
