/*
 * Public site header, footer, Help and legal layout (docs/UX_PUBLIC_SITE.md).
 * Imported by the SPA pages and written by the build to /site.css for the
 * static ones. Colours are the landing page's (landing.css --lp-*).
 *
 * Theme: the SPA sets data-theme (dark | light | system) on <html>; the static
 * pages set none and follow the device.
 */

:root {
  --vz-text: #eef1f7;
  --vz-muted: #9aa3b6;
  --vz-line: #222838;
  --vz-raised: #151a26;
  --vz-accent: #7aa2ff;
  --vz-head: rgb(7 9 15 / 0.82);
  --vz-panel: #0f131d;
  --vz-head-h: 64px;
  --vz-measure: 31.5rem; /* about 70 characters, as legal.css */
  --vz-rail: 13.75rem;
  --vz-sticky-top: calc(var(--vz-head-h) + 24px);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --vz-text: #10141f;
    --vz-muted: #545e72;
    --vz-line: #dfe5ee;
    --vz-raised: #eef2f8;
    --vz-accent: #2c63d6;
    --vz-head: rgb(255 255 255 / 0.86);
    --vz-panel: #ffffff;
  }
}

:root[data-theme="light"] {
  --vz-text: #10141f;
  --vz-muted: #545e72;
  --vz-line: #dfe5ee;
  --vz-raised: #eef2f8;
  --vz-accent: #2c63d6;
  --vz-head: rgb(255 255 255 / 0.86);
  --vz-panel: #ffffff;
}

/* Wordmark: one image per theme, no layout shift (width and height set). */
.vz-wordmark {
  display: block;
  height: 32px;
  width: auto;
}

.vz-wordmark-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .vz-wordmark-dark {
    display: none;
  }

  :root:not([data-theme="dark"]) .vz-wordmark-light {
    display: block;
  }
}

:root[data-theme="light"] .vz-wordmark-dark {
  display: none;
}

:root[data-theme="light"] .vz-wordmark-light {
  display: block;
}

/* Skip link */
.vz-skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--vz-panel);
  color: var(--vz-text);
  font-weight: 700;
  font-size: 15px;
}

.vz-skip:focus {
  top: 12px;
}

/* ---- Header -------------------------------------------------------------- */

/* styles.css styles the app's bare <header>; the SPA pages load it, so reset what it sets. */
.vz-head {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  overflow: visible;
  isolation: auto;
  border-bottom: 1px solid var(--vz-line);
  background: var(--vz-head);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  overflow-wrap: normal;
  white-space: nowrap;
}

.vz-head-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(1140px, 100% - 32px);
  height: var(--vz-head-h);
  margin-inline: auto;
}

.vz-head .vz-brand {
  display: flex;
  flex-shrink: 0;
  border-radius: 8px;
}

.vz-head .vz-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.vz-head .vz-nav a,
.vz-head .vz-menu-panel a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--vz-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.vz-head .vz-nav a:hover,
.vz-head .vz-menu-panel a:hover {
  color: var(--vz-text);
  background: var(--vz-raised);
}

.vz-head .vz-nav a[aria-current="page"],
.vz-head .vz-menu-panel a[aria-current="page"] {
  color: var(--vz-text);
}

/* Active bar under the current section (decoration; aria-current carries it). */
.vz-head .vz-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -13px;
  height: 2px;
  border-radius: 2px;
  background: var(--vz-accent);
}

.vz-head .vz-open {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--vz-line);
  border-radius: 999px;
  color: var(--vz-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.vz-head .vz-open:hover {
  border-color: var(--vz-accent);
}

.vz-head a:focus-visible,
.vz-head summary:focus-visible,
.vz-foot a:focus-visible,
.vz-toc a:focus-visible,
.vz-help-side a:focus-visible,
.vz-help-topics summary:focus-visible,
.vz-help-topics a:focus-visible {
  outline: 2px solid var(--vz-accent);
  outline-offset: 2px;
}

/* Phone menu: a disclosure, so it works without JavaScript. */
.vz-menu {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
}

.vz-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--vz-text);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.vz-menu summary::-webkit-details-marker {
  display: none;
}

/* Three-line icon, drawn in CSS so it follows the text colour. */
.vz-menu summary::before {
  content: "";
  width: 16px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
}

.vz-menu[open] summary {
  background: var(--vz-raised);
}

.vz-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--vz-line);
  background: var(--vz-panel);
  box-shadow: 0 16px 32px rgb(0 0 0 / 0.18);
}

.vz-head .vz-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: 10px;
  font-size: 16px;
}

.vz-head .vz-menu-panel a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--vz-accent);
  border-radius: 0 10px 10px 0;
}

@media (max-width: 719px) {
  :root {
    --vz-head-h: 58px;
  }

  .vz-head .vz-nav {
    display: none;
  }

  .vz-menu {
    display: block;
  }

  .vz-wordmark {
    height: 28px;
  }

  .vz-head .vz-open {
    padding: 7px 14px;
    font-size: 14px;
  }

  .vz-head .vz-brand {
    margin-right: auto;
  }

  .vz-menu {
    margin-left: 0;
  }
}

/* Narrow phones: the menu shows its icon only; the word stays its accessible name. */
@media (max-width: 419px) {
  .vz-head-row {
    gap: 8px;
  }

  .vz-wordmark {
    height: 26px;
  }

  .vz-menu summary {
    padding: 8px 12px;
  }

  .vz-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Anchors clear the sticky header. */
main [id],
.vz-doc [id] {
  scroll-margin-top: calc(var(--vz-head-h) + 16px);
}

/* ---- Footer -------------------------------------------------------------- */

.vz-foot {
  margin-top: 64px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--vz-line);
  color: var(--vz-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.vz-foot-grid,
.vz-foot-base {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

.vz-foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.vz-foot-brand p {
  max-width: 22rem;
  margin: 14px 0 0;
}

.vz-foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.vz-foot nav h2 {
  margin: 0 0 6px;
  color: var(--vz-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vz-foot nav a {
  color: var(--vz-muted);
  text-decoration: none;
  border-radius: 4px;
  /* Long words (Nutzungsbedingungen) break with a hyphen in the page's language, not mid-word. */
  hyphens: auto;
  -webkit-hyphens: auto;
}

.vz-foot nav a:hover,
.vz-foot nav a[aria-current="page"] {
  color: var(--vz-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vz-foot-base {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--vz-line);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.vz-foot-base p {
  margin: 0;
}

.vz-foot-base p + p {
  margin-top: 4px;
}

.vz-foot-base a {
  color: inherit;
}

@media (max-width: 900px) {
  .vz-foot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .vz-foot-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .vz-foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Contents list ("On this page") ---------------------------------------- */

.vz-toc {
  margin: 0 0 28px;
  padding-left: 14px;
  border-left: 2px solid var(--vz-line);
  font-size: 15px;
  line-height: 1.45;
}

.vz-toc h2 {
  margin: 0 0 8px;
  color: var(--vz-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vz-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vz-toc li {
  margin: 0;
  padding: 3px 0;
}

/* ---- Legal pages ----------------------------------------------------------- */

.vz-date {
  margin: 0 0 6px;
  color: var(--vz-muted);
  font-size: 14px;
}

/* Lead-in words that already start a paragraph, anchored for the contents list. */
.vz-lead {
  font-weight: 650;
}

@media (min-width: 1024px) {
  .legal-main.vz-doc:has(> .vz-toc) {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure, var(--vz-measure)));
    grid-template-areas:
      "toc head"
      "toc body";
    column-gap: 56px;
    justify-content: center;
    max-width: calc(15rem + 56px + var(--measure, var(--vz-measure)) + 32px);
  }

  .vz-doc > .vz-doc-head {
    grid-area: head;
  }

  .vz-doc > .vz-doc-body {
    grid-area: body;
  }

  .vz-doc > .vz-toc {
    grid-area: toc;
    align-self: start;
    position: sticky;
    top: var(--vz-sticky-top);
    max-height: calc(100vh - var(--vz-sticky-top) - 16px);
    overflow-y: auto;
    margin-top: 8px;
  }
}

/* ---- Help ------------------------------------------------------------------ */

.vz-help {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

/* The help main sits in .vz-help, which sets the outer width and gutter. */
.vz-help > .vz-help-main {
  max-width: var(--measure, var(--vz-measure));
  margin-inline: auto;
  padding-left: 0;
  padding-right: 0;
}

/* Phones and tablets: "Help topics" disclosure. */
.vz-help-topics {
  max-width: var(--measure, var(--vz-measure));
  margin: 20px auto 0;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
  background: var(--vz-panel);
}

.vz-help-topics summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  border-radius: 12px;
}

.vz-help-topics summary::-webkit-details-marker {
  display: none;
}

.vz-help-topics summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.vz-help-topics[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.vz-help-topics ul,
.vz-help-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vz-help-topics ul {
  padding: 0 8px 8px;
}

.vz-help-topics li,
.vz-help-side li {
  margin: 0;
}

.vz-help-topics a,
.vz-help-side a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--vz-text);
  text-decoration: none;
}

.vz-help-topics a:hover,
.vz-help-side a:hover {
  background: var(--vz-raised);
}

.vz-help-topics a[aria-current="page"],
.vz-help-side a[aria-current="page"] {
  background: var(--vz-raised);
  box-shadow: inset 3px 0 0 var(--vz-accent);
  border-radius: 0 8px 8px 0;
  font-weight: 650;
}

.vz-help-side {
  display: none;
}

@media (min-width: 960px) {
  .vz-help {
    display: grid;
    grid-template-columns: var(--vz-rail) minmax(0, 1fr);
    column-gap: 48px;
    align-items: start;
  }

  .vz-help-topics,
  .help-crumb {
    display: none;
  }

  .vz-help-side {
    display: block;
    position: sticky;
    top: var(--vz-sticky-top);
    max-height: calc(100vh - var(--vz-sticky-top) - 16px);
    overflow-y: auto;
    margin-top: 36px;
    font-size: 15px;
  }

  .vz-help-side h2 {
    margin: 0 0 8px 12px;
    color: var(--vz-muted);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .vz-help-side a {
    min-height: 36px;
  }

  .vz-help > .vz-help-main {
    margin-inline: 0;
  }
}

@media (min-width: 1200px) {
  .vz-help > .vz-help-main.vz-doc:has(> .vz-toc) {
    display: grid;
    grid-template-columns: minmax(0, var(--measure, var(--vz-measure))) var(--vz-rail);
    grid-template-areas:
      "head toc"
      "body toc";
    column-gap: 56px;
    max-width: none;
  }

  .vz-help-main > .vz-doc-head {
    grid-area: head;
  }

  .vz-help-main > .vz-doc-body {
    grid-area: body;
  }

  .vz-help-main > .vz-toc {
    grid-area: toc;
    align-self: start;
    position: sticky;
    top: var(--vz-sticky-top);
    max-height: calc(100vh - var(--vz-sticky-top) - 16px);
    overflow-y: auto;
    margin-top: 8px;
  }
}

/* ---- Print ----------------------------------------------------------------- */

@media print {
  .vz-skip,
  .vz-head .vz-nav,
  .vz-menu,
  .vz-lang,
  .vz-head .vz-open,
  .vz-toc,
  .vz-help-side,
  .vz-help-topics,
  .vz-foot nav {
    display: none !important;
  }

  .vz-head {
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #999;
  }

  .vz-wordmark-dark {
    display: none !important;
  }

  .vz-wordmark-light {
    display: block !important;
  }

  .legal-main.vz-doc,
  .vz-help-main {
    display: block !important;
    max-width: none !important;
  }

  .vz-foot {
    margin-top: 24px;
    padding-top: 12px;
    color: #333;
  }

  .vz-date {
    color: #333;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .vz-head .vz-nav a,
  .vz-head .vz-open,
  .vz-help-side a,
  .vz-help-topics a {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
}

/* Language menu (footer), shown once more than one language is published. One wrapping row,
   not the footer groups' column (.vz-foot nav). */
.vz-foot .vz-langs {
  width: min(1140px, 100% - 32px);
  margin: 28px auto 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 14px;
}

.vz-foot .vz-langs a {
  display: inline-block;
  padding: 6px 0;
  color: var(--vz-muted);
  text-decoration: none;
}

.vz-foot .vz-langs a:hover,
.vz-foot .vz-langs a[aria-current="true"] {
  color: var(--vz-text);
}

.vz-foot .vz-langs a[aria-current="true"] {
  font-weight: 600;
}

.vz-foot-base .vz-legal-note {
  margin-bottom: 8px;
}

/* Header language switch: a small menu on wide screens; on phones the same links end the Menu panel. */
.vz-lang {
  position: relative;
  flex-shrink: 0;
}

.vz-lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--vz-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
}

.vz-lang summary::-webkit-details-marker {
  display: none;
}

.vz-lang summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.vz-lang summary:hover,
.vz-lang[open] summary {
  background: var(--vz-raised);
  color: var(--vz-text);
}

.vz-lang summary:focus-visible {
  outline: 2px solid var(--vz-accent);
  outline-offset: 2px;
}

.vz-lang-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
  background: var(--vz-panel);
  box-shadow: 0 16px 32px rgb(0 0 0 / 0.18);
}

.vz-head .vz-lang-panel a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--vz-muted);
  font-size: 15px;
  text-decoration: none;
}

.vz-head .vz-lang-panel a:hover,
.vz-head .vz-lang-panel a[aria-current="true"] {
  background: var(--vz-raised);
  color: var(--vz-text);
}

.vz-head .vz-lang-panel a[aria-current="true"] {
  font-weight: 600;
}

.vz-menu-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--vz-line);
}

.vz-head .vz-menu-langs a {
  font-size: 15px;
  color: var(--vz-muted);
}

.vz-head .vz-menu-langs a[aria-current="true"] {
  color: var(--vz-text);
  font-weight: 600;
}

@media (max-width: 719px) {
  .vz-lang {
    display: none;
  }
}
