/* Loading skeletons and the skip link. Skeletons: shapes that hold the page layout while scripts and data load. They are decorative (aria-hidden) and a
   separate role="status" line tells assistive technology what is loading. Colors adapt to the light and dark themes. */
.sk{display:block;position:relative;overflow:hidden;border-radius:10px;background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 9%,transparent);min-height:1em}
.sk::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);animation:sk-shimmer 1.4s ease-in-out infinite}
@media (prefers-color-scheme:dark){.sk::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent)}}
html[data-theme="dark"] .sk::after,body.theme-dark .sk::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent)}
html[data-theme="light"] .sk::after,body.theme-light .sk::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent)}
@keyframes sk-shimmer{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.sk::after{animation:none;display:none}}
@media (forced-colors:active){.sk{background:GrayText;opacity:.25}.sk::after{display:none}}
.sk-line{height:1em;margin:0 0 .75rem}
.sk-title{height:2.25rem;width:min(22rem,70%);margin-bottom:1rem}
.sk-sub{height:1.05rem;width:min(34rem,90%)}
.sk-circle{width:3.25rem;height:3.25rem;border-radius:50%;margin:0 auto 1.25rem}
.sk-bar{height:2.75rem;border-radius:12px;margin:0 0 1.25rem}
.sk-pill{display:inline-block;width:5.5rem;height:2.4rem;border-radius:999px;margin:0 .5rem .5rem 0}
.sk-w20{width:20%}.sk-w40{width:40%}.sk-w60{width:60%}.sk-w80{width:80%}
.sk-center{margin-left:auto;margin-right:auto}

/* Route skeletons: shown only while the app is starting on a tool or catalog address. Without JavaScript, or if startup fails,
   nothing is hidden and the normal page remains. */
.route-skeleton{display:none;max-width:1280px;margin:0 auto;padding:2rem var(--page-gutter,1.5rem) 4rem}
/* Tool pages lay out the guide, examples and footer while the app downloads (kept invisible below), so revealing the tool later does not
   lay out the whole page again in one long task that blocks input. */
html.js body.route-tool:not(.app-ready):not(.app-failed) #mainApp>:not(.route-skeleton):not([role="status"]):not(#toolSeo):not(#workflowExamples):not(#closingAction),
html.js body.route-catalog:not(.app-ready):not(.app-failed) #mainApp>:not(.route-skeleton):not([role="status"]):not(#workflowExamples):not(#closingAction):not(#categorySeo){display:none}
html.js body.route-tool:not(.app-ready):not(.app-failed) .route-skeleton-tool,
html.js body.route-catalog:not(.app-ready):not(.app-failed) .route-skeleton-catalog{display:block}
body.app-ready #mainApp>.route-skeleton-status,body.app-failed #mainApp>.route-skeleton-status{display:none}
.sk-split{display:grid;grid-template-columns:minmax(0,1fr) 20rem;gap:1.5rem;margin-top:2rem}
.sk-drop{border:2px dashed rgba(127,127,127,.35);border-radius:20px;min-height:20rem;padding:4rem 1.5rem;text-align:center}
.sk-panel{border:1px solid rgba(127,127,127,.25);border-radius:20px;padding:1.5rem}
.sk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.25rem;margin-top:1.5rem}
.sk-card{border:1px solid rgba(127,127,127,.25);border-radius:20px;padding:1.5rem;min-height:11.5rem}
.sk-card .sk-circle{margin:0 0 1.25rem;width:2.5rem;height:2.5rem;border-radius:10px}
@media (max-width:1100px){.sk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.sk-split{grid-template-columns:minmax(0,1fr)}.sk-drop{min-height:14rem;padding:2.5rem 1rem}.sk-grid{grid-template-columns:minmax(0,1fr)}}

/* Table rows (administration) and file thumbnails reuse the same shapes. */
.sk-row td{padding:.9rem .75rem}.sk-row .sk{height:1rem;margin:0}
.queue-file-art.is-loading-thumb{position:relative;overflow:hidden}
.queue-file-art.is-loading-thumb::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);animation:sk-shimmer 1.4s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.queue-file-art.is-loading-thumb::after{animation:none;display:none}}
[aria-busy="true"]{cursor:progress}

/* Skip link: the first Tab stop on the page; it moves keyboard focus past the navigation to the main content. */
.skip-link{position:absolute;top:-100px;left:16px;padding:12px 20px;z-index:110;background:var(--bg-surface,#fff);color:inherit;border:2px solid var(--border-focus,currentColor);border-radius:10px}
.skip-link:focus{top:12px}

/* Smooth cross-fade between pages: browsers with cross-document view transitions animate full page loads; others navigate as before. Skipped for reduced motion. */
@media (prefers-reduced-motion:no-preference){@view-transition{navigation:auto}}

/* While a tool or catalog address shows its loading skeleton, keep the footer out of sight (layout space is kept): it would otherwise sit in view and then jump away when the workspace renders, which scores as a large layout shift. */
html.js body.route-tool:not(.app-ready):not(.app-failed) :is(#toolSeo,#workflowExamples,#closingAction,.site-footer),
html.js body.route-catalog:not(.app-ready):not(.app-failed) :is(#workflowExamples,#closingAction,#categorySeo,.site-footer){visibility:hidden}

/* Studio pages: reserve the studio's height (and keep the examples below it out of sight) until its module has loaded. */
html.studio-pending #workflowStudio{visibility:hidden;min-height:min(1000px,120vh)}
html.studio-pending #workflowStudio[hidden]{display:block;margin-bottom:40px}
html.studio-pending #workflowExamples{visibility:hidden}
/* Without JavaScript nothing is loading: keep the page heading for screen readers but drop the "Loading the tool…" line. */
html:not(.js) #mainApp>.route-skeleton-status>p:not([role="heading"]){display:none}
