/* Home: the page's own parts, on top of /css/tokens.css and /css/site.css (art direction
   "Instrument", docs/art-direction.md). Colour, type, space, radius and motion come from the
   tokens; the only literal colours are the play button's, which sit on the video's own picture.

   Built here because site.css does not have them:
   - the hero gate poster (.gate--hero): the site's gate, recomposed as a square instrument with
     three two-line proposal chips that drift gently, labels, and the way to your tools
   - the hairline trust row under the hero buttons
   - the intro video: a 16:9 frame, a drawn placeholder behind the poster, the play button
   - the team: the chat drawn in code and the list of departments
   - the tools sheet, the ruled list of rules, the MCP card */

/* ===================================================================== hero */
/* The hero's top is every page's top, so the label and the headline sit where they sit on every
   other page; the text and the gate start on the same line. */
.hm-hero {
  padding-bottom: var(--s-8);
}
.hm-hero-grid {
  row-gap: var(--s-8);
  align-items: start;
}
.hm-hero-text,
.hm-hero-art {
  grid-column: 1 / -1;
  min-width: 0;
}
.hm-hero-text {
  container-type: inline-size;
}
@media (min-width: 1024px) {
  .hm-hero-text {
    grid-column: 1 / span 7;
  }
  /* the picture keeps to the grid: its right edge is the header button's right edge */
  .hm-hero-art {
    grid-column: 8 / span 5;
  }
}

/* The headline fits its column: the longest line, "Asks before it spends.", is about 9 em. */
.hm-hero-title {
  font-size: clamp(2.625rem, 10.6cqi, 4.75rem);
  line-height: 1;
}
/* Each line rises the last 16 px inside its own mask, so it is readable from the first frame. */
.hm-hero-title.reveal-lines .line > span {
  animation-name: hm-line-up;
}
@keyframes hm-line-up {
  from {
    transform: translateY(var(--s-4));
  }
}
.hm-hero .hero-lede {
  max-width: var(--measure-lede);
}

/* The three trust points: one row, hairlines between, stacked rows on phones. */
.hm-trust {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.hm-trust li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 52px;
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.hm-trust .icon {
  width: 20px;
  height: 20px;
  color: var(--text);
}
@media (min-width: 600px) {
  .hm-trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hm-trust li {
    align-items: flex-start;
    min-height: 0;
    padding: var(--s-4) var(--s-4) 0;
    border-bottom: 0;
  }
  .hm-trust li:first-child {
    padding-left: 0;
  }
  .hm-trust li + li {
    border-left: 1px solid var(--border);
  }
  .hm-trust .icon {
    margin-top: 1px;
  }
  /* in a third of the text column a point takes two lines: two even ones, never a short tail */
  .hm-trust li > span {
    text-wrap: balance;
  }
}
/* from 1024 to 1279 px the text has seven narrow columns: one row each, as on phones, so no point
   breaks into three short lines */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .hm-trust {
    grid-template-columns: minmax(0, 1fr);
  }
  .hm-trust li {
    align-items: center;
    min-height: 48px;
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--border);
  }
  .hm-trust li + li {
    border-left: 0;
  }
  .hm-trust .icon {
    margin-top: 0;
  }
}

/* ---------------------------------------------------------------- the gate poster */
.hm-hero-figure {
  gap: var(--s-4);
  max-width: 600px;
}
@media (min-width: 1024px) {
  .hm-hero-figure {
    max-width: none;
  }
}
/* The stage is the query container: a rule cannot query the gate it is styling, so the small
   gate's geometry below asks the stage how wide it is. */
.hm-stage {
  position: relative;
  container: hm-stage / inline-size;
  width: 100%;
  max-width: 600px;
}
@media (min-width: 1024px) {
  .hm-stage {
    max-width: none;
  }
}
/* A faint drafting grid, only around the instrument. */
.hm-stage::before {
  content: '';
  position: absolute;
  inset: 0 0 var(--s-8);
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--s-5) var(--s-5);
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
  pointer-events: none;
}
/* Geometry, in the gate's own width (cqw): the ring's centre and its diameter. Proposals come in
   from the left; the one you approved has passed through the ring on its way to Meta. */
.gate--hero {
  --cx: 55cqw;
  --cy: 45cqw;
  --d: 64cqw;
  --inset: 0px;
  aspect-ratio: 1 / 0.88;
  overflow: clip;
  overflow-clip-margin: var(--s-5);
}
/* the instrument stands on the page: a soft contact shadow under the ring */
.gate--hero::after {
  content: '';
  position: absolute;
  left: var(--cx);
  top: calc(var(--cy) + var(--d) * 0.53);
  z-index: -1;
  width: calc(var(--d) * 0.74);
  height: calc(var(--d) * 0.07);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--hm-contact), transparent);
}
.gate--hero {
  --hm-contact: color-mix(in srgb, var(--text) 12%, transparent);
}
:root[data-theme='dark'] .gate--hero {
  --hm-contact: rgba(0, 0, 0, 0.55);
}
.hm-face {
  fill: color-mix(in srgb, var(--surface) 38%, transparent);
}
.gate--hero .gate-core {
  stroke-width: 1.5;
}
.gate--hero .gate-glow {
  left: var(--cx);
  top: var(--cy);
  width: calc(var(--d) * 0.98);
  height: calc(var(--d) * 0.98);
}
.hm-dial {
  position: absolute;
  left: calc(var(--cx) - var(--d) / 2);
  top: calc(var(--cy) - var(--d) / 2);
  width: var(--d);
  height: var(--d);
  overflow: visible;
}
.hm-dial-outer {
  fill: none;
  stroke: var(--gate-ring);
  stroke-width: 1;
  opacity: 0.55;
}
.hm-arc-band {
  fill: none;
  stroke: var(--gate-bounce);
  stroke-width: 20;
  opacity: 0.1;
  transition: opacity var(--dur-2) var(--ease-out);
}
.hm-impact {
  fill: none;
  stroke: var(--gate-bounce);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.8;
}
.hm-ring-inner {
  opacity: 0.6;
}
.hm-core-halo {
  fill: color-mix(in srgb, var(--gate) 7%, transparent);
  stroke: color-mix(in srgb, var(--gate) 28%, transparent);
  stroke-width: 1;
  transition:
    fill var(--dur-2) var(--ease-out),
    stroke var(--dur-2) var(--ease-out);
}
.hm-pointer {
  fill: var(--text);
  transition: fill var(--dur-2) var(--ease-out);
}

/* The way through: dashed on the way in, a solid line with an arrow out to your tools. */
.hm-track {
  position: absolute;
  top: var(--cy);
  height: 1px;
}
.hm-track--in {
  left: 0;
  width: calc(var(--cx) - var(--d) * 0.14);
  background: repeating-linear-gradient(90deg, var(--gate-tick) 0 4px, transparent 4px 9px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%);
  mask-image: linear-gradient(90deg, transparent, #000 22%);
}
.hm-track--out {
  left: calc(var(--cx) + var(--d) * 0.14);
  right: 22cqw;
  background: var(--text-3);
  transition: background-color var(--dur-2) var(--ease-out);
}
.hm-track--out::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -4.5px;
  width: 10px;
  height: 10px;
  background: inherit;
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transform: rotate(-90deg);
}

/* Labels on the instrument: mono, quiet; the limit's label is orange like its arc. */
.hm-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 2.4cqw, 0.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-3);
}
/* inside the ring, against the middle of the orange arc */
.hm-label--limit {
  left: calc(var(--cx) - var(--d) * 0.255);
  top: calc(var(--cy) - var(--d) * 0.235);
  translate: -50% -50%;
  padding: 0.35em 0.5em;
  border-radius: var(--r-xs);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--critical-text);
}
/* under the core: the way through */
.hm-label--ok {
  left: var(--cx);
  top: calc(var(--cy) + var(--d) * 0.2);
  translate: -50% -50%;
}
.hm-dest {
  position: absolute;
  right: 0;
  top: var(--cy);
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 2.2em;
  padding: 0 0.85em 0 0.7em;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-edge),
    var(--shadow-card);
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 2.4cqw, 0.75rem);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text);
}
.hm-dest-dot {
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px currentColor;
}

/* The proposals: two type sizes, glass, each with its state in words and a mark. */
.hm-chip {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28em;
  padding: 0.72em 0.9em 0.78em;
  border-radius: var(--r-md);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-edge),
    var(--shadow-card);
  font-size: clamp(0.75rem, 2.7cqw, 0.8125rem);
  line-height: 1.2;
  white-space: nowrap;
}
.hm-chip-kind,
.hm-chip-state {
  font-size: max(0.88em, 0.6875rem);
}
.hm-chip-kind {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-chip-item {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.hm-chip-state {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.2em;
  font-weight: 600;
}
.hm-chip-state::before {
  content: '';
  flex: none;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: currentColor;
}
/* waits at the ring's left edge, on the way in */
.hm-chip--wait {
  right: calc(100cqw - var(--cx) + var(--d) * 0.345);
  top: var(--cy);
  translate: 0 -50%;
}
.hm-chip--wait .hm-chip-state {
  color: var(--info-text);
}
/* through the ring, under the way out, arriving at your tools */
.hm-chip--pass {
  right: 0;
  top: calc(var(--cy) + 6cqw);
}
.hm-chip--pass .hm-chip-state {
  color: var(--success-text);
}
.hm-chip--pass .hm-chip-state::before {
  width: 0.85em;
  height: 0.85em;
  border-radius: 0;
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}
/* its corner meets the middle of the orange arc */
.hm-chip--bounce {
  right: calc(100cqw - var(--cx) + var(--d) * 0.28);
  top: calc(var(--cy) - var(--d) * 0.34);
  translate: 0 -100%;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--gate-bounce) 55%, transparent),
    var(--shadow-card);
}
.hm-chip--bounce .hm-chip-state {
  color: var(--critical-text);
}
.hm-chip--bounce .hm-chip-state::before {
  border-radius: 1.5px;
}

/* A small gate (phones, and the 5 columns from 1024 to 1279 px): the ring sits further right so
   the two incoming chips keep their size; the approved one passes under the "Your OK" label. */
@container hm-stage (max-width: 479px) {
  .gate--hero {
    --cx: 60cqw;
    --cy: 50cqw;
    --d: 52cqw;
    aspect-ratio: 1 / 0.92;
  }
  .hm-chip--wait {
    right: calc(100cqw - var(--cx) + var(--d) * 0.33);
  }
  .hm-chip--bounce {
    right: calc(100cqw - var(--cx) + var(--d) * 0.27);
    top: calc(var(--cy) - var(--d) * 0.36);
  }
  .hm-chip--pass {
    right: var(--inset);
    top: calc(var(--cy) + var(--d) * 0.29);
  }
  .hm-dest {
    right: var(--inset);
  }
  .hm-track--out {
    right: calc(var(--inset) + 25cqw);
  }
}

/* Idle drift: small and slow, only with JavaScript and motion on. */
@keyframes hm-drift-a {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(0, -5px);
  }
}
@keyframes hm-drift-b {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(4px, -3px);
  }
}
/* the over-limit chip leans into the orange arc and is held off */
@keyframes hm-nudge {
  0%,
  100% {
    transform: translate(0, 0);
  }
  42% {
    transform: translate(4px, 4px);
  }
  52% {
    transform: translate(-2px, -2px);
  }
  64% {
    transform: translate(0, 0);
  }
}
@keyframes hm-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--info-text) 45%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.45em transparent;
  }
}
.has-js .hm-chip--wait {
  animation: hm-drift-a 7s var(--ease-in-out) infinite;
}
.has-js .hm-chip--wait .hm-chip-state::before {
  animation: hm-pulse 2.4s var(--ease-out) infinite;
}
.has-js .hm-chip--pass {
  animation: hm-drift-b 8.5s var(--ease-in-out) -2s infinite;
}
.has-js .hm-chip--bounce {
  animation: hm-nudge 5s var(--ease-in-out) -1s infinite;
}
/* Without JavaScript nothing on the instrument moves. */
html:not(.has-js) .gate--hero *,
html:not(.has-js) .gate--hero *::before {
  animation: none !important;
}

/* phones: the drawing runs to the screen's edges; chips, labels and the tag keep the 16 px margin */
@media (max-width: 719.98px) {
  .gate--hero {
    --inset: var(--gutter);
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
  }
}
.hm-stage-tag {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

/* ===================================================================== sections */
/* Ledes are one or two lines: balanced, so no lede ends on a lone word (checklist 9). */
.hm-sec .section-lede {
  text-wrap: balance;
}
.hm-hero-fine {
  margin-top: var(--s-4);
  color: var(--text-3);
  font-size: var(--fs-fine);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- 01 the intro video */
/* Right under the hero, so it starts a step closer than other sections. */
.hm-watch {
  padding-top: var(--s-8);
}
.hm-watch-head {
  margin-bottom: var(--s-6);
}
.hm-video {
  gap: var(--s-4);
}
/* The frame: 16:9, rounded, a soft lift. The placeholder sits behind the video, so the poster
   covers it once it arrives and it shows where a poster is missing. The hairline is drawn on top,
   so the picture never covers it. */
.hm-video-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container: hm-video / inline-size;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-lift);
}
.hm-video-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--border);
  pointer-events: none;
}
@media (max-width: 479.98px) {
  .hm-video-frame {
    border-radius: var(--r-md);
  }
}
.hm-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background-color: var(--surface-2);
  background-image:
    radial-gradient(42% 56% at 50% 50%, var(--orb-a), transparent 80%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size:
    100% 100%,
    var(--s-6) var(--s-6),
    var(--s-6) var(--s-6);
  background-position: center;
}
.hm-video-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent);
  mask-image: radial-gradient(closest-side, #000 60%, transparent);
}
.hm-video-ring {
  fill: none;
  stroke: var(--gate-ring);
  stroke-width: 1;
}
.hm-video-ring--dash {
  stroke-dasharray: 3 7;
}
.hm-video-ticks {
  fill: none;
  stroke: var(--gate-tick);
  stroke-width: 8;
  stroke-dasharray: 1 16.1;
  opacity: 0.6;
}
/* the brand under the play button, where the poster's title would be */
.hm-video-brand {
  position: absolute;
  left: 50%;
  bottom: clamp(var(--s-4), 6%, var(--s-7));
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text);
  font-size: clamp(0.9375rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hm-video-brand .logo-mark {
  width: 1.4em;
  height: 1.4em;
}
/* a small frame has room for the play button and its words only */
@container hm-video (max-width: 560px) {
  .hm-video-brand,
  .hm-video-ticks {
    display: none;
  }
}
.hm-video-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
/* Playing: black behind the picture, as every player has. */
.hm-video-frame.is-playing .hm-video-media {
  background: #000;
}

/* The play button covers the frame (one big target), with a disc and its words in the middle.
   The words sit on dark glass, so they read on the poster and on the placeholder alike. */
.hm-video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(11, 13, 17, 0.1), transparent);
  color: #fff;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hm-video-play-disc {
  display: grid;
  place-items: center;
  width: clamp(64px, 8vw, 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(13, 17, 23, 0.08),
    0 0 0 10px rgba(255, 255, 255, 0.22),
    0 18px 44px -14px rgba(13, 17, 23, 0.5);
  color: #2b4ee6;
  transition:
    transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}
.hm-video-play-disc svg {
  width: 38%;
  height: 38%;
  margin-left: 8%;
  fill: currentColor;
}
.hm-video-play-label {
  padding: 0.45em 0.95em;
  border-radius: var(--r-pill);
  background: rgba(11, 13, 17, 0.62);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-size: var(--fs-fine);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
@media (hover: hover) {
  .hm-video-play:hover .hm-video-play-disc {
    transform: scale(1.06);
    box-shadow:
      0 0 0 1px rgba(13, 17, 23, 0.08),
      0 0 0 14px rgba(255, 255, 255, 0.26),
      0 22px 52px -14px rgba(13, 17, 23, 0.55);
  }
}
.hm-video-play:active .hm-video-play-disc {
  transform: scale(0.97);
}
/* the focus ring goes round the disc, inside the frame, so the frame's rounding never clips it */
.hm-video-play:focus-visible {
  outline: none;
}
.hm-video-play:focus-visible .hm-video-play-disc {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5px var(--focus),
    0 18px 44px -14px rgba(13, 17, 23, 0.5);
}
/* No video yet: the button stays as a quiet note and plays nothing. */
.hm-video-play:disabled {
  cursor: default;
}
.hm-video-play:disabled .hm-video-play-disc {
  opacity: 0.55;
  transform: none;
}
/* Reduced motion: nothing scales; the states still change. */
@media (prefers-reduced-motion: reduce) {
  .hm-video-play-disc {
    transition: none;
  }
  .hm-video-play:hover .hm-video-play-disc,
  .hm-video-play:active .hm-video-play-disc {
    transform: none;
  }
}
:root[data-motion='reduce'] .hm-video-play:hover .hm-video-play-disc,
:root[data-motion='reduce'] .hm-video-play:active .hm-video-play-disc {
  transform: none;
}

/* ---------------------------------------------------------------- 02 the team */
.hm-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}
@media (min-width: 1024px) {
  .hm-team {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
  }
  .hm-team-figure {
    grid-column: 1 / span 7;
  }
  .hm-depts {
    grid-column: 9 / span 4;
  }
}
/* the chat, drawn in code: the request, the answer, and the two departments' work */
.hm-chat-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.hm-chat-you {
  align-self: flex-end;
  max-width: 85%;
  margin: 0;
  padding: var(--s-3) var(--s-4);
  border-radius: 14px 14px 4px 14px;
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text);
}
.hm-chat-reply {
  margin: 0;
  color: var(--text);
}
.hm-chat-tasks {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.hm-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  padding: var(--s-4);
}
.hm-task + .hm-task {
  border-top: 1px solid var(--border);
}
.hm-task .chip {
  justify-self: start;
}
@media (min-width: 600px) {
  .hm-task {
    grid-template-columns: 9.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s-4);
  }
}
.hm-task-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
}
.hm-task-dept {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-task-what {
  color: var(--text-2);
  text-wrap: pretty;
}

/* the five departments: a list with hairlines, a name, its agents and one line */
.hm-depts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.hm-dept {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-1) var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.hm-dept-name {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--tracking-h3);
}
.hm-dept-agents {
  margin: 0;
  align-self: center;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-dept-text {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.hm-team-foot {
  margin: var(--s-7) 0 0;
  color: var(--text-2);
  font-size: var(--fs-small);
}

/* ---------------------------------------------------------------- 03 the tools */
/* A spec sheet: one surface split by hairlines (the gaps show the border colour behind). */
.hm-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--border);
  box-shadow:
    0 0 0 1px var(--border),
    var(--shadow-card);
}
.hm-tool {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 132px;
  padding: var(--s-5);
  background: var(--surface);
}
.hm-tool--lead {
  grid-column: span 2;
}
@media (min-width: 900px) {
  .hm-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hm-tool {
    min-height: 168px;
    padding: var(--s-6);
  }
}
.hm-tool-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.hm-tool--lead .hm-tool-name {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  letter-spacing: var(--tracking-h2);
}
.hm-tool-what {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-tool--more {
  background: var(--surface-2);
}
.hm-tool--more .hm-tool-name {
  color: var(--text-2);
}

/* ---------------------------------------------------------------- 04 control */
/* Six rules as a ruled list, not six cards: a hairline over each, three across on wide screens. */
.hm-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .hm-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .hm-rules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hm-rule {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--s-1) var(--s-3);
  padding: var(--s-5) 0 var(--s-6);
  border-top: 1px solid var(--border);
}
.hm-rule .icon {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--text);
}
.hm-rule-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--tracking-h3);
}
.hm-rule-text {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- 05 MCP */
.hm-mcp {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  align-items: center;
}
.hm-mcp-head {
  margin-bottom: 0;
}
@media (min-width: 1024px) {
  .hm-mcp {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
  }
  .hm-mcp-head {
    grid-column: 1 / span 6;
    max-width: none;
  }
  .hm-mcp-card {
    grid-column: 8 / span 5;
  }
}
.hm-mcp-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--border),
    var(--shadow-card);
}
.hm-mcp-card .label {
  margin: 0;
}
.hm-mcp-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px var(--border);
}
.hm-mcp-url {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  color: var(--text);
}
.hm-copy {
  flex: none;
}
.hm-mcp-note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-fine);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- the final call */
.hm-final {
  padding-top: clamp(var(--s-8), 7vw, var(--s-9));
}
