/* ──────────────────────────────────────────────────────────────────
   kaizoku.cyou — landing page
   plain CSS, no build step
   ────────────────────────────────────────────────────────────────── */

:root,
[data-theme="dark"] {
  --bg-0: #0a0418;
  --bg-1: #14092a;
  --bg-2: #1f0e3d;
  --magenta: #ff3b8b;
  --magenta-soft: #ff8fb1;
  --pink-100: #ffd6e7;
  --violet: #8b5cf6;
  --text: #f4ecff;
  --text-dim: #c9bcde;
  --text-faint: #8d7fb0;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-bg-hover: rgba(255, 255, 255, 0.075);
  --card-border: rgba(255, 214, 231, 0.12);
  --card-border-hover: rgba(255, 143, 177, 0.55);
  --aurora-1: rgba(255, 59, 139, 0.28);
  --aurora-2: rgba(139, 92, 246, 0.22);
  --watermark-color: 255, 255, 255;
  --watermark-opacity: 0.04;
  --max-w: 1120px;
  --radius: 20px;
}

[data-theme="light"] {
  --bg-0: #fdf2e8;
  --bg-1: #fff5f0;
  --bg-2: #ffffff;
  --magenta: #d4337a;
  --magenta-soft: #b91c5c;
  --pink-100: #5b1638;
  --violet: #6d28d9;
  --text: #1a0b2e;
  --text-dim: #4a3b6e;
  --text-faint: #6d5e90;
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-bg-hover: rgba(255, 255, 255, 0.92);
  --card-border: rgba(91, 22, 56, 0.12);
  --card-border-hover: rgba(212, 51, 122, 0.5);
  --aurora-1: rgba(255, 105, 165, 0.22);
  --aurora-2: rgba(168, 139, 250, 0.18);
  --watermark-color: 91, 22, 56;
  --watermark-opacity: 0.04;
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--aurora-1), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, var(--aurora-2), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

/* ── decorative layers — kept cheap (no live blur, no huge text) ── */

.bg-aurora {
  /* No CSS filter:blur — that creates a constantly-composited GPU
     texture that's expensive. We get a similar glow effect from a
     pre-blurred radial-gradient with a wide soft fade. */
  position: fixed;
  top: -240px;
  right: -160px;
  width: 640px;
  height: 640px;
  background: radial-gradient(
    circle,
    var(--aurora-1) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* The watermark is now a much smaller, pre-rasterized SVG background
   instead of a 700px CJK character — Noto Serif JP at that size was
   pegging the renderer on scroll. Using mask-image so we can theme
   the colour via CSS variables. */
.kanji-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(360px, 40vw);
  height: min(360px, 40vw);
  transform: translate(-50%, -50%);
  -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ctext x='100' y='130' font-family='serif' font-weight='700' font-size='180' text-anchor='middle' fill='%23000'%3E%E6%B5%B7%3C/text%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ctext x='100' y='130' font-family='serif' font-weight='700' font-size='180' text-anchor='middle' fill='%23000'%3E%E6%B5%B7%3C/text%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: rgba(var(--watermark-color), var(--watermark-opacity));
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -24px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ffb3d1 0%, #ff6ba6 100%);
  border-radius: 100% 0 100% 0;
  opacity: 0.5;
  animation: petal-fall linear infinite;
  will-change: transform;
}

/* Winter — soft snowflakes */
[data-season="winter"] .petal {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55));
}

/* Autumn — drifting maple-ish leaves */
[data-season="autumn"] .petal {
  background: linear-gradient(135deg, #fb923c 0%, #b45309 100%);
  border-radius: 60% 40% 70% 30% / 60% 30% 70% 40%;
  filter: drop-shadow(0 0 4px rgba(180, 83, 9, 0.45));
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -24px, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(40px, 110vh, 0) rotate(540deg);
  }
}

/* ── layout chrome ─────────────────────────────────────────────── */

.site-header,
main,
footer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-header {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  font-family: "Noto Serif JP", serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--magenta-soft);
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--magenta-soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text) !important;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

[data-theme="light"] .nav-cta {
  background: rgba(255, 255, 255, 0.6);
}

.nav-cta-icon {
  width: 15px;
  height: 15px;
  color: #5865f2;
  flex-shrink: 0;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  border-color: var(--card-border-hover);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

[data-theme="light"] .nav-cta:hover,
[data-theme="light"] .nav-cta:focus-visible {
  background: #fff;
}

/* Theme toggle button */

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.6);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--card-border-hover);
  background: rgba(255, 255, 255, 0.08);
  color: var(--magenta-soft);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-toggle:focus-visible {
  background: #fff;
}

.theme-icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* Show the right icon for the current theme: moon = "go to dark",
   sun = "go to light". Convention: dark theme shows sun (so user knows
   clicking will bring brightness); light theme shows moon. */
[data-theme="dark"] .theme-icon--moon,
[data-theme="light"] .theme-icon--sun {
  display: none;
}

/* Hamburger / mobile menu */

.nav-toggle {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

[data-theme="light"] .nav-toggle {
  background: rgba(255, 255, 255, 0.6);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--card-border-hover);
  color: var(--magenta-soft);
}

.nav-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* Show menu icon by default, close (X) when drawer is open */
body.nav-open .nav-toggle-icon--menu,
body:not(.nav-open) .nav-toggle-icon--close {
  display: none;
}

.mobile-drawer {
  display: none;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  margin: 4px 18px 0;
  position: relative;
  z-index: 20;
  animation: drawer-in 0.18s ease;
}

.mobile-drawer-inner > a {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-drawer-inner > a:hover,
.mobile-drawer-inner > a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--magenta-soft);
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid;
  }
  .mobile-drawer:not([hidden]) {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer-inner {
    animation: none;
  }
}

/* Keyboard help overlay */

.kb-help {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}

.kb-help.open {
  display: flex;
  animation: kb-help-in 0.18s ease;
}

.kb-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 4, 24, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.kb-help-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .kb-help-panel {
  background: #fff;
}

.kb-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.kb-help-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}

.kb-help-close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.kb-help-close:hover {
  color: var(--magenta-soft);
  background: rgba(255, 255, 255, 0.08);
}

.kb-help-section {
  margin-bottom: 18px;
}

.kb-help-section h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.kb-help-section dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.kb-help-section dl > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}

.kb-help-section dt {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.kb-help-section dt a {
  color: var(--magenta-soft);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.kb-help-section dt a:hover {
  text-decoration: underline;
}

.kb-help-section dd {
  margin: 0;
  color: var(--text-dim);
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  text-align: center;
}

[data-theme="light"] kbd {
  background: rgba(0, 0, 0, 0.04);
}

.kb-help-footer {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  font-style: italic;
}

@keyframes kb-help-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kb-help.open {
    animation: none;
  }
}

@media (max-width: 560px) {
  .kb-help-section dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ── Easter egg overlay ───────────────────────────────────────── */

.easter-egg {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 4, 24, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    -webkit-backdrop-filter 0.4s ease;
}

.easter-egg.show {
  opacity: 1;
  background: rgba(10, 4, 24, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.easter-egg-content {
  text-align: center;
  transform: scale(0.6);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.easter-egg.show .easter-egg-content {
  transform: scale(1);
}

.easter-egg-mark {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(120px, 24vw, 280px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--egg-from, #ff3b8b) 0%, var(--egg-to, #ffd6e7) 60%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px color-mix(in srgb, var(--egg-from, #ff3b8b) 55%, transparent));
}

.easter-egg-text {
  font-family: "Noto Serif JP", "Inter", serif;
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 600;
  color: var(--egg-to, #ffd6e7);
  letter-spacing: 0.08em;
  margin-top: 18px;
  text-shadow: 0 0 18px color-mix(in srgb, var(--egg-from, #ff3b8b) 65%, transparent);
}

.easter-egg-credit {
  margin-top: 10px;
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .easter-egg,
  .easter-egg-content {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* ── main ──────────────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 64px 0 96px;
}

/* hero */

.hero {
  text-align: center;
  margin-bottom: 88px;
}

.hero h1 {
  font-weight: 700;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-mark {
  font-family: "Noto Serif JP", serif;
  font-weight: 700;
  font-size: clamp(96px, 14vw, 168px);
  line-height: 1;
  background: linear-gradient(135deg, var(--magenta) 0%, var(--pink-100) 60%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-word {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 64px);
  letter-spacing: -0.025em;
}

.tagline {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 auto 36px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-dim);
}

.tagline-jp {
  font-family: "Noto Serif JP", serif;
  font-weight: 500;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--pink-100);
  letter-spacing: 0.06em;
}

.tagline-romaji {
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.95em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.status-pill:hover,
.status-pill:focus-visible {
  border-color: var(--card-border-hover);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 14px #4ade80;
  animation: breathe 2.4s ease-in-out infinite;
}

.status-pill .arrow {
  color: var(--text-faint);
  font-size: 13px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.status-pill:hover .arrow {
  color: var(--magenta-soft);
  transform: translateX(3px);
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

/* crew grid */

.crew {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 600px) {
  .crew {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 920px) {
  .crew {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  --accent: var(--magenta);
  position: relative;
  padding: 24px 24px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  overflow: hidden;
  /* Cheap accent-tinted top edge using a single 1px line. */
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: var(--accent);
  opacity: 0.45;
}

.card:hover,
.card:focus-visible {
  border-color: var(--accent);
  background-color: var(--card-bg-hover);
}

.card-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 4px;
}

.card-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card-sub {
  font-size: 14px;
  color: var(--text-dim);
  flex: 1;
}

.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  font-feature-settings: "tnum";
  /* Hidden until either the static-meta timeout fires or a dynamic
     handler finishes its fetch. Keeps the perceived loading rhythm
     consistent across cards. */
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.card-meta.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

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

.card-meta .meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  display: inline-block;
}

.card-meta .meta-dot--up {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}
.card-meta .meta-dot--mixed {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}
.card-meta .meta-dot--down {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* Card button — looks like a button, not link text */

.card-btn {
  margin-top: 14px;
  align-self: flex-start;
  padding: 9px 16px 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

/* Light-mode: white-on-white was invisible against the card. */
[data-theme="light"] .card-btn {
  background: rgba(91, 22, 56, 0.06);
  border-color: rgba(91, 22, 56, 0.15);
}

.card-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent);
}

.card-btn .arrow {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 12px;
  margin-left: 2px;
}

.card:hover .card-btn,
.card:focus-visible .card-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0418;
}

.card:hover .card-btn svg,
.card:focus-visible .card-btn svg,
.card:hover .card-btn .arrow,
.card:focus-visible .card-btn .arrow {
  color: #0a0418;
}

/* footer */

footer {
  padding: 32px 0;
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13px;
  position: relative;
}

.footer-help {
  position: absolute;
  right: 0;
  bottom: 28px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

[data-theme="light"] .footer-help {
  background: rgba(255, 255, 255, 0.6);
}

.footer-help:hover,
.footer-help:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--magenta-soft);
  border-color: var(--card-border-hover);
}

.anime-quote {
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
  text-align: center;
  max-width: 560px;
  line-height: 1.5;
  opacity: 0.85;
  padding: 0 16px;
}

.footer-mark {
  display: inline-block;
  color: var(--magenta-soft);
  font-family: serif;
  /* Force the text-style skull glyph, not the emoji presentation that
     some platforms use by default. VS16 (U+FE0E) requests text style. */
  font-variant-emoji: text;
  margin: 0 2px;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--card-border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--magenta-soft);
  border-bottom-color: var(--magenta-soft);
}

/* ── /status/m/<id>/ — single monitor detail ──────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.back-link:hover,
.back-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--card-border-hover);
}

.monitor-hero {
  margin-bottom: 28px;
}

.monitor-hero-skeleton {
  padding: 36px 28px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-faint);
}

.monitor-hero-error {
  padding: 36px 28px;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, #ef4444 30%, var(--card-border));
  border-radius: var(--radius);
  text-align: center;
}

.monitor-hero-error h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.monitor-hero-error p {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-status {
  --c: #4ade80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 999px;
}

.hero-status.up { --c: #4ade80; }
.hero-status.down { --c: #ef4444; }
.hero-status.maint { --c: #fbbf24; }

.hero-status .mon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

.hero-status.up .mon-dot {
  animation: breathe 2.4s ease-in-out infinite;
}

.hero-name {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 14px;
}

/* stats — 3 cards in a row */

.monitor-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.stat-card {
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: "tnum";
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-value.up { color: #4ade80; }
.stat-card .stat-value.mixed { color: #fbbf24; }
.stat-card .stat-value.down { color: #ef4444; }

.stat-card .stat-note {
  font-size: 12px;
  color: var(--text-faint);
}

/* monitor-block: common wrapper for weekly/history sections */

.monitor-block {
  margin-top: 28px;
  padding: 22px 22px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.monitor-block .block-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.monitor-block .block-meta {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: none;
}

/* Weekly daily bars */

.day-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items: end;
  height: 140px;
}

.day-bar {
  --c: #4ade80;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  height: 100%;
  cursor: default;
}

.day-bar.up { --c: #4ade80; }
.day-bar.mixed { --c: #fbbf24; }
.day-bar.down { --c: #ef4444; }

.day-bar-fill {
  height: var(--h, 0%);
  background: color-mix(in srgb, var(--c) 78%, transparent);
  border-radius: 4px 4px 2px 2px;
  transition: opacity 0.18s ease;
}

.day-bar:hover .day-bar-fill {
  background: var(--c);
}

.day-bar-label {
  margin-top: 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-faint);
  font-feature-settings: "tnum";
}

/* Monthly history bars */

.history-chart {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 90px;
  padding-bottom: 1px;
}

.mon-bar {
  --c: #4ade80;
  flex: 1 1 0;
  height: var(--h, 6%);
  min-height: 4px;
  background: color-mix(in srgb, var(--c) 72%, transparent);
  border-radius: 2px;
  position: relative;
  transition: background 0.15s ease;
  cursor: default;
}

.mon-bar.up { --c: #4ade80; }
.mon-bar.mixed { --c: #fbbf24; }
.mon-bar.down { --c: #ef4444; }

.mon-bar:hover {
  background: var(--c);
}

.mon-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 9, 42, 0.96);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #f4ecff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 5;
  font-feature-settings: "tnum";
  line-height: 1.4;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .mon-bar-tooltip {
  background: rgba(255, 255, 255, 0.98);
  color: #1a0b2e;
  border-color: rgba(91, 22, 56, 0.2);
}

.mon-bar:hover .mon-bar-tooltip {
  opacity: 1;
}

.history-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  font-feature-settings: "tnum";
}

/* Server resources block */

.block-subtitle {
  margin-top: 22px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.block-system {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-faint);
  font-feature-settings: "tnum";
}

.reboot-flag {
  color: #fbbf24;
  font-weight: 600;
}

.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.res-card {
  padding: 14px 16px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.res-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.res-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  font-feature-settings: "tnum";
  line-height: 1.2;
}

.res-value.ok   { color: var(--text); }
.res-value.warn { color: #fbbf24; }
.res-value.high { color: #ef4444; }

.res-spark {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 4px;
}

.res-spark-placeholder {
  height: 28px;
}

/* Disks */

.disks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.disk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-feature-settings: "tnum";
}

.disk-mount {
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disk-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.disk-bar-fill {
  height: 100%;
  width: var(--w, 0%);
  background: #4ade80;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.disk-bar-fill.warn { background: #fbbf24; }
.disk-bar-fill.high { background: #ef4444; }

.disk-pct {
  min-width: 38px;
  text-align: right;
  font-weight: 600;
  color: var(--text);
}

.disk-pct.warn { color: #fbbf24; }
.disk-pct.high { color: #ef4444; }

/* Drive health */

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

.drive-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 12px;
}

.drive-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-dim);
}

.drive-health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.drive-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.drive-health--healthy { color: #4ade80; }
.drive-health--warning { color: #fbbf24; }
.drive-health--failing { color: #ef4444; }
.drive-health--unknown { color: var(--text-faint); }

/* About this server (extras from monitors.json) */

.extras {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.extras-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.extras-row dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 2px;
}

.extras-row dd {
  margin: 0;
  color: var(--text);
}

@media (max-width: 560px) {
  .extras-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Blacklist detail page */

.block-body {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.block-body--ok {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.ok-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  flex-shrink: 0;
}

.listings {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.listing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, #ef4444 8%, transparent);
  border: 1px solid color-mix(in srgb, #ef4444 25%, var(--card-border));
  font-size: 13px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.listing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  flex-shrink: 0;
}

/* 404 page */

.error-page main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-card {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 56px 32px;
  max-width: 560px;
}

.error-code {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(72px, 14vw, 144px);
  font-weight: 700;
  line-height: 0.9;
  background: linear-gradient(135deg, var(--magenta) 0%, var(--pink-100) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}

.error-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.error-title .accent {
  font-family: "Noto Serif JP", serif;
  background: linear-gradient(135deg, var(--magenta) 0%, var(--pink-100) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-sub {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.6;
}

.error-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.error-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

.error-btn.primary {
  background: linear-gradient(135deg, var(--magenta) 0%, #e63b80 100%);
  border-color: var(--magenta);
  color: #0a0418;
}

.error-btn.primary:hover {
  background: linear-gradient(135deg, var(--magenta-soft) 0%, var(--magenta) 100%);
}

/* ── /bots/ — bot directory ────────────────────────────────────── */

.bots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 800px) {
  .bots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bot-card {
  --accent: var(--magenta);
  position: relative;
  padding: 24px 24px 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.bot-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.bot-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--card-border));
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.bot-name-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bot-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--text);
}

.bot-handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.18s ease;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-handle:hover {
  color: var(--accent);
}

.bot-status {
  --c: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  border-radius: 999px;
}

.bot-status.up   { --c: #4ade80; }
.bot-status.down { --c: #ef4444; }

.bot-status .mon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.bot-status.up .mon-dot {
  animation: breathe 2.4s ease-in-out infinite;
}

.bot-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.bot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}

.bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.bot-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.bot-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent);
}

.bot-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--card-border));
}

.bot-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0418;
}

.bot-btn.primary:hover {
  filter: brightness(1.08);
}

.bot-btn.primary svg {
  color: #0a0418;
}

/* placeholder card for 'more bots coming' */

.bot-card--placeholder {
  border-style: dashed;
  background: transparent;
  align-items: flex-start;
  justify-content: center;
  min-height: 220px;
}

.bot-card--placeholder::before {
  display: none;
}

.bot-placeholder-mark {
  font-size: 32px;
  font-weight: 300;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.bot-card--placeholder .bot-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dim);
}

.bot-card--placeholder .bot-desc a {
  color: var(--magenta-soft);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--magenta-soft) 40%, transparent);
}

.bots-loading {
  padding: 36px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ── /status page ──────────────────────────────────────────────── */

.status-page main {
  padding-top: 32px;
}

.page-heading {
  text-align: center;
  margin-bottom: 32px;
}

.page-heading h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-heading h1 .accent {
  font-family: "Noto Serif JP", serif;
  background: linear-gradient(135deg, var(--magenta) 0%, var(--pink-100) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-heading p {
  color: var(--text-dim);
  font-size: 15px;
}

.status-aux {
  margin-top: 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

.status-aux a {
  color: var(--magenta-soft);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--magenta-soft) 40%, transparent);
}

/* World map block */

.world-map-block {
  margin-bottom: 28px;
  padding: 22px 22px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.world-map-block .block-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.world-map-block .block-meta {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: none;
  font-feature-settings: "tnum";
}

.world-map-wrap {
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at center, rgba(255, 59, 139, 0.04), transparent 70%);
}

.world-map {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
}

.world-map .continents path {
  fill: rgba(255, 214, 231, 0.07);
  stroke: rgba(255, 214, 231, 0.18);
  stroke-width: 0.5;
  stroke-linejoin: round;
}

[data-theme="light"] .world-map .continents path {
  fill: rgba(91, 22, 56, 0.06);
  stroke: rgba(91, 22, 56, 0.25);
}

.world-map .marker {
  pointer-events: auto;
  cursor: help;
}

.world-map .marker-ping {
  fill: var(--magenta);
  opacity: 0;
  transform-origin: center;
  animation: marker-ping 2.6s ease-out infinite;
}

.world-map .marker-halo {
  fill: var(--magenta);
  opacity: 0.18;
}

.world-map .marker-dot {
  fill: var(--magenta);
  filter: drop-shadow(0 0 6px var(--magenta));
}

.world-map .marker-label {
  fill: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: "Inter", sans-serif;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(20, 9, 42, 0.9);
  stroke-width: 3px;
}

[data-theme="light"] .world-map .marker-label {
  stroke: rgba(255, 245, 240, 0.9);
}

@keyframes marker-ping {
  0% {
    opacity: 0.45;
    transform: scale(0.3);
  }
  80% {
    opacity: 0;
    transform: scale(1.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-map .marker-ping {
    animation: none;
    opacity: 0.3;
  }
}

/* status summary card */

.status-summary {
  margin-bottom: 28px;
}

.summary-skeleton {
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-faint);
}

.summary-card {
  --c: #4ade80;
  padding: 26px 28px;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%),
    var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--card-border));
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.summary-card.up    { --c: #4ade80; }
.summary-card.mixed { --c: #fbbf24; }
.summary-card.down  { --c: #ef4444; }

.summary-headline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(18px, 2.3vw, 22px);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.summary-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 18px var(--c);
  animation: breathe 2.4s ease-in-out infinite;
}

.summary-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 28px;
  text-align: right;
}

.summary-stats .stat-value {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: "tnum";
  line-height: 1;
}

.summary-stats .stat-of {
  font-size: 0.55em;
  color: var(--text-faint);
  font-weight: 500;
  margin-left: 2px;
}

.summary-stats .stat-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .summary-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .summary-stats {
    text-align: left;
    grid-template-columns: 1fr 1fr;
  }
}

/* "Last updated …" small meta row, sits between summary and grid */

.status-meta {
  margin: 4px 4px 20px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.status-meta::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 8px #4ade80;
}

/* Flat monitor grid — no per-category sections, the category lives as
   a small tag on each card. */

.mon-grid,
.bl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 560px) {
  .mon-grid,
  .bl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .mon-grid,
  .bl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blacklist-section:not(:empty) {
  margin-top: 32px;
}

.blacklist-section .cat-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-left: 4px;
  margin-bottom: 14px;
}

/* monitor card */

.mon,
.bl {
  --c: #4ade80;
  padding: 16px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  border-left: 3px solid var(--c);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

a.mon,
a.bl {
  cursor: pointer;
}

a.mon:hover,
a.bl:hover,
a.mon:focus-visible,
a.bl:focus-visible {
  background: var(--card-bg-hover);
  border-color: color-mix(in srgb, var(--c) 50%, var(--card-border));
  border-left-color: var(--c);
}

.mon.up,
.bl.up    { --c: #4ade80; }
.mon.down,
.bl.down  { --c: #ef4444; }
.mon.maint { --c: #fbbf24; }

.mon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mon-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c);
}

.mon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

.mon.up .mon-dot,
.bl.up .mon-dot {
  animation: breathe 2.4s ease-in-out infinite;
}

.mon-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mon-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  cursor: default;
  white-space: nowrap;
}

.mon-tag--loc {
  color: var(--text-faint);
  font-feature-settings: "tnum";
  cursor: help;
}

.mon-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.mon-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.mon-uptime {
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}

.mon-uptime-label {
  font-weight: 400;
  color: var(--text-faint);
  font-size: 12px;
}

.mon-check {
  color: var(--text-faint);
  font-size: 12px;
}

/* 7-day uptime sparkline on each monitor card */

.mon-spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 70px;
  margin: 0 auto 0 2px;
}

.spark-bar {
  flex: 1 1 0;
  min-height: 2px;
  height: var(--h, 100%);
  border-radius: 1.5px;
  background: var(--text-faint);
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.spark-bar--up      { background: #4ade80; }
.spark-bar--mixed   { background: #fbbf24; }
.spark-bar--down    { background: #ef4444; }
.spark-bar--unknown { background: var(--text-faint); opacity: 0.4; }

a.mon:hover .spark-bar,
a.mon:focus-visible .spark-bar {
  opacity: 0.95;
}

@media (max-width: 480px) {
  .mon-spark {
    width: 56px;
  }
}

/* ── responsive ────────────────────────────────────────────────── */

@media (max-width: 720px) {
  body {
    padding: 0 18px;
  }
  .site-header {
    padding: 20px 0;
  }
  .site-nav {
    gap: 14px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  main {
    padding: 32px 0 64px;
  }
  .hero {
    margin-bottom: 56px;
  }
  .hero h1 {
    gap: 6px;
    flex-direction: column;
    align-items: center;
  }
}

/* ── accessibility ─────────────────────────────────────────────── */

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

@media (prefers-reduced-motion: reduce) {
  .petal {
    display: none;
  }
  .status-pill .dot {
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
