/* Open Source Radar */

:root {
  --paper: #EAF0F5;
  --surface: #F7FAFC;
  --ink: #13263A;
  --ink-soft: #4A5F74;
  --rule: #C9D5E0;
  --teal: #0E7C72;
  --teal-strong: #0A5F57;
  --amber: #C2710C;
  --amber-wash: #FBE9D1;
  --warn: #9F2F1F;
  --warn-wash: #F6DDD8;
  --focus: #1D6FD8;

  --font-display: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-4: clamp(2.2rem, 1.4rem + 3.6vw, 3.9rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1822;
    --surface: #132331;
    --ink: #DCE7F1;
    --ink-soft: #9DB0C2;
    --rule: #27394A;
    --teal: #4FD1C1;
    --teal-strong: #8CE6DA;
    --amber: #F0A94B;
    --amber-wash: #3A2A14;
    --warn: #F29A89;
    --warn-wash: #3B1F1A;
    --focus: #7FB3FF;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0D1822;
  --surface: #132331;
  --ink: #DCE7F1;
  --ink-soft: #9DB0C2;
  --rule: #27394A;
  --teal: #4FD1C1;
  --teal-strong: #8CE6DA;
  --amber: #F0A94B;
  --amber-wash: #3A2A14;
  --warn: #F29A89;
  --warn-wash: #3B1F1A;
  --focus: #7FB3FF;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
}

a { color: var(--teal-strong); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}

.brand-mark { width: 1.9rem; height: 1.9rem; }
.brand-mark circle { fill: none; stroke: var(--teal); stroke-width: 6; }
.brand-mark .dot { fill: var(--amber); stroke: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.2rem;
  font-size: var(--step--1);
}
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.theme-toggle svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }

/* Hero */

.hero { padding-block: clamp(2rem, 6vw, 4.5rem) 1.75rem; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 17ch;
  margin: 0 0 1.1rem;
  font-variation-settings: "opsz" 96;
}

.lede {
  max-width: 62ch;
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* The query line: the page's signature element. It is the GitHub search the current filters express. */
.query {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  max-width: 100%;
}

.query code {
  flex: 1 1 26rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-code);
  font-size: clamp(0.82rem, 0.75rem + 0.35vw, 1rem);
  overflow-wrap: anywhere;
  color: var(--ink);
}

.query code .q-key { color: var(--teal-strong); font-weight: 600; }
.query code .q-new { background: var(--amber-wash); border-radius: 3px; animation: q-flash 900ms ease-out; }

@keyframes q-flash {
  from { background: var(--amber); }
  to { background: var(--amber-wash); }
}

.query a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.85rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  font-size: var(--step--1);
}
.query a:hover { background: var(--teal-strong); color: var(--surface); }

.summary {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.summary strong { color: var(--ink); }

/* Filters */

.filters-shell {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-block: 1px solid var(--rule);
}

.filters {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) repeat(5, minmax(8.5rem, 1fr)) auto;
  gap: 0.6rem 0.75rem;
  align-items: end;
  padding-block: 0.8rem;
}

.field { display: grid; gap: 0.2rem; min-width: 0; }
.field span { font-size: 0.78rem; color: var(--ink-soft); font-weight: 700; }

.field input,
.field select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
}
.field input:hover, .field select:hover { border-color: var(--ink-soft); }

.reset {
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  border: 0;
  background: none;
  color: var(--teal-strong);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 72rem) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-search { grid-column: 1 / -1; }
  .reset { justify-self: start; }
}

@media (max-width: 40rem) {
  .filters-shell { position: static; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Issue list: dense rows, not cards */

.results { padding-block: 0.5rem 3rem; }
.results:focus { outline: none; }

.issue-list { list-style: none; margin: 0; padding: 0; }

.issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.issue-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  font-variation-settings: "opsz" 24;
  overflow-wrap: anywhere;
}
.issue-title:hover { text-decoration: underline; color: var(--teal-strong); }
.issue-title .num { color: var(--ink-soft); font-weight: 500; }

.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin: 0.3rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.issue-meta .repo { font-weight: 700; color: var(--teal-strong); }

.repo-desc {
  margin: 0.25rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 75ch;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.repo-desc:empty { display: none; }

.issue-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  font-size: var(--step--1);
  text-align: right;
}

.level {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.level.beginner { background: var(--amber-wash); color: var(--amber); }
.level.help-wanted { border: 1px solid var(--rule); color: var(--ink-soft); }

.comments { color: var(--ink-soft); }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.badges li a,
.badges li span {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.78rem;
  white-space: nowrap;
}
.badges li a:hover { border-color: var(--ink-soft); color: var(--ink); }
.badges li.ai-restricted a { background: var(--warn-wash); border-color: transparent; color: var(--warn); }

@media (max-width: 40rem) {
  .issue { grid-template-columns: minmax(0, 1fr); }
  .issue-side { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; }
  .badges { justify-content: flex-start; }
}

.empty, .more { padding-block: 2rem; }
.empty p { margin: 0 0 0.5rem; font-size: var(--step-1); }

.more button, .link-button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.more button {
  padding: 0.7rem 1.3rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
.more button:hover { background: var(--ink); color: var(--paper); }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Before you pick */

.before {
  padding-block: 2.5rem 3rem;
  border-top: 2px solid var(--ink);
}
.before h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem 2rem;
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  max-width: 64rem;
}
.steps li { padding-left: 0.3rem; color: var(--ink-soft); }
.steps li::marker { font-family: var(--font-display); font-weight: 800; color: var(--teal); }
.steps strong { display: block; color: var(--ink); }
.strong-link { font-weight: 700; }

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.site-footer p { margin: 0.2rem 0; }

@media (prefers-reduced-motion: reduce) {
  .query code .q-new { animation: none; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; list-style: none; margin: 0.4rem 0 0; padding: 0; }

@media (max-width: 40rem) {
  .query a { flex: 1 1 100%; justify-content: center; }
}
