/* Cloud Media Shrinker's own navigation, under the site header on each of its pages (product, help, What's new,
   What's coming, privacy). It sits outside <main>, so it spans the frame on every page whatever width the page's
   content uses. Wide screens: one row with the app, the pages and Get the app, and a thin line below. Narrower
   screens: a tinted band, the app on the first row (with a back arrow on the inner pages), the pages wrapping below.
   Get the app shows in the band only from 724 px, where it clears the Privacy link below it by 40 px or more. */
.cms-nav { --muted: #5d6a5f; --tile: #edf1e3; --line: #a7b2a5; --pill: #124b30; --pill-hover: #1c6240; --pill-ink: #fdfaf3; --pill-line: #789182; }
/* The site styles every nav like its menu bar, so this one resets that. */
.page-frame > nav.cms-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 12px var(--rail) 0 0; padding: 4px 0 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
.page-frame > nav.cms-nav a { min-width: 0; padding: 0; white-space: nowrap; }
.page-frame > nav.cms-nav a.cms-nav-get { padding: 0 16px; }
.cms-nav a.cms-nav-home { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; color: var(--ink); font-size: 17px; font-weight: 700; }
.cms-nav-home img { display: block; width: 28px; height: 28px; }
.cms-nav-back { display: none; flex: 0 0 auto; }
.cms-nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.cms-nav-links a { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; min-height: 44px; color: var(--muted); }
/* Each link is as wide as its bold label, so the current page's bold doesn't shift the links after it. */
.cms-nav-links a::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: 700; pointer-events: none; user-select: none; }
.cms-nav-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cms-nav-links a[aria-current="page"] { color: var(--green); font-weight: 700; }
.cms-nav a.cms-nav-get { position: relative; display: inline-flex; align-items: center; min-height: 38px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-weight: 700; }
.cms-nav a.cms-nav-get:hover { background: var(--pill-hover); color: var(--pill-ink); }
/* A 44 px tap area around the pill. */
.cms-nav-get::after { content: ""; position: absolute; inset: -3px 0; }
/* The language menu: an outlined pill with a globe, the page's language code (EN, DE) and a chevron, so it reads as a
   button (Daniel picked it on 2026-12-01: the bare gray globe and code before it was hard to see; he asked for the
   code, not the name, on English pages too). It opens a short list of the languages by their own names. Wide screens
   show it between the pages and Get the app; in the band it sits on the first row, right of the app's name; on phones
   it closes the last line of page links. */
.cms-lang { position: relative; flex: 0 0 auto; }
.cms-lang summary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 40px; padding: 0 12px 0 11px; border: 1.5px solid var(--pill-line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; }
.cms-lang summary::-webkit-details-marker { display: none; }
.cms-lang summary:hover, .cms-lang[open] summary { border-color: var(--green); color: var(--green); }
.cms-lang summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.cms-lang-chevron { flex: 0 0 auto; color: var(--muted); transition: transform .15s; }
.cms-lang summary:hover .cms-lang-chevron, .cms-lang[open] .cms-lang-chevron { color: currentColor; }
.cms-lang[open] .cms-lang-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .cms-lang-chevron { transition: none; } }
.cms-lang ul { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 196px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 10px 28px -6px rgb(17 24 16 / 28%); font-size: 15px; }
/* A button at the left of its row opens the list rightward (cms-lang.js). */
.cms-lang.cms-lang-start ul { right: auto; left: 0; }
.page-frame > nav.cms-nav .cms-lang a { display: flex; align-items: center; justify-content: flex-start; min-height: 42px; padding: 0 12px; border-radius: 6px; color: var(--ink); }
.page-frame > nav.cms-nav .cms-lang a:hover { background: var(--tile); text-decoration: none; }
.page-frame > nav.cms-nav .cms-lang a[aria-current="true"] { color: var(--green); font-weight: 700; }
.cms-lang a[aria-current="true"]::after { content: "\2713"; content: "\2713" / ""; margin-left: auto; padding-left: 16px; }
/* The page below starts closer, since the bar already separates it from the header. */
.cms-nav + .cms { padding-top: 30px; }
/* Get the app lands on the product page's download box with room above it. */
#get { scroll-margin-top: 24px; }

@media (min-width: 1001px) {
  /* Translated pages' bar closes up a little, since their labels run longer. */
  html:not([lang="en"]) .cms-lang summary { gap: 5px; padding: 0 10px 0 9px; }
  html:not([lang="en"]) .page-frame > nav.cms-nav { column-gap: 18px; }
  html:not([lang="en"]) .cms-nav-links { column-gap: 18px; }
}
@media (min-width: 1001px) and (max-width: 1120px) {
  /* Just above the band's width the gaps close up. */
  .cms-lang summary { gap: 5px; padding: 0 10px 0 9px; }
  .page-frame > nav.cms-nav, html:not([lang="en"]) .page-frame > nav.cms-nav { column-gap: 14px; }
  .cms-nav-links, html:not([lang="en"]) .cms-nav-links { column-gap: 16px; }
}
@media (min-width: 1001px) and (max-width: 1060px) {
  /* Narrower still, the menu is the globe and the code, and the gaps close up more. */
  .cms-lang-chevron { display: none; }
  .page-frame > nav.cms-nav, html:not([lang="en"]) .page-frame > nav.cms-nav { column-gap: 10px; }
  .cms-nav-links, html:not([lang="en"]) .cms-nav-links { column-gap: 13px; }
}
@media (max-width: 1119px) {
  /* Translated labels run longer than the English ones, so on translated pages Get the app waits for a wider window.
     The pages and the language menu always fit; the download buttons are one tap away on the first page. */
  html:not([lang="en"]) .cms-nav a.cms-nav-get { display: none; }
}
@media (max-width: 1000px) {
  .page-frame > nav.cms-nav { gap: 0 16px; margin-top: 14px; padding: 2px 14px 6px; border: 0; border-radius: 6px; background: var(--tile); }
  .cms-nav a.cms-nav-home { gap: 9px; }
  .cms-nav:not(.cms-nav-on-home) .cms-nav-back { display: block; margin: 0 -1px 0 -2px; }
  .cms-nav-links { order: 3; flex-basis: 100%; gap: 0 18px; }
  .cms-nav-links a { min-height: 40px; }
  .cms-nav + .cms { padding-top: 26px; }
}
@media (max-width: 723px) {
  /* Narrower than this, Get the app would sit over Privacy on the row below, so the band shows the app's name and
     the pages only. */
  .cms-nav-get { display: none !important; }
  /* The language menu has no room beside the app's name on a phone, and a row of its own would push the page down.
     So the page links flow as the band's own items, and the menu closes their last line, at the right. The last link
     takes up the room before it, not the menu, so a menu that drops to a row of its own lines up with the links on
     the left (Daniel, 2026-12-01). */
  .page-frame > nav.cms-nav::after { content: ""; order: 1; flex-basis: 100%; }
  .cms-nav-links { display: contents; }
  .cms-nav-links li { order: 2; }
  .cms-nav-links li:last-child { flex-grow: 1; }
  .cms-lang { order: 3; }
  .cms-lang summary { gap: 5px; padding: 0 10px 0 9px; font-size: 14px; }
  .cms-lang-chevron { width: 10px; height: 10px; }
}
@media (max-width: 620px) {
  .page-frame > nav.cms-nav { margin: 12px 0 0; padding: 2px 12px 6px; }
  .cms-nav-links { gap: 0 16px; }
  .cms-nav + .cms { padding-top: 22px; }
}
@media screen and (prefers-color-scheme: dark) {
  .cms-nav { --muted: var(--soft); --tile: var(--card); --line: var(--rule); --pill: var(--fill); --pill-hover: var(--fill-hover); --pill-ink: var(--on-fill); --pill-line: var(--frame); }
}
@media screen and (prefers-color-scheme: dark) {
  .cms-lang ul { background: var(--card); box-shadow: 0 12px 30px -8px #000c; }
  .page-frame > nav.cms-nav .cms-lang a:hover { background: var(--card-line); }
}
@media screen and (prefers-color-scheme: dark) and (max-width: 1000px) {
  /* The band is close to the page's color at night, so it gets a faint edge. */
  .page-frame > nav.cms-nav { box-shadow: inset 0 0 0 1px var(--card-line); }
}

/* Cloud Media Shrinker pages on phones: no floating site dock over the app (Daniel, 2026-11-24). The page's own nav
   stays, and "Daniel" at the top still goes home. 3D Print Monitor also uses this file and keeps the dock. */
@media (max-width: 620px) {
  body[data-app="cloud-media-shrinker"] { padding-bottom: 0; }
  body[data-app="cloud-media-shrinker"] .page-frame .site-header nav { display: none; }
}

/* Translated pages (tools/cms-l10n). This is the one stylesheet all of them load. A heading word too long for a phone
   breaks instead of pushing the page sideways. A translation can say where with a soft hyphen (&shy;), as the German
   privacy page does in Datenschutzerklärung. */
html:not([lang="en"]) body[data-app="cloud-media-shrinker"] :is(h1, h2, h3) { overflow-wrap: break-word; }
/* Japanese, Chinese and Korean. A browser may break these scripts between any two characters, which splits a word in a
   big heading (使用容 / 量). There a heading breaks only where its translation allows: at a zero-width space (&#8203;),
   after punctuation or at a space. A heading with no such place still breaks rather than run off the screen. Korean
   keeps its words whole everywhere, as Korean pages do. */
html:is(:lang(ja), :lang(zh), :lang(ko)) body[data-app="cloud-media-shrinker"] :is(h1, h2) { word-break: keep-all; overflow-wrap: anywhere; }
html:lang(ko) body[data-app="cloud-media-shrinker"] { word-break: keep-all; overflow-wrap: break-word; }
