/*
 * Landing page v2 at the root of the map host (ADR 0038): a scroll tour from street to planet.
 * One sticky live map (the embed) that the chapters drive; light and dark from the variables
 * below, auto by default. Type is SiemensSans Pro only (ADR 0041), from the Siemens font CDN.
 * Mobile first: on phones the map sits on top and the text scrolls below it, never over it.
 */
@font-face { font-family: "Siemens Sans Pro"; font-weight: 400; font-style: normal; font-display: swap; src: url("https://cdn.siemens.com/fonts/professional/7.0/SiemensSansPro_W_Rm.woff2") format("woff2"); }
@font-face { font-family: "Siemens Sans Pro"; font-weight: 700; font-style: normal; font-display: swap; src: url("https://cdn.siemens.com/fonts/professional/7.0/SiemensSansPro_W_Bd.woff2") format("woff2"); }

:root {
  --deep: #000028; --petrol: #009999; --bold-green: #00ffb9; --bold-petrol: #00e6dc; --sand: #f3f3f0;
  --bg: #ffffff; --bg2: var(--sand); --bg3: #e9e9e3; --fg: var(--deep); --fg2: #4c4c68; --line: #d9d9df;
  --accent: #007993; --accent-fg: #fff; --accent-soft: #e5f4f4; --card: #fff;
  --grad: linear-gradient(90deg, var(--bold-green), var(--bold-petrol));
  --ext-bg: #fde4e8; --ext-fg: #8a0020; --live-bg: #d9f7ee; --live-fg: #00664d;
  --r: 14px; --bar-h: 56px; --map-h: 44svh;
  --font: "Siemens Sans Pro", arial, sans-serif;
  --mono: "Siemens Sans Pro", arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: #000028; --bg2: #0b0b3b; --bg3: #15154a; --fg: #ffffff; --fg2: #b3b3be; --line: #2e2e6a;
    --accent: var(--bold-petrol); --accent-fg: var(--deep); --accent-soft: #0b2b45; --card: #0f0f42;
    --ext-bg: #4a0716; --ext-fg: #ffb3c0; --live-bg: #003b33; --live-fg: var(--bold-green);
    color-scheme: dark;
  }
}
:root[data-scheme="dark"] {
  --bg: #000028; --bg2: #0b0b3b; --bg3: #15154a; --fg: #ffffff; --fg2: #b3b3be; --line: #2e2e6a;
  --accent: var(--bold-petrol); --accent-fg: var(--deep); --accent-soft: #0b2b45; --card: #0f0f42;
  --ext-bg: #4a0716; --ext-fg: #ffb3c0; --live-bg: #003b33; --live-fg: var(--bold-green);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* clip, not hidden: overflow hidden would make body a scroll container and break sticky */
html, body { margin: 0; max-width: 100%; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 1rem; line-height: 1.5; color: var(--fg); background: var(--bg); }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: 0.85em; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #1491eb; outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--bg); color: var(--fg); padding: 8px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 12px; height: var(--bar-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--fg); }
.brand .dot { width: 20px; height: 20px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--grad); }
.bar nav { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.bar nav a { color: var(--fg2); text-decoration: none; padding: 10px 8px; border-radius: 8px; font-size: 0.95rem; }
.bar nav a:hover { color: var(--fg); background: var(--bg2); }
.bar nav a.hide-m { display: none; }
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-left: 4px; }
.theme button { border: 0; background: none; color: var(--fg2); width: 36px; height: 36px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.theme button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

/* buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
:root[data-scheme="dark"] .btn-primary { background: var(--grad); }
@media (prefers-color-scheme: dark) { :root:not([data-scheme="light"]) .btn-primary { background: var(--grad); } }
.btn-ghost { border-color: currentColor; color: var(--fg); background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { font: inherit; font-size: 0.9rem; min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--fg); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--live-bg); color: var(--live-fg); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kicker { color: var(--accent); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.6em; display: flex; gap: 6px; align-items: center; }
.lede { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--fg2); max-width: 38em; }
.sub { color: var(--fg2); max-width: 44em; }
section { padding: clamp(48px, 9vw, 96px) 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.alt { background: var(--bg2); }

/* intro */
.intro { padding: 28px 0 20px; }
.intro .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.intro .cta .btn { flex: 1 1 auto; }

/* the tour: phones stack, the map sticks below the bar and the chapters scroll under it */
.story { padding: 0; }
.story .grid { display: block; }
.sticky { position: sticky; top: var(--bar-h); z-index: 5; height: var(--map-h); padding: 8px 0 10px; background: var(--bg); }
.mapframe { position: relative; height: 100%; border-radius: var(--r); overflow: hidden; background: var(--bg3); border: 1px solid var(--line); }
.mapframe iframe, .mapframe > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.45s; }
.mapframe > img { object-fit: contain; }
.mapframe .on { opacity: 1; z-index: 1; }
.shield { position: absolute; inset: 0; z-index: 3; cursor: pointer; touch-action: pan-x pan-y; display: flex; align-items: flex-start; justify-content: center; padding-top: 44px; }
.shield span { opacity: 0; transition: opacity 0.2s; background: rgb(0 0 40 / 85%); color: #fff; font-size: 0.82rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.shield:hover span, .shield:focus-visible span { opacity: 1; }
@media (hover: none) { .shield span { opacity: 1; } }
.mapframe.is-live .shield, .mapframe.is-image .shield { display: none; }
.progress { position: absolute; left: 8px; top: 6px; display: flex; gap: 2px; z-index: 4; }
.progress button { width: 28px; height: 32px; border: 0; padding: 14px 2px; background: none; cursor: pointer; }
.progress button::before { content: ""; display: block; height: 4px; border-radius: 2px; background: rgb(0 0 40 / 30%); }
:root[data-scheme="dark"] .progress button:not(.on)::before { background: rgb(255 255 255 / 35%); }
@media (prefers-color-scheme: dark) { :root:not([data-scheme="light"]) .progress button:not(.on)::before { background: rgb(255 255 255 / 35%); } }
.progress button.on::before { background: var(--accent); }
.maplabel { position: absolute; left: 8px; bottom: 8px; z-index: 4; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--fg); max-width: calc(100% - 200px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ch { scroll-margin-top: calc(var(--bar-h) + var(--map-h) + 10px); min-height: 64svh; padding: 26px 0 40px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--line); min-width: 0; }
.ch:last-child { border-bottom: 0; }
.step { font-size: 0.8rem; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ch h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); }
.ch p { color: var(--fg2); max-width: 34em; }
code.url { display: block; background: var(--bg2); border-radius: 10px; padding: 10px 12px; margin-top: 8px; overflow-wrap: anywhere; font-size: 0.82rem; color: var(--fg); }
code.url mark { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 75%, var(--fg)); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.duel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 10px; margin-top: 10px; max-width: 34em; }
.duel > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); min-width: 0; }
.duel > div.ours { border: 2px solid var(--accent); }
.duel h3 { font-size: 0.95rem; margin: 0 0 8px; }
.duel ul { list-style: none; padding: 0; margin: 0 0 10px; font-size: 0.85rem; color: var(--fg2); }
.duel li { padding: 2px 0; }
.hosts { display: flex; flex-wrap: wrap; gap: 4px; }
.hosts span { font-size: 0.72rem; padding: 2px 6px; border-radius: 5px; background: var(--bg2); color: var(--fg); overflow-wrap: anywhere; }
.hosts span.ext { background: var(--ext-bg); color: var(--ext-fg); }
.src { font-size: 0.8rem; color: var(--fg2); margin-top: 10px; max-width: 34em; }
.video { position: relative; display: block; border-radius: 12px; overflow: hidden; margin-top: 10px; max-width: 34em; border: 1px solid var(--line); color: #fff; }
.video img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.video .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(rgb(0 0 40 / 60%), transparent 40%); }
.video .play span { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: var(--deep); display: grid; place-items: center; }
.video .play .icon { width: 28px; height: 28px; }
.video .caption { position: absolute; left: 12px; top: 10px; font-weight: 700; font-size: 0.9rem; }

/* after the tour */
.newgrid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.newgrid li { padding: 16px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.newgrid li .icon { width: 28px; height: 28px; color: var(--accent); grid-row: span 3; }
.newgrid li h3 { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.newgrid li p { margin: 0; color: var(--fg2); font-size: 0.9rem; }
.newgrid li code { font-size: 0.75rem; color: var(--fg2); overflow-wrap: anywhere; }
.newgrid a { color: inherit; text-decoration: none; grid-column: 1 / -1; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.newgrid a:hover h3 { text-decoration: underline; }

/* converter */
.conv { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: minmax(0, 1fr); }
.conv .card { padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.conv label, .conv .label { font-weight: 700; margin: 0; }
.conv textarea { width: 100%; font: 0.85rem/1.5 var(--mono); padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); resize: vertical; }
.ours { margin: 0; padding: 10px; border-radius: 10px; background: var(--accent-soft); color: var(--fg); font: 0.85rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; min-height: 4.5rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.note { margin: 0; font-size: 0.88rem; color: var(--fg2); }
.preview { position: relative; min-height: 18rem; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg3) center / cover no-repeat; }
.preview iframe, .preview img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.csp { margin: 12px 0 0; color: var(--fg2); font-size: 0.92rem; }
.ways { display: grid; gap: 18px; margin-top: 28px; grid-template-columns: minmax(0, 1fr); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { font: inherit; border: 0; background: none; color: var(--fg2); padding: 10px 14px; min-height: 44px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); font-weight: 700; }
.code { background: #000028; color: #e6f7f7; border-radius: var(--r); padding: 16px; border: 1px solid var(--line); min-width: 0; }

/* questions and footer */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3em; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--fg2); margin: 10px 0 0; max-width: 46em; }
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 0.85rem; color: var(--fg2); }
.foot ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot a { color: var(--fg2); display: inline-block; padding: 6px 0; }

@media (min-width: 640px) {
  .bar nav a.hide-m { display: inline-block; }
  .intro .cta .btn { flex: 0 0 auto; }
}
@media (min-width: 700px) { .newgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .conv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ways { grid-template-columns: 300px minmax(0, 1fr); }
}
/* wide screens: text on the left, the sticky map on the right */
@media (min-width: 960px) {
  .intro { padding: 56px 0 24px; }
  .story .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; }
  .sticky { order: 2; height: calc(100svh - var(--bar-h) - 32px); top: calc(var(--bar-h) + 16px); padding: 0; background: none; align-self: start; }
  .chapters { order: 1; }
  .ch { scroll-margin-top: 0; min-height: 88svh; border: 0; }
}
@media (min-width: 1000px) { .newgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
