/* ==========================================================================
   Wave Uninstaller — website
   Monochrome, same system as the sibling projects: white, black, grey.
   Colour is reserved for state, so green always means "done" and amber
   always means "be careful with this".
   ========================================================================== */

:root {
  color-scheme: light;

  --g-0: #ffffff;
  --g-25: #fbfbfc;
  --g-50: #f6f6f7;
  --g-100: #ededef;
  --g-200: #e0e0e3;
  --g-300: #c9c9ce;
  --g-400: #a3a3aa;
  --g-500: #7c7c85;
  --g-600: #5a5a63;
  --g-700: #3d3d45;
  --g-800: #26262c;
  --g-900: #161619;
  --g-950: #0b0b0d;

  --surface: var(--g-0);
  --surface-sunken: var(--g-50);
  --surface-raised: var(--g-0);
  --surface-inset: var(--g-100);
  --border: var(--g-200);
  --border-strong: var(--g-300);

  --text: var(--g-900);
  --text-muted: var(--g-600);
  --text-subtle: var(--g-500);

  --accent: var(--g-900);
  --accent-text: var(--g-0);

  --ok: #1f7a45;
  --warn: #9a6b06;
  --risk: #b3261e;
  --ok-bg: #e9f4ee;
  --warn-bg: #fdf3e0;
  --risk-bg: #fceceb;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 6%);
  --shadow: 0 2px 8px rgb(0 0 0 / 7%), 0 1px 2px rgb(0 0 0 / 4%);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 12%);

  --font:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --page: 1120px;
  --measure: 68ch;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: var(--g-950);
  --surface-sunken: #000000;
  --surface-raised: var(--g-900);
  --surface-inset: var(--g-800);
  --border: #26262c;
  --border-strong: #3a3a42;
  --text: #f4f4f6;
  --text-muted: var(--g-400);
  --text-subtle: var(--g-500);
  --accent: #f4f4f6;
  --accent-text: var(--g-950);
  --ok: #6ddc9b;
  --warn: #eabd63;
  --risk: #ff8a80;
  --ok-bg: #10261b;
  --warn-bg: #2a2110;
  --risk-bg: #2c1512;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow: 0 2px 10px rgb(0 0 0 / 45%);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 55%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: var(--g-950);
    --surface-sunken: #000000;
    --surface-raised: var(--g-900);
    --surface-inset: var(--g-800);
    --border: #26262c;
    --border-strong: #3a3a42;
    --text: #f4f4f6;
    --text-muted: var(--g-400);
    --text-subtle: var(--g-500);
    --accent: #f4f4f6;
    --accent-text: var(--g-950);
    --ok: #6ddc9b;
    --warn: #eabd63;
    --risk: #ff8a80;
    --ok-bg: #10261b;
    --warn-bg: #2a2110;
    --risk-bg: #2c1512;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 2px 10px rgb(0 0 0 / 45%);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / 55%);
  }
}

/* ------------------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--surface-inset);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
}

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--text-subtle);
}

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

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

.btn--ghost {
  background: transparent;
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--surface-inset);
  border-color: transparent;
}

.btn--icon {
  padding: 0.5rem;
  min-width: 2.35rem;
}

.btn--sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
}

/* ----------------------------------------------------------------- header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
}

.brand__mark svg {
  width: 100%;
  height: 100%;
}

.brand__name span {
  color: var(--text-subtle);
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.94rem;
}

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

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

.head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.5rem 1.5rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .site-nav a {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .head-actions {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 2.5rem;
}

/* Limit the line length of the hero's contents, not the wrap itself: shrinking
   the wrap re-centres it and the hero stops lining up with every section
   below it. */
.hero__inner > * {
  max-width: var(--measure);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.35rem);
}

.lead {
  margin: 1.15rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.9rem 0 1rem;
}

.hero-note {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------- pill */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.3rem;
  padding: 0.28rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

/* --------------------------------------------------------------- sections */

section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section--sunken {
  background: var(--surface-sunken);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}

.section-head p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ screenshots */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.shot figcaption {
  margin-top: 0.85rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------ cards */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.card__icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.9rem;
  color: var(--text-subtle);
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin: 0.6rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ------------------------------------------------------------------- tags */

.tag {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.tag--ok {
  background: var(--ok-bg);
  border-color: transparent;
  color: var(--ok);
}

.tag--next {
  background: var(--surface-inset);
  border-color: transparent;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ notes */

.note {
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-subtle);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 0.94rem;
}

.note--warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
  color: var(--text);
}

.note strong {
  color: var(--text);
}

.note :first-child {
  margin-top: 0;
}

.note :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ split */

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.split h3 {
  font-size: 1.1rem;
}

.split p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------- roadmap */
/* Child combinators throughout: a phase's detail row carries its own <li>
   bullets, and a descendant selector turns each of those into a grid row. */

.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-raised);
}

.roadmap > li {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.4rem 1rem;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--border);
}

.roadmap > li:last-child {
  border-bottom: 0;
}

.roadmap > li[data-done] {
  background: var(--surface-sunken);
}

.roadmap__phase {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.roadmap > li[data-done] .roadmap__phase {
  color: var(--ok);
}

.roadmap__body h3 {
  font-size: 1rem;
}

.roadmap__body p {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.roadmap .tag {
  margin: 0;
}

@media (max-width: 620px) {
  .roadmap > li {
    grid-template-columns: auto 1fr;
  }

  .roadmap__phase {
    grid-area: 1 / 1;
  }

  .roadmap .tag {
    grid-area: 1 / 2;
    justify-self: end;
  }

  .roadmap__body {
    grid-area: 2 / 1 / 3 / -1;
  }
}

/* ------------------------------------------------------------------ prose */

/* Limit the children, not the wrap: shrinking a .wrap re-centres it, and the
   text stops lining up with every other section. Same reason as .hero__inner. */
.prose > * {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.3rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose p {
  margin: 0.9rem 0 0;
}

.prose ul {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
}

.prose li {
  margin-top: 0.35rem;
}

/* ----------------------------------------------------------------- tables */

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
  padding-block: 2.75rem 2rem;
}

/* minmax(0, 1fr) rather than auto-fit: an auto-fit track keeps its content's
   min width, which pushed the whole footer wider than a phone screen. */
.foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}

.foot-brand p {
  margin: 0.8rem 0 0;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.foot-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.foot-col ul {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.foot-col li {
  margin-top: 0.45rem;
}

.foot-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--text);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.85rem;
}

.foot-bottom p {
  margin: 0;
}

/* -------------------------------------------------------------- not found */

.nf-wrap {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 2rem 1.5rem;
  text-align: center;
}

.nf-inner {
  max-width: 44ch;
}

.nf-inner svg {
  width: 4.5rem;
  height: 4.5rem;
  color: var(--text-subtle);
}

.nf-code {
  margin: 1rem 0 0.4rem;
  font-family: var(--mono);
  color: var(--text-subtle);
}

.nf-inner p {
  color: var(--text-muted);
}

.nf-inner .btn {
  margin-top: 1.5rem;
}

/* A note directly after the two-column block needs breathing room; the CSP
   forbids inline styles, so the spacing lives here. */
.split + .note {
  margin-top: 2rem;
}

.section-cta {
  margin: 1.75rem 0 0;
}

/* The roadmap page pairs each phase with a detail row underneath it. */
.roadmap__detail {
  padding-top: 0;
  border-bottom: 1px solid var(--border);
}

.roadmap__detail ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.roadmap__detail ul li {
  margin-top: 0.3rem;
}

@media (max-width: 620px) {
  .roadmap__detail .roadmap__phase {
    display: none;
  }
}

/* ------------------------------------------------------------- downloads */

.btn--block {
  display: flex;
  width: 100%;
  margin-top: 1.1rem;
}

/* Pushes the button to the bottom of a card so buttons line up across a row
   even when the descriptions differ in length. */
.card .btn--block {
  margin-top: auto;
}

.build-meta {
  margin-top: 0.9rem !important;
  color: var(--text-subtle) !important;
  font-size: 0.82rem !important;
}

.code {
  margin-top: 0.9rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-inset);
  overflow-x: auto;
}

.code pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}

.code code {
  background: none;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}
