/* usefulweb apps: landing pages, tutorials, /apps overview, main-page showcase and the workspace top bar.
   Per-app colours come from /static/apps/themes.css ([data-app="<id>"] sets --app-accent, --app-accent-2, --app-gradient).
   Site tokens (styles.css) give light and dark themes; the workspace keeps each app's own theme and only the platform
   top bar (.uwapp-bar) follows the site theme. No inline styles anywhere (CSP style-src 'self'). */
:root { --app-accent: #0b5cad; --app-accent-2: #5b21b6; --app-gradient: linear-gradient(135deg, #0b5cad 0%, #5b21b6 100%); --app-accent-ink: #0b5cad; --app-gradient-ink: var(--app-gradient); --app-radius: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- buttons ---------- */
/* --app-accent-ink / --app-gradient-ink (themes.css, apps.ts inkStops): the app's own hues, darkened where needed so white text is ≥ 4.5:1. */
.app-launch { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: .7em 1.3em; border-radius: var(--r-pill, 999px); background: var(--app-accent-ink); color: #fff !important; font-weight: 700; text-decoration: none; border: 0; box-shadow: 0 6px 16px rgb(15 23 42 / .18); transition: transform .12s ease, box-shadow .12s ease; }
.app-launch:hover, .app-launch:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 24px rgb(15 23 42 / .24); }
.app-launch:focus-visible, .app-more:focus-visible, .app-thumb:focus-visible { outline: 3px solid var(--focus-color, #b45309); outline-offset: 3px; }
.app-launch-xl { font-size: 1.15rem; padding: .85em 1.6em; }
/* gap: an inline-flex box drops the whitespace between its text and inline children ("Open in app→"). */
.app-more { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; padding: .65em 1.1em; border-radius: var(--r-pill, 999px); border: 1.5px solid var(--accent-line); color: var(--accent-text); font-weight: 600; text-decoration: none; background: var(--surface); }
.app-more:hover { border-color: var(--accent-text); color: var(--accent-text); background: var(--accent-tint); }

.app-lightbox { display: none; }
.app-lightbox:target { display: grid; position: fixed; inset: 0; z-index: 50; place-items: center; padding: 3vh 3vw; background: rgb(2 6 23 / .88); }
.lb-backdrop { position: absolute; inset: 0; }
.app-lightbox figure { position: relative; margin: 0; max-width: min(1400px, 94vw); }
.app-lightbox img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgb(0 0 0 / .5); }
.app-lightbox figcaption { color: #e2e8f0; text-align: center; margin-top: .6rem; }
.lb-nav { position: relative; display: flex; gap: 1rem; justify-content: center; margin: .8rem 0 0; }
.lb-nav a { color: #fff; background: rgb(255 255 255 / .14); padding: .45em .9em; border-radius: 999px; text-decoration: none; font-weight: 600; }
.lb-nav a:hover, .lb-nav a:focus-visible { background: rgb(255 255 255 / .28); color: #fff; }
.lb-nav a:focus-visible { outline-color: #fff; }

/* for AI agents */
.app-tool-list { padding-inline-start: 1.1rem; max-width: 62ch; }
.app-tools-all { margin: .5rem 0 0; font-weight: 600; }
.app-tools-more { margin: .75rem 0 0; }
.app-tools-more > summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.app-tools-more > .app-builtin-tools { margin-top: .5rem; }
#limitations li { max-width: 62ch; }
.app-shortcuts kbd { display: inline-block; padding: .3em .5em; line-height: 1.25; }
.app-tool-list li { margin: .5rem 0; }
.app-tool-list code, .app-agent-links code, .app-agent-links a, .app-agents code { overflow-wrap: anywhere; word-break: break-word; }
.app-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.app-formats h3 { margin-bottom: .2rem; }
.app-faq { border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: .75rem 1rem; margin: .5rem 0; background: var(--surface); }
.app-faq summary { font-weight: 600; }
.app-faq p { margin: .5rem 0 0; color: var(--ink-2); }

/* tutorials */
.app-tutorials { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; counter-reset: tut; }
@media (min-width: 900px) { .wrap.narrow > .app-tutorials, .app-page > .app-tutorials { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); } } /* w42-content: two columns on the tutorials page */
.app-tutorials li { margin: 0; }
.app-tutorials a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); align-content: start; column-gap: .9rem; height: 100%; padding: var(--sp-5, 24px); border-radius: var(--r-lg, 14px); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; counter-increment: tut; transition: transform .14s var(--ease), border-color .14s var(--ease); }
.app-tutorials a::before { content: counter(tut); grid-row: 1 / span 3; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--app-accent-ink); color: #fff; font-weight: 700; }
.app-tutorials a:hover { border-color: var(--accent-line); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .app-tutorials a:hover { transform: none; } }
.tut-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; color: var(--ink); }
.app-tutorials a:hover .tut-title { color: var(--accent-text); text-decoration: underline; }
.tut-desc { color: var(--ink-2); font-size: .95rem; }
.tut-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.tut-badge { display: inline-block; padding: .1em .6em; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tut-level[data-level="beginner"] { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.tut-level[data-level="intermediate"] { background: var(--info-bg); color: var(--primary-text); border-color: var(--info-line); }
.tut-level[data-level="advanced"] { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.app-tutorial .blog-content img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin: 1rem 0; }
.tut-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0 1rem; }
.tut-pager a { display: grid; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md, 12px); text-decoration: none; background: var(--surface); }
.tut-pager a:hover { border-color: var(--accent-line); }
.tut-next { text-align: end; }

/* ---------- app landing pages (w42-landings; app-pages.ts appLandingPage) ----------
   One template for all apps on the site system (docs/DESIGN_SYSTEM.md): canvas ground, the .btn pair, flat cards,
   Funnel type, teal as the only accent (the app's own colours stay in its logo and screenshots; several app accents
   are violet, which the system never uses). Hero = the app's name and what it is, then its real screenshot to the fold;
   every feature section shows a different screenshot; a portrait (phone) screenshot stands beside its words instead of
   being cropped. The kit's motion layer (public/taste/motion) does the hover, press and the hero entrance. */
[data-landing] {
  --action: var(--primary); --action-ink: var(--on-accent); --card: var(--surface);
  --accent: var(--primary); --accent-text: var(--primary-text); --accent-line: var(--info-line); --accent-tint: var(--info-bg);
  --al-padt: 96px; --al-padb: 72px; --al-gap: 24px; --al-h2: clamp(30px, 1.4vw + 18px, 44px); --al-screen: 100svh;
  --t-h2: clamp(26px, 1.6vw + 16px, 44px); /* the word-highlight statement (moment.css reads --t-h2) */
  color: var(--ink);
}
/* One content column for every landing block: the box IS the column (the shared header's content lines), no inline
   padding, so the checker's and the eye's left/right lines are the same. The shared header is fixed over the page here
   (as on the home), so the hero and each feature section fill whole screens. */
section.wrap[data-landing], [data-landing] .wrap { box-sizing: border-box; width: min(100% - 2 * clamp(16px, 4vw, 28px), calc(var(--wrap) - 56px)); max-width: none; margin-inline: auto; padding-inline: 0; }
html:has(.app-hero[data-landing]) { scroll-padding-top: var(--header-h, 64px); }
html:has(.app-hero[data-landing]) .site-header { position: fixed; top: 0; inset-inline: 0; }
.app-section.app-chapter[data-landing] { padding-top: calc(var(--header-h, 64px) + 48px); }
[data-landing] :is(h1, h2, h3) { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
[data-landing] p { text-wrap: pretty; }
[data-landing]:lang(ar) :is(h1, h2, h3) { letter-spacing: 0; }

/* hero: head row (name + kind | lede, actions, facts), then the screenshot runs to the fold */
.app-hero[data-landing] { display: flex; flex-direction: column; min-height: var(--al-screen); padding-block: calc(var(--header-h, 64px) + 48px) 40px; background: var(--canvas); box-sizing: border-box; }
.app-hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--al-gap); align-items: start; width: 100%; box-sizing: border-box; }
.app-hero-copy { grid-column: 1 / span 7; min-width: 0; }
.app-hero-side { grid-column: 8 / span 5; display: grid; gap: 16px; min-width: 0; }
.app-title { display: grid; justify-items: start; gap: 12px; margin: 0; font-weight: 600; }
.app-title .app-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 8px; }
.app-title-name { font-size: clamp(48px, 3.4vw + 22px, 80px); line-height: 1; letter-spacing: -0.035em; }
.app-title-kind { font-size: clamp(22px, 1vw + 15px, 32px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; color: var(--ink-2); max-width: 22ch; }
.app-lede { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink); }
[data-landing] .app-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.app-meta { margin: 0; font-size: 14px; color: var(--muted); }
/* minimum-age badge (manifest minAge, e.g. Rising Kingpin 18+) in the landing hero and on app cards */
.app-age-badge { display: inline-block; padding: 0 7px; border-radius: 999px; background: #b3261e; color: #fff; font-weight: 700; font-size: .8em; line-height: 1.6; vertical-align: 1px; }
[data-landing] .app-meta .app-more { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--primary-text); font-weight: 600; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; vertical-align: middle; }
[data-landing] .app-meta .app-more:hover { color: var(--ink); text-decoration-thickness: 2px; background: none; }
.app-data-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.app-hero-stage { display: flex; flex: 1 1 auto; width: 100%; margin-top: 40px; box-sizing: border-box; }
.app-frame { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); color: inherit; }
.app-frame:focus-visible, .app-thumb:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 3px; }
.app-hero-shot { flex: 1 1 auto; min-height: 280px; max-height: 760px; }
.app-hero-shot img, .app-chapter:not(.is-tall) .app-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
[dir="rtl"] [data-landing] .btn .m-arrow { transform: scaleX(-1); }

/* sections: one idea each, on the wrap's lines; the h2 first, its short line on the split line */
.app-section[data-landing] { padding-block: var(--al-padt) var(--al-padb); }
.app-section[data-landing] h2 { margin: 0; font-size: var(--al-h2); line-height: 1.1; letter-spacing: -0.025em; font-weight: 600; max-width: 24ch; }
.app-section[data-landing] h3 { font-weight: 600; }
.app-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--al-gap); row-gap: 16px; align-items: start; margin-bottom: 40px; }
.app-head > h2 { grid-column: 1 / span 6; }
.app-head > p { grid-column: 8 / span 5; margin: 0; padding-top: 6px; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
/* Features: the long description reads under its heading (beside it, it left a hole under a one-word h2) */
#features .app-head { grid-template-columns: minmax(0, 1fr); }
#features .app-head > :is(h2, p) { grid-column: 1; }
#features .app-head > p { font-size: 17px; max-width: 72ch; padding-top: 0; }
.app-head > p .link { display: inline-flex; align-items: center; min-height: 44px; }

/* feature sections: the caption names it, the matching feature explains it, the screenshot fills the rest of the screen */
.app-chapter { display: flex; flex-direction: column; min-height: var(--al-screen); box-sizing: border-box; }
.app-chapter-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr); column-gap: var(--al-gap); row-gap: 40px; flex: 1 1 auto; width: 100%; box-sizing: border-box; }
.app-chapter-text { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 16px; align-items: end; }
.app-chapter-text > h2 { grid-column: 1 / span 6; }
.app-chapter-text > p { grid-column: 8 / span 5; margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.app-chapter:not(.is-tall) .app-frame { grid-column: 1 / -1; min-height: 320px; max-height: 680px; }
.app-chapter.is-tall .app-chapter-grid { grid-template-rows: auto; align-items: start; }
.app-chapter.is-tall .app-chapter-text { grid-column: 1 / span 6; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.app-chapter.is-tall .app-chapter-text > :is(h2, p) { grid-column: 1; }
.app-chapter.is-tall .app-frame { grid-column: 8 / span 5; justify-self: start; width: fit-content; max-width: 100%; }
.app-chapter.is-tall .app-frame img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(680px, calc(var(--al-screen) - var(--al-padt) - var(--al-padb))); }

/* features: flat cards, the app's own line icon on a quiet tile (teal, never the app accent) */
/* Card rows never end half empty: the cards of the last row share its width (flex-grow), whatever the count. */
.app-features, .app-templates, [data-landing] .app-builtin-tools, [data-landing] .app-tutorials { --al-cols: 3; display: flex; flex-wrap: wrap; gap: var(--al-gap); }
:is(.app-features, .app-templates, [data-landing] .app-builtin-tools, [data-landing] .app-tutorials) > li { flex: 1 1 calc((100% - (var(--al-cols) - 1) * var(--al-gap)) / var(--al-cols)); min-width: 0; box-sizing: border-box; }
.app-features { list-style: none; margin: 0; padding: 0; }
.app-features > li.card { margin: 0; padding: 24px; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; align-items: center; align-content: start; }
.app-features h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.app-features p { grid-column: 1 / -1; margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.app-features .card:hover { transform: none; border-color: var(--line); box-shadow: none; }
.app-feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary); }
.app-feature-icon img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.app-feature-icon:not(:has(img)) { color: var(--on-accent); }
.app-feature-icon svg { width: 22px; height: 22px; }
.app-feature-icon.is-tile { background: none; }
.app-feature-icon.is-tile img { width: 40px; height: 40px; filter: none; }
:root[data-theme="dark"] .app-feature-icon:not(.is-tile) img { filter: brightness(0); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-feature-icon:not(.is-tile) img { filter: brightness(0); } }

/* the remaining screenshots: a wall of linked frames (each opens the no-JS lightbox), no captions */
.app-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--al-gap); }
.app-gallery li { margin: 0; }
.app-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.app-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* templates, built-in tools: flat cards */
.app-templates { list-style: none; margin: 0; padding: 0; --al-cols: 4; }
.app-templates > li.card { margin: 0; padding: 20px; gap: 8px; }
.app-templates h3 { margin: 0; font-size: 18px; }
.app-templates p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.app-templates .card:hover { transform: none; border-color: var(--line); box-shadow: none; }
.app-template-open { margin-top: auto !important; padding-top: 4px; }
.app-template-open .link { display: inline-flex; align-items: center; min-height: 44px; }
.app-template-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 0 8px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
[data-landing] .app-builtin-tools { margin: 0; }
[data-landing] .app-builtin-tools > li { padding: 20px; border-radius: var(--r-lg); }
[data-landing] .app-builtin-tools > li > a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 17px; text-decoration-thickness: 1px; text-underline-offset: .2em; }
[data-landing] .app-builtin-tools > li > a:hover { color: var(--primary-text); }
[data-landing] .app-tools-more { margin-top: 16px; }
[data-landing] .app-tools-more > summary { color: var(--primary-text); }
[data-landing] .app-tools-more > .app-builtin-tools, [data-landing] .app-tools-more > .app-templates { margin-top: 12px; }

/* for AI agents: the one statement lights up word by word (word-highlight), the facts under it */
.app-statement { margin: 0 0 48px; font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 1.6vw + 16px, 44px); line-height: 1.18; letter-spacing: -0.02em; max-width: 30ch; color: var(--ink); }
.app-agents-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--al-gap); row-gap: 24px; }
.app-agents-grid > :first-child { grid-column: 1 / span 7; }
.app-agents-grid > :last-child { grid-column: 8 / span 5; }
.app-agents-grid > :only-child { grid-column: 1 / span 8; }
[data-landing] .app-agent-links { margin-bottom: 12px !important; }
[data-landing] .app-tool-list a, [data-landing] .app-agent-links a { display: inline-block; padding-block: 6px; }

/* two short reference blocks side by side: formats | shortcuts, questions | limitations */
[data-landing] .app-formats { gap: var(--al-gap); }
[data-landing] .app-formats h3 { margin: 0 0 8px; font-size: 18px; }
/* reference lists start on the column line: the bullet sits inside the item's own padding */
[data-landing] :is(.app-formats ul, .app-limits, .app-tool-list, .app-agent-links) { list-style: none; margin: 0; padding: 0; }
[data-landing] :is(.app-formats ul, .app-limits, .app-tool-list, .app-agent-links) > li { position: relative; margin: 0 0 8px; padding-inline-start: 18px; }
[data-landing] :is(.app-formats ul, .app-limits, .app-tool-list, .app-agent-links) > li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
@media (forced-colors: active) { [data-landing] :is(.app-formats ul, .app-limits, .app-tool-list, .app-agent-links) > li::before { background: CanvasText; } }
/* limitations: the honest list in two columns on wide screens; questions: one readable column */
.app-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--al-gap); align-items: stretch; }
.app-limits li { margin: 0 0 10px; max-width: none !important; }
.app-faq-list { max-width: none; }
[data-landing] .app-faq { border-radius: var(--r-md); padding: 0 16px; margin: 0 0 8px; }
[data-landing] .app-faq summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; }
[data-landing] .app-faq p { margin: 0 0 14px; }

/* tutorials: the first six as numbered cards */
[data-landing] .app-tutorials { margin: 0; }
[data-landing] .app-tutorials a { height: 100%; box-sizing: border-box; padding: 20px; border-radius: var(--r-lg); box-shadow: none; row-gap: 4px; }
[data-landing] .app-tutorials a::before { background: var(--primary); color: var(--on-accent); font-weight: 600; }
[data-landing] .app-tutorials a:hover { border-color: var(--line-strong); box-shadow: none; }
[data-landing] .tut-title { color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 17px; }
[data-landing] .app-tools-all { margin: 16px 0 0; }
[data-landing] .app-tools-all a { display: inline-flex; align-items: center; min-height: 44px; }

/* other apps: linked cards with a real screenshot */
.app-rel-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--al-gap); }
.app-rel-card.card { margin: 0; padding: 0; overflow: hidden; }
.app-rel-shot { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.app-rel-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.app-rel-body { display: grid; gap: 6px; padding: 18px 20px 20px; }
.app-rel-head { display: flex; align-items: center; gap: 12px; }
.app-rel-head .app-logo { flex: none; border-radius: 9px; }
.app-rel-card h3 { margin: 0; font-size: 19px; }
.app-rel-card p { margin: 0; font-size: 15px; }
.app-rel-kind { color: var(--muted) !important; font-size: 14px !important; }

/* close: the action, then the app's name set across the wrap (liquid-type) */
.app-final[data-landing] { text-align: start; padding-bottom: 48px; }
.app-final-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--al-gap); row-gap: 24px; align-items: end; }
.app-final-row > div { grid-column: 1 / span 7; }
.app-final-row > .app-cta { grid-column: 9 / span 4; justify-content: flex-start; }
.app-final-word { margin-top: 48px; overflow: hidden; }
[data-landing] .mo-wh .mo-w { color: color-mix(in oklab, var(--ink) 62%, var(--bg)); } /* ≥ 3:1 before it lights up */
[data-landing] .mo-wh .mo-w.is-on { color: var(--ink); }
.app-final-word .mo-lt__type { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(56px, 11vw, 168px); line-height: .95; letter-spacing: -0.045em; color: var(--ink); max-width: none; white-space: nowrap; }
:lang(ar) .app-final-word .mo-lt__type { letter-spacing: 0; }
[data-landing] .lb-nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* From 1024 px every landing section takes at least one whole screen (one idea per screen, no neighbour's heading
   peeking in); the shared header is fixed, so each section's top padding clears it. */
@media (min-width: 1024px) {
  .app-section[data-landing] { box-sizing: border-box; min-height: 100svh; padding-top: calc(var(--header-h, 64px) + 56px); }
  .app-section.app-final[data-landing] { min-height: 0; }
}
/* 1024–1279: same order, tighter grids */
@media (max-width: 1179px) {
  .app-rel-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-features, [data-landing] .app-tutorials, [data-landing] .app-builtin-tools { --al-cols: 2; }
  .app-templates { --al-cols: 3; }
}
/* tablet: stack the words first; screenshots at their own ratio (no crop) */
@media (max-width: 1023px) {
  [data-landing] { --al-padt: 72px; --al-padb: 56px; }
  .app-hero[data-landing], .app-chapter { min-height: 0; }
  .app-hero-grid, .app-head, .app-final-row, .app-agents-grid { grid-template-columns: minmax(0, 1fr); }
  :is(.app-hero-copy, .app-hero-side, .app-head > h2, .app-head > p, .app-final-row > div, .app-final-row > .app-cta, .app-agents-grid > *) { grid-column: 1 / -1 !important; }
  .app-hero-side { margin-top: 24px; }
  .app-hero-shot { min-height: 0; max-height: none; }
  .app-hero-shot img, .app-chapter:not(.is-tall) .app-frame img { position: static; display: block; height: auto; }
  .app-chapter-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 32px; }
  .app-chapter-text { grid-template-columns: minmax(0, 1fr); }
  .app-chapter-text > :is(h2, p), .app-chapter .app-frame, .app-chapter.is-tall .app-chapter-text { grid-column: 1 / -1 !important; }
  .app-chapter:not(.is-tall) .app-frame { min-height: 0; max-height: none; }
  .app-chapter.is-tall .app-frame { justify-self: center; }
  .app-chapter.is-tall .app-frame img { max-height: 640px; }
  .app-limits { grid-template-columns: minmax(0, 1fr); }
}
/* phone */
@media (max-width: 640px) {
  [data-landing] { --al-padt: 56px; --al-padb: 40px; --al-gap: 12px; }
  .app-hero[data-landing] { padding-block: calc(var(--header-h, 56px) + 28px) 32px; }
  .app-section.app-chapter[data-landing] { padding-top: calc(var(--header-h, 56px) + 32px); }
  .app-title .app-logo { width: 52px; height: 52px; }
  .app-lede { font-size: 17px; }
  [data-landing] .app-cta .btn { flex: 1 1 auto; padding-inline: 18px; }
  .app-hero-side { gap: 12px; margin-top: 20px; }
  .app-title { gap: 8px; }
  .app-title .app-logo { margin-bottom: 4px; }
  .app-hero-stage { margin-top: 28px; }
  .app-head { margin-bottom: 28px; }
  .app-rel-cards, .app-gallery { grid-template-columns: minmax(0, 1fr); }
  .app-features, [data-landing] .app-tutorials, [data-landing] .app-builtin-tools, .app-templates { --al-cols: 1; }
  .app-features > li.card { padding: 18px; }
  .app-statement { margin-bottom: 32px; }
  .app-final-word { margin-top: 32px; }
  .app-final-word .mo-lt__type { font-size: 13vw; }
}
@media (forced-colors: active) {
  .app-frame, .app-thumb, .app-feature-icon { border: 1px solid CanvasText; }
  .app-feature-icon img { filter: none; }
}
@media (prefers-reduced-motion: reduce) { [data-landing] .card { transition: none; transform: none !important; } }
@media print {
  .app-hero[data-landing], .app-chapter { min-height: 0; }
  .app-hero-stage, .app-final-word { display: none; }
  .app-chapter:not(.is-tall) .app-frame img { position: static; height: auto; }
}

/* ---------- cards (main-page showcase, /apps, related apps) ---------- */
.app-showcase { padding: clamp(1.5rem, 4vw, 2.5rem) 0 .5rem; }
.app-showcase-head h2 { font-size: var(--fs-2xl, 2rem); margin: 0; }
.app-showcase-head .lede { margin-top: .4rem; color: var(--ink-2); }
.app-cards { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 1.25rem; }
.app-cards > li { margin: 0; }
.app-cards-small { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
#more-apps .app-cards-small { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); } /* 6 related apps: 3 + 3, no orphan row */
.app-tools-more .table-wrap { margin-top: .5rem; }
.app-card { display: flex; flex-direction: column; border-radius: var(--app-radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-line); }
.app-card-shot { display: block; position: relative; background: color-mix(in srgb, var(--app-accent) 16%, var(--surface-2)); padding: 14px 14px 0; }
/* Launch on listing cards: one solid primary button site-wide (the app accent shows in the logo, kind line and
   screenshot frame), not a per-app gradient pill with a coloured glow — several accents failed 4.5:1 with white text. */
.app-card .app-launch { background: var(--primary); color: var(--on-accent) !important; box-shadow: var(--shadow-1); }
.app-card .app-launch:hover, .app-card .app-launch:focus-visible { background: var(--primary); box-shadow: var(--shadow-2); text-decoration: underline; }
.app-card-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-radius: 10px 10px 0 0; box-shadow: 0 -2px 18px rgb(2 6 23 / .25); background: #fff; }
.app-card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.15rem 1.15rem; }
.app-card-head { display: flex; align-items: center; gap: .75rem; }
.app-card-head h2, .app-card-head h3 { margin: 0; font-size: 1.3rem; }
.app-card-head h2 a, .app-card-head h3 a { color: var(--ink); text-decoration: none; }
.app-card-head h2 a:hover, .app-card-head h3 a:hover { color: var(--accent-text); text-decoration: underline; }
.app-card-head .app-logo { border-radius: 12px; flex: none; }
.app-card-kind { margin: 0; font-size: .85rem; font-weight: 600; color: var(--accent-text); }
.app-card-tagline { margin: .7rem 0 .4rem; color: var(--ink-2); }
.app-highlights { margin: .2rem 0 .8rem; padding: 0; list-style: none; display: grid; gap: .3rem; }
.app-highlights li { position: relative; margin: 0; padding-inline-start: 1.5rem; font-size: .95rem; color: var(--ink-2); }
.app-highlights li::before { content: "✓"; position: absolute; inset-inline-start: 0; font-weight: 800; color: var(--accent-text); }
.app-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: auto 0 0; padding-top: .4rem; }
.app-showcase-more { margin: 1rem 0 0; font-weight: 600; }
/* apps by goal (home showcase + /apps, src/platform/home-guide.ts) */
.app-showcase-count { margin: .2rem 0 0; font-weight: 700; color: var(--accent-text); }
.app-featured-h { margin: 1.4rem 0 0; font-size: var(--fs-lg, 1.2rem); }
.app-goals { margin: 2rem 0 0; }
.app-goals > h2, .app-goals > h3 { margin: 0; font-size: var(--fs-xl, 1.5rem); }
.app-goals > p { margin: .3rem 0 0; }
.app-goal-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: .9rem 0 0; }
.app-goal-nav li { margin: 0; }
.app-goal-nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.app-goal-nav a:hover { border-color: var(--accent-line); text-decoration: underline; }
.app-goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1rem; margin-top: 1rem; }
.app-goal { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg, 14px); background: var(--surface); scroll-margin-top: 90px; }
.app-goal > h3, .app-goal > h4 { margin: 0; font-size: 1.05rem; }
.app-goal > p { margin: .25rem 0 .5rem; }
.app-goal-count { white-space: nowrap; }
.app-goal-apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.app-goal-apps li { margin: 0; }
.app-goal-apps a { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px 8px; margin-inline: -8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.app-goal-apps a:hover { background: var(--surface-2); }
.app-goal-apps a:hover .app-goal-name { text-decoration: underline; }
.app-goal-apps .app-logo { grid-row: 1 / 3; border-radius: 7px; }
.app-goal-name { font-weight: 700; line-height: 1.2; }
.app-goal-kind { font-size: .85rem; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.app-goal-tools { margin: .6rem 0 0; padding-top: .5rem; border-top: 1px solid var(--line); color: var(--ink-2); }
.app-goal-tools a { display: inline-block; padding-block: 4px; }
.app-overview-counts { margin: .6rem 0 0; color: var(--ink-2); }
.app-overview-counts a { font-weight: 600; display: inline-block; padding-block: 4px; }
.app-overview-hero + .wrap > .app-goals { margin-bottom: 2rem; }
.app-logo-fallback { display: inline-flex; }

/* ---------- workspace (/app): keeps the app's own theme; the platform bar follows the site theme ---------- */
:root.uwapp-html { color-scheme: light; }
.uwapp-html, .uwapp-body { height: 100%; }
.uwapp-body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--canvas); color: var(--ink); }
.uwapp-bar { display: flex; align-items: center; gap: .9rem; height: 48px; padding: 0 .9rem; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); flex: none; }
.uwapp-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.uwapp-brand .app-logo { border-radius: 8px; }
.uwapp-platform { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); text-decoration: none; padding-inline-start: .9rem; border-inline-start: 1px solid var(--line); }
.uwapp-platform svg { border-radius: 5px; }
.uwapp-bar a:hover { color: var(--primary-text); }
.uwapp-spacer { flex: 1; }
.uwapp-help { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; color: var(--primary-text); }
.uwapp-help:hover { text-decoration: underline; text-underline-offset: .22em; }
/* Tutorials on phones (≤ 480 px, docs/DESIGN_SYSTEM.md §9): a 44 px open-book icon button (accessible name = the
   visually hidden label); apps with a Tools menu move the link into that menu instead (.uwapp-utilities-help). */
.uwapp-help-ico, .uwapp-utilities-ico { display: none; flex: none; }
.uwapp-utilities-help { display: none; }
.uwapp-bar .lang-switch { margin: 0; }
.uwapp-bar .lang-switch select { min-height: 32px; padding-block: 3px; }
.uwapp-bar .lang-switch .lang-apply { min-height: 32px; padding-block: 3px; }
.uwapp-bar button { min-height: 32px; }
/* Sign-in in the app bar: the site header's quiet outline (system teal on hover), not the app's own accent. */
.uwapp-bar .account-signin { min-height: 34px; border-radius: var(--r-sm); border-color: var(--line-strong); color: var(--ink); }
.uwapp-bar .account-signin:hover, .uwapp-bar .account-signin:focus-visible { border-color: var(--control); background: var(--surface-2); color: var(--ink); }
/* Save-status chip (app-pages.ts saveChip, platform.js window.uwSave): the ONE save indicator of every app. It inherits
   the bar's colours, so apps that darken .uwapp-bar (Lumina) keep it legible. Phones: icon only (label stays the name). */
.uwapp-save { position: relative; flex: 0 1 auto; min-width: 0; }
.uwapp-save[hidden] { display: none; }
.uwapp-save-chip { list-style: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; min-width: 32px; max-width: 18rem; padding: .15rem .65rem; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: var(--r-pill, 999px); background: transparent; font-size: .8125rem; line-height: 1.2; white-space: nowrap; cursor: pointer; color: inherit; }
.uwapp-save-chip::-webkit-details-marker { display: none; }
.uwapp-save-chip:hover { border-color: color-mix(in srgb, currentColor 60%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); }
.uwapp-save-chip:focus-visible { outline: 3px solid var(--focus-color, #0a5c66); outline-offset: 2px; }
.uwapp-save-ico { flex: none; }
.uwapp-save-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.uwapp-save[data-state="error"] .uwapp-save-chip { border-color: var(--danger, #b42318); }
.uwapp-save-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 320; width: min(22rem, calc(100vw - 1.5rem)); padding: .85rem 1rem; background: var(--surface, #fff); color: var(--ink, #1f3038); border: 1px solid var(--line, #d9e0e3); border-radius: var(--r-md, 12px); box-shadow: var(--shadow-2); font-size: .9rem; line-height: 1.45; white-space: normal; }
.uwapp-save-pop p { margin: 0 0 .6rem; }
.uwapp-save-pop .uwapp-save-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.uwapp-save-pop a { color: var(--primary-text, #0b6570); font-weight: 600; text-underline-offset: .22em; }
.uwapp-save-pop .uwapp-cloud { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .6rem; }
.uwapp-save-pop .uwapp-cloud[hidden] { display: none; }
.uwapp-save-pop .uwapp-cloud-btn, .uwapp-save-pop .uwapp-cloud-auto { display: inline-flex; }
.uwapp-save-pop .uwapp-cloud-status { position: static; width: auto; height: auto; overflow: visible; clip-path: none; max-width: none; white-space: normal; flex-basis: 100%; }
.uwapp-save-extra { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--line, #d0d7e2); }
.uwapp-save-extra[hidden] { display: none; }
.uwapp-save-action { min-height: 40px; padding: .3rem .9rem; border-radius: var(--r-btn, 8px); border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.uwapp-save-action:hover { background: var(--surface-2, #ecf0f2); color: inherit; }
.uwapp-save-action:active { transform: translateY(1px); }
.uwapp-save-action:focus-visible { outline: 3px solid var(--focus-color, #0a5c66); outline-offset: 2px; }
.uwapp-project { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 600; }
.uwapp-project[hidden] { display: none; }
/* Boot watchdog (platform.js): the app did not start or part of it is missing. */
.uwapp-boot-error, .uwapp-part-error { max-width: 34rem; padding: 1rem 1.25rem; border: 1px solid var(--danger-line, #f4c7c2); border-radius: var(--r-md, 12px); background: var(--danger-bg, #fef3f2); color: var(--ink, #1f3038); }
.uwapp-boot-error { margin: auto; }
.uwapp-part-error { flex: none; max-width: none; margin: 0; padding: .5rem 1rem; border-width: 0 0 1px; border-radius: 0; }
.uwapp-boot-error p, .uwapp-part-error p { margin: 0 0 .5rem; }
.uwapp-boot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 !important; }
.uwapp-boot-actions a { color: var(--danger, #b42318); font-weight: 600; }
.uwapp-part-error { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.uwapp-part-error p { margin: 0; }
@media (max-width: 900px) {
  .uwapp-save-chip { padding: .15rem .4rem; justify-content: center; }
  .uwapp-save-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .uwapp-save { flex: none; }
}
@media (max-width: 480px) {
  .uwapp-save-chip { min-height: 36px; min-width: 36px; }
  /* The chip sits mid-bar: on phones the menu spans the screen under the bar (LTR and RTL). */
  .uwapp-save-pop { position: fixed; top: 52px; inset-inline: .75rem; width: auto; }
  /* Phones: language = globe + code ("EN"); the select keeps its value and accessible name, only its text is
     transparent under the code (pages.ts languageSwitcher renders .lang-short). */
  .uwapp-bar .lang-switch { position: relative; gap: 4px; flex: none; }
  .uwapp-bar .lang-switch label svg { display: inline; }
  .uwapp-bar .lang-switch select, [dir=rtl] .uwapp-bar .lang-switch select { width: 3.5rem; min-width: 0; max-width: 3.5rem; padding-inline: 6px 18px; color: transparent; }
  .uwapp-bar .lang-switch select option { color: var(--ink); background: var(--surface); }
  .uwapp-bar .lang-short, .uwapp-bar .lang-short[hidden] { position: absolute; inset-block: 0; inset-inline-start: 22px; width: 2.1rem; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--ink); pointer-events: none; }
}
@media (min-width: 481px) { .uwapp-bar .lang-short { display: none; } }
.uwapp-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }
.uwapp-loading { margin: auto; color: var(--muted); }
.uwapp-noscript { max-width: 40rem; margin: 2rem auto; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 16px); }
@media (max-width: 640px) {
  .uwapp-platform span { display: none; }
  /* Narrow phones (320–390 px): the language select ("Automatic (English)") pushed the bar past the viewport. */
  .uwapp-bar { gap: .5rem; padding: 0 .6rem; }
  .uwapp-platform { padding-inline-start: .5rem; }
  .uwapp-bar .lang-switch { min-width: 0; flex: 0 1 auto; }
  .uwapp-bar .lang-switch select { min-width: 0; max-width: 8.5rem; text-overflow: ellipsis; }
  /* Visually hidden but still the link's accessible name (axe link-name). */
  .uwapp-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .tut-pager { grid-template-columns: 1fr; }
}
/* Phones: big app cards (home "Popular apps", /apps) were ~720 px tall each. Keep the screenshot as a short strip, the
   first two highlights and tighter spacing; the full list stays on each app's landing page ("Learn more"). */
@media (max-width: 600px) {
  .app-cards { gap: .9rem; }
  .app-card-big .app-card-shot { padding: 10px 10px 0; }
  .app-card-big .app-card-shot img { aspect-ratio: 16 / 7; }
  .app-card-big .app-card-body { padding: .8rem .95rem .95rem; }
  .app-card-big .app-card-head .app-logo { width: 40px; height: 40px; }
  .app-card-big .app-card-tagline { margin: .5rem 0 .3rem; }
  .app-card-big .app-highlights { margin: .1rem 0 .5rem; gap: .2rem; }
  .app-card-big .app-highlights li { font-size: .9rem; }
  .app-card-big .app-highlights li:nth-child(n + 3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .app-launch, .app-card { transition: none; transform: none !important; } }
@media print { .app-launch, .app-more, .app-lightbox { display: none !important; } }

/* "Built-in tools" on the app landing page (app-pages.ts): the app's toolIds with their pages. */
.app-builtin-tools { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.app-builtin-tools > li { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--surface); }
.app-builtin-tools > li > a { font-weight: 700; }
.app-builtin-tagline { display: block; margin-top: .25rem; color: var(--ink-2); font-size: .95rem; }
.app-tool-badge { display: inline-block; margin-inline-start: .35rem; padding: 0 .45rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: .78rem; line-height: 1.6; vertical-align: middle; }

/* Additional app-owned utility workspaces; outside app-specific editors. */
.uwapp-utilities{position:relative;font-size:.85rem}.uwapp-utilities summary{cursor:pointer;padding:.4rem .6rem;display:flex;align-items:center;gap:.3rem;white-space:nowrap}.uwapp-utilities ul{position:absolute;inset-inline-end:0;inset-block-start:100%;z-index:300;min-width:16rem;max-width:min(24rem,calc(100vw - 2rem));max-height:70vh;overflow:auto;list-style:none;margin:0;padding:.5rem;background:var(--surface,#fff);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-md,12px);box-shadow:var(--shadow-2)}.uwapp-utilities a{display:block;padding:.6rem;border-radius:var(--r-sm,8px);text-decoration:none;color:inherit}.uwapp-utilities a:hover,.uwapp-utilities a:focus-visible{background:var(--surface-2,#edf4f6);outline:2px solid currentColor;outline-offset:-2px}

@media (max-width: 640px) { .uwapp-utilities ul { position: fixed; inset-inline: .6rem; inset-block-start: 48px; min-width: 0; max-width: none; } }

/* App bar with the extra "Tools" menu on phones: brand, home mark and menu keep 24 px targets (WCAG 2.5.8), the bar fits 390 px in every language. */
@media (max-width: 640px) {
  .uwapp-brand, .uwapp-platform, .uwapp-utilities { flex: none; }
  .uwapp-utilities summary { display: flex; align-items: center; min-height: 24px; padding: .35rem .3rem; white-space: nowrap; }
}
@media (max-width: 420px) {
  .uwapp-bar { gap: .35rem; }
  .uwapp-platform { padding-inline-start: .35rem; }
  .uwapp-bar .account-signin { padding: 4px 7px; font-size: .8rem; }
  .uwapp-bar .lang-switch { min-width: 32px; }
  .uwapp-utilities { font-size: .8rem; }
  /* Signed in: the account pill shows only its avatar here (name hidden ≤ 720 px in account.css). It never shrinks below
     its content (Ledgerly's extra "Tools" menu made it overflow the bar by 2 px in German). */
  .uwapp-bar .account-menu { flex: none; }
  .uwapp-bar .account-menu > summary { padding-inline: 4px; }
}
/* Phones: globe + language code never shrink (the 640 px rule above let the switch shrink in DE/AR and the code then
   stuck out of the bar by ~5 px), and the code stays visible even where an app hides every [hidden] element with
   !important (Kerfwise showed an empty box). */
@media (max-width: 480px) {
  .uwapp-bar .lang-switch { flex: none; }
  .uwapp-bar .lang-short, .uwapp-bar .lang-short[hidden] { display: grid !important; }
  /* Tutorials never shrinks to an unreadable ellipsis (it collapsed to 0–15 px in German/Russian Pageboard): a 44 px
     book icon, or — where the bar also has a Tools menu — the first entry of that menu. */
  .uwapp-bar .uwapp-help { flex: none; justify-content: center; width: 44px; min-width: 44px; height: 44px; border-radius: var(--r-btn, 8px); color: var(--primary-text); }
  .uwapp-bar .uwapp-help:hover { background: var(--surface-2); text-decoration: none; }
  .uwapp-bar .uwapp-help-ico { display: block; }
  .uwapp-bar .uwapp-help-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .uwapp-bar--tools .uwapp-help { display: none; }
  .uwapp-bar--tools .uwapp-utilities-help { display: list-item; }
}
@media (max-width: 360px) {
  .uwapp-bar .lang-switch label svg { display: none; }
  .uwapp-bar .lang-short, .uwapp-bar .lang-short[hidden] { inset-inline-start: 4px; }
}
/* 320 px phones: "Anmelden" / "تسجيل الدخول" pushed the bar 28–50 px past the viewport (sideways scroll). Sign-in
   becomes a 44 px sign-in icon; its text stays in the DOM as the link's accessible name (font-size 0, not hidden). */
@media (max-width: 340px) {
  .uwapp-bar .account-signin { flex: none; justify-content: center; width: 44px; min-width: 44px; min-height: 44px; padding: 0; font-size: 0; overflow: hidden; }
  .uwapp-bar .account-signin::before { content: ""; flex: none; width: 20px; height: 20px; background: currentColor; forced-color-adjust: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E") center / contain no-repeat; }
  [dir=rtl] .uwapp-bar .account-signin::before { transform: scaleX(-1); }
  /* …and the Tools menu becomes a 44 px tile icon (Russian "Инструменты" pushed Ledgerly's bar 19 px too wide); the
     label stays the summary's accessible name. */
  .uwapp-utilities summary { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .uwapp-utilities-ico { display: block; }
  .uwapp-utilities-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
