/*
 * run: 03 Run, one story row (lib/story.css .hf-row) whose visual is the closer dotted map of the six states
 * (lib/map.js, the hero's floor seen closer, as in the 20:40 Run stop), sized to the visual column: the six
 * names on the map, the six rulebooks in a calm legend under it. Home Reframe 2026-11-28.
 */

/* NEW TOKENS (scoped to this section) */
[data-section="run"] {
  --run-map-dot: var(--hf-map-dot, #34404C);
  --run-map-edge: var(--hf-map-edge, #0E6F7C);
  --run-map-context: var(--hf-map-context, #A3AEB9);
  --run-map-sea: var(--hf-map-sea, #00879B);
  --run-map-signal: var(--hf-map-signal, #0097B1);
  --run-map-ratio: 1.36;          /* the map's width : height in the visual column */
  --run-line: rgb(11 13 16 / 0.08);
}
@media (max-width: 47.99rem) { [data-section="run"] { --run-map-ratio: 1.02; } }

/* the shared WebGL canvas is dressed like the slot; nothing may poke out sideways */
[data-section="run"].run { overflow-x: clip; }

[data-section="run"] .run-vis { margin: 0; inline-size: 100%; }

/* The map: unframed, on the section's sea-glass halo; its edges fade so Saudi Arabia's west and the
   neighbours run softly out of the column. */
[data-section="run"] .run-map { position: relative; aspect-ratio: var(--run-map-ratio); }
[data-section="run"] .run-map__canvas {
  position: absolute; inset: 0; display: block; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 9%, #000 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 9%, #000 100%);
          mask-composite: intersect;
}

/* The names: a dot on each state's main city and its name; the state in focus in sea glass.
   The map never mirrors, so the sides are physical (e, w, s) in both languages. */
[data-section="run"] .run-map__pins { position: absolute; inset: 0; pointer-events: none; }
[data-section="run"] .run-pin { position: absolute; inline-size: 0; block-size: 0; }
html:not(.hf-js) [data-section="run"] .run-pin { display: none; }
[data-section="run"] .run-pin__dot {
  position: absolute; left: -4px; top: -4px; inline-size: 8px; block-size: 8px; border-radius: 50%;
  background: var(--hf-ground-pearl); box-shadow: inset 0 0 0 2px var(--hf-color-sea-600);
  transition: background-color var(--hf-dur-3) var(--hf-ease-out), box-shadow var(--hf-dur-3) var(--hf-ease-out);
}
[data-section="run"] .run-pin__name {
  position: absolute; top: 0; translate: 0 -50%;
  display: inline-flex; align-items: center; min-block-size: 24px; padding: 2px 9px;
  border-radius: var(--hf-radius-pill); background: var(--hf-surface-chip);
  box-shadow: var(--hf-ring-soft), 0 4px 12px -6px rgb(30 42 54 / 0.25);
  font-size: 12.5px; font-weight: 500; line-height: 1.2; color: var(--hf-color-text-2); white-space: nowrap;
  transition: color var(--hf-dur-3) var(--hf-ease-out), background-color var(--hf-dur-3) var(--hf-ease-out), box-shadow var(--hf-dur-3) var(--hf-ease-out);
}
[data-section="run"] .run-pin--e .run-pin__name { left: 10px; }
[data-section="run"] .run-pin--w .run-pin__name { right: 10px; }
[data-section="run"] .run-pin--s .run-pin__name { left: 0; top: 10px; translate: -50% 0; }
[data-section="run"] .run-pin[data-on] .run-pin__dot { background: var(--hf-color-sea-600); box-shadow: 0 0 0 4px rgb(0 103 118 / 0.16); }
[data-section="run"] .run-pin[data-on] .run-pin__name { color: var(--hf-color-sea-600); background: var(--hf-tint-sea); box-shadow: inset 0 0 0 1px var(--hf-tint-sea-line), 0 4px 12px -6px rgb(30 42 54 / 0.25); }
:lang(ar) [data-section="run"] .run-pin__name { font-family: "HF Alexandria", var(--hf-font-sans); font-size: 13px; letter-spacing: 0; }

/* The legend: the six states and the rule that shapes AI projects in each (the old country pages).
   Each is a link to its country page; pointing at one, or reaching it with the keyboard, shows it on
   the map. The one in focus wears the sea tint. */
[data-section="run"] .run-legend {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px;
  margin: 0; padding: 0; list-style: none;
}
@media (max-width: 47.99rem) { [data-section="run"] .run-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-section="run"] .run-legend__item { min-inline-size: 0; }
[data-section="run"] .run-legend__link {
  display: grid; align-content: start; gap: 3px; min-block-size: 44px; block-size: 100%;
  padding: 9px 10px 10px; border-radius: 12px; text-decoration: none; color: inherit;
  transition: background-color var(--hf-dur-3) var(--hf-ease-out), box-shadow var(--hf-dur-3) var(--hf-ease-out);
}
[data-section="run"] .run-legend__name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; color: var(--hf-color-text-1);
}
[data-section="run"] .run-legend__name::before {
  content: ""; flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--hf-color-sea-600);
  transition: background-color var(--hf-dur-3) var(--hf-ease-out), box-shadow var(--hf-dur-3) var(--hf-ease-out);
}
[data-section="run"] .run-legend__rule {
  padding-inline-start: 15px; font-size: 13px; line-height: 1.4; color: var(--hf-color-text-2); text-wrap: pretty;
}
[data-section="run"] .run-legend__link:hover .run-legend__name { color: var(--hf-color-sea-600); }
[data-section="run"] .run-legend__item[data-on] .run-legend__link { background: var(--hf-tint-sea); box-shadow: inset 0 0 0 1px var(--hf-tint-sea-line); }
[data-section="run"] .run-legend__item[data-on] .run-legend__name::before { background: var(--hf-color-sea-600); box-shadow: 0 0 0 3px rgb(0 103 118 / 0.14); }
:lang(ar) [data-section="run"] .run-legend__name { font-size: 14.5px; letter-spacing: 0; line-height: 1.5; }
:lang(ar) [data-section="run"] .run-legend__rule { font-size: 13px; line-height: 1.6; }
[data-section="run"] .run-legend .hf-ltr { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 47.99rem) {
  [data-section="run"] .run-legend__link { padding: 8px 8px 9px; }
  [data-section="run"] .run-legend__name { font-size: 14px; }
  [data-section="run"] .run-legend__rule { font-size: 12.5px; }
}

/* home-bots-pricing (2026-11-28; the founder: "Where are the bots?") ---------------------------------------------
   The Claims intake agent travels onto the map and lands in the UAE (section.js): a 52 px figure whose feet sit on
   its landing point (inside the map's names layer, under the names). The Run monitor stands beside the six
   rulebooks (72 px, named in text); it rests and looks at the rulebook in focus. Phones: the monitor and its name
   are one row above the legend. */
[data-section="run"] { --run-agent: 52px; --run-mon: 72px; }
[data-section="run"] .run-agent {
  position: absolute; left: 0; top: 0; inline-size: var(--run-agent); block-size: var(--run-agent);
  margin: calc(var(--run-agent) * -0.92) 0 0 calc(var(--run-agent) * -0.5); line-height: 0;
}
html:not(.hf-js) [data-section="run"] .run-agent { display: none; }
[data-section="run"] .run-foot {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 10px;
  margin-block-start: 14px;
}
[data-section="run"] .run-mon { display: grid; justify-items: center; inline-size: 104px; padding-block-start: 2px; }
[data-section="run"] .run-mon__fig { display: grid; place-items: end center; inline-size: var(--run-mon); block-size: var(--run-mon); line-height: 0; }
[data-section="run"] .run-mon__name { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--hf-color-text-1); }
:lang(ar) [data-section="run"] .run-mon__name { line-height: 1.6; }
@media (max-width: 47.99rem) {
  [data-section="run"] { --run-agent: 44px; --run-mon: 52px; }
  [data-section="run"] .run-foot { grid-template-columns: minmax(0, 1fr); row-gap: 6px; margin-block-start: 10px; }
  [data-section="run"] .run-mon { display: flex; align-items: center; gap: 10px; inline-size: auto; padding: 0 8px; }
  [data-section="run"] .run-mon__name { margin: 0; }
}
