/**
 * The Agent Hub — redesigned WordPress tool workspace.
 *
 * This stylesheet intentionally scopes the local React tool-shell language to
 * the WordPress tool template so legacy page rules cannot leak into the frame.
 */

body.agent-hub-theme {
  margin: 0;
  min-width: 320px;
  padding: 0 !important;
  overflow-x: hidden;
  background: #02070d;
  color: #f4f7f8;
}

body.tool-switcher-open {
  overflow: hidden !important;
}

.tool-shell {
  --ink: #02070d;
  --ink-soft: #06111a;
  --panel: #09141f;
  --panel-raised: #0c1b2a;
  --line: rgba(244, 247, 248, 0.12);
  --line-strong: rgba(244, 247, 248, 0.23);
  --paper: #f4f7f8;
  --muted: #9da9b7;
  --violet: #a855f7;
  --violet-light: #c084fc;
  --violet-deep: #5b21b6;
  --mint: #48f59a;
  --coral: #ff6b6b;
  --display: "Space Grotesk", "Arial Black", sans-serif;
  --body: "Inter", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;

  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(91, 33, 182, 0.18), transparent 28%),
    radial-gradient(circle at 7% 76%, rgba(72, 245, 154, 0.055), transparent 22%),
    var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.tool-shell::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(rgba(192, 132, 252, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 72%);
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
  pointer-events: none;
}

.tool-shell > :not(.modal-shell) {
  position: relative;
  z-index: 1;
}

.tool-shell > .modal-shell {
  position: fixed;
  z-index: 1000;
}

.tool-shell a {
  color: inherit;
  text-decoration: none;
}

:where(.tool-shell) button {
  color: inherit;
  font: inherit;
}

.tool-shell :focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
}

.tool-skip-link {
  position: fixed !important;
  z-index: 1100 !important;
  top: 10px;
  left: 10px;
  padding: 11px 15px;
  border: 1px solid var(--violet-light);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: 700 11px/1 var(--mono);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.tool-header {
  position: relative;
  z-index: 40 !important;
  display: grid;
  grid-template-columns: 72px 170px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  padding: 0 24px 0 0;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 7, 13, 0.94);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(192, 132, 252, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.tool-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(32vw, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet-light));
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.48);
  content: "";
  pointer-events: none;
}

.tool-header__back {
  display: grid;
  min-height: 76px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  transition:
    color 180ms ease,
    background 180ms ease;
}

.tool-header__back:hover {
  background: rgba(168, 85, 247, 0.09);
  color: var(--paper);
}

.tool-header__back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-header__back span {
  display: none;
}

.tool-header__brand {
  position: relative;
  display: block;
  width: 142px;
  height: 63px;
  margin-left: 22px;
}

.tool-header__brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.tool-header__station {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
  margin-left: 30px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.tool-header__glyph {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 50%;
  color: var(--violet-light);
  background: rgba(168, 85, 247, 0.08);
}

.tool-header__glyph::before {
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(192, 132, 252, 0.22);
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: ah-glyph-orbit 18s linear infinite;
}

.tool-header__glyph svg {
  width: 18px;
  height: 18px;
}

.tool-header__station > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.tool-header__station small {
  color: var(--violet-light);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-header__station strong {
  overflow: hidden;
  max-width: min(32vw, 390px);
  font-family: var(--display);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-shell .network-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-shell .network-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(72, 245, 154, 0.1), 0 0 14px var(--mint);
  animation: ah-live-pulse 2.4s ease-in-out infinite;
}

.tool-shell .wallet-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  max-width: 190px;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 20, 31, 0.72);
  color: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.tool-shell .wallet-pill:hover {
  border-color: rgba(192, 132, 252, 0.55);
  background: rgba(91, 33, 182, 0.22);
  transform: translateY(-1px);
}

.tool-shell .wallet-pill__signal {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid var(--violet-light);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.tool-shell .wallet-pill__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-shell .wallet-pill.connected,
.tool-shell .wallet-pill.is-connected {
  border-color: rgba(72, 245, 154, 0.28);
}

.tool-shell .wallet-pill.connected .wallet-pill__signal,
.tool-shell .wallet-pill.is-connected .wallet-pill__signal {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 10px rgba(72, 245, 154, 0.48);
}

.tool-switcher-button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tool-switcher-button:hover {
  border-color: rgba(192, 132, 252, 0.48);
  background: rgba(168, 85, 247, 0.11);
  box-shadow: 0 0 24px rgba(91, 33, 182, 0.18);
  transform: translateY(-1px);
}

.tool-switcher-button span {
  margin-left: 8px;
  color: var(--violet-light);
}

.tool-switcher {
  position: absolute !important;
  z-index: 35 !important;
  top: 76px;
  right: 0;
  left: 0;
  padding: 28px clamp(22px, 4vw, 70px) 34px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.35);
  background: rgba(6, 17, 26, 0.98);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: ah-switcher-drop 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tool-switcher[hidden] {
  display: none !important;
}

.tool-switcher::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 0%, rgba(168, 85, 247, 0.15), transparent 32%),
    repeating-linear-gradient(
      90deg,
      transparent 0 71px,
      rgba(192, 132, 252, 0.025) 72px
    );
  content: "";
  pointer-events: none;
}

.tool-switcher > * {
  position: relative;
  z-index: 1;
}

.tool-switcher__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tool-switcher .section-kicker,
.tool-not-found .section-kicker {
  margin: 0 0 8px;
  color: var(--violet-light);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-switcher__head h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.tool-switcher__head button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  transition: border-color 160ms ease, background 160ms ease;
}

.tool-switcher__head button:hover {
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(168, 85, 247, 0.09);
}

.tool-switcher__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tool-switcher__grid a {
  display: grid;
  grid-template-columns: 22px 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tool-switcher__grid a:hover,
.tool-switcher__grid a.is-active {
  border-color: rgba(192, 132, 252, 0.28);
  background: rgba(168, 85, 247, 0.11);
  box-shadow: inset 0 0 28px rgba(91, 33, 182, 0.09);
}

.tool-switcher__grid a:hover {
  transform: translateY(-2px);
}

.tool-switcher__grid a.is-active {
  box-shadow: inset 2px 0 var(--violet-light);
}

.tool-switcher__grid a > span {
  color: rgba(157, 169, 183, 0.5);
  font-family: var(--mono);
  font-size: 7px;
}

.tool-switcher__grid svg {
  width: 19px;
  height: 19px;
  color: var(--violet-light);
}

.tool-switcher__grid strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.tool-switcher__grid small {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 6px;
}

.tool-context {
  z-index: 3 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 9px 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(168, 85, 247, 0.055), transparent 24%),
    var(--ink-soft);
}

.tool-context > div {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.tool-context__status {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-context__status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
}

.tool-context p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-context__actions {
  flex: 0 0 auto;
}

.tool-context__actions button,
.tool-context__actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.tool-context__actions button:hover,
.tool-context__actions a:hover {
  border-color: rgba(192, 132, 252, 0.4);
  background: rgba(168, 85, 247, 0.07);
  color: var(--paper);
  transform: translateY(-1px);
}

.tool-context__hint {
  color: var(--violet-light);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-context__hint[hidden] {
  display: none !important;
}

.tool-stage {
  position: relative;
  min-height: calc(100svh - 136px);
  padding: 25px 0 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 8%, rgba(168, 85, 247, 0.09), transparent 26%),
    #090c12;
  box-shadow: inset 0 1px 0 rgba(192, 132, 252, 0.08);
}

.tool-stage__effects {
  position: absolute;
  z-index: 4;
  inset: 25px 0 0;
  overflow: hidden;
  pointer-events: none;
}

.tool-stage__effects::before {
  position: absolute;
  top: -18%;
  right: 0;
  left: 0;
  height: 16%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(192, 132, 252, 0.045),
    rgba(72, 245, 154, 0.028),
    transparent
  );
  content: "";
  animation: ah-tool-stage-scan 8s linear infinite;
}

.tool-stage__effects span {
  position: absolute;
  width: 32px;
  height: 32px;
  opacity: 0.7;
}

.tool-stage__effects span:nth-child(1),
.tool-stage__effects span:nth-child(2) {
  top: 12px;
  border-top: 1px solid rgba(192, 132, 252, 0.52);
}

.tool-stage__effects span:nth-child(3),
.tool-stage__effects span:nth-child(4) {
  bottom: 12px;
  border-bottom: 1px solid rgba(72, 245, 154, 0.32);
}

.tool-stage__effects span:nth-child(odd) {
  left: 12px;
  border-left: 1px solid rgba(192, 132, 252, 0.52);
}

.tool-stage__effects span:nth-child(even) {
  right: 12px;
  border-right: 1px solid rgba(192, 132, 252, 0.52);
}

.tool-stage__rail {
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(244, 247, 248, 0.08);
  background: #04080d;
  color: rgba(157, 169, 183, 0.54);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.tool-shell .tool-stage .standalone-tool-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: none;
  height: calc(100svh - 161px);
  min-height: calc(100svh - 161px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #090c12;
  opacity: 1;
  transition: opacity 240ms ease;
}

.tool-shell .tool-stage .standalone-tool-frame.is-loading {
  opacity: 0;
}

.tool-stage__loader {
  position: absolute;
  z-index: 5;
  inset: 25px 0 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle, rgba(91, 33, 182, 0.15), transparent 30%),
    #070c12;
  text-align: center;
}

.tool-stage__loader[hidden] {
  display: none !important;
}

.tool-stage__loader-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 18px;
}

.tool-stage__loader-orbit span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 50%;
  animation: ah-spin 2s linear infinite;
}

.tool-stage__loader-orbit span:nth-child(2) {
  inset: 20px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 1.4s;
}

.tool-stage__loader-orbit i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--violet-light);
  box-shadow: 0 0 20px var(--violet);
  transform: translate(-50%, -50%);
}

.tool-stage__loader p {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
}

.tool-stage__loader small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.tool-mobile-bar {
  display: none;
}

.tool-not-found {
  display: grid;
  min-height: calc(100svh - 76px);
  padding: clamp(40px, 10vw, 150px) clamp(22px, 8vw, 120px);
  align-content: center;
  justify-items: start;
  background:
    radial-gradient(circle at 18% 32%, rgba(168, 85, 247, 0.15), transparent 30rem),
    linear-gradient(110deg, transparent, rgba(72, 245, 154, 0.025));
}

.tool-not-found h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 9vw, 126px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.tool-not-found > p:not(.section-kicker) {
  max-width: 580px;
  margin: 24px 0;
  color: var(--muted);
  line-height: 1.65;
}

.tool-not-found > a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.1);
  font-size: 12px;
  font-weight: 700;
}

@keyframes ah-live-pulse {
  50% {
    opacity: 0.58;
    transform: scale(0.82);
  }
}

@keyframes ah-glyph-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ah-switcher-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ah-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ah-tool-stage-scan {
  to {
    transform: translateY(760%);
  }
}

@media (max-width: 1180px) {
  .tool-switcher__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .tool-header {
    grid-template-columns: 64px 150px minmax(0, 1fr) auto;
  }

  .tool-header__station {
    margin-left: 15px;
    padding-left: 15px;
  }

  .tool-header__actions .network-status {
    display: none;
  }

  .tool-context p,
  .tool-context__hint {
    display: none;
  }
}

@media (max-width: 768px) {
  .tool-shell {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .tool-header {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 66px;
    padding-right: 12px;
  }

  .tool-header__back {
    min-height: 66px;
  }

  .tool-header__brand {
    display: none;
  }

  .tool-header__station {
    margin-left: 14px;
    padding-left: 0;
    border-left: 0;
  }

  .tool-header__station strong {
    max-width: 40vw;
  }

  .tool-header__station small {
    display: none;
  }

  .tool-header__actions .tool-switcher-button,
  .tool-header__actions .wallet-pill__label {
    display: none;
  }

  .tool-header__actions .wallet-pill {
    width: 44px;
    padding: 0;
  }

  .tool-context {
    min-height: 48px;
    padding: 2px 12px;
  }

  .tool-context__actions button {
    display: none;
  }

  .tool-context__actions a {
    min-height: 44px;
  }

  .tool-stage {
    min-height: calc(100svh - 176px - env(safe-area-inset-bottom));
  }

  .tool-shell .tool-stage .standalone-tool-frame {
    height: calc(100svh - 201px - env(safe-area-inset-bottom));
    min-height: calc(100svh - 201px - env(safe-area-inset-bottom));
  }

  .tool-switcher {
    position: fixed !important;
    z-index: 80 !important;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 14px max(24px, env(safe-area-inset-bottom));
  }

  .tool-switcher__grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-switcher__grid a {
    grid-template-columns: 20px 30px minmax(0, 1fr);
    min-height: 68px;
  }

  .tool-switcher__grid small {
    display: none;
  }

  .tool-mobile-bar {
    position: fixed !important;
    z-index: 70 !important;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(192, 132, 252, 0.25);
    background: rgba(2, 7, 13, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .tool-mobile-bar a,
  .tool-mobile-bar button {
    display: grid;
    min-height: 62px;
    padding: 0;
    place-content: center;
    justify-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
  }

  .tool-mobile-bar a:hover,
  .tool-mobile-bar button:hover {
    color: var(--paper);
    background: rgba(168, 85, 247, 0.07);
  }

  .tool-mobile-bar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tool-stage__effects {
    opacity: 0.42;
  }

  .tool-stage__effects::before {
    animation: none;
  }
}

@media (max-width: 560px) {
  .tool-header__station {
    gap: 9px;
  }

  .tool-header__glyph {
    width: 35px;
    height: 35px;
  }

  .tool-header__station strong {
    max-width: 42vw;
    font-size: 12px;
  }

  .tool-context__status {
    font-size: 8px;
  }

  .tool-context__actions a {
    padding-inline: 10px;
    font-size: 9px;
  }

  .tool-switcher__head h2 {
    font-size: 25px;
  }

  .tool-switcher__grid a {
    padding: 9px 8px;
  }
}

@media (max-width: 380px) {
  .tool-header {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    padding-right: 8px;
  }

  .tool-header__station {
    margin-left: 10px;
  }

  .tool-header__glyph {
    display: none;
  }

  .tool-header__station strong {
    max-width: 44vw;
  }

  .tool-switcher__grid {
    grid-template-columns: 1fr;
  }

  .tool-switcher__grid a {
    min-height: 64px;
  }

  .tool-context {
    padding-inline: 9px;
  }

  .tool-context__actions a {
    padding-inline: 8px;
    font-size: 8px;
  }

  .tool-stage__rail {
    padding-inline: 8px;
    font-size: 6px;
  }
}

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