:root {
  color-scheme: dark;
  --bg: #100d18;
  --bg-radial: radial-gradient(circle at 18% -8%, rgb(139 92 246 / 0.26), transparent 31%),
    radial-gradient(circle at 90% 0%, rgb(190 166 255 / 0.12), transparent 27%);
  --panel: #171321;
  --panel-2: #211a31;
  --panel-3: #120f1a;
  --line: #33294b;
  --line-strong: #5b4a81;
  --text: #f7f3ff;
  --muted: #bcb2cf;
  --accent: #9b7cff;
  --accent-strong: #c9b8ff;
  --accent-soft: #7c5cff;
  --accent-text: #120828;
  --shadow: 0 10px 26px rgb(6 3 16 / 0.2);
  --shadow-soft: 0 4px 14px rgb(91 70 150 / 0.1);
  --radius: 14px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8ff;
  --bg-radial: radial-gradient(circle at 18% -8%, rgb(155 124 255 / 0.22), transparent 30%),
    radial-gradient(circle at 90% 0%, rgb(215 196 255 / 0.32), transparent 28%);
  --panel: #ffffff;
  --panel-2: #f4f0ff;
  --panel-3: #fbf9ff;
  --line: #e4dcf6;
  --line-strong: #bba9e4;
  --text: #20172f;
  --muted: #6f6382;
  --accent: #6f45d7;
  --accent-strong: #5630b2;
  --accent-soft: #8b5cf6;
  --accent-text: #ffffff;
  --shadow: 0 14px 38px rgb(67 42 120 / 0.11);
  --shadow-soft: 0 8px 20px rgb(108 78 170 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-radial), linear-gradient(180deg, var(--bg), var(--panel-3));
  color: var(--text);
  font-family: "Geist", "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  transition: background 220ms ease, color 220ms ease;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 850;
  line-height: 0.95;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 0;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
  font-weight: 800;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 38px 0 64px;
  position: relative;
  z-index: 1;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.42;
  z-index: -1;
}

.bg-orb-a {
  width: 340px;
  height: 340px;
  right: -90px;
  top: -80px;
  background: color-mix(in srgb, var(--accent-soft) 62%, transparent);
}

.bg-orb-b {
  width: 300px;
  height: 300px;
  left: -90px;
  bottom: 12vh;
  background: color-mix(in srgb, #42d0ff 28%, var(--accent) 48%);
}

.section {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  max-width: 75ch;
  margin-bottom: 1rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.35rem 0.66rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 65%, transparent);
  background: color-mix(in srgb, var(--panel-2) 68%, transparent);
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  font-size: 0.8rem;
  font-weight: 700;
}

.tools {
  padding: 18px;
}

.section-heading {
  margin-bottom: 12px;
}

.tools-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: linear-gradient(
      170deg,
      color-mix(in srgb, var(--panel-2) 42%, transparent),
      transparent 45%
    ),
    color-mix(in srgb, var(--panel) 93%, transparent);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  text-decoration: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 14px 26px rgb(20 10 50 / 0.2);
}

.tool-card p {
  margin-bottom: 1rem;
}

.tool-card p:last-of-type {
  flex: 1;
}

.result-link {
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 78%, transparent);
  border-radius: 10px;
  color: var(--accent-text);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0.58rem 0.8rem;
  text-decoration: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  box-shadow: 0 6px 14px rgb(124 92 255 / 0.16);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 100%;
}

.result-link:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 18px rgb(124 92 255 / 0.22);
}

.tool-replay {
  border-top: 2px solid color-mix(in srgb, #53b8ff 60%, var(--accent));
}

.tool-dps {
  border-top: 2px solid color-mix(in srgb, #7af3cf 58%, var(--accent));
}

.tool-tracker {
  border-top: 2px solid color-mix(in srgb, #ffd26f 52%, var(--accent));
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

button:focus-visible,
.tool-card:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent);
  outline-offset: 3px;
}

.theme-toggle-wrap {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 20;
}

.theme-toggle {
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 78%, var(--panel));
  box-shadow: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  min-height: 34px;
  padding: 3px;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle-option {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
  transition: background 160ms ease, color 160ms ease;
}

.theme-toggle-option.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

@media (max-width: 980px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 0;
  }

  .hero {
    padding: 22px;
  }
}
