:root {
  --ink: #080b0f;
  --panel: #0e1319;
  --panel-2: #121922;
  --line: #26303b;
  --muted: #9ca7b5;
  --soft: #c6cdd6;
  --white: #f7f8f5;
  --gold: #e5b020;
  --gold-soft: #ffd45e;
  --blue: #4687ff;
  --max: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--white);
  background:
    linear-gradient(rgba(255, 255, 255, .023) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .023) 1px, transparent 1px),
    var(--ink);
  background-size: 44px 44px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--gold);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
}

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

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(var(--max), calc(100% - 48px));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  font-weight: 900;
}

.site-header nav,
footer nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header nav a,
footer nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

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

.site-header .header-help {
  padding: 10px 16px;
  border: 1px solid #596473;
  color: var(--white);
}

.hero {
  position: relative;
  display: grid;
  width: min(var(--max), calc(100% - 48px));
  min-height: 680px;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);
  gap: clamp(60px, 8vw, 120px);
  align-items: center;
  margin: 0 auto;
  padding: 80px 0 100px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 8%;
  left: -18%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: rgba(229, 176, 32, .09);
  filter: blur(110px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--gold);
  font: 800 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 30px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(53px, 6vw, 86px);
  font-weight: 850;
  line-height: .96;
  letter-spacing: -.065em;
}

.hero h1 em {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-intro {
  max-width: 600px;
  margin: 30px 0 34px;
  color: var(--soft);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.75;
}

.primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 44px;
  padding: 0 22px;
  color: var(--ink);
  background: var(--gold);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.primary-action:hover,
.primary-action:focus-visible { background: var(--gold-soft); }

.route-map {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: 24px;
  border: 1px solid #34404d;
  background: rgba(12, 16, 21, .92);
  box-shadow: 28px 34px 0 rgba(70, 135, 255, .07);
}

.route-map::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 210px;
  height: 210px;
  border: 42px solid rgba(70, 135, 255, .08);
  border-radius: 50%;
}

.route-map__top,
.route-map__signal {
  display: flex;
  align-items: center;
}

.route-map__top {
  justify-content: space-between;
  color: #788493;
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
}

.route-map__signal { gap: 7px; }

.route-map__signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59d69a;
  box-shadow: 0 0 12px #59d69a;
}

.route-map__core {
  position: relative;
  display: grid;
  width: 146px;
  height: 146px;
  place-content: center;
  margin: 62px auto 0;
  border: 1px solid #465260;
  text-align: center;
}

.route-map__core::before,
.route-map__core::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(229, 176, 32, .22);
  transform: rotate(45deg);
}

.route-map__core::after {
  inset: -20px;
  border-color: rgba(255, 255, 255, .07);
}

.route-map__mark {
  position: relative;
  z-index: 1;
  justify-self: center;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  font-weight: 900;
}

.route-map__core strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 20px;
  letter-spacing: .18em;
}

.route-map__core small {
  position: absolute;
  top: calc(100% + 34px);
  left: 50%;
  width: max-content;
  color: #6f7b89;
  font: 700 9px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .14em;
  transform: translateX(-50%);
}

.route-map__lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 78%;
  height: 58px;
  margin: 57px auto 0;
}

.route-map__lines span {
  border-top: 1px solid rgba(229, 176, 32, .55);
  border-right: 1px solid rgba(229, 176, 32, .55);
}

.route-map__lines span:first-child { border-right: 0; border-left: 1px solid rgba(229, 176, 32, .55); }

.route-map__groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.route-map__groups a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #2c3540;
  background: #10161d;
  text-decoration: none;
}

.route-map__groups a:hover,
.route-map__groups a:focus-visible { border-color: var(--gold); }

.route-map__groups b {
  color: var(--gold);
  font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.route-map__groups span {
  overflow: hidden;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
}

.tool-directory {
  scroll-margin-top: 30px;
  padding: 104px max(24px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 19, 25, .96);
}

.directory-heading {
  display: grid;
  max-width: var(--max);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 50px;
  align-items: end;
  margin: 0 auto 18px;
}

.directory-heading > * { min-width: 0; }

.directory-heading h2,
.expert-route h2 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.tool-search {
  display: grid;
  min-width: 0;
  gap: 9px;
  color: var(--muted);
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.search-control {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid #3a4653;
  background: var(--ink);
}

.search-control:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(229, 176, 32, .16); }

.search-control svg {
  width: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.6;
}

.search-control input {
  width: 0;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font: 500 15px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  text-transform: none;
}

.search-control input::placeholder { color: #697482; }

.search-status {
  max-width: var(--max);
  margin: 0 auto 34px;
  color: #75818e;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-groups {
  display: grid;
  max-width: var(--max);
  gap: 22px;
  margin: 0 auto;
}

.tool-group {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--ink);
}

.tool-group[hidden],
.tool[hidden] { display: none; }

.tool-group__heading {
  display: flex;
  gap: 22px;
  padding: 30px 26px;
  border-right: 1px solid var(--line);
}

.tool-group__heading > span {
  color: var(--gold);
  font: 700 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-group__heading h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.25;
}

.tool-group__heading p {
  margin: 0;
  color: #838e9b;
  font-size: 13px;
  line-height: 1.65;
}

.tool-list { min-width: 0; }

.tool {
  display: grid;
  min-height: 112px;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 22px 26px;
  text-decoration: none;
  transition: background .18s ease;
}

.tool + .tool { border-top: 1px solid var(--line); }

.tool:hover,
.tool:focus,
.tool:focus-visible { background: var(--panel-2); }

.tool:focus,
.tool:focus-visible {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.tool-code {
  color: #677483;
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}

.tool-copy { display: grid; gap: 7px; }

.tool-copy strong {
  color: var(--white);
  font-size: 18px;
  line-height: 1.2;
}

.tool-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool-open {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.tool-open i {
  color: var(--gold);
  font-size: 18px;
  font-style: normal;
  transition: transform .18s ease;
}

.tool:hover .tool-open i,
.tool:focus-visible .tool-open i { transform: translate(3px, -3px); }

.empty-state {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px;
  border: 1px dashed #485462;
  text-align: center;
}

.empty-state strong { font-size: 22px; }
.empty-state p { color: var(--muted); }
.empty-state button {
  padding: 11px 16px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.expert-route {
  display: grid;
  width: min(var(--max), calc(100% - 48px));
  grid-template-columns: 1fr .8fr auto;
  gap: clamp(36px, 6vw, 80px);
  align-items: end;
  margin: 0 auto;
  padding: 100px 0;
}

.expert-route p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.expert-route > a {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold);
  color: var(--white);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.expert-route > a span { color: var(--gold); font-size: 18px; }
.expert-route > a:hover,
.expert-route > a:focus-visible { color: var(--gold-soft); }

footer {
  display: grid;
  width: min(var(--max), calc(100% - 48px));
  min-height: 130px;
  grid-template-columns: auto 1fr auto;
  gap: 34px;
  align-items: center;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.brand--small { font-size: 15px; }
.brand--small .brand-mark { width: 25px; height: 25px; font-size: 14px; }
footer > p { margin: 0; color: #707b88; font-size: 12px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .route-map { width: min(620px, 100%); }
  .tool-group { grid-template-columns: 240px minmax(0, 1fr); }
  .expert-route { grid-template-columns: 1fr 1fr; }
  .expert-route > a { justify-self: start; }
}

@media (max-width: 720px) {
  .site-header { width: min(100% - 32px, var(--max)); }
  .site-header nav a:not(.header-help) { display: none; }
  .site-header nav { gap: 0; }
  .site-header .header-help { padding: 9px 11px; font-size: 11px; }
  .hero { width: min(100% - 32px, var(--max)); min-height: 0; padding: 70px 0 76px; }
  .hero::before { left: -120px; width: 320px; height: 320px; filter: blur(70px); }
  .hero h1 { font-size: clamp(47px, 15vw, 68px); }
  .route-map { min-height: 440px; padding: 19px; box-shadow: 12px 14px 0 rgba(70, 135, 255, .07); }
  .route-map__top { gap: 12px; }
  .route-map__signal { text-align: right; }
  .route-map__core { margin-top: 56px; }
  .route-map__groups a { padding: 11px 8px; }
  .route-map__groups span { font-size: 9px; }
  .tool-directory { padding: 74px 16px; }
  .directory-heading { grid-template-columns: 1fr; gap: 30px; }
  .tool-group { grid-template-columns: 1fr; }
  .tool-group__heading { border-right: 0; border-bottom: 1px solid var(--line); }
  .tool { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 22px 18px; }
  .tool-open { grid-column: 2; justify-content: space-between; padding-top: 6px; }
  .expert-route { width: min(100% - 32px, var(--max)); grid-template-columns: 1fr; padding: 76px 0; }
  footer { width: min(100% - 32px, var(--max)); grid-template-columns: 1fr; gap: 17px; padding: 34px 0; }
  footer nav { flex-wrap: wrap; gap: 18px; }
}

@media (max-width: 390px) {
  .tool { grid-template-columns: 1fr; }
  .tool-open { grid-column: 1; }
  .tool-group__heading { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool,
  .tool-open i { transition: none; }
}
