:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --soft: #eef2f7;
  --line: rgba(23, 32, 51, 0.1);
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #14b8a6;
  --discord: #5865f2;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5edf8;
  --muted: #9aa8bb;
  --soft: #111827;
  --line: rgba(226, 232, 240, 0.12);
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --brand: #60a5fa;
  --brand-strong: #3b82f6;
  --accent: #2dd4bf;
  --discord: #5865f2;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.14), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(20, 184, 166, 0.15), transparent 25rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
  color: var(--ink) !important;
  letter-spacing: 0;
  transition: background-color 0.35s ease, color 0.35s ease;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% 8%, rgba(96, 165, 250, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(45, 212, 191, 0.12), transparent 25rem),
    linear-gradient(180deg, #020617 0%, #0f172a 100%) !important;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

#page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

:root[data-theme="dark"] #page-transition-overlay {
  background: #020617;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  transform: translateY(-120%);
  z-index: 70;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

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

:root[data-theme="dark"] .skip-link {
  background: rgba(15, 23, 42, 0.96);
  color: var(--ink);
}

.search-suggestions {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-suggestions.hidden {
  display: none;
}

.search-suggestions ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-suggestions li {
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.search-suggestions li:last-child {
  border-bottom: none;
}

.search-suggestions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.9rem 1rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.search-suggestions button:hover,
.search-suggestions button:focus {
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.speech-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.speech-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.speech-button:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.speech-button.playing {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

.speech-button.loading {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0ea5e9;
  cursor: progress;
}

.speech-button svg {
  transition: transform 0.2s ease, fill 0.2s ease;
}

.speech-button.playing svg {
  transform: scale(1.05);
}

.speech-status {
  min-height: 1.25rem;
}

.sticky.top-0 {
  border-bottom: 1px solid var(--line) !important;
  background: rgba(248, 250, 252, 0.82) !important;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="dark"] .sticky.top-0 {
  background: rgba(2, 6, 23, 0.82) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  min-width: 2.9rem;
  min-height: 2.9rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--panel-solid);
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 150;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
  color: var(--ink);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease, background 0.32s ease, border-color 0.32s ease;
}

:root[data-theme="dark"] .cookie-banner {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__message {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookie-banner a {
  color: var(--brand-strong);
  text-decoration: underline;
}

:root[data-theme="dark"] .theme-toggle {
  background: rgba(15, 23, 42, 0.9);
  color: var(--ink);
  border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme="dark"] .theme-toggle:hover {
  background: rgba(30, 41, 59, 0.95);
}

.mobile-theme-toggle {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: flex-start;
  min-height: 2.75rem;
}

@media (max-width: 640px) {
  .theme-toggle {
    width: 2.7rem;
    min-width: 2.7rem;
    min-height: 2.7rem;
  }
}

.logo-img {
  height: 2rem !important;
  width: auto;
  pointer-events: none;
  user-select: none;
  transition: filter 0.2s ease;
}

:root[data-theme="dark"] .logo-img {
  filter: brightness(0) invert(1);
}

nav a,
#mobile-menu a {
  border-radius: var(--radius) !important;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

nav a.bg-indigo-50,
#mobile-menu a.bg-indigo-50 {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

:root[data-theme="dark"] nav a.bg-indigo-50,
:root[data-theme="dark"] #mobile-menu a.bg-indigo-50 {
  background: rgba(96, 165, 250, 0.18) !important;
  color: #bfdbfe !important;
}

#mobile-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(92vw, 320px);
  max-width: 320px;
  background: rgba(248, 250, 252, 0.96) !important;
  border-top: 0 !important;
  box-shadow: 28px 0 70px rgba(15, 23, 42, 0.12);
  z-index: 45;
}

.mobile-menu-enter {
  transform: translateX(-110%);
  opacity: 1;
  overflow-y: auto;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  backdrop-filter: blur(18px);
}

.mobile-menu-enter.open {
  transform: translateX(0);
}

:root[data-theme="dark"] #mobile-menu {
  background: rgba(2, 6, 23, 0.96) !important;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-menu-close {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  transition: background 0.18s ease, transform 0.18s ease;
}

.mobile-menu-close:hover {
  transform: translateX(1px);
  background: rgba(241, 245, 249, 0.95);
}

:root[data-theme="dark"] .mobile-menu-close {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.2);
}

input[type="text"] {
  border-radius: var(--radius) !important;
  border-color: var(--line) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

:root[data-theme="dark"] input[type="text"] {
  background: rgba(15, 23, 42, 0.82) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

input[type="text"]:focus {
  border-color: rgba(37, 99, 235, 0.42) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.modern-shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.modern-shell.max-w-3xl {
  width: min(768px, calc(100% - 2rem));
}

.page-hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

:root[data-theme="dark"] .eyebrow {
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

.hero-title {
  max-width: 780px;
  font-size: clamp(2.35rem, 7vw, 5.8rem);
  line-height: 0.94;
  font-weight: 850;
  letter-spacing: 0;
  color: #0f172a;
}

:root[data-theme="dark"] .hero-title,
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3 {
  color: #f8fafc !important;
}

.hero-copy {
  max-width: 660px;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.modern-button,
a.modern-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius) !important;
  font-weight: 750;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.modern-button:hover,
a.modern-button:hover {
  transform: translateY(-1px);
}

.modern-button.primary,
a.modern-button.primary {
  background: var(--brand) !important;
  color: white !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.modern-button.primary:hover,
a.modern-button.primary:hover {
  background: var(--brand-strong) !important;
}

.modern-button.secondary,
a.modern-button.secondary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .modern-button.primary,
:root[data-theme="dark"] a.modern-button.primary {
  color: #06111f !important;
}

.discord-button,
a[href*="discord.gg"] {
  border-radius: var(--radius) !important;
  background: var(--discord) !important;
}

a.plain-discord-link,
a.plain-discord-link:hover {
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-decoration: underline !important;
}

a.plain-discord-link:hover {
  background: transparent !important;
  color: inherit !important;
}

.discord-button:hover,
a[href*="discord.gg"]:hover {
  background: #4752c4 !important;
}

a.plain-discord-link[href*="discord.gg"]:hover {
  background: transparent !important;
  color: inherit !important;
}

.feature-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.modern-card,
.card-hover,
.tilt-card-inner,
#pageCard,
.bg-white.rounded-xl,
.bg-white.rounded-2xl {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--panel) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="dark"] .modern-card,
:root[data-theme="dark"] .card-hover,
:root[data-theme="dark"] .tilt-card-inner,
:root[data-theme="dark"] #pageCard,
:root[data-theme="dark"] .bg-white.rounded-xl,
:root[data-theme="dark"] .bg-white.rounded-2xl {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.modern-card {
  padding: 1.25rem;
}

.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow: var(--shadow) !important;
}

.section-band {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.1;
  font-weight: 820;
  color: #0f172a;
}

.section-copy {
  max-width: 620px;
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
}

.home-hero {
  min-height: calc(100vh - 4rem);
  padding: clamp(2rem, 5vw, 5rem) 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.interactive-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="dark"] .interactive-panel,
:root[data-theme="dark"] .preview-window,
:root[data-theme="dark"] .quick-card,
:root[data-theme="dark"] .spotlight-panel,
:root[data-theme="dark"] .timeline-item,
:root[data-theme="dark"] .stat-card {
  background: var(--panel);
}

.interactive-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 35%, rgba(20, 184, 166, 0.12));
  pointer-events: none;
}

.panel-inner {
  position: relative;
  padding: 1rem;
}

.preview-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.preview-tab {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.preview-tab:hover,
.preview-tab.active {
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

:root[data-theme="dark"] .preview-tab {
  background: rgba(15, 23, 42, 0.74);
}

:root[data-theme="dark"] .preview-tab:hover,
:root[data-theme="dark"] .preview-tab.active {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

.preview-window {
  margin-top: 0.75rem;
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.84);
  overflow: hidden;
}

.preview-content {
  animation: pageIn 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.preview-list {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="dark"] .preview-row,
:root[data-theme="dark"] .spotlight-button {
  background: rgba(15, 23, 42, 0.74);
}

.preview-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: var(--radius);
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 850;
}

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

.quick-card {
  display: block;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow);
}

.quick-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: #dbeafe;
  color: #1d4ed8;
}

.home-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: stretch;
}

.spotlight-list {
  display: grid;
  gap: 0.7rem;
}

.spotlight-button {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.spotlight-button:hover,
.spotlight-button.active {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(2px);
}

:root[data-theme="dark"] .spotlight-button:hover,
:root[data-theme="dark"] .spotlight-button.active {
  background: rgba(30, 41, 59, 0.92);
}

.spotlight-panel {
  min-height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline-item {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 3.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.timeline-year {
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: var(--radius);
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 850;
}

:root[data-theme="dark"] .timeline-year,
:root[data-theme="dark"] .quick-icon,
:root[data-theme="dark"] .preview-mark {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1rem;
  align-items: start;
}

.sticky-note {
  position: sticky;
  top: 5rem;
}

.reveal-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.stat-number {
  display: block;
  color: var(--brand);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
  font-weight: 850;
}

.profile-avatar,
.revival-logo {
  border-radius: var(--radius) !important;
}

#grid {
  align-items: stretch;
}

#page {
  z-index: 50;
}

#pageCard {
  box-shadow: var(--shadow) !important;
}

.detail-view {
  background:
    radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.12), transparent 25rem),
    radial-gradient(circle at 86% 18%, rgba(20, 184, 166, 0.12), transparent 24rem),
    #f8fafc !important;
  overflow-y: auto;
}

:root[data-theme="dark"] .detail-view {
  background:
    radial-gradient(circle at 18% 8%, rgba(96, 165, 250, 0.14), transparent 25rem),
    radial-gradient(circle at 86% 18%, rgba(45, 212, 191, 0.1), transparent 24rem),
    #020617 !important;
}

.detail-card {
  width: min(960px, calc(100% - 2rem)) !important;
  max-width: none !important;
  max-height: none !important;
  margin: clamp(1rem, 4vw, 2.5rem) auto;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.bubble-enter {
  animation: pageIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.bubble-exit {
  animation: pageOut 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(14px);
  }
}

footer {
  border-color: var(--line) !important;
  background: rgba(248, 250, 252, 0.76);
}

:root[data-theme="dark"] footer {
  background: rgba(2, 6, 23, 0.76);
}

:root[data-theme="dark"] .text-slate-400,
:root[data-theme="dark"] .text-slate-500,
:root[data-theme="dark"] .text-slate-600,
:root[data-theme="dark"] .text-slate-700,
:root[data-theme="dark"] .text-slate-800 {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .text-slate-900,
:root[data-theme="dark"] .text-slate-950 {
  color: #f8fafc !important;
}

:root[data-theme="dark"] .bg-white,
:root[data-theme="dark"] .bg-slate-50,
:root[data-theme="dark"] .bg-slate-100,
:root[data-theme="dark"] [class*="bg-white/"],
:root[data-theme="dark"] [class*="bg-slate-50"],
:root[data-theme="dark"] [class*="bg-slate-100"],
:root[data-theme="dark"] [class*="border-white"],
:root[data-theme="dark"] [class*="border-slate-100"],
:root[data-theme="dark"] [class*="border-slate-200"] {
  background-color: var(--panel) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

:root[data-theme="dark"] [class*="bg-white/"] {
  background-color: rgba(15, 23, 42, 0.8) !important;
}

:root[data-theme="dark"] #page-transition-overlay {
  background: var(--soft) !important;
}

:root[data-theme="dark"] .bg-slate-50,
:root[data-theme="dark"] .bg-slate-100 {
  background-color: rgba(15, 23, 42, 0.74) !important;
}

:root[data-theme="dark"] .bg-white,
:root[data-theme="dark"] .border-slate-100,
:root[data-theme="dark"] .border-slate-200 {
  border-color: var(--line) !important;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .sticky.top-0 > div {
    padding: 0.6rem 0.85rem !important;
    gap: 0.6rem !important;
  }

  .logo-img {
    height: 1.65rem !important;
  }

  #hamburger-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #mobile-menu nav {
    padding: 0.75rem !important;
  }

  #mobile-menu a {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .modern-shell {
    width: min(100% - 1rem, 1120px);
  }

  .home-hero {
    min-height: auto;
    padding: 1.4rem 0 2.2rem;
  }

  .feature-grid,
  .metrics-grid,
  .quick-grid,
  .hero-layout,
  .home-spotlight,
  .info-layout {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .hero-actions > * {
    width: 100%;
  }

  .page-hero {
    padding: 1.5rem 0 1rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 14vw, 4rem);
    line-height: 0.98;
  }

  .hero-copy {
    font-size: 0.98rem;
    line-height: 1.62;
    margin-top: 0.9rem;
  }

  .section-band {
    padding: 2rem 0;
  }

  .interactive-panel {
    margin-top: 0.75rem;
  }

  .panel-inner {
    padding: 0.75rem;
  }

  .preview-tabs {
    gap: 0.4rem;
  }

  .preview-tab {
    min-height: 2.75rem;
    font-size: 0.78rem;
  }

  .preview-window {
    min-height: auto;
  }

  .preview-list {
    padding: 0.75rem;
  }

  .preview-row {
    align-items: flex-start;
    padding: 0.72rem;
  }

  .quick-card {
    min-height: auto;
    padding: 1rem;
  }

  .spotlight-button {
    padding: 0.9rem;
  }

  .spotlight-panel,
  .modern-card,
  .stat-card {
    padding: 1rem;
  }

  .timeline-item {
    padding: 1rem;
  }

  .timeline-year {
    position: static;
    margin-bottom: 0.75rem;
  }

  #grid {
    gap: 0.55rem !important;
  }

  #grid > div {
    padding: 0.7rem !important;
    min-height: 8.5rem;
  }

  .detail-card {
    width: min(100% - 0.75rem, 960px) !important;
    margin: 0.5rem auto 1rem;
  }

  .detail-card > div {
    padding: 0.5rem !important;
  }

  .detail-panel .p-5,
  .detail-panel .sm\:p-8 {
    padding: 1rem !important;
  }

  .detail-panel h1 {
    font-size: clamp(2rem, 12vw, 3rem) !important;
  }

  .sticky-note {
    position: static;
  }
}

@media (max-width: 390px) {
  .preview-tabs {
    grid-template-columns: 1fr;
  }

  .hero-actions .modern-button {
    min-height: 3rem;
  }
}
