:root {
  --bg: #f4f6f1;
  --card: #ffffff;
  --ink: #17201b;
  --muted: #657069;
  --soft: #e3e8e1;
  --line: #d5ddd4;
  --shadow: 0 18px 45px rgba(28, 34, 30, 0.12);
  --shadow-strong: 0 24px 55px rgba(28, 34, 30, 0.18);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(32, 143, 120, 0.14), transparent 30%),
    linear-gradient(315deg, rgba(224, 91, 73, 0.11), transparent 26%),
    repeating-linear-gradient(
      90deg,
      rgba(23, 32, 27, 0.035) 0,
      rgba(23, 32, 27, 0.035) 1px,
      transparent 1px,
      transparent 76px
    ),
    var(--bg);
}

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

.page-shell {
  width: min(1540px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 24px;
}

.topline {
  display: grid;
  grid-template-columns: minmax(300px, 1.08fr) minmax(260px, 0.92fr) auto;
  gap: 22px;
  align-items: end;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.company-logo {
  display: block;
  width: 82px;
  height: auto;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 3.35rem;
  line-height: 0.95;
}

.intro {
  max-width: 520px;
  margin: 0;
  color: #43504a;
  font-size: 1rem;
  line-height: 1.5;
}

.search-shell {
  display: grid;
  gap: 8px;
  width: min(330px, 100%);
}

.search-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tool-search {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(28, 34, 30, 0.08);
}

.tool-search::placeholder {
  color: #7c8780;
}

.tool-search:focus {
  border-color: rgba(19, 143, 122, 0.65);
  outline: 3px solid rgba(19, 143, 122, 0.18);
  outline-offset: 2px;
}

.gateway {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.empty-state {
  padding: 22px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.group {
  display: grid;
  grid-template-columns: minmax(180px, 0.22fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.group-heading {
  position: sticky;
  top: 14px;
  min-width: 0;
  padding: 10px 0;
}

.group-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.group-kicker::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.group h2 {
  margin-bottom: 7px;
  font-size: 1.22rem;
  line-height: 1.05;
}

.group p {
  max-width: 220px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

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

.tool-card {
  position: relative;
  display: grid;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.tool-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), white 26%);
  outline-offset: 3px;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent), black 8%);
  box-shadow: var(--shadow-strong);
}

.tool-card:hover .preview-frame {
  opacity: 0.95;
  transform: scale(0.17) translate3d(-28px, -18px, 0);
}

.preview {
  position: relative;
  height: 78px;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  background: color-mix(in srgb, var(--accent), white 82%);
}

.preview-fallback {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent), black 8%);
  opacity: 0.16;
}

.preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1180px;
  height: 740px;
  border: 0;
  pointer-events: none;
  opacity: 0.72;
  transform: scale(0.15) translate3d(-10px, -8px, 0);
  transform-origin: 0 0;
  filter: saturate(0.86) contrast(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.card-body {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 7px;
  padding: 11px 12px 13px;
}

.domain-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent), transparent 82%);
}

.domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tool-card h3 {
  overflow-wrap: anywhere;
  margin-bottom: 0;
  font-size: 0.96rem;
  line-height: 1.08;
}

.arrow {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(23, 32, 27, 0.15);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 850;
  background: var(--accent);
  transition: transform 180ms ease;
}

.tool-card:hover .arrow {
  transform: translateX(2px);
}

.route {
  align-self: end;
  overflow: hidden;
  margin-bottom: 0;
  color: #6d7771;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .topline {
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    font-size: 3.2rem;
  }

  .search-shell {
    width: min(440px, 100%);
  }

  .group {
    grid-template-columns: 1fr;
  }

  .group-heading {
    position: static;
    padding-bottom: 0;
  }

  .group p {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1540px);
    padding-top: 16px;
  }

  .brand {
    align-items: flex-start;
    gap: 12px;
  }

  .company-logo {
    width: 62px;
  }

  h1 {
    font-size: 2.35rem;
    line-height: 0.98;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

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