:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #20242d;
  --muted: #687084;
  --line: #d8deea;
  --accent: #166f63;
  --accent-soft: #e6f4f1;
  --warm: #f3b33d;
  --shadow: 0 18px 46px rgba(27, 35, 52, .12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.toolbox-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero {
  min-height: 178px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 26px 22px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 10vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.intro {
  max-width: 25em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.toolbox-mark {
  width: 92px;
  height: 92px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.toolbox-mark span {
  border-radius: 8px;
  background: var(--accent-soft);
  border: 2px solid rgba(22, 111, 99, .22);
}

.toolbox-mark span:nth-child(2) {
  background: #fff4d8;
  border-color: rgba(243, 179, 61, .35);
}

.toolbox-mark span:nth-child(3) {
  background: #eef1f7;
  border-color: rgba(104, 112, 132, .2);
}

.toolbox-mark span:nth-child(4) {
  background: #e8eefc;
  border-color: rgba(63, 91, 170, .18);
}

.map {
  padding: 20px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.root-node {
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 0 18px;
  border-radius: 8px;
  background: #20242d;
  color: #fff;
  font-weight: 800;
}

.branches {
  height: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  margin: 0 8px;
  border-top: 2px solid var(--line);
}

.branches span {
  width: 2px;
  margin: 0 auto;
  background: var(--line);
}

.leaf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tool-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  -webkit-tap-highlight-color: transparent;
}

.tool-card.available {
  box-shadow: 0 10px 24px rgba(27, 35, 52, .07);
}

.tool-card.available:active {
  transform: scale(.99);
}

.tool-card.placeholder {
  color: #8a92a3;
  background: #f4f6fa;
}

.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.tool-card:nth-child(2) .tool-icon {
  background: #fff4d8;
  color: #9a6200;
}

.tool-card:nth-child(3) .tool-icon,
.tool-card:nth-child(4) .tool-icon {
  background: #e9edf4;
  color: #7a8292;
}

.tool-card strong,
.tool-card small {
  display: block;
}

.tool-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.tool-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 560px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .toolbox-mark {
    width: 74px;
    height: 74px;
  }

  .map {
    padding: 16px;
  }

  .branches {
    display: none;
  }

  .root-node {
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
  }

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