:root {
  color-scheme: light dark;
  --brand-blue: #488eff;
  --brand-blue-light: #5e9bff;
  --brand-primary: var(--brand-blue);
  --focus-glow: rgba(72, 142, 255, 0.12);
  --surface-light: #f8fafc;
  --surface-dark: #020817;
  --text-light: #0b1220;
  --text-dark: #e2e8f0;
  --text-muted: #475569;
  --text-muted-dark: #94a3b8;
  --header-height: 60px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --page-max-width: 1120px;
  --page-padding: clamp(16px, 4vw, 48px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme='dark'] body,
:root[data-theme='dark'] body {
  color: var(--text);
  background-color: var(--bg);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 4px;
}

.focus-ring:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-glow);
}

.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;
}

.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header__nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 1.5rem;
}

.site-header__nav .brand {
  grid-column: 2;
  justify-self: center;
}

.site-header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__theme-toggle {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .site-header__nav {
    grid-template-columns: auto auto;
    justify-items: start;
  }

  .site-header__nav .brand {
    grid-column: 1;
    justify-self: start;
  }

  .site-header__actions {
    grid-column: 2;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
}

.brand-wordmark {
  display: inline-flex;
  gap: 0.25rem;
  align-items: baseline;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  color: var(--focus);
  line-height: 1.1;
  transition: color 0.01s linear;
}

.brand-wordmark > span {
  font-weight: 700;
  letter-spacing: 0.09em;
}

.brand:focus-visible .brand-wordmark,
.brand:hover .brand-wordmark {
  color: var(--brand-blue-light);
}

.brand-wordmark--footer {
  font-size: 2rem;
}

main {
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-shell {
  --app-shell-top: calc(var(--header-height) + var(--safe-area-top));
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  padding-bottom: max(32px, calc(var(--safe-area-bottom) + 24px));
  overscroll-behavior: contain;
}

.page-shell__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--app-shell-top);
}

.page-shell__content--app {
  padding-top: var(--app-shell-top);
}

.site-footer {
  --footer-bg: #020817;
  --footer-text: #e2e8f0;
  --footer-muted: rgba(148, 163, 184, 0.82);
  --footer-link: rgba(255, 255, 255, 0.85);
  --footer-accent: var(--brand-primary);
  --footer-border: rgba(72, 142, 255, 0.25);
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 1.5rem calc(2.75rem + var(--safe-area-bottom));
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(72, 142, 255, 0.55), rgba(94, 155, 255, 0.35), rgba(72, 142, 255, 0.55));
  opacity: 0.7;
}

.footer-shell {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.75rem;
  align-items: start;
}

.footer-brand-block {
  position: relative;
  isolation: isolate;
  max-width: 360px;
}

.footer-heading {
  position: relative;
  display: inline-block;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--footer-accent);
}

.footer-heading::after {
  content: "";
  position: absolute;
  inset: -1.75rem -2rem;
  background: radial-gradient(circle at center, rgba(72, 142, 255, 0.18) 0%, rgba(72, 142, 255, 0) 70%);
  z-index: -1;
}

.footer-tagline {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--footer-text);
}

.footer-attribution {
  margin: 0;
  font-size: 0.95rem;
  color: var(--footer-muted);
  letter-spacing: 0.01em;
}

.footer-navigation {
  position: relative;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus {
  text-decoration: none;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--brand-blue-light);
}

.footer-link:hover::after,
.footer-link:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--footer-text);
}

.footer-contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-social-link,
.footer-social-link.social-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible,
.social-icon:hover,
.social-icon:focus-visible {
  color: var(--brand-blue);
  transform: translateY(-1px);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  margin-top: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--footer-border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--footer-muted);
  letter-spacing: 0.01em;
}

@media (max-width: 960px) {
  .footer-grid {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand-block,
  .footer-navigation,
  .footer-contact {
    margin: 0 auto;
  }

  .footer-links {
    align-items: center;
  }

  .footer-contact {
    align-items: center;
  }

  .footer-contact-group {
    align-items: center;
  }

  .footer-social-list {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-link,
  .footer-link::after,
  .footer-social-link,
  .social-icon,
  .brand-wordmark,
  .primary-button {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    transition-timing-function: linear !important;
  }

  .footer-social-link,
  .footer-social-link:hover,
  .footer-social-link:focus-visible,
  .social-icon,
  .social-icon:hover,
  .social-icon:focus-visible,
  .primary-button,
  .primary-button:hover,
  .primary-button:focus-visible {
    transform: none !important;
  }
}

.section-title {
  font-size: 2rem;
  margin: 3rem 0 1rem;
  color: var(--brand-primary);
}

.section {
  margin-top: 2.5rem;
  line-height: 1.7;
  color: #334155;
}

@media (prefers-color-scheme: dark) {
  .section {
    color: #cbd5f5;
  }
}



.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.85rem 1.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background-color: var(--brand-blue-light);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
  .lookup-fallback {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 55px rgba(2, 6, 23, 0.55);
  }
}
.app-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  padding-top: var(--safe-area-top);
  min-height: calc(var(--header-height) + var(--safe-area-top));
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme='dark'] .app-header,
:root[data-theme='dark'] .app-header {
  background-color: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.35);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  min-height: var(--header-height);
  width: min(100%, var(--page-max-width));
  margin: 0 auto;
  padding-inline: var(--page-padding);
  padding-block: clamp(0.5rem, 1.5vw, 0.75rem);
}

.app-header__left,
.app-header__right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.app-header__right {
  justify-content: flex-end;
}

.app-header__center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.app-header__brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  text-decoration: none;
  color: inherit;
}

.app-header__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.app-header__toggle {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .app-header__chip {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
}


.lookup-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-layout .lookup-shell {
  min-height: calc(100svh - var(--safe-area-bottom));
  padding: 0;
  background-color: var(--surface);
  background-image: radial-gradient(circle at top, rgba(72, 142, 255, 0.06), rgba(72, 142, 255, 0));
  transition: background-color 0.3s ease, background-image 0.3s ease;
}

[data-theme='dark'] .home-layout .lookup-shell,
:root[data-theme='dark'] .home-layout .lookup-shell {
  background-color: var(--bg);
  background-image: radial-gradient(circle at top, rgba(72, 142, 255, 0.18), rgba(11, 18, 32, 0));
}

.lookup-fallback {
  margin: 0 auto;
  max-width: 520px;
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.app-mount,
.app-mount__root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-article {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3rem) var(--page-padding) clamp(2rem, 6vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.page-article__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}

.page-article__lead {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--text);
  max-width: 65ch;
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-section + .page-section {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.page-section__title {
  margin: 0;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.page-section__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 70ch;
}

.page-section__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.65rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.page-section__list li {
  margin: 0;
  list-style: disc;
}

.hero-surface {
  position: relative;
  min-height: calc(100svh - var(--app-shell-top) - var(--safe-area-bottom));
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.5rem, 10vw, 5.5rem) var(--page-padding) clamp(3.5rem, 10vw, 5.5rem);
  overflow: hidden;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.hero-surface__content {
  position: relative;
  z-index: 1;
  width: min(92vw, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-surface__title {
  margin: 0;
  font-size: clamp(2.45rem, 4vw + 1.5rem, 3.65rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  max-width: 14ch;
  color: var(--text-strong);
  transition: color 0.3s ease;
}

.hero-surface__subtext {
  margin: 1rem 0 0;
  max-width: 60ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  transition: color 0.3s ease;
}

.hero-surface__form {
  width: 100%;
  margin-top: 2.75rem;
  display: flex;
  justify-content: center;
}

.hero-command {
  position: relative;
  width: min(92vw, 820px);
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 0.75rem 0.85rem 0.75rem 1.05rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12), 0 16px 32px var(--tab-shadow);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.3s ease, background-color 0.3s ease;
}

@media (max-width: 640px) {
  .hero-command {
    padding: 0.65rem 0.65rem 0.65rem 0.95rem;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14), 0 12px 24px var(--tab-shadow);
  }
}

.hero-command:hover,
.hero-command:focus-within {
  transform: scale(1.02);
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.16), 0 22px 48px var(--tab-shadow);
}

.hero-command:focus-within {
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.16), 0 22px 48px var(--tab-shadow), 0 0 0 2px var(--focus);
}

.hero-command__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: clamp(0.95rem, 2.7vw, 1.05rem);
  line-height: 1.6;
  padding: 0.35rem 0.5rem;
}

.hero-command__input:focus {
  outline: none;
}

.hero-command__input::placeholder {
  color: var(--muted);
}

.hero-command__submit {
  flex-shrink: 0;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  border-radius: clamp(0.9rem, 3vw, 1.5rem);
}

@media (max-width: 640px) {
  .hero-command__submit {
    padding: 0.7rem 1.35rem;
    font-size: 0.9rem;
  }
}

.hero-progress {
  margin-top: 1.5rem;
}
