body {
  --grid: color-mix(in srgb, var(--accent) 6.5%, transparent);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 15% -20%, var(--accent-soft), transparent 38rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
}
/* Fade the grid out towards the bottom of the viewport. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, var(--bg));
  opacity: .72;
}

main {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(64px, 10vh, 118px) 0 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 8vw, 88px);
  font-weight: 500;
  letter-spacing: -.052em;
  line-height: .92;
}
.descriptor {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
  letter-spacing: -.01em;
}
.index-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--highlight);
}
.index-mark svg { width: 40px; height: 40px; }

/* ---------- tool cards ---------- */
.tools {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool {
  min-width: 0;
  min-height: 300px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px -28px var(--shade);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.tool:hover {
  background: var(--panel-2);
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.tool:focus-visible { outline: 2px solid var(--highlight); outline-offset: 4px; }
.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tool-number {
  color: var(--dim);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: .08em;
}
.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tool-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.tool-icon {
  height: 112px;
  margin: 20px 0 16px;
  display: grid;
  place-items: center;
  color: var(--highlight);
}
.tool-icon svg { width: 104px; height: 104px; overflow: visible; }
.tool h2 {
  margin: auto 0 8px;
  max-width: 12ch;
  font-size: clamp(21px, 2.3vw, 29px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 600;
}
.tool p {
  min-height: 3em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.open-arrow {
  align-self: flex-end;
  margin-top: 18px;
  color: var(--accent);
  font-size: 23px;
  line-height: 1;
  transition: transform 160ms ease;
}
.tool:hover .open-arrow { transform: translateX(4px); }

.tool-footer {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--dim);
  font: 600 10px/1.5 var(--font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

@media (max-width: 780px) {
  main {
    width: min(100% - 28px, 560px);
    padding: 48px 0 40px;
    justify-content: flex-start;
  }
  .intro {
    grid-template-columns: minmax(0, 1fr) 56px;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
  }
  .index-mark { width: 56px; height: 56px; }
  .index-mark svg { width: 29px; height: 29px; }
  .descriptor { margin-top: 12px; font-size: 15px; }
  .tools { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .tool {
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    column-gap: 16px;
    align-items: center;
  }
  .tool-top { grid-column: 1 / -1; margin-bottom: 14px; }
  .tool-icon { grid-column: 1; grid-row: 2 / 4; height: auto; margin: 0; }
  .tool-icon svg { width: 66px; height: 66px; }
  .tool h2 { grid-column: 2; grid-row: 2; margin: 0 0 6px; font-size: 21px; }
  .tool p { grid-column: 2; grid-row: 3; min-height: 0; font-size: 13px; }
  .open-arrow { grid-column: 3; grid-row: 2 / 4; margin: 0; }
  .tool-footer { margin-top: 24px; flex-direction: column; gap: 5px; }
}
