/* Process hero (Themen draft, "Prozess- & Fertigungstechnik", brief 10): a lit schematic of a production line.
   Markup from design/heroes/process.php, drawing and station names from process.js. Everything is scoped to .ph.
   The text block repeats the measures of the Event Hero text on the other v2 topic heroes (grain structure, turbine):
   left edge = the 1280px box with 64px padding (24px below 1024), eyebrow top 168px at 1024 and wider, h1
   clamp(1.75rem, 3.65vw, 3.3rem)/1.05 900, lead clamp(1.02rem, 1.25vw, 1.18rem)/1.62, buttons 49.6px, radius 10. */
.ph {
  --ph-p: #00abe3; --ph-p2: #b6eafc; --ph-p3: #89defb; --ph-pl: #7fd8f5; --ph-deep: #072631; --ph-ink: #00212c;
  --ph-pad: 64px; --ph-top: 168px; --ph-copy: calc((min(100cqw, 1280px) - 180px) * 7 / 12);
  container: ph / inline-size;
  position: relative; isolation: isolate; overflow: hidden; box-sizing: border-box; margin: 0; color: #fff;
  font-family: "Theme-Font", Inter, system-ui, sans-serif;
  background:
    radial-gradient(ellipse 52% 66% at 76% 54%, rgb(0 171 227 / .15), transparent 72%),
    radial-gradient(ellipse 46% 60% at 8% 0%, rgb(0 171 227 / .07), transparent 70%),
    linear-gradient(162deg, #001b24 0%, #00212c 38%, #002b3a 72%, #003a4e 100%);
}
.ph *, .ph *::before, .ph *::after { box-sizing: border-box; }
/* placed as an html content element: its frame runs the full width with no outer spacing, as the Event Hero does */
#crm__widgets .frame:has(> .ph) { max-width: none; width: auto; margin: 0; padding: 0; }
.ph a { text-decoration: none; }
.ph__far { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ph__far canvas, .ph__stage > canvas, .ph__strip canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* a calm field behind the text: the line's glow never reaches the copy */
.ph::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 27 36 / .78) 0%, rgb(0 27 36 / .5) 30%, rgb(0 27 36 / 0) 50%); }

.ph__inner { position: relative; z-index: 3; width: 100%; max-width: 1280px; min-height: 672px; margin: 0 auto;
  padding: var(--ph-top) var(--ph-pad) 104px; pointer-events: none; }
.ph__copy, .ph__chips { pointer-events: auto; }
.ph__copy { width: var(--ph-copy); max-width: 100%; }
html.tm-fw .ph__copy { visibility: hidden; }

.ph__eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.2rem; padding: .4rem .85rem .4rem .7rem;
  border: 1px solid rgb(137 222 251 / .28); border-radius: 999px; background: rgb(7 38 49 / .52); color: #e6f6fd;
  font: 800 .72rem/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.ph__pulse { position: relative; display: inline-flex; width: .5rem; height: .5rem; border-radius: 999px; background: var(--ph-p3);
  box-shadow: 0 0 22px rgb(0 171 227 / .7); }
.ph__pulse::after { content: ""; position: absolute; inset: -.45rem; border: 1px solid rgb(0 171 227 / .42); border-radius: 999px;
  animation: ph-pulse 2.4s ease-out infinite; }
@keyframes ph-pulse { 0% { opacity: .72; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.8); } }

.ph__h1 { max-width: 680px; margin: 0; color: #fff; font-family: "Heading-Font", "Inter Tight", Inter, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.65vw, 3.3rem); font-weight: 900; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance;
  hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 9 5 4; overflow-wrap: break-word; }
.ph__accent { display: block; margin-top: .12em; padding-bottom: .14em; line-height: 1.14;
  background: linear-gradient(96deg, #b6eafc 0%, #fff 44%, #89defb 78%, #46cefb 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgb(255 255 255 / .4)) drop-shadow(0 0 20px rgb(0 171 227 / .3)); }
.ph__lead { max-width: 540px; margin-top: 1.5rem; color: rgb(236 244 251 / .84); font-size: clamp(1.02rem, 1.25vw, 1.18rem); line-height: 1.62; text-wrap: pretty; }
.ph__lead p { margin: 0; }
.ph__lead p + p { margin-top: .6em; }
.ph__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2rem; }
.ph__btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.1rem; padding: .8rem 1.4rem;
  border-radius: 10px; font-size: 1rem; font-weight: 800; letter-spacing: .01em; line-height: 1.2; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.ph__btn--primary { background: #00abe3; color: #fff; box-shadow: 0 16px 38px -12px rgb(0 171 227 / .55); }
.ph__btn--primary:hover, .ph__btn--primary:focus-visible { background: #007aa8; color: #fff; box-shadow: 0 18px 40px -12px rgb(0 122 168 / .6); }
.ph__btn--secondary { border: 1px solid rgb(137 222 251 / .34); background: rgb(7 38 49 / .46); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ph__btn--secondary:hover, .ph__btn--secondary:focus-visible { border-color: rgb(137 222 251 / .6); background: rgb(0 171 227 / .2); color: #fff; }
.ph__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ph__btn i { font-size: 1rem; }

/* ---------- the line (900 px and wider): the drawing box ----------
   left: clear of the text block by 40 px (the longest h1 line is 10.95 em, the lead at most 540 px, both inside the
   copy column); right: 40 px from the hero's edge; top: 40 px under the site header (84 px); bottom: 40 px over the
   topic switch, which overlaps the hero by 30 px. Rounded to whole pixels, so the canvases sit on the pixel grid. */
.ph__art { position: absolute; z-index: 2; top: 124px; bottom: 70px; right: 40px; container: phart / size;
  left: round(down, calc(max(0px, (100cqw - 1280px) / 2) + var(--ph-pad) + min(var(--ph-copy), max(540px, min(3.65vw, 3.3rem) * 10.95)) + 40px), 1px); }
.ph__stage { position: absolute; inset: 0; }
.ph__hits { position: absolute; inset: 0; }
.ph__hit { position: absolute; cursor: pointer; }
.ph__stations { position: absolute; inset: 0; pointer-events: none; }

/* the callout system: one size and weight (13/600), at most 190 px wide (the stack beside the cell 240), names always in
   full; vertical leaders of one length
   (16 px) ending in the same 5 px dot. Top rail: label above its dot; bottom rail: below; stack: right-aligned, beside
   the cell, joined by one bracket. JS sets left/top in px (the dot's centre) and --lead for the stack's leader. */
.ph__st { --ph-lc: rgb(127 216 245 / .62); position: absolute; display: block; width: max-content; max-width: 190px;
  color: #e3f5fc; font-size: 13px; font-weight: 600; line-height: 16px; letter-spacing: 0; text-decoration: none;
  pointer-events: auto; opacity: 0; transition: opacity .6s ease, color .2s ease; }
.ph__st.is-in { opacity: 1; }
.ph__st.is-now { transition: none; }
.ph__st-t { display: block; padding: 2px 0; text-decoration: underline 1px transparent; text-underline-offset: 3px; transition: text-decoration-color .2s ease;
  text-wrap: pretty; }
.ph__st::before, .ph__st::after { content: ""; position: absolute; pointer-events: none; }
.ph__st::before { width: 1px; background: var(--ph-lc); transition: background-color .2s ease; }
.ph__st::after { width: 5px; height: 5px; border-radius: 50%; background: #002b3a; box-shadow: inset 0 0 0 1px #7fd8f5; transition: background-color .2s ease; }
.ph__st--top, .ph__st--bot { text-align: center; translate: -50% 0; }
.ph__st--top { padding-bottom: 19px; translate: -50% -100%; }
.ph__st--bot { padding-top: 19px; }
.ph__st--top::before, .ph__st--bot::before { left: calc(50% - .5px); height: 16px; }
.ph__st--top::before { bottom: 3px; }
.ph__st--bot::before { top: 3px; }
.ph__st--top::after, .ph__st--bot::after { left: calc(50% - 2.5px); }
.ph__st--top::after { bottom: -2.5px; }
.ph__st--bot::after { top: -2.5px; }
/* the stack beside the cell: right-aligned labels, a tick each to one bracket, one leader into the cell */
.ph__stack { position: absolute; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; translate: -100% -50%;
  padding-right: 19px; pointer-events: none; }
.ph__stack .ph__st { position: relative; max-width: 240px; text-align: right; } /* 240: the longest field name (74, German) in three lines */
.ph__stack .ph__st::before { right: -19px; top: 9.5px; width: 13px; height: 1px; }
.ph__stack .ph__st::after { display: none; }
.ph__stack::before { content: ""; position: absolute; right: 6px; top: var(--b0, 10px); bottom: var(--b1, 10px); width: 1px; background: rgb(127 216 245 / .62); }
.ph__stack::after { content: ""; position: absolute; right: calc(-1 * var(--lead, 24px)); top: calc(50% - .5px); width: calc(var(--lead, 24px) + 6px); height: 1px;
  background: linear-gradient(90deg, rgb(127 216 245 / .62) calc(100% - 5px), transparent 0); }
.ph__stack-dot { position: absolute; right: calc(-1 * var(--lead, 24px) - 2.5px); top: calc(50% - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: #002b3a; box-shadow: inset 0 0 0 1px #7fd8f5; }
/* focus: the label gains an underline, its leader and dot light up; the others step back a little */
.ph__st:hover, .ph__st:focus-visible, .ph__st.is-hi { color: #fff; }
.ph__st:hover .ph__st-t, .ph__st:focus-visible .ph__st-t, .ph__st.is-hi .ph__st-t { text-decoration-color: #7fd8f5; }
.ph__st:hover::before, .ph__st:focus-visible::before, .ph__st.is-hi::before { background: #b6eafc; }
.ph__st:hover::after, .ph__st:focus-visible::after, .ph__st.is-hi::after { background: #7fd8f5; }
.ph__stations.has-hi .ph__st:not(.is-hi) { opacity: .62; }
.ph__st:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* ---------- 900 to 1199: the drawing keeps its place but is too small for the callouts (scale under 0.86), so it runs
   without them and the ten fields are chips under the buttons. Under 900: text first, the strip, the chips. ---------- */
.ph__strip, .ph__chips { display: none; }
/* 1024 to 1279: the text column keeps the other heroes' left edge, h1 size and top, but stops at 460 px */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .ph { --ph-copy: min(calc((min(100cqw, 1280px) - 180px) * 7 / 12), 460px); }
}
@media (min-width: 900px) and (max-width: 1023.98px) {
  .ph { --ph-pad: 24px; --ph-top: 116px; --ph-copy: 420px; }
  .ph__inner { min-height: 600px; }
}
/* 900 to 1199 (a pointer device beside the drawing): every chip in view, rows that wrap, long names wrap inside
   their chip; no scroller, nothing over them */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .ph__stations { display: none; }
  .ph__chips { display: flex; flex-wrap: wrap; gap: 8px; width: var(--ph-copy); max-width: 100%; margin-top: 28px; pointer-events: auto; }
  .ph__chips .ph__chip { height: auto; min-height: 34px; padding: 7px 14px 7px 12px; border-radius: 17px; white-space: normal; text-wrap: balance; max-width: 100%; }
}
@media (max-width: 899.98px) {
  .ph { --ph-pad: 24px; --ph-top: 104px; --ph-copy: 100%; }
  .ph::after { background: linear-gradient(180deg, rgb(0 27 36 / .55) 0%, rgb(0 27 36 / 0) 60%); }
  .ph__inner { min-height: 0; padding-bottom: 60px; }
  .ph__copy { max-width: 620px; }
  .ph__art { display: none; }
  .ph__strip { position: relative; display: block; height: 230px; margin: 28px calc(-1 * var(--ph-pad)) 0; pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent); }
  /* phones only: two rows that scroll sideways; the edge fades over 48 px, the rows snap to a chip's start */
  .ph__chips { display: grid; margin: 16px calc(-1 * var(--ph-pad)) 0; padding: 0 48px 0 var(--ph-pad); scroll-padding-inline: var(--ph-pad);
    grid-auto-flow: column; grid-template-rows: repeat(2, 40px); grid-auto-columns: max-content; gap: 8px; height: 88px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; pointer-events: auto;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
  .ph__chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 640px) {
  .ph { --ph-pad: 20px; --ph-top: 84px; }
  .ph__eyebrow { gap: .45rem; margin-bottom: 1rem; padding: .28rem .7rem; font-size: .6875rem; letter-spacing: .1em; line-height: 1.45; }
  .ph__lead { margin-top: 1.25rem; font-size: .95rem; line-height: 1.55; }
  .ph__buttons { flex-direction: column; align-items: stretch; }
  .ph__btn { width: 100%; }
  .ph__strip { height: 180px; margin-top: 22px; }
}
.ph__chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border: 1px solid rgb(127 216 245 / .3); border-radius: 999px;
  background: rgb(0 40 54 / .72); color: #e3f6fd; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none; scroll-snap-align: start;
  opacity: 0; transition: opacity .6s ease, background-color .2s ease, border-color .2s ease; }
.ph__chip::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; box-shadow: inset 0 0 0 1px #7fd8f5; }
.ph__chip.is-in { opacity: 1; }
.ph__chip.is-now { transition: none; }
.ph__chip:hover, .ph__chip:focus-visible { border-color: var(--ph-pl); background: rgb(0 171 227 / .22); color: #fff; }
.ph__chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .ph__pulse::after { animation: none; opacity: 0; }
  .ph__st, .ph__chip, .ph__btn { transition: none; }
}

/* ---------- element dgm_section_hero_process (Themen task 20, agent A, 2026-11-12): what the hero took from themen.css,
   so the element does not need the Themen template. Everything above is process.css as deployed, unchanged. ---------- */
/* the sibling bar (pill menu) over the hero's lower edge (themen.css: body:has(.tm-b) …) */
body:has(.ph) #crm__widgets .frame-type-menu_subpages { margin-top: -30px; z-index: 41; }
