/* Tool pages: one identity system for every tool. Loaded after the kit (kit/th.css), before each page's own page.css.
   --acc is the tool's own accent (tools.json "accent", set in the page head); --nebula-2 is its position hue for the second wash.
   Chrome (nav, labels, buttons, text) stays ink. The accent marks: the glyph tile, the status dots, the sample's rim and its selected or
   active parts. Everything here is static CSS: no motion, nothing to pause. */
main { --th-lit: var(--acc); }   /* --acc itself is set on :root in the page head */

/* a faint per-tool nebula behind the hero (the same 10 % strength for every tool): the accent in the upper left, the position hue and a deep indigo on the right */
.th-hero { position: relative; isolation: isolate; }
.th-hero::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: -72px; bottom: -48px; pointer-events: none;
  background:
    radial-gradient(760px 420px at 9% 36%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 68%),
    radial-gradient(700px 480px at 104% 18%, color-mix(in srgb, var(--nebula-2, #6E49FF) 10%, transparent), transparent 62%),
    radial-gradient(1100px 420px at 55% -12%, rgba(49, 46, 129, .30), transparent 60%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}

/* the glyph tile: accent-tinted, with a soft glow (the same tile as the Home plate, at 64 px) */
.th-hero-icon {
  color: var(--acc); border-radius: var(--th-r-inner);
  background: color-mix(in srgb, var(--acc) 13%, rgba(8, 8, 11, .72));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 32%, transparent), 0 0 44px color-mix(in srgb, var(--acc) 26%, transparent);
}

/* status dots: filled and ring keep their meaning, now in the accent; pre-alpha is a half-filled ring, never a dashed one */
.th-status .th-dot { border-color: var(--acc); }
.th-status [data-state="live"] > .th-dot, .th-status [data-state="open"] > .th-dot, .th-status [data-state="shipped"] > .th-dot { background: var(--acc); }
.th-status [data-state="prealpha"] > .th-dot { border-style: solid; background: linear-gradient(90deg, var(--acc) 50%, transparent 50%); }

/* the sample: family look (ink body), the accent on the rim, the corner settle and every selected or active mark */
.th-specimen.th-residue::before { background: var(--acc); opacity: .7; }   /* the corner settle: the same softer strength on every tool */
.th-specimen::after { background: linear-gradient(140deg, var(--acc), color-mix(in srgb, var(--acc) 22%, transparent) 42%, transparent 78%); opacity: .75; }
.th-specimen .th-badge::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--acc); }
.th-specimen .th-seg > button[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 15%, var(--th-fill-ghost-hover)); box-shadow: inset 0 0 0 1.5px var(--acc); }
.th-specimen .th-dg { --lit: var(--acc); }
.th-specimen .th-dg-node--on { stroke: var(--acc); }
@media (max-width: 719px) {
  .th-hero::before { background:
    radial-gradient(420px 320px at 12% 16%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 70%),
    radial-gradient(380px 300px at 100% 8%, color-mix(in srgb, var(--nebula-2, #6E49FF) 10%, transparent), transparent 66%),
    radial-gradient(640px 280px at 50% -10%, rgba(49, 46, 129, .28), transparent 62%); }
}

/* ---------- below the hero: the accent in the page's own structure ----------
   The same marks on every tool page, each in the tool's one accent: the glyph tile and numeral that open a section, the top rule of each
   list, the step markers, the key figures, the current-section mark in the rail, and a rule that lights under the row the pointer is on.
   Text, labels and buttons stay ink. Nothing here moves except colour and opacity on hover. */
:root { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3C/svg%3E"); }   /* each tool's page.css sets its own icon here, as a mask */
.th-sec-head > .th-label:first-child {
  position: relative; display: flex; align-items: center; min-height: 32px; padding-left: 44px;
  color: var(--acc); font-variant-numeric: tabular-nums;
}
.th-sec-head > .th-label:first-child::before {   /* the tile: the same one as the hero's and the Home plate, at 32 px */
  content: ""; position: absolute; left: 0; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: calc(var(--th-r-tile) / 2);
  background: color-mix(in srgb, var(--acc) 13%, rgba(8, 8, 11, .72));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 32%, transparent);
}
.th-sec-head > .th-label:first-child::after {   /* the tool's own glyph, drawn as a mask in the accent */
  content: ""; position: absolute; left: 7px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--acc);
  -webkit-mask: var(--glyph) center / 100% 100% no-repeat; mask: var(--glyph) center / 100% 100% no-repeat;
}

/* list rules, numbers and figures */
.th-rows, .th-spec, .th-seq { border-top-color: color-mix(in srgb, var(--acc) 40%, var(--th-hairline-strong)); }
.th-table th { border-bottom-color: color-mix(in srgb, var(--acc) 40%, var(--th-hairline-strong)); }
.th-rows--num .th-rows__t::before { color: var(--th-ink-3); font-variant-numeric: tabular-nums; }   /* the list's numbers are quiet ink-3 (identity stays on the section tile and the status dot); six accent numerals on one screen was the loudest thing on the page */
.th-figures > div { border-top-color: color-mix(in srgb, var(--acc) 55%, var(--th-hairline-strong)); }
.th-figure-num { color: var(--acc); }
.th-steps > li::before { color: var(--acc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent); }
.th-steps > li::after { background: color-mix(in srgb, var(--acc) 22%, var(--th-hairline-strong)); }
.th-sources li::marker { color: var(--acc); }
.th-gated .th-icon { color: var(--acc); }
.th-formula { box-shadow: rgba(0, 0, 0, .25) 0 0 12px inset, inset 0 0 0 1px var(--th-hairline), inset 2px 0 0 color-mix(in srgb, var(--acc) 70%, transparent); }

/* the rail and the phone pill: the current section in the accent */
.th-ix-fill, .th-ix-dot { background: var(--acc); }
.th-index a[aria-current] .th-ix-n, .th-toc-btn .th-toc-cur b { color: var(--acc); }

/* the row under the pointer: a short accent bar in the gutter and a lit rule below. Touch has no hover, so it is a pointer-only extra. */
.th-rows > li, .th-spec > div { position: relative; transition: border-color .4s var(--th-ease-decay); }
.th-rows > li::before, .th-spec > div::before {
  content: ""; position: absolute; left: -14px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--acc);
  opacity: 0; transform: scaleY(.4); transition: opacity .4s var(--th-ease-decay), transform .4s var(--th-ease-decay);
}
.th-table td { transition: border-color .4s var(--th-ease-decay), color .4s var(--th-ease-decay); }
@media (hover: hover) {
  .th-rows > li:hover, .th-spec > div:hover { border-bottom-color: color-mix(in srgb, var(--acc) 50%, transparent); }
  .th-rows > li:hover::before, .th-spec > div:hover::before { opacity: 1; transform: none; }
  .th-table tbody tr:hover td { border-bottom-color: color-mix(in srgb, var(--acc) 50%, transparent); color: var(--th-ink); }
}
html[data-motion="calm"] .th-rows > li::before, html[data-motion="calm"] .th-spec > div::before { transform: none; }

.th-specimen .th-seg > button { height: var(--th-control-h, 44px); }   /* the sample's controls keep a 44 px target on every pointer */

