:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f7f9fc;
  --surface-strong: #eef3f9;
  --text: #0b1730;
  --muted: #5d6b80;
  --border: #d8e0eb;
  --accent: #095ed5;
  --accent-hover: #074aa9;
  --focus: #f7b500;
  --shadow: 0 18px 45px rgba(22, 42, 75, 0.09);
  --radius: 1.15rem;
  --shell: 74rem;
}

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

html {
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.45rem;
  background: var(--text);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

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

.shell {
  width: min(calc(100% - 3rem), var(--shell));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.15rem, 3vw, 2rem);
}

.site-nav a {
  position: relative;
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.page-main {
  flex: 1;
  padding-block: clamp(3.75rem, 8vw, 7rem);
}

.intro {
  max-width: 59rem;
  margin-bottom: clamp(3rem, 7vw, 5.25rem);
}

.intro h1,
.page-heading h1,
.agent-detail h1 {
  margin: 0;
  color: var(--text);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.intro h1 {
  font-size: clamp(2.55rem, 6vw, 5.1rem);
}

.intro p,
.page-heading p,
.agent-detail > p {
  margin: 1.4rem 0 0;
  max-width: 43rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.section-title {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agent-list {
  display: grid;
  gap: 1rem;
}

.agent-card {
  min-height: 15rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.7rem, 4vw, 3rem);
  padding: clamp(1.4rem, 4vw, 2.8rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.agent-card-featured {
  min-height: 18rem;
}

.agent-card-featured .agent-icon {
  width: clamp(7rem, 16vw, 11rem);
}

.agent-icon {
  width: clamp(6.5rem, 13vw, 9rem);
  height: auto;
  border-radius: 1.65rem;
}

.agent-card-body h2,
.agent-card-body h3 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.agent-card-body p {
  margin: 0.65rem 0 1.15rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.text-link,
.back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover,
.back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.agent-card-featured .text-link {
  min-height: 3.25rem;
  padding: 0.75rem 1.1rem;
  border-radius: 0.7rem;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(9, 94, 213, 0.18);
}

.agent-card-featured .text-link:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
}

.text-link svg,
.back-link svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.page-heading {
  margin-bottom: clamp(2.4rem, 6vw, 4rem);
}

.page-heading h1,
.agent-detail h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
}

.directory-main {
  max-width: var(--shell);
}

.registry-message {
  margin: 1rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-strong);
  color: var(--muted);
}

.detail-main {
  display: grid;
  place-items: center;
}

.agent-detail {
  width: min(100%, 46rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-icon {
  width: clamp(7rem, 16vw, 10rem);
  height: auto;
  margin-bottom: 2rem;
  border-radius: 1.8rem;
}

.agent-detail > p {
  margin-inline: auto;
}

.button-primary {
  min-width: min(100%, 18rem);
  min-height: 3.5rem;
  margin-top: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--accent);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(9, 94, 213, 0.22);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.back-link {
  margin-top: 1.5rem;
}

@media (max-width: 42rem) {
  .shell {
    width: min(calc(100% - 2rem), var(--shell));
  }

  .header-inner {
    min-height: 4.5rem;
  }

  .page-main {
    padding-block: 3rem;
  }

  .intro {
    margin-bottom: 3rem;
  }

  .agent-card,
  .agent-card-featured {
    min-height: 0;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 1.35rem;
    padding: 1.4rem;
  }

  .agent-icon {
    width: 6.4rem;
    border-radius: 1.3rem;
  }

  .detail-icon {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 30rem) {
  .header-inner {
    min-height: 0;
    display: grid;
    justify-content: stretch;
    gap: 0.65rem;
    padding-block: 0.85rem;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

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