/* SEO/GEO Dashboard — design system v2 (lime/dark, Geist) */
/* Task 1: tokens, reset, base typography, grain, focus, utilities */

/* ==========================================================================
   FONTS
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* Surfaces — warm-neutral near-black, single gray family */
  --bg:           #0a0b09;
  --bg-tint:      #0f100d;
  --surface:      #141512;
  --surface-2:    #1a1b17;
  --surface-3:    #202117;
  --border:       #26271f;
  --border-strong:#34362a;

  /* Text — warm off-white, never pure #fff */
  --text:         #eaece6;
  --text-soft:    #c3c5bc;
  --text-muted:   #8d8f84;
  --text-dim:     #7d7f73;

  /* Brand accent — acid lime, ONE accent only */
  --accent:       #c4e538;
  --accent-strong:#b2d125;
  --accent-ink:   #14160a;
  --accent-soft:  rgba(196, 229, 56, 0.14);
  --accent-line:  rgba(196, 229, 56, 0.45);

  /* Data semantics — reserved for metric direction only, NOT decoration */
  --up:           #38b0c2;
  --up-soft:      rgba(56, 176, 194, 0.14);
  --down:         #e5675f;
  --down-soft:    rgba(229, 103, 95, 0.14);
  --flat:         #8d8f84;
  --caution:      #d8a534;
  --caution-soft: rgba(216, 165, 52, 0.14);

  /* Typography */
  --font-ui:      "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", monospace;

  /* Shape */
  --r-card:       12px;
  --r-control:    8px;
  --r-xs:         4px;
  --r-pill:       999px;

  /* Depth */
  --shadow:       0 1px 0 rgba(255, 255, 255, 0.02) inset,
                  0 12px 40px rgba(8, 9, 5, 0.5);
  --shadow-sm:    0 1px 0 rgba(255, 255, 255, 0.02) inset,
                  0 4px 16px rgba(8, 9, 5, 0.4);
  --ring:         0 0 0 2px var(--bg), 0 0 0 4px var(--accent-line);

  /* Motion */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --dur:          200ms;
  --dur-fast:     180ms;

  /* Z-index scale */
  --z-base:       0;
  --z-nav:        50;
  --z-overlay:    80;
  --z-grain:      100;
}

/* ==========================================================================
   MODERN RESET
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

ol, ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TYPOGRAPHY SCALE
   ========================================================================== */

.display,
h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--text);
}

h2 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--text);
}

h3 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

p {
  line-height: 1.55;
  max-width: 68ch;
  text-wrap: pretty;
  color: var(--text-soft);
}

/* Eyebrow / label — used sparingly */
.label,
label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Monospace helper — for metrics, positions, dates, counts */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   LINKS
   ========================================================================== */

a:not([class]) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
  transition:
    color var(--dur-fast) var(--ease),
    text-decoration-color var(--dur-fast) var(--ease);
}

a:not([class]):hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.5em 1.1em;
  border-radius: var(--r-control);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
  user-select: none;
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

/* Primary — lime fill with dark ink */
.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

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

.btn-primary:active {
  background-color: var(--accent-strong);
}

/* Secondary — bordered */
.btn-secondary {
  background-color: transparent;
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.btn-secondary:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

/* Ghost */
.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--surface-2);
  color: var(--text-soft);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   INPUTS
   ========================================================================== */

.input,
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.5em 0.75em;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover,
.input:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-2);
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.input:focus {
  border-color: var(--accent-line);
  background-color: var(--surface);
  box-shadow: var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

/* Form field wrapper */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.field-error {
  font-size: 0.8rem;
  color: var(--down);
  margin-top: 0.2em;
}

/* ==========================================================================
   FOCUS VISIBLE (global ring)
   ========================================================================== */

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-control);
}

/* ==========================================================================
   SELECTION
   ========================================================================== */

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

/* ==========================================================================
   GRAIN OVERLAY
   ========================================================================== */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: url("/static/noise.svg");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.032;
  mix-blend-mode: overlay;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Layout container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* Hairline divider */
.hairline {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 0;
}

/* Visually hidden (accessible) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: calc(var(--z-grain) + 10);
  padding: 0.5em 1em;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--r-control);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   CHIP
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.55em;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.6;
}

/* ==========================================================================
   BADGE — semantic state component
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.18em 0.6em;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.6;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Up — teal (improvement) */
.badge--up {
  background-color: var(--up-soft);
  border-color: rgba(56, 176, 194, 0.3);
  color: var(--up);
}

/* Down — red (regression) */
.badge--down {
  background-color: var(--down-soft);
  border-color: rgba(229, 103, 95, 0.3);
  color: var(--down);
}

/* Flat — muted (no change) */
.badge--flat {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}

/* New — lime (brand accent, first appearance) */
.badge--new {
  background-color: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* Lost — red (gone from rankings) */
.badge--lost {
  background-color: var(--down-soft);
  border-color: rgba(229, 103, 95, 0.3);
  color: var(--down);
}

/* Too early — amber (window not elapsed) */
.badge--too_early {
  background-color: var(--caution-soft);
  border-color: rgba(216, 165, 52, 0.3);
  color: var(--caution);
}

/* No data — dim (no impressions) */
.badge--no_data {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}

/* Low confidence — amber */
.badge--low_confidence {
  background-color: var(--caution-soft);
  border-color: rgba(216, 165, 52, 0.3);
  color: var(--caution);
}

/* Mixed — muted */
.badge--mixed {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}

/* Neutral — muted, no semantic colour (Long tail, No rank, etc.) */
.badge--neutral {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}

/* ==========================================================================
   DATE-RANGE BUTTONS -- .btn-range
   ========================================================================== */

.btn-range {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2em 0.7em;
  border-radius: var(--r-control);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.6;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-range:hover {
  background: var(--surface-3, var(--surface-2));
  color: var(--text-base);
  border-color: var(--border-hover, var(--border));
}

.btn-range[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.btn-range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-range { transition: none; }
}

/* ==========================================================================
   DELTA — signed metric indicator
   ========================================================================== */

.delta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 500;
}

.delta--up {
  color: var(--up);
}

.delta--down {
  color: var(--down);
}

.delta--flat {
  color: var(--flat);
}

/* ==========================================================================
   CARD
   ========================================================================== */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.card:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

/* ==========================================================================
   SCORECARD — metric display card
   ========================================================================== */

.scorecard {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scorecard__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scorecard__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.4rem, 2.5vw, 1.875rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.scorecard__meta {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 4-column grid, responsive */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

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

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

/* ==========================================================================
   DATA TABLE — dense tabular data
   ========================================================================== */

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background-color: var(--surface);
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table thead th {
  padding: 0.6rem 0.9rem;
  background-color: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table thead th:first-child {
  border-radius: var(--r-card) 0 0 0;
}

.data-table thead th:last-child {
  border-radius: 0 var(--r-card) 0 0;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-fast) var(--ease);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--surface-3);
}

.data-table tbody td {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  vertical-align: middle;
}

/* Numbers in tables always mono + tabular */
.data-table .num,
.data-table .pos,
.data-table [data-type="num"],
.data-table [data-type="pos"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* State tint: faint left-border color per row state */
.data-table tbody tr[data-state="up"]              { border-left: 2px solid rgba(56, 176, 194, 0.45); }
.data-table tbody tr[data-state="down"]            { border-left: 2px solid rgba(229, 103, 95, 0.45); }
.data-table tbody tr[data-state="new"]             { border-left: 2px solid rgba(196, 229, 56, 0.45); }
.data-table tbody tr[data-state="lost"]            { border-left: 2px solid rgba(229, 103, 95, 0.45); }
.data-table tbody tr[data-state="too_early"]       { border-left: 2px solid rgba(216, 165, 52, 0.35); }
.data-table tbody tr[data-state="low_confidence"]  { border-left: 2px solid rgba(216, 165, 52, 0.35); }
.data-table tbody tr[data-state="flat"],
.data-table tbody tr[data-state="no_data"],
.data-table tbody tr[data-state="mixed"]           { border-left: 2px solid transparent; }

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background-color: var(--bg-tint);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 60px;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav__brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.7em;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-control);
  transition:
    color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--text);
  background-color: var(--surface-2);
}

.nav__link.active {
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.nav__link.active::after {
  content: "";
  position: absolute;
  bottom: -0.35em;
  left: 0.7em;
  right: 0.7em;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--r-pill);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.nav__email {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Responsive nav — keep links reachable on phones */
@media (max-width: 720px) {
  .nav__links {
    flex-wrap: wrap;
    gap: 0.1rem;
  }

  .nav__link {
    padding: 0.25em 0.45em;
    font-size: 0.78rem;
  }

  .nav__brand-name {
    display: none;
  }
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */

main#content {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  padding-block: 2rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  background-color: var(--bg-tint);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.site-footer__inner a {
  color: var(--text-dim);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease);
}

.site-footer__inner a:hover {
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.page-header {
  margin-bottom: 2rem;
}

.page-header__title {
  font-size: clamp(1.4rem, 2.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  text-wrap: balance;
}

.page-header__meta {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CALLOUT / DISCLAIMER
   ========================================================================== */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background-color: var(--surface-2);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.callout--caution {
  border-left-color: var(--caution);
  background-color: var(--caution-soft);
  color: var(--caution);
}

.callout--up {
  border-left-color: var(--up);
  background-color: var(--up-soft);
}

.callout--down {
  border-left-color: var(--down);
  background-color: var(--down-soft);
}

.callout__icon {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 3rem 2rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
  color: var(--text-muted);
}

.empty-state__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-soft);
}

.empty-state__body {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 44ch;
}

/* ==========================================================================
   TRACKER LIST ROWS
   ========================================================================== */

.tracker-list {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background-color: var(--surface);
}

.tracker-row {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    background-color var(--dur-fast) var(--ease);
}

.tracker-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: background-color var(--dur-fast) var(--ease);
}

.tracker-row:hover {
  background-color: var(--surface-2);
}

.tracker-row:hover::before {
  background-color: var(--accent);
}

.tracker-row__top {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.tracker-row__title {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-row__time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tracker-row__url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.tracker-row__chips {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* Tracker summary strip: portfolio KPIs, chips double as status filters */
.tracker-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.tracker-summary__chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28em 0.85em;
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.tracker-summary__chip strong {
  color: var(--text);
  font-weight: 600;
  margin-left: 0.2em;
}

.tracker-summary__chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tracker-summary__chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.tracker-summary__chip.is-active strong { color: var(--accent); }
.tracker-summary__chip.chip-up { color: var(--up); }
.tracker-summary__chip.chip-down { color: var(--down); }

.tracker-summary__kpi {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 0.35rem;
}

.tracker-summary__kpi strong.is-up { color: var(--up); }
.tracker-summary__kpi strong.is-down { color: var(--down); }

/* Tracker filter bar */
.tracker-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tracker-filters__search {
  flex: 1;
  min-width: 180px;
  max-width: 340px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.4em 0.75em;
}

.tracker-filters__search:focus {
  outline: none;
  border-color: var(--accent);
}

.tracker-filters select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.4em 0.6em;
}

/* Per-row click delta */
.tracker-row__delta {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.tracker-row__delta.is-up { color: var(--up); }
.tracker-row__delta.is-down { color: var(--down); }

/* Metric toggle (clicks/impressions) on row charts */
.uchart__toggle {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.uchart__toggle button {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.uchart__toggle button:hover { color: var(--text); }

.uchart__toggle button.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Global metric switch above the tracker list: flips every row chart at once */
.chart-metric-global {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin: 0.75rem 0 0.25rem;
}

.chart-metric-global__label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-right: 0.25rem;
}

.chart-metric-global button {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.chart-metric-global button:hover { color: var(--text); }

.chart-metric-global button.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Tracker list item: clickable row + interactive daily-clicks chart below it */
.tracker-item {
  border-bottom: 1px solid var(--border);
}

.tracker-item:last-child {
  border-bottom: none;
}

/* Full-width daily-clicks chart under each tracker row (uPlot-enhanced) */
.tracker-row__clicks {
  padding: 0 1.25rem 1rem;
}

.tracker-row__clicks .uchart__svg svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   POSITION BAR — inline horizontal bar for keyword position visual
   ========================================================================== */

.pos-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.pos-bar {
  position: relative;
  width: 48px;
  height: 4px;
  background-color: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  flex-shrink: 0;
}

.pos-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: var(--r-pill);
  background-color: var(--up);
}

/* ==========================================================================
   CHANGE LOG SPECIFIC
   ========================================================================== */

.changes-list {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background-color: var(--surface);
}

.change-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.change-row:last-child {
  border-bottom: none;
}

.change-row:hover {
  background-color: var(--surface-2);
}

.change-row__body {
  flex: 1;
  min-width: 0;
}

.change-row__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.change-row__url {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.change-row__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.change-row__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-style: italic;
}

.change-row__time {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Source badge modifier */
.badge--source-skill {
  background-color: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.badge--source-manual {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}

/* ==========================================================================
   FORM LAYOUT (change log + login)
   ========================================================================== */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.required-mark {
  color: var(--down);
  margin-left: 0.15em;
  font-size: 0.8em;
  font-weight: 600;
}

/* Inline form message (success/error) */
.form-message {
  padding: 0.6em 0.9em;
  border-radius: var(--r-control);
  font-size: 0.85rem;
  display: none;
}

.form-message.is-visible {
  display: block;
}

.form-message--error {
  background-color: var(--down-soft);
  border: 1px solid rgba(229, 103, 95, 0.3);
  color: var(--down);
}

.form-message--success {
  background-color: var(--up-soft);
  border: 1px solid rgba(56, 176, 194, 0.3);
  color: var(--up);
}

/* ==========================================================================
   LOGIN CARD
   ========================================================================== */

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.5rem;
  background-color: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.login-card__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.login-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.login-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.login-card__heading {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.login-card__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   DETAIL HEADER (tracker/tracker id)
   ========================================================================== */

.detail-header {
  margin-bottom: 1.75rem;
}

.detail-header__title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.detail-header__url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  display: block;
  margin-bottom: 0.5rem;
}

.detail-header__url:hover {
  color: var(--text-muted);
}

.detail-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ==========================================================================
   SECTION HEADER — typography + spacing, no per-section color
   ========================================================================== */

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-header__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

.section-header__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   AUDIT TOOL — main page (index.html) components (Task 8 retokenize)
   All per-section colors replaced with neutral surfaces + single --accent.
   Severities: good → --up (teal), mid → --caution (amber), bad → --down (red).
   ========================================================================== */

/* Utility: hidden (JS toggles this) */
.hidden { display: none !important; }

/* Muted text (used inline in audit rows, competitor section, etc.) */
.muted { color: var(--text-muted) !important; }

/* --- Hero section --- */
.hero {
  padding-block: 2rem 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin-bottom: 0.6rem;
}

.lede {
  color: var(--text-soft);
  margin-bottom: 1.5rem;
  max-width: 62ch;
  font-size: 1rem;
}

/* --- Analyze form --- */
.analyze-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.875rem;
  max-width: 960px;
}

/* Override global label block display so each label is a flex column */
.analyze-form > label {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  text-transform: none;
  letter-spacing: normal;
  color: inherit;
  font-size: inherit;
}

/* Label text as eyebrow */
.analyze-form > label > span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

/* Prevent text-transform inheriting into input values */
.analyze-form input,
.analyze-form select {
  text-transform: none;
}

/* URL field: widest */
.analyze-form > label:nth-child(1) { flex: 2 1 220px; min-width: 180px; }
/* Country: narrow */
.analyze-form > label:nth-child(2) { flex: 0 1 110px; min-width: 90px; }
/* Model: medium */
.analyze-form > label:nth-child(3) { flex: 1 1 160px; min-width: 140px; }

/* Submit button — lime primary */
#submit-btn {
  flex-shrink: 0;
  align-self: flex-end;
  padding: 0 1.35em;
  height: 38px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Opt toggle checkbox label */
.opt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  margin-bottom: 0;
}

.opt-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0;
  display: inline;
}

/* --- Status pills (API health) --- */
.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2em 0.6em;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--surface-2);
  color: var(--text-dim);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-dim);
  flex-shrink: 0;
  display: inline-block;
}

.status-pill.on { color: var(--text-soft); border-color: var(--border-strong); }
.status-pill.on .dot { background-color: var(--up); }
.status-pill.off .dot { background-color: var(--down); }

/* --- Status / progress box (#status) --- */
#status {
  padding: 0.75em 1em;
  border-radius: var(--r-control);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

#status.info {
  background-color: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}

#status.error {
  background-color: var(--down-soft);
  border: 1px solid rgba(229, 103, 95, 0.3);
  color: var(--down);
}

/* --- Result banner (URL + timing after analysis) --- */
.result-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.875rem 1.125rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.result-banner .url {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-banner .timing {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.result-banner .timing span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}

.result-banner .timing b {
  color: var(--text-soft);
  font-weight: 500;
}

/* --- Audit sections (uniform neutral surface, no per-section color) --- */
.section {
  margin-bottom: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.section-text {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.section-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0.2em 0 0;
  max-width: 72ch;
}

.section-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.section-body {
  padding: 1.125rem;
}

/* --- Score grid --- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.625rem;
}

.score-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  transition:
    border-color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.score-tile.big {
  grid-column: span 2;
  background-color: var(--surface-3);
  border-color: var(--border-strong);
}

/* .label override for score tile labels */
.score-tile .label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
}

.value-row {
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  line-height: 1;
}

.score-tile .value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color var(--dur-fast) var(--ease);
}

.score-tile.big .value {
  font-size: 2.5rem;
}

.score-tile .out {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 0.1em;
}

/* Severity coloring — JS adds good/mid/bad to tile element */
.score-tile.good .value      { color: var(--up); }
.score-tile.mid  .value      { color: var(--caution); }
.score-tile.bad  .value      { color: var(--down); }
.score-tile.good             { border-color: rgba(56,  176, 194, 0.25); }
.score-tile.mid              { border-color: rgba(216, 165,  52, 0.25); }
.score-tile.bad              { border-color: rgba(229, 103,  95, 0.25); }

.score-bar {
  height: 3px;
  background-color: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 0.2rem;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background-color: var(--text-dim);
  will-change: width;
  transition: width var(--dur) var(--ease), background-color var(--dur-fast) var(--ease);
}

.score-tile.good .score-bar-fill { background-color: var(--up); }
.score-tile.mid  .score-bar-fill { background-color: var(--caution); }
.score-tile.bad  .score-bar-fill { background-color: var(--down); }

/* --- Audit key-value rows --- */
.audit-grid {
  display: flex;
  flex-direction: column;
}

.audit-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.845rem;
}

.audit-row:last-child { border-bottom: none; }

.audit-row .k {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 150px;
  max-width: 150px;
  flex-shrink: 0;
}

.audit-row .v {
  color: var(--text-soft);
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.audit-row code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 0.05em 0.35em;
  color: var(--text-soft);
}

/* --- CWV --- */
.cwv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.625rem;
}

.cwv-tile {
  padding: 0.75rem 0.875rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cwv-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
}

.cwv-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* CWV severity — JS sets good/mid/bad on the cwv-val span */
.cwv-val.good { color: var(--up); }
.cwv-val.mid  { color: var(--caution); }
.cwv-val.bad  { color: var(--down); }

/* --- AI Crawlers --- */
.crawlers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.875rem;
}

.crawler-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.7em;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--surface-2);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) var(--ease);
}

.crawler-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background-color: var(--text-dim);
}

.crawler-chip .name  { font-weight: 600; }
.crawler-chip .state { font-size: 0.7rem; opacity: 0.75; }

.crawler-chip.allowed {
  border-color: rgba(56, 176, 194, 0.3);
  background-color: var(--up-soft);
  color: var(--up);
}
.crawler-chip.allowed .dot { background-color: var(--up); }

.crawler-chip.blocked {
  border-color: rgba(229, 103, 95, 0.3);
  background-color: var(--down-soft);
  color: var(--down);
}
.crawler-chip.blocked .dot { background-color: var(--down); }

/* llms.txt row */
.llms-row { margin-top: 0.25rem; }

.llms-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.8em;
  border-radius: var(--r-control);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background-color: var(--surface-2);
  flex-wrap: wrap;
  gap: 0.3em;
}

.llms-pill.ok {
  border-color: rgba(56, 176, 194, 0.3);
  background-color: var(--up-soft);
  color: var(--up);
}

.llms-pill code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 0.05em 0.3em;
  border-radius: var(--r-xs);
}

/* badge-bad — used inline for "N blocked" in crawl count */
.badge-bad {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.5em;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 500;
  background-color: var(--down-soft);
  border: 1px solid rgba(229, 103, 95, 0.3);
  color: var(--down);
}

/* --- Keywords table --- */
.kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.845rem;
}

.kw-table thead th {
  padding: 0.5rem 0.75rem;
  background-color: var(--surface-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.kw-table thead th.num { text-align: right; }

.kw-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-fast) var(--ease);
}
.kw-table tbody tr:last-child { border-bottom: none; }
.kw-table tbody tr:hover { background-color: var(--surface-3); }

.kw-table tbody td {
  padding: 0.475rem 0.75rem;
  color: var(--text-soft);
  vertical-align: middle;
}

.kw-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-muted);
}

/* Search intent badges */
.intent {
  display: inline-flex;
  gap: 0.15em;
  line-height: 1;
}

.i-info,
.i-comm,
.i-trx,
.i-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: var(--r-xs);
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.i-info { background-color: var(--up-soft);      color: var(--up); }
.i-comm { background-color: var(--accent-soft);   color: var(--accent); }
.i-trx  { background-color: var(--caution-soft);   color: var(--caution); }
.i-nav  { background-color: var(--surface-3);     color: var(--text-muted); }

/* SERP feature chips */
.serp-feat {
  display: inline-flex;
  align-items: center;
  padding: 0.08em 0.32em;
  border-radius: var(--r-xs);
  font-size: 0.6rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background-color: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  line-height: 1.5;
  margin-inline-end: 0.15em;
}

.serp-feat.serp-ai {
  background-color: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* Branded keyword pill */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.45em;
  border-radius: var(--r-pill);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.pill.brand {
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}

/* --- Cannibalization table --- */
.cann-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.845rem;
}

.cann-table thead th {
  padding: 0.5rem 0.75rem;
  background-color: var(--surface-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cann-table thead th.num { text-align: right; }

.cann-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-fast) var(--ease);
}
.cann-table tbody tr:last-child { border-bottom: none; }
.cann-table tbody tr:hover { background-color: var(--surface-3); }

.cann-table tbody td {
  padding: 0.475rem 0.75rem;
  color: var(--text-soft);
  vertical-align: middle;
}

.cann-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-muted);
}

.pos-this {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}

.path {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.1em;
}

/* ok-msg: no cannibalization detected */
.ok-msg { color: var(--up) !important; }

/* --- Competitors --- */
.comp-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.comp {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.comp:hover {
  background-color: var(--surface-3);
  border-color: var(--border-strong);
}

.comp-rank {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 2rem;
  line-height: 1.2;
  padding-top: 0.1rem;
}

.comp-body { flex: 1; min-width: 0; }

.comp-host {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.comp-host a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 2px;
}

.comp-host a:hover { color: var(--accent-strong); }

.comp-title {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.comp-score {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-dim);
}

/* Target query chip (in competitors section-sub) */
.target-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.55em;
  background-color: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-soft);
  font-style: normal;
}

/* --- Recommendations (markdown-rendered) --- */
.reco-verdict {
  padding: 0.875rem 1rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  margin-bottom: 0.875rem;
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.reco-verdict p  { color: var(--text-soft); max-width: 76ch; margin-bottom: 0.5rem; }
.reco-verdict p:last-child { margin-bottom: 0; }
.reco-verdict strong { color: var(--text); font-weight: 600; }

/* Each callout card */
.reco-callout {
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  background-color: var(--surface-2);
  overflow: hidden;
}

.reco-callout-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.reco-callout-head .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background-color: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  flex-shrink: 0;
}

.reco-callout .body {
  padding: 0.625rem 0.875rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.reco-callout .body p  { color: var(--text-soft); max-width: 80ch; margin-bottom: 0.5rem; }
.reco-callout .body p:last-child { margin-bottom: 0; }
.reco-callout .body ul,
.reco-callout .body ol { padding-left: 1.25rem; list-style: disc; }
.reco-callout .body ol { list-style: decimal; }
.reco-callout .body li { margin-bottom: 0.3rem; color: var(--text-soft); }
.reco-callout .body strong { color: var(--text); font-weight: 600; }
.reco-callout .body code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background-color: var(--surface-3);
  border: 1px solid var(--border);
  padding: 0.05em 0.3em;
  border-radius: var(--r-xs);
  color: var(--accent);
}

/* Severity variants for callouts — border + badge color */
.reco-callout.critical {
  border-left-color: var(--down);
}
.reco-callout.critical .reco-callout-head .badge {
  background-color: var(--down-soft);
  border-color: rgba(229, 103, 95, 0.3);
  color: var(--down);
}

.reco-callout.high {
  border-left-color: var(--caution);
}
.reco-callout.high .reco-callout-head .badge {
  background-color: var(--caution-soft);
  border-color: rgba(216, 165, 52, 0.3);
  color: var(--caution);
}

.reco-callout.medium {
  border-left-color: var(--caution);
}
.reco-callout.medium .reco-callout-head .badge {
  background-color: var(--caution-soft);
  border-color: rgba(216, 165, 52, 0.3);
  color: var(--caution);
}

.reco-callout.strengths {
  border-left-color: var(--up);
}
.reco-callout.strengths .reco-callout-head .badge {
  background-color: var(--up-soft);
  border-color: rgba(56, 176, 194, 0.3);
  color: var(--up);
}

.reco-callout.keyword,
.reco-callout.action {
  border-left-color: var(--accent);
}
.reco-callout.keyword .reco-callout-head .badge,
.reco-callout.action  .reco-callout-head .badge {
  background-color: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.reco-callout.gap {
  border-left-color: var(--down);
}
.reco-callout.gap .reco-callout-head .badge {
  background-color: var(--down-soft);
  border-color: rgba(229, 103, 95, 0.3);
  color: var(--down);
}

/* Debug section pre */
.section.debug pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .card,
  .scorecard {
    padding: 1rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 0.5rem 0.65rem;
  }

  main#content {
    padding-block: 1.25rem;
  }
}

/* ==========================================================================
   TREND CHART PANEL + SPARKLINES
   ========================================================================== */

/* Container card for the daily impressions chart */
.trend-chart {
  padding: 1rem 1.25rem 0.875rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

/* The inline SVG area chart - responsive width, fixed max height */
.trend-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  /* Static SVG - nothing animates; defensive no-op for prefers-reduced-motion */
}

/* Caption below the chart */
.trend-chart__cap {
  margin: 0.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ==========================================================================
   RANK DISTRIBUTION BAR + BRANDED SPLIT
   ========================================================================== */

/* Segmented horizontal bar for rank distribution and branded split */
.dist-bar,
.split-bar {
  display: flex;
  height: 1.375rem;
  border-radius: var(--r-control);
  overflow: hidden;
  gap: 2px;
}

/* Individual segment -- width set inline as a percentage */
.dist-seg,
.split-seg {
  height: 100%;
}

/* Band colours -- semantic tokens only */
.dist-seg--top3   { background-color: var(--up); }
.dist-seg--page1  { background-color: var(--accent); }
.dist-seg--page2  { background-color: var(--caution); }
.dist-seg--beyond { background-color: var(--text-muted); }

/* Branded split colours */
.split-seg--nonbranded { background-color: var(--accent); }
.split-seg--branded    { background-color: var(--text-muted); }

/* Legend dots -- small filled circles */
.dist-dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  flex-shrink: 0;
}
.dist-dot--top3   { background-color: var(--up); }
.dist-dot--page1  { background-color: var(--accent); }
.dist-dot--page2  { background-color: var(--caution); }
.dist-dot--beyond { background-color: var(--text-muted); }

/* Responsive: stack two-up panels on narrow screens */
@media (max-width: 680px) {
  .dist-panels {
    grid-template-columns: 1fr !important;
  }
}

/* Per-keyword sparkline table cell */
.sparkline {
  width: 100px;
  min-width: 80px;
  vertical-align: middle;
  padding: 0.25rem 0.5rem;
}

/* Sparkline SVG fills the cell width, fixed height via viewBox scaling */
.sparkline svg {
  display: block;
  width: 100%;
  height: 30px;
}

/* Ensure no width/height animations on chart elements (reduced motion compliance) */
@media (prefers-reduced-motion: reduce) {
  .trend-svg,
  .sparkline svg {
    animation: none;
    transition: none;
  }
}

/* ==========================================================================
   UCHART - uPlot PROGRESSIVE-ENHANCEMENT WRAPPER
   ========================================================================== */

/* Container: fills its parent, fixed height for interactive charts */
.uchart {
  position: relative;
  width: 100%;
  min-height: 80px; /* fallback SVG shows before JS upgrades */
}

/* The fallback static SVG wrapper (hidden by charts.js when uPlot mounts) */
.uchart__svg {
  width: 100%;
}

/* uPlot canvas background: transparent so .card bg shows through */
.uchart .u-wrap,
.uchart .u-over,
.uchart canvas {
  background: transparent !important;
}

/* Axis tick labels and grid lines via CSS var overrides */
.uchart .u-axis text {
  fill: var(--text-muted) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
}

/* Tooltip: floating label shown on cursor hover */
.u-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2, #1a1b17);
  border: 1px solid var(--border, #26271f);
  border-radius: var(--r-xs, 4px);
  padding: 0.3em 0.65em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-soft, #c3c5bc);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

/* uPlot drag-select highlight: use accent color at low opacity */
.uchart .u-select {
  background: var(--accent-soft, rgba(196, 229, 56, 0.14)) !important;
  border: 1px solid var(--accent-line, rgba(196, 229, 56, 0.45)) !important;
}

/* No animation on chart elements (prefers-reduced-motion compliance) */
@media (prefers-reduced-motion: reduce) {
  .uchart .u-wrap,
  .uchart canvas,
  .u-tooltip {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   KEYWORD DETAIL PAGE
   ========================================================================== */

/* Three-chart stack on the keyword detail page */
.kw-charts {
  display: flex;
  flex-direction: column;
  gap: 0;      /* cards already have margin-bottom applied inline */
}

/* Ensure keyword-page uPlot containers have enough room for the chart */
.kw-charts .uchart {
  min-height: 200px;
  width: 100%;
}

/* Keyword links in the tracker detail keyword table */
.kw-link {
  color: var(--text-base);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.kw-link:hover,
.kw-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line, var(--accent));
  outline: none;
}

.kw-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ── Opportunity cards (tracker detail Opportunities section) ──────────────── */

/* Remove default <details> marker; use our own toggle icon */
.opp-card > summary {
  list-style: none;
}
.opp-card > summary::-webkit-details-marker {
  display: none;
}

/* Rotate the custom toggle arrow when the details element is open */
.opp-card[open] .opp-card__toggle {
  display: inline-block;
  transform: rotate(180deg);
}

/* Hover/focus feedback on the summary row */
.opp-card > summary:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.04));
  border-radius: var(--r-card) var(--r-card) 0 0;
}
.opp-card > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Smooth transition for body reveal -- respects prefers-reduced-motion */
.opp-card__body {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .opp-card[open] .opp-card__body {
    animation: opp-fade-in 0.15s ease;
  }
  @keyframes opp-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── Metric tooltips (.tip) ─────────────────────────────────── */
.tip {
  position: relative;
  display: inline-block;
  cursor: help;
  color: var(--text-muted);
  font-size: .72rem;
  vertical-align: middle;
  margin-left: .25rem;
  border: 1px solid var(--text-dim, #555);
  border-radius: 50%;
  width: 1.1em;
  height: 1.1em;
  line-height: 1.1em;
  text-align: center;
  font-style: normal;
}
/* .tip tooltip now uses the native title attribute (set from data-tip in hub-sort.js) so it is never clipped by the table overflow container */

/* hub sortable-table active-column arrow (does not disturb header tooltip spans) */
.data-table.sortable th { white-space: nowrap; }
.data-table.sortable th[data-sort-dir="asc"]::after { content: " \2191"; color: var(--accent); }
.data-table.sortable th[data-sort-dir="desc"]::after { content: " \2193"; color: var(--accent); }

/* ── Per-page action cards (the daily-work surface) ───────────────── */
.pa-action { padding: 1rem 1.25rem 0.85rem; margin-block-end: 0.85rem; border-left: 3px solid var(--accent); }
.pa-action__head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; }
.pa-action__meta { display:flex; align-items:center; gap:0.45rem; flex-wrap:wrap; }
.pa-action__effort { font-size:0.68rem; padding:0.12em 0.6em; border-radius:999px; border:1px solid var(--border-strong); color:var(--text-muted); text-transform:capitalize; white-space:nowrap; }
.pa-action__value { font-family:var(--font-mono); font-size:1.15rem; font-weight:600; color:var(--accent); white-space:nowrap; line-height:1.1; }
.pa-action__value small { font-size:0.66rem; font-weight:400; color:var(--text-dim); }
.pa-action__title { font-size:1.02rem; font-weight:600; color:var(--text); margin:0.55rem 0 0; line-height:1.3; }
.pa-action__lead { margin:0.55rem 0 0; font-size:0.9rem; line-height:1.5; color:var(--text-soft); }
.pa-action__steps { list-style: disc; margin:0.5rem 0 0; padding-left:1.3rem; line-height:1.5; color:var(--text-soft); font-size:0.9rem; }
.pa-action__steps li { margin-block-end:0.35rem; padding-left:0.15rem; }
.pa-action__steps li::marker { color:var(--accent); }
.pa-action__outcome { margin-block-start:0.65rem; font-size:0.88rem; color:var(--text); font-weight:500; }
.pa-action__outcome::before { content:"\2192"; color:var(--accent); margin-right:0.45rem; font-weight:700; }
.pa-action__kw { margin-block-start:0.7rem; display:flex; flex-wrap:wrap; gap:0.3rem; align-items:center; }
.pa-action__kw-label { font-size:0.66rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.06em; margin-right:0.15rem; }
.pa-action__kw .chip { font-size:0.7rem; padding:0.12em 0.55em; }
.pa-action__foot { display:flex; justify-content:space-between; align-items:center; gap:0.75rem; flex-wrap:wrap; margin-block-start:0.85rem; padding-block-start:0.7rem; border-top:1px solid var(--border); }
.pa-action__score { font-family:var(--font-mono); font-size:0.72rem; color:var(--text-dim); }
.pa-action__score b { color:var(--text-muted); font-weight:600; }
.pa-action__actions { display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }
.pa-action__done { background:var(--accent); color:var(--accent-ink); font-size:0.7rem; font-weight:600; padding:0.15em 0.6em; border-radius:999px; }

/* ==========================================================================
   AUDIT HISTORY PAGE
   ========================================================================== */

/* Screen-reader only utility (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inline score badge for audit history table rows */
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  padding: 0.1em 0.45em;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.score-pill.good {
  color: var(--up);
  border-color: rgba(56, 176, 194, 0.35);
  background-color: var(--up-soft);
}

.score-pill.warn {
  color: var(--caution);
  border-color: rgba(216, 165, 52, 0.35);
  background-color: var(--caution-soft);
}

.score-pill.bad {
  color: var(--down);
  border-color: rgba(229, 103, 95, 0.35);
  background-color: var(--down-soft);
}

/* Destructive row action button for audit history */
.btn-del {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  border: 1px solid rgba(229, 103, 95, 0.4);
  background: transparent;
  color: var(--down);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.btn-del:hover {
  background-color: var(--down-soft);
  border-color: rgba(229, 103, 95, 0.65);
}

.btn-del:active {
  opacity: 0.8;
}

#copy-content-prompt { margin-left: auto; white-space: nowrap; align-self: center; }
