@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --line: #22262d;
  --line-strong: #2f353d;
  --text: #e6e8eb;
  --muted: #8b9198;
  --accent: #3ddc84;
  --accent-hover: #63e59d;
  --accent-ink: #0b0d10;
  --pressed: #1a1e24;
  --line-hover: #3b424c;

  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 0.2s;

  color-scheme: dark;
}

/* Light theme: the default (set on <html> in index.html); the top-bar toggle switches to dark.
   The accent is yAudit blue (#0055ff), so
   buttons and links match yAudit and keep at least 4.5:1 contrast on a light ground. */
:root[data-theme="light"] {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --pressed: #f2f4f6;
  --line: #e2e5e9;
  --line-strong: #cdd2d8;
  --line-hover: #b4bbc3;
  --text: #111418;
  --muted: #5b626b;
  --accent: #0055ff;
  --accent-hover: #0044cc;
  --accent-ink: #ffffff;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--line-strong) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent);
}

h1, h2, h3, p, ol, ul {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.sprite {
  position: absolute;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus-visible {
  top: 12px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-inline: auto;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  font: 500 0.9375rem/1 var(--mono);
  text-decoration: none;
}

.brand span {
  color: var(--muted);
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font-size: 0.9375rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--text);
}

/* Hero */

.hero {
  padding-block: clamp(72px, 13vh, 136px) clamp(56px, 9vh, 96px);
}

.hero h1 {
  font-size: clamp(3rem, 1.6rem + 5.6vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

/* Pixel-art bust standing on the name's baseline. The box clips at the baseline, so the
   figure can duck behind the line. It faces right; main.js flips it to face the pointer,
   and a click makes it hide for a few seconds before popping back up. */
.avatar-box {
  display: inline-block;
  margin-left: 0.18em;
  overflow: hidden;
  vertical-align: baseline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.avatar {
  display: block;
  width: auto;
  height: 1.1em;
  image-rendering: pixelated;
  transition:
    scale 0.3s var(--ease),
    translate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar.is-facing-left {
  scale: -1 1;
}

.avatar-box.is-hiding .avatar {
  translate: 0 105%;
  transition:
    scale 0.3s var(--ease),
    translate 1.2s cubic-bezier(0.55, 0, 0.75, 0.4);
}

.role {
  margin-top: 20px;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}


.lede {
  max-width: 58ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.lede a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn:hover {
  border-color: var(--line-hover);
  background: var(--surface);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.btn .arrow {
  transition: transform 0.35s var(--ease);
}

.btn:hover .arrow,
.btn:focus-visible .arrow {
  transform: translate(2px, -2px);
}

/* Sections */

.section {
  padding-block: clamp(72px, 12vh, 128px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 65ch;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-head p {
  color: var(--muted);
  text-wrap: pretty;
}

/* Audits */

/* Keeps each row's report link close to the text it belongs to. */
.audit-years {
  max-width: 920px;
}

.year + .year {
  margin-top: 56px;
}

.year-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
  padding: 0 24px 14px;
  border-bottom: 1px solid var(--line);
}

.year-head h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.year-head .count {
  color: var(--muted);
  font: 0.875rem/1 var(--mono);
}

.audit {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 4px 32px;
  align-items: baseline;
  padding: 18px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition:
    opacity 0.3s var(--ease),
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.audit-proto {
  font-weight: 600;
  transition: color var(--fast) var(--ease);
}

.audit-scope {
  font-weight: 500;
}

.audit-desc {
  color: var(--muted);
}

.audit-more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 6px;
  font-size: 0.875rem;
}

.audit-more a {
  position: relative;
  z-index: 1;
  color: var(--accent);
  text-decoration: none;
}

.audit-more a:hover {
  text-decoration: underline;
}

.audit-report,
.audit-private {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.audit-report {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

/* The whole row opens the report. */
.audit-report::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.audit-report:focus-visible {
  outline: none;
}

.audit:has(.audit-report:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.audit-report .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.35s var(--ease);
}

.audit-private {
  color: var(--muted);
}

.audit-private .icon {
  width: 15px;
  height: 15px;
}

.audit:has(.audit-report):hover,
.audit:has(.audit-report:focus-visible) {
  border-color: var(--line);
  background: var(--surface);
}

.audit:has(.audit-report):hover .audit-proto,
.audit:has(.audit-report:focus-visible) .audit-proto {
  color: var(--accent);
}

.audit:hover .audit-report .icon,
.audit-report:focus-visible .icon {
  transform: translate(2px, -2px);
}

.audit:has(.audit-report):active {
  background: var(--pressed);
}

/* Signature: the active row stays lit while the rest of its year dims. */
@media (hover: hover) {
  .audit-list:has(.audit:has(.audit-report):hover) .audit:not(:hover) {
    opacity: 0.5;
  }
}

.audit-list:has(.audit-report:focus-visible) .audit:not(:has(.audit-report:focus-visible)) {
  opacity: 0.5;
}

/* Tools */

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--fast) var(--ease);
}

.tool h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.tool h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.35s var(--ease);
}

.tool h3 a {
  text-decoration: none;
}

.tool h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.tool h3 a:focus-visible {
  outline: none;
}

.tool:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tool > p:not(.tool-meta) {
  max-width: 60ch;
  color: var(--muted);
}

.tool.is-live:hover {
  border-color: var(--line-strong);
}

.tool.is-live:active {
  background: var(--pressed);
}

.tool.is-live:hover h3 .icon {
  transform: translate(2px, -2px);
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.status,
.tag {
  font: 500 0.8125rem/1 var(--sans);
}

.status {
  margin-right: 6px;
  color: var(--muted);
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.status-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tag {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
}

/* Contact */

.contact-links {
  max-width: 760px;
  border-top: 1px solid var(--line);
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease);
}

.contact-links .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition:
    color var(--fast) var(--ease),
    transform 0.35s var(--ease);
}

.contact-links .label {
  font-weight: 600;
}

.contact-links .handle {
  margin-left: auto;
  color: var(--muted);
  font: 0.9375rem/1 var(--mono);
  transition: color var(--fast) var(--ease);
}

.contact-links .arrow {
  width: 18px;
  height: 18px;
}

.contact-links a:hover .handle {
  color: var(--text);
}

.contact-links a:hover .icon {
  color: var(--text);
}

.contact-links a:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 32px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* Small screens */

@media (max-width: 720px) {
  .audit {
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 16px;
  }

  .audit-body {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .year-head {
    padding-inline: 16px;
  }

  .tool {
    padding: 22px;
  }

  .contact-links a {
    padding-inline: 4px;
  }
}

/* Phones: the secondary buttons share one row, the primary takes the full row below. */
@media (max-width: 480px) {
  .btn {
    flex: 1 1 auto;
    justify-content: center;
    padding-inline: 14px;
  }

  .btn-primary {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
