/* RepoSweep site. Colors come from the app icon (indigo backdrop, folder, broom)
   and the ecosystem palette in App/Views/Styling.swift. */

:root {
  --indigo-1: #5a66ff;
  --indigo-2: #3b40c4;
  --indigo-3: #1f1f63;
  --folder: #ffc23d;
  --broom: #f26b3a;

  --paper: #f4f5fc;
  --surface: #ffffff;
  --ink: #1a1b4b;
  --ink-2: #4d5080;
  --ink-3: #8285ad;
  --line: #dfe1f2;

  --win-bg: #ffffff;
  --win-bar: #f3f3f7;
  --win-line: #e6e6ee;
  --win-ink: #1d1d24;
  --win-ink-2: #6b6b78;
  --win-select: #e9ebff;

  --eco-python: #2a78d6;
  --eco-rust: #eb6834;
  --eco-go: #1baf7a;
  --eco-node: #eda100;
  --eco-apple: #e87ba4;
  --eco-dart: #008300;
  --eco-dotnet: #4a3aa7;
  --eco-cpp: #e34948;

  --st-active: #f08a1c;
  --st-older: #e0b400;
  --st-inactive: #2fa84f;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12132f;
    --surface: #1a1b40;
    --ink: #eceeff;
    --ink-2: #b4b7e0;
    --ink-3: #7f83b8;
    --line: #2c2e62;
    --win-bg: #1e1e24;
    --win-bar: #2a2a31;
    --win-line: #34343d;
    --win-ink: #ececf1;
    --win-ink-2: #9d9daa;
    --win-select: #2c3170;
    --eco-python: #3987e5;
    --eco-rust: #d95926;
    --eco-go: #199e70;
    --eco-node: #c98500;
    --eco-apple: #d55181;
    --eco-dotnet: #9085e9;
    --eco-cpp: #e66767;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12132f;
  --surface: #1a1b40;
  --ink: #eceeff;
  --ink-2: #b4b7e0;
  --ink-3: #7f83b8;
  --line: #2c2e62;
  --win-bg: #1e1e24;
  --win-bar: #2a2a31;
  --win-line: #34343d;
  --win-ink: #ececf1;
  --win-ink-2: #9d9daa;
  --win-select: #2c3170;
  --eco-python: #3987e5;
  --eco-rust: #d95926;
  --eco-go: #199e70;
  --eco-node: #c98500;
  --eco-apple: #d55181;
  --eco-dotnet: #9085e9;
  --eco-cpp: #e66767;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
code,
.path {
  font-family: var(--mono);
  font-size: 0.88em;
}
:focus-visible {
  outline: 3px solid var(--folder);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--folder);
  color: var(--indigo-3);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

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

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1rem/1 var(--sans);
  color: var(--indigo-3);
  background: var(--folder);
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  cursor: default;
  user-select: none;
  box-shadow: inset 0 -2px 0 rgba(31, 31, 99, 0.18);
}
.soon::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--indigo-3);
  animation: blink 2.4s ease-in-out infinite;
}
.soon--small {
  font-size: 0.875rem;
  padding: 9px 16px 9px 13px;
  gap: 8px;
}
.soon--small::before {
  width: 7px;
  height: 7px;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.82;
}
.nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.on-indigo {
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(
    180deg,
    var(--indigo-1) 0%,
    var(--indigo-2) 48%,
    var(--indigo-3) 100%
  );
  padding-bottom: 0;
  overflow: hidden;
}
/* The icon's sparkles, scattered once across the sky. */
.hero .sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero .sparkles svg {
  position: absolute;
  fill: #fff;
  opacity: 0.9;
}

.hero-copy {
  position: relative;
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.hero h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.75rem, 8.4vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 11ch;
  text-wrap: balance;
}
.hero-lede {
  margin: 28px 0 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 36px;
}
.hero-cta .req {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Notify me ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.notify {
  display: flex;
  width: 100%;
  max-width: 30rem;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.notify:focus-within {
  box-shadow: inset 0 0 0 2px var(--folder);
}
.notify input {
  flex: 1;
  min-width: 0;
  padding: 0 12px 0 16px;
  border: 0;
  background: none;
  color: #fff;
  font: 500 1rem/1 var(--sans);
}
.notify input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.notify input:focus {
  outline: none;
}
.notify button {
  flex: none;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--folder);
  color: var(--indigo-3);
  font: 700 1rem/1 var(--sans);
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(31, 31, 99, 0.18);
}
.notify button:hover {
  filter: brightness(1.06);
}
.finale .notify {
  margin: 36px auto 0;
}

/* The demo window sits on the horizon between the indigo hero and the paper page. */
.stage {
  position: relative;
  padding-bottom: clamp(24px, 4vw, 40px);
}
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: var(--paper);
  z-index: 0;
}
.stage .wrap {
  position: relative;
  z-index: 1;
}
.try {
  margin: 18px 4px 0;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Demo window ---------- */

.window {
  background: var(--win-bg);
  color: var(--win-ink);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(20, 20, 60, 0.18),
    0 30px 80px -20px rgba(10, 10, 50, 0.55),
    0 12px 24px -12px rgba(10, 10, 50, 0.35);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 16px;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-line);
}
.lights {
  display: flex;
  gap: 8px;
}
.lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.lights span:nth-child(1) {
  background: #ff5f57;
}
.lights span:nth-child(2) {
  background: #febc2e;
}
.lights span:nth-child(3) {
  background: #28c840;
}
.win-title {
  font-weight: 700;
  font-size: 13px;
}
.win-tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.win-search {
  width: 180px;
  height: 26px;
  border-radius: 7px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: var(--win-ink-2);
  background: var(--win-bg);
  border: 1px solid var(--win-line);
}
.win-btn {
  font: inherit;
  font-weight: 500;
  color: var(--win-ink);
  background: var(--win-bg);
  border: 1px solid var(--win-line);
  border-radius: 7px;
  padding: 4px 11px;
  cursor: pointer;
}
.win-btn:hover {
  background: var(--win-select);
}
.win-btn:disabled {
  opacity: 0.45;
  cursor: default;
  background: var(--win-bg);
}
.win-btn.primary {
  background: #0a84ff;
  border-color: #0a84ff;
  color: #fff;
  font-weight: 600;
}
.win-btn.primary:disabled {
  background: #0a84ff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.table th {
  text-align: left;
  font-weight: 600;
  color: var(--win-ink-2);
  font-size: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--win-line);
}
.table td {
  padding: 9px 10px;
  vertical-align: middle;
}
.table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--win-bar) 55%, transparent);
}
.table tbody tr.is-selected td {
  background: var(--win-select);
}
.table .c-check {
  width: 40px;
  padding-left: 16px;
}
.table .c-eco {
  width: 190px;
}
.table .c-act {
  width: 130px;
}
.table .c-status {
  width: 120px;
}
.table .c-size {
  width: 118px;
  text-align: right;
  padding-right: 18px;
}
.table td.c-size {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.proj-name {
  font-weight: 600;
}
.proj-arts {
  color: var(--win-ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.check {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--win-ink) 30%, transparent);
  background: var(--win-bg);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check:checked {
  background: #0a84ff;
  border-color: #0a84ff;
}
.check:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check:disabled {
  opacity: 0.35;
  cursor: default;
}

.badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.status[data-s="active"] {
  --c: var(--st-active);
}
.status[data-s="older"] {
  --c: var(--st-older);
}
.status[data-s="inactive"] {
  --c: var(--st-inactive);
}

.put-back {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #0a84ff;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.put-back:hover {
  text-decoration: underline;
}
.trashed {
  color: var(--win-ink-2);
}
.trashed .proj-name {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--win-ink) 35%, transparent);
}

.summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 11px 16px;
  background: var(--win-bar);
  border-top: 1px solid var(--win-line);
}
.summary .totals strong {
  font-variant-numeric: tabular-nums;
}
.summary .sub {
  color: var(--win-ink-2);
  font-size: 11.5px;
  margin-top: 2px;
}
.stack {
  display: flex;
  width: 150px;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 1px;
  background: var(--win-line);
}
.stack span {
  background: var(--c);
  transition: flex-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-basis: 0;
}
.summary .spacer {
  flex: 1;
}
.summary .sel {
  color: var(--win-ink-2);
  font-variant-numeric: tabular-nums;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translate(-50%, 12px);
  background: var(--win-ink);
  color: var(--win-bg);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.window-body {
  position: relative;
}

.trashed .proj-arts {
  font-family: inherit;
  font-size: 12px;
}

/* A broom pass across a row as it goes to the Trash. */
.table tr.sweeping td {
  position: relative;
}
.table tr.sweeping td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1400px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--broom) 30%, transparent) 45%,
    transparent 60%
  );
  animation: sweep 0.7s ease-out forwards;
  pointer-events: none;
}
@keyframes sweep {
  from {
    transform: translateX(-60%);
  }
  to {
    transform: translateX(80%);
    opacity: 0;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 0;
  font-weight: 850;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 16ch;
  text-wrap: balance;
}
.section .intro {
  margin: 20px 0 0;
  max-width: 36rem;
  color: var(--ink-2);
  font-size: 1.15rem;
}

/* What it clears */
.eco-list {
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}
.eco-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.eco-row dt {
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.eco-row dt::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  transform: translateY(-1px);
}
.eco-row dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.eco-row .path {
  color: var(--ink-2);
}
.more {
  margin-top: 36px;
}
.more a {
  font-weight: 700;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--indigo-1);
}

/* Safety */
.safety-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.tree {
  margin: 0;
  padding: 26px 28px;
  border-radius: 16px;
  background: var(--indigo-3);
  color: #d9dcff;
  font: 400 0.95rem/1.9 var(--mono);
  overflow-x: auto;
}
.tree .dir {
  color: #fff;
  font-weight: 700;
}
.tree .note {
  color: var(--folder);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.tree .hit {
  background: rgba(255, 194, 61, 0.16);
  border-radius: 4px;
  padding: 1px 4px;
  margin: -1px -4px;
}
.tree-caption {
  margin: 14px 2px 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 30rem;
}

.checks h3,
.promise h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.checks > p {
  margin: 0;
  color: var(--ink-2);
}
.checks ol {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  counter-reset: c;
}
.checks li {
  counter-increment: c;
  position: relative;
  padding: 14px 0 14px 46px;
  border-top: 1px solid var(--line);
}
.checks li::before {
  content: counter(c);
  position: absolute;
  left: 0;
  top: 13px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--indigo-2);
}

.promises {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.promise p {
  margin: 0;
  color: var(--ink-2);
}
.promise .kbd {
  font: 600 0.8em/1 var(--sans);
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
}

/* Activity */
.timeline {
  margin-top: 64px;
}
.tl-bar {
  display: grid;
  grid-template-columns: 7fr 14fr 22fr;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  gap: 3px;
}
.tl-bar span:nth-child(1) {
  background: var(--st-active);
}
.tl-bar span:nth-child(2) {
  background: var(--st-older);
}
.tl-bar span:nth-child(3) {
  background: linear-gradient(
    90deg,
    var(--st-inactive) 70%,
    color-mix(in srgb, var(--st-inactive) 20%, transparent)
  );
}
.tl-ticks {
  position: relative;
  height: 26px;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.tl-ticks span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.tl-ticks span:first-child {
  transform: none;
}
.tl-labels {
  display: grid;
  grid-template-columns: 7fr 14fr 22fr;
  gap: 3px;
  margin-top: 18px;
}
.tl-labels div {
  padding-right: 16px;
}
.tl-labels strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}
.tl-labels p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.activity-notes {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: 60rem;
}
.activity-notes p {
  margin: 0;
  color: var(--ink-2);
}
.activity-notes h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.tag-git {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  color: #c96a00;
  background: rgba(240, 138, 28, 0.15);
}

/* Native */
.native {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.menubar {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -30px rgba(20, 20, 70, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, var(--sans);
  font-size: 14px;
}
.menubar .mb-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 6px 14px;
  font-size: 13px;
  background: color-mix(in srgb, var(--indigo-2) 10%, var(--surface));
  border-bottom: 1px solid var(--line);
}
.menubar .mb-top img {
  width: 16px;
  height: 16px;
}
.menubar ul {
  list-style: none;
  margin: 0;
  padding: 6px;
}
.menubar li {
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.menubar li.sep {
  padding: 0;
  height: 1px;
  background: var(--line);
  margin: 5px 8px;
}
.menubar li.info {
  color: var(--ink-2);
  font-size: 13px;
}
.menubar li kbd {
  font: inherit;
  color: var(--ink-3);
}
.native ul.facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.native ul.facts li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.native ul.facts li strong {
  color: var(--ink);
}

/* Finale */
.finale {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: linear-gradient(
    0deg,
    var(--indigo-1) 0%,
    var(--indigo-2) 50%,
    var(--indigo-3) 100%
  );
  padding: clamp(80px, 12vw, 150px) 0 clamp(64px, 9vw, 110px);
}
.finale img {
  width: clamp(96px, 14vw, 148px);
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 24px 40px rgba(10, 10, 50, 0.45));
}
.finale .big {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  font-size: clamp(6rem, 24vw, 19rem);
}
.finale p {
  margin: 26px auto 0;
  max-width: 30rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a {
  text-underline-offset: 4px;
}

/* ---------- Rules page ---------- */

.page-head {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
}
.page-head h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 14ch;
}
.page-head p {
  margin: 22px 0 0;
  max-width: 38rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
}
.rules-hero {
  background: linear-gradient(
    180deg,
    var(--indigo-1),
    var(--indigo-2) 70%,
    var(--indigo-3)
  );
  color: #fff;
}

.rule-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.rule-nav .wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.rule-nav a {
  flex: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.rule-nav a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.rule-nav a:hover {
  background: var(--surface);
}

.eco-block {
  padding: 56px 0 8px;
  scroll-margin-top: 64px;
}
.eco-block h2 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}
.eco-block h2::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
}
.eco-block .markers {
  margin: 0 0 24px;
  color: var(--ink-2);
}
.rule {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.rule .name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  word-break: break-word;
}
.rule .slow {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--indigo-1) 16%, transparent);
  color: var(--ink-2);
}
.rule p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.rule p b {
  display: block;
  color: var(--ink);
  font-size: 0.85rem;
  margin-bottom: 2px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .table .c-act {
    display: none;
  }
  .eco-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .safety-grid,
  .native {
    grid-template-columns: minmax(0, 1fr);
  }
  .promises {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .rule {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .nav a {
    display: none;
  }
  .win-search,
  .win-tools .win-btn:not(.primary) {
    display: none;
  }
  .table .c-eco,
  .table .c-status {
    display: none;
  }
  .table .c-size {
    width: 92px;
    padding-right: 14px;
  }
  .stack {
    display: none;
  }
  .summary .sel {
    display: none;
  }
  .summary .win-btn.primary {
    width: 100%;
  }
  .tl-labels {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .tl-labels strong::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  .tl-labels div:nth-child(1) strong::before {
    background: var(--st-active);
  }
  .tl-labels div:nth-child(2) strong::before {
    background: var(--st-older);
  }
  .tl-labels div:nth-child(3) strong::before {
    background: var(--st-inactive);
  }
  .activity-notes {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .eco-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .stage::after {
    height: 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.lost-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 12vh;
}
.lost-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 36px 0 0;
}
.lost-links a {
  color: #fff;
  font-weight: 700;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--folder);
}
