.tools-hero {
  padding: 42px 0 30px;
  border-bottom: 1px solid rgba(56, 232, 255, .18);
  background: linear-gradient(112deg, #0b0e2b 0%, #15103a 52%, #071829 100%);
}
.tools-hero-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.tools-hero h1 {
  margin: 2px 0 6px;
  color: #fff;
  font-size: 3.85rem;
  line-height: .98;
  letter-spacing: 0;
}
.tools-hero p { max-width: 760px; margin: 0; color: #c8cee9; }
.tools-directory-count {
  display: grid;
  flex: 0 0 auto;
  min-width: 128px;
  padding: 12px 15px;
  border-left: 3px solid var(--electric);
  background: rgba(4, 7, 25, .58);
}
.tools-directory-count strong { color: var(--electric); font-size: 1.75rem; line-height: 1; }
.tools-directory-count span { margin-top: 4px; color: #c6cdeb; font-size: .68rem; font-weight: 850; text-transform: uppercase; }

.tools-filter-dock {
  position: sticky;
  z-index: 80;
  top: var(--site-header-height);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(5, 7, 23, .96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px) saturate(140%);
}
.tools-command-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding-top: 13px;
}
.tools-search { display: grid; gap: 5px; min-width: 0; }
.tools-search > span {
  color: #aeb8e0;
  font-size: .67rem;
  font-weight: 900;
  text-transform: uppercase;
}
.tools-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(56, 232, 255, .3);
  border-radius: 7px;
  outline: 0;
  color: #fff;
  background: #0d1230;
}
.tools-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 232, 255, .12);
}
.tools-info-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid rgba(248, 255, 70, .26);
  border-radius: 7px;
  background: rgba(248, 255, 70, .055);
  cursor: pointer;
}
.tools-info-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tools-info-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: #242944;
  transition: border-color .16s ease, background .16s ease;
}
.tools-info-switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c1c7df;
  transition: transform .16s ease, background .16s ease;
}
.tools-info-toggle input:checked + .tools-info-switch { border-color: var(--electric); background: rgba(248, 255, 70, .2); }
.tools-info-toggle input:checked + .tools-info-switch::after { transform: translateX(18px); background: var(--electric); }
.tools-info-toggle input:focus-visible + .tools-info-switch { outline: 3px solid rgba(56, 232, 255, .35); outline-offset: 2px; }
.tools-info-label { display: grid; line-height: 1.1; white-space: nowrap; }
.tools-info-label strong { color: #fff; font-size: .76rem; }
.tools-info-label small { margin-top: 3px; color: var(--electric); font-size: .64rem; font-weight: 900; text-transform: uppercase; }

.tools-role-wrap { padding-top: 10px; padding-bottom: 11px; overflow-x: auto; scrollbar-width: thin; }
.tools-role { display: flex; gap: 7px; min-width: max-content; }
.tools-role button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  color: #e7eaff;
  background: #111537;
  font: 900 .75rem/1 inherit;
  cursor: pointer;
}
.tools-role button:hover { border-color: var(--magenta); }
.tools-role button:focus-visible { outline: 3px solid rgba(56, 232, 255, .28); outline-offset: 2px; }
.tools-role button.is-active { border-color: var(--electric); color: #071019; background: var(--electric); }

.tools-layout { display: grid; gap: 34px; padding-top: 34px; padding-bottom: 90px; }
.tools-group {
  display: grid;
  grid-template-columns: minmax(190px, .25fr) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.tools-group > header { display: flex; align-items: flex-start; gap: 11px; }
.tools-group > header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 950;
}
.tools-group > header p { margin: 0 0 3px; color: var(--magenta); font-size: .63rem; font-weight: 900; text-transform: uppercase; }
.tools-group h2 { margin: 0; color: #fff; font-size: 1.25rem; line-height: 1.15; }
.tools-group > header small { display: block; margin-top: 6px; color: #919cc7; font-size: .68rem; font-weight: 800; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tools-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 194px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: linear-gradient(145deg, #111532, #0a0e29);
  box-shadow: inset 3px 0 rgba(56, 232, 255, .22);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.tools-card:hover {
  border-color: rgba(56, 232, 255, .56);
  box-shadow: inset 3px 0 var(--cyan), 0 12px 26px rgba(0, 0, 0, .2);
  transform: translateY(-2px);
}
.tools-card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 28px; }
.tools-access {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid rgba(56, 232, 255, .25);
  border-radius: 999px;
  color: #8ef3ff;
  background: rgba(56, 232, 255, .07);
  font-size: .59rem;
  font-weight: 950;
  text-transform: uppercase;
}
.tools-access-seller { border-color: rgba(255, 78, 219, .31); color: #ff9bea; background: rgba(255, 78, 219, .08); }
.tools-access-master { border-color: rgba(255, 106, 61, .34); color: #ffaf8f; background: rgba(255, 106, 61, .09); }
.tools-access-employee { border-color: rgba(93, 255, 197, .3); color: #8dffd6; background: rgba(93, 255, 197, .07); }
.tools-access-beta { border-color: rgba(248, 255, 70, .34); color: var(--electric); background: rgba(248, 255, 70, .07); }
.tools-access-account { border-color: rgba(159, 85, 255, .34); color: #caa6ff; background: rgba(159, 85, 255, .08); }
.tools-card h3 { margin: 10px 0 5px; color: #fff; font-size: 1.04rem; line-height: 1.2; overflow-wrap: anywhere; }
.tools-card-explanation { margin: 0 0 15px; color: #bfc7e7; font-size: .76rem; line-height: 1.55; }
.tools-open-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid rgba(248, 255, 70, .24);
  border-radius: 6px;
  color: var(--electric);
  background: rgba(248, 255, 70, .045);
  font-size: .7rem;
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tools-open-button:hover { border-color: var(--electric); color: #071019; background: var(--electric); }
.tools-open-button:focus-visible { outline: 3px solid rgba(56, 232, 255, .3); outline-offset: 2px; }
.tools-compact-info { position: relative; z-index: 4; flex: 0 0 auto; }
.tools-info-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  background: #0d1230;
  font: 950 .75rem/1 inherit;
  cursor: help;
}
.tools-info-button:hover,
.tools-info-button:focus-visible { outline: 0; color: #06101b; background: var(--cyan); box-shadow: 0 0 16px rgba(56, 232, 255, .4); }
.tools-hover-tip {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 8px);
  width: 300px;
  max-width: calc(100vw - 62px);
  padding: 11px 12px;
  border: 1px solid var(--cyan);
  border-radius: 7px;
  color: #eef1ff;
  background: #080c26;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .48);
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .14s ease, visibility .14s, transform .14s ease;
  pointer-events: none;
}
.tools-info-button:hover + .tools-hover-tip,
.tools-info-button:focus-visible + .tools-hover-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.tools-layout.is-info-expanded .tools-compact-info { display: none; }
.tools-layout.is-info-compact .tools-card-explanation { display: none; }
.tools-layout.is-info-compact .tools-card { min-height: 132px; }
.tools-layout.is-info-compact .tools-card h3 { margin-top: 7px; }
.tools-empty {
  padding: 34px 0 50px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.tools-empty strong { color: var(--electric); font-size: 1.15rem; }
.tools-empty p, .tools-noscript { color: #b9c2e3; }
.tools-noscript { padding: 28px 0 70px; }

.tools-tip {
  position: fixed;
  z-index: 300;
  left: 50%;
  top: 50%;
  width: min(470px, calc(100vw - 32px));
  padding: 24px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  color: #fff;
  background: #090c27;
  box-shadow: 0 0 0 100vmax rgba(2, 3, 12, .76), 0 24px 70px #000;
}
.tools-tip > button {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}
.tools-tip h2 { margin: 1px 38px 8px 0; }
.tools-tip p:not(.eyebrow) { color: #c8cee9; line-height: 1.65; }
.tools-tip .btn { margin-top: 8px; }

@media (max-width: 920px) {
  .tools-group { grid-template-columns: 1fr; gap: 15px; }
  .tools-group > header { align-items: center; }
}
@media (max-width: 680px) {
  .tools-hero { padding: 30px 0 24px; }
  .tools-hero-inner { align-items: flex-start; flex-direction: column; gap: 17px; }
  .tools-hero h1 { font-size: 2.6rem; }
  .tools-directory-count { min-width: 116px; }
  .tools-command-bar { grid-template-columns: 1fr; align-items: stretch; }
  .tools-info-toggle { justify-content: space-between; }
  .tools-info-label { order: -1; }
  .tools-grid { grid-template-columns: 1fr; }
  .tools-layout { gap: 26px; padding-top: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .tools-info-switch,
  .tools-info-switch::after,
  .tools-card,
  .tools-hover-tip { transition: none; }
  .tools-card:hover { transform: none; }
}
