/* Microscope hero (Themen draft, "Materialkenntnisse", brief 14): the view through a reflected-light microscope.
   Markup from design/heroes/microscope.php, drawing from microscope.js. Everything is scoped to .mh.
   The text block repeats the measures of the other v2 topic heroes (process hero, Event Hero text): 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.
   The instrument (1200px and wider): the field of view with its dial left, the read-out column (142px) right, as one
   group centred in the free space between the text (lead 540px, 26px clear) and min(40px from the edge, 40px outside the
   1280 box); the field's radius R follows from that width (140 to 220px) and is a whole number of pixels, so the
   canvases sit on the pixel grid. Vertical centre: 363px = the middle between the site header (84) and the topic
   switch (642). Dial ring: 31px outside R; the vernier and index reach 49px at 3 o'clock; leader to the stage row. */
.mh {
  --mh-pad: 64px; --mh-top: 168px; --mh-copy: calc((min(100cqw, 1280px) - 180px) * 7 / 12);
  --mh-tr: calc(max(0px, (100cqw - 1280px) / 2) + var(--mh-pad) + min(var(--mh-copy), 540px));
  --mh-fl: calc(var(--mh-tr) + 26px);
  --mh-fr: min(calc(100cqw - 40px), calc((100cqw + 1280px) / 2 + 40px));
  --mh-col: 142px;
  --mh-r: round(down, clamp(140px, (var(--mh-fr) - var(--mh-fl) - 97px - var(--mh-col)) / 2, 220px), 1px);
  --mh-gw: calc(2 * var(--mh-r) + 97px + var(--mh-col));
  --mh-gl: round(down, calc(var(--mh-fl) + (var(--mh-fr) - var(--mh-fl) - var(--mh-gw)) / 2), 1px);
  --mh-cy: 363px;
  container: mh / 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(circle 330px at calc(var(--mh-gl) + var(--mh-r) + 31px) var(--mh-cy), rgb(0 171 227 / .16), rgb(0 171 227 / .05) 62%, transparent 100%),
    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%);
}
.mh *, .mh *::before, .mh *::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(> .mh) { max-width: none; width: auto; margin: 0; padding: 0; }
.mh a { text-decoration: none; }
.mh::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 27 36 / .6) 0%, rgb(0 27 36 / .32) 30%, rgb(0 27 36 / 0) 48%); }

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

.mh__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; }
.mh__pulse { position: relative; display: inline-flex; width: .5rem; height: .5rem; border-radius: 999px; background: #89defb;
  box-shadow: 0 0 22px rgb(0 171 227 / .7); }
.mh__pulse::after { content: ""; position: absolute; inset: -.45rem; border: 1px solid rgb(0 171 227 / .42); border-radius: 999px;
  animation: mh-pulse 2.4s ease-out infinite; }
@keyframes mh-pulse { 0% { opacity: .72; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.8); } }

.mh__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; }
.mh__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)); }
.mh__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; }
.mh__lead p { margin: 0; }
.mh__lead p + p { margin-top: .6em; }
.mh__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2rem; }
.mh__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; }
.mh__btn--primary { background: #00abe3; color: #fff; box-shadow: 0 16px 38px -12px rgb(0 171 227 / .55); }
.mh__btn--primary:hover, .mh__btn--primary:focus-visible { background: #007aa8; color: #fff; box-shadow: 0 18px 40px -12px rgb(0 122 168 / .6); }
.mh__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); }
.mh__btn--secondary:hover, .mh__btn--secondary:focus-visible { border-color: rgb(137 222 251 / .6); background: rgb(0 171 227 / .2); color: #fff; }
.mh__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mh__btn i { font-size: 1rem; }

/* ---------- the instrument ---------- */
.mh__inst { position: absolute; z-index: 2; left: var(--mh-gl); top: calc(var(--mh-cy) - var(--mh-r) - 31px);
  width: var(--mh-gw); height: calc(2 * var(--mh-r) + 62px); pointer-events: none; }
.mh__view { position: absolute; left: 31px; top: 31px; width: calc(2 * var(--mh-r)); height: calc(2 * var(--mh-r)); border-radius: 50%;
  overflow: hidden; background: #00141b; pointer-events: auto; touch-action: pan-y; }
.mh__gl { display: block; width: 100%; height: 100%; }
.mh__dial { position: absolute; left: -24px; top: -24px; width: calc(100% + 48px); height: calc(100% + 48px); display: block; pointer-events: none; }

/* the read-out column: labels 12px mono caps in the light tone, values 13px mono white, options as buttons (24px rows);
   the stage row sits on the field's horizontal centre line (the leader from the index ends there) */
.mh__panel { position: absolute; left: calc(2 * var(--mh-r) + 97px); top: calc(var(--mh-r) + 31px - 258px); width: var(--mh-col);
  display: flex; flex-direction: column; gap: 14px; pointer-events: auto;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace; }
.mh__row { display: flex; flex-direction: column; align-items: flex-start; }
.mh__k { display: block; height: 16px; margin: 0; color: #7fd8f5; font-size: 12px; font-weight: 600; line-height: 14px; letter-spacing: .1em; text-transform: uppercase; }
.mh__v { display: block; color: #fff; font-size: 13px; font-weight: 500; line-height: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mh__num { min-width: 13ch; contain: layout paint; }
.mh__sub { display: block; color: rgb(198 232 244 / .8); font-size: 12px; line-height: 15px; white-space: nowrap; }
.mh__opts { display: flex; flex-direction: column; width: calc(100% + 8px); margin-left: -8px; }
.mh__opt, .mh__spec { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 24px; margin: 0; padding: 0 8px;
  border: 0; border-radius: 6px; background: transparent; color: rgb(227 245 252 / .82); font: inherit; font-size: 13px; font-weight: 500;
  line-height: 24px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.mh__opt-na { color: rgb(127 216 245 / .78); font-size: 12px; font-variant-numeric: tabular-nums; }
.mh__opt:hover, .mh__spec:hover { background: rgb(127 216 245 / .1); color: #fff; }
.mh__opt.is-on { background: rgb(0 171 227 / .24); color: #fff; box-shadow: inset 2px 0 0 #00abe3; }
.mh__opt.is-on .mh__opt-na { color: #b6eafc; }
.mh__opt:focus-visible, .mh__spec:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.mh__spec { display: block; height: auto; width: calc(100% + 8px); margin-left: -8px; padding: 2px 8px 3px; }
.mh__row--mode .mh__sub { margin-top: 3px; }
.mh__row--meas { transition: opacity .25s ease; opacity: 0; }
.mh__row--meas.is-on { opacity: 1; }
.mh__line { 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) {
  .mh { --mh-copy: min(calc((min(100cqw, 1280px) - 180px) * 7 / 12), 460px); }
}
/* ---------- 900 to 1199: the field of view right of the text, the options in two rows under it ---------- */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .mh { --mh-r: round(down, clamp(130px, min((var(--mh-fr) - var(--mh-fl) - 96px) / 2, 158px), 170px), 1px);
    --mh-gw: calc(2 * var(--mh-r) + 62px); --mh-cy: 340px; }
  .mh__panel { left: 50%; top: calc(2 * var(--mh-r) + 76px); width: 300px; translate: -50% 0; gap: 6px; }
  .mh__row--spec, .mh__row--stage, .mh__row--focus, .mh__row--meas, .mh__panel .mh__sub, .mh__panel .mh__k { display: none; }
  .mh__opts { flex-direction: row; justify-content: center; gap: 4px; width: 100%; margin: 0; }
  .mh__opt { width: auto; padding: 0 9px; }
  .mh__opt-na { display: none; }
  .mh__row--obj, .mh__row--mode { width: 100%; }
}
@media (min-width: 900px) and (max-width: 1023.98px) {
  .mh { --mh-pad: 24px; --mh-top: 116px; --mh-copy: 420px; }
  .mh__inner { min-height: 640px; }
}
/* ---------- under 900: text first, then the field of view (240px) with a one-line read-out ---------- */
@media (max-width: 899.98px) {
  .mh { --mh-pad: 24px; --mh-top: 104px; --mh-copy: 100%; --mh-r: 120px; }
  .mh::after { background: linear-gradient(180deg, rgb(0 27 36 / .55) 0%, rgb(0 27 36 / 0) 60%); }
  .mh__inner { min-height: 0; padding-bottom: 0; }
  .mh__copy { max-width: 620px; }
  .mh__inst { position: relative; left: auto; top: auto; width: calc(2 * var(--mh-r) + 62px); height: calc(2 * var(--mh-r) + 62px); margin: 34px auto 96px; }
  .mh__panel { display: none; }
  .mh__line { position: absolute; left: 50%; top: calc(100% + 14px); display: flex; gap: 14px; translate: -50% 0; margin: 0; white-space: nowrap;
    color: #fff; font: 500 13px/18px ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace; font-variant-numeric: tabular-nums; }
  .mh__line span + span::before { content: "·"; margin-right: 14px; color: #7fd8f5; }
  .mh { background:
    radial-gradient(circle 240px at 50% calc(100% - 72px - 30px - var(--mh-r) - 31px), rgb(0 171 227 / .16), transparent 100%),
    linear-gradient(162deg, #001b24 0%, #00212c 38%, #002b3a 72%, #003a4e 100%); }
}
@media (max-width: 640px) {
  .mh { --mh-pad: 20px; --mh-top: 84px; }
  .mh__eyebrow { gap: .45rem; margin-bottom: 1rem; padding: .28rem .7rem; font-size: .6875rem; letter-spacing: .1em; line-height: 1.45; }
  .mh__lead { margin-top: 1.25rem; font-size: .95rem; line-height: 1.55; }
  .mh__buttons { flex-direction: column; align-items: stretch; }
  .mh__btn { width: 100%; }
}
@media (max-width: 359.98px) {
  .mh { --mh-r: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  .mh__pulse::after { animation: none; opacity: 0; }
  .mh__btn, .mh__opt, .mh__spec, .mh__row--meas { transition: none; }
}

/* ---------- element dgm_section_hero_microscope (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 microscope.css as deployed, unchanged. ---------- */
/* the sibling bar (pill menu) over the hero's lower edge (themen.css: body:has(.tm-b) …) */
body:has(.mh) #crm__widgets .frame-type-menu_subpages { margin-top: -30px; z-index: 41; }

/* ---------- theme light (Themen brief 21, L2, 2026-11-13): the same hero on a light ground, class mh--light (field
   tx_dgm_ex_theme = light). Layout, heights, texts, the loop and the micrograph's colours stay; the ground, text, chip,
   buttons and read-out take the light topic heroes' values (section-hero-loop: .lh), the dial is redrawn by the script
   (PAL.light). No pulse dot (the template leaves it out). Everything above renders the dark hero unchanged. ---------- */
.mh--light {
  color: #0f172a;
  background:
    radial-gradient(circle 330px at calc(var(--mh-gl) + var(--mh-r) + 31px) var(--mh-cy), rgb(255 255 255 / .95), rgb(255 255 255 / .55) 62%, rgb(255 255 255 / 0) 100%),
    radial-gradient(ellipse 60% 70% at 100% 100%, rgb(127 216 245 / .22), transparent 70%),
    linear-gradient(160deg, #f6fbfe 0%, #eef8fc 42%, #e4f4fb 74%, #dff2fa 100%);
}
.mh--light::after { background: linear-gradient(90deg, rgb(246 251 254 / .5) 0%, rgb(246 251 254 / .2) 30%, rgb(246 251 254 / 0) 48%); }
.mh--light .mh__eyebrow { vertical-align: top; border-color: rgb(0 171 227 / .34); background: rgb(255 255 255 / .72); color: #00475e;
  box-shadow: 0 6px 18px -12px rgb(0 62 82 / .35); }
@media (min-width: 640.02px) { .mh--light .mh__eyebrow { padding-left: .85rem; } }
.mh--light .mh__h1 { color: #003e52; }
.mh--light .mh__accent { background: linear-gradient(90deg, #007aa8 0%, #00abe3 100%); -webkit-background-clip: text; background-clip: text; filter: none; }
.mh--light .mh__lead { color: #475569; }
.mh--light .mh__btn--primary { box-shadow: 0 16px 34px -14px rgb(0 171 227 / .6); }
.mh--light .mh__btn--primary:hover, .mh--light .mh__btn--primary:focus-visible { box-shadow: 0 18px 36px -14px rgb(0 122 168 / .6); }
.mh--light .mh__btn--secondary { border-color: rgb(0 62 82 / .26); background: rgb(255 255 255 / .74); color: #003e52; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mh--light .mh__btn--secondary:hover, .mh--light .mh__btn--secondary:focus-visible { border-color: #00abe3; background: #fff; color: #003e52; }
.mh--light .mh__btn:focus-visible { outline-color: #003e52; }
/* the instrument: the field of view lifts off the ground with a soft shadow; read-out in ink */
.mh--light .mh__view { box-shadow: 0 24px 48px -26px rgb(0 62 82 / .55), 0 2px 6px -2px rgb(0 62 82 / .18); }
.mh--light .mh__k { color: #00607f; }
.mh--light .mh__v { color: #003e52; }
.mh--light .mh__sub { color: #3b6577; }
.mh--light .mh__opt, .mh--light .mh__spec { color: #2d5566; }
.mh--light .mh__opt-na { color: #3b6577; }
.mh--light .mh__opt:hover, .mh--light .mh__spec:hover { background: rgb(0 171 227 / .1); color: #003e52; }
.mh--light .mh__opt.is-on { background: rgb(0 171 227 / .14); color: #003e52; }
.mh--light .mh__opt.is-on .mh__opt-na { color: #00607f; }
.mh--light .mh__opt:focus-visible, .mh--light .mh__spec:focus-visible { outline-color: #003e52; }
@media (max-width: 899.98px) {
  .mh--light::after { background: none; }
  .mh--light .mh__line { color: #003e52; }
  .mh--light .mh__line span + span::before { color: #00abe3; }
  .mh--light { background:
    radial-gradient(circle 240px at 50% calc(100% - 72px - 30px - var(--mh-r) - 31px), rgb(255 255 255 / .95), rgb(255 255 255 / 0) 100%),
    linear-gradient(160deg, #f6fbfe 0%, #eef8fc 42%, #e4f4fb 74%, #dff2fa 100%); }
}
/* light hero (page field tx_dgm_fullscreen_hero = 2, the dark menu): as on the loop hero, pinned the blue logo turns white
   on the blue bar; over the hero, search and language buttons with ink icons and a visible border */
body.dgm-page-has-fullscreen-hero-dark:has(.mh--light) .mainmenu.dgm-mainmenu--pinned #logo img { filter: brightness(0) invert(1); }
body.dgm-page-has-fullscreen-hero-dark:has(.mh--light) .mainmenu:not(.dgm-mainmenu--float) .dgm-mainmenu-overlay-actions :is(button[aria-label="Search"], #options-menu) { border: 1px solid rgb(15 23 42 / .28) !important; background: rgb(255 255 255 / .7) !important; color: #0f172a !important; }
body.dgm-page-has-fullscreen-hero-dark:has(.mh--light) .mainmenu:not(.dgm-mainmenu--float) .dgm-mainmenu-overlay-actions :is(button[aria-label="Search"], #options-menu) * { color: #0f172a !important; }
body.dgm-page-has-fullscreen-hero-dark:has(.mh--light) .mainmenu:not(.dgm-mainmenu--float) .dgm-mainmenu-overlay-actions :is(button[aria-label="Search"], #options-menu):hover { border-color: #00abe3 !important; }
