/* claat-style workshop viewer. Layout inspired by googlecodelabs/codelab-elements
   (Apache-2.0); written from scratch, no Google marks. Light theme only. */
:root { --cl-bar: 56px; --cl-side: 288px; --cl-rail: 64px; }

.md-typeset { font-size: 16px; line-height: 1.6; }

/* Top bar */
.workshop-header { position: fixed; top: 0; left: 0; right: 0; height: var(--cl-bar);
  background: var(--md-primary-fg-color); color: #fff; z-index: 10; }
.workshop-header__inner { display: flex; align-items: center; gap: 16px; height: 100%; padding: 0 16px; }
.workshop-back, .workshop-back:hover { color: #fff; font-size: 24px; text-decoration: none; }
.workshop-title { font-size: 20px; font-weight: 500; flex: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.workshop-remaining { font-size: 14px; white-space: nowrap; }
.workshop-toggle { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; }

/* Sidebar: each step is a card; the current one is raised. */
.workshop-sidebar { position: fixed; top: var(--cl-bar); bottom: 0; left: 0; width: var(--cl-side);
  overflow-y: auto; padding: 16px 12px; background: #f8f9fa; border-right: 1px solid #e0e0e0; z-index: 5;
  display: flex; flex-direction: column; }
#workshop-steps { list-style: none; margin: 0; padding: 0; }
#workshop-steps li { margin: 0 0 8px; }
#workshop-steps a { display: flex; align-items: center; gap: 12px; padding: 12px; color: #3c4043;
  text-decoration: none; font-size: 14px; line-height: 1.4; background: #fff;
  border: 1px solid #dadce0; border-radius: 8px; transition: box-shadow .15s, border-color .15s; }
#workshop-steps a:hover { box-shadow: 0 1px 2px rgba(60, 64, 67, .2); }
#workshop-steps a:focus-visible { outline: 2px solid var(--md-primary-fg-color); outline-offset: 2px; }
.workshop-num { flex: none; width: 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 50%; background: #80868b; color: #fff; font-size: 12px; font-weight: 500; }
#workshop-steps li.done a { font-weight: 400; }
#workshop-steps li.done .workshop-num { background: #388e3c; }
#workshop-steps li[aria-current="step"] a { color: #202124; font-weight: 700; border-color: transparent;
  box-shadow: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15); }
#workshop-steps li[aria-current="step"] .workshop-num { background: var(--md-primary-fg-color); }
/* Foot: the collapse button stays pinned to the sidebar bottom (wide screens only). */
.workshop-sidebar__foot { display: none; position: sticky; bottom: -16px; margin: auto -12px -16px;
  padding: 12px 12px 16px; background: #f8f9fa; }
@media (min-width: 960px) { .js .workshop-sidebar__foot { display: block; } }
.js.workshop-collapsed .workshop-sidebar__foot { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
.workshop-collapse { display: none; }
@media (min-width: 960px) {
  .js .workshop-collapse { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
    margin-left: auto;
    background: none; border: 0; border-radius: 8px; color: #5f6368; font: inherit; font-size: 14px; cursor: pointer; }
  .js .workshop-collapse:hover { background: #e8eaed; color: #202124; }
  .js .workshop-collapse:focus-visible { outline: 2px solid var(--md-primary-fg-color); outline-offset: 2px; }
  .workshop-collapse svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .workshop-collapse__open, .js.workshop-collapsed .workshop-collapse__close { display: none; }
  .js.workshop-collapsed .workshop-collapse__open { display: block; }
}

/* Content */
.md-main { padding-top: var(--cl-bar); }
.md-main__inner { max-width: none; margin: 0; }
.md-content { padding-left: var(--cl-side); }
.md-content .workshop-content { max-width: 800px; margin: 0 auto; padding: 24px 16px 96px; overflow-x: clip; }
.js section.workshop-step[hidden] { display: none; }
/* "Last tested": top right of step 1 only (workshop.js hides it on other steps). */
.md-typeset .workshop-verified { float: right; margin: 0 0 8px 16px; font-size: 12px; color: #5f6368; }
.workshop-verified[hidden] { display: none; }
/* Security checks panel: step 1 only, under "Last tested". */
.md-typeset .workshop-security { clear: both; margin: 0 0 24px; padding: 12px 16px; border: 1px solid #dadce0; border-radius: 8px; font-size: 14px; }
.workshop-security[hidden] { display: none; }
.md-typeset .workshop-security__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.md-typeset .workshop-security__title { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.md-typeset .workshop-security__date { font-size: 12px; color: #5f6368; }
/* ul./details. selectors match the specificity of Material's [dir=ltr] list and admonition rules. */
.md-typeset ul.workshop-security__rows { list-style: none; margin: 8px 0 0; padding: 0; }
.md-typeset ul.workshop-security__rows > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 6px 0; border-top: 1px solid #f1f3f4; }
.md-typeset .workshop-security__status { display: inline-flex; align-items: center; gap: 8px; }
.md-typeset .workshop-security__reviewed { font-size: 12px; color: #5f6368; }
.md-typeset .workshop-pill { display: inline-block; min-width: 56px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-align: center; }
.workshop-pill--pass { color: #137333; background: #e6f4ea; }
.workshop-pill--warn { color: #b06000; background: #fef7e0; }
.workshop-pill--unknown { color: #5f6368; background: #f1f3f4; }
.md-typeset details.workshop-security__details { margin: 4px 0 0; padding: 0; border: 0; border-top: 1px solid #f1f3f4; border-radius: 0; box-shadow: none; background: none; font-size: 13px; }
.md-typeset details.workshop-security__details > summary { margin: 0; padding: 6px 0 0; border: 0; background: none; cursor: pointer; color: #5f6368; font-weight: 400; }
.md-typeset details.workshop-security__details > summary::before, .md-typeset details.workshop-security__details > summary::after { display: none; }
.md-typeset details.workshop-security__details > summary { display: list-item; list-style: disclosure-closed inside; }
.md-typeset details.workshop-security__details[open] > summary { list-style-type: disclosure-open; }
.md-typeset details.workshop-security__details ul { margin: 6px 0 0 18px; }
.md-typeset details.workshop-security__details li { margin: 4px 0; }
.md-typeset .workshop-security__tag { font-size: 12px; color: #5f6368; }
.md-typeset .workshop-security__note { margin: 10px 0 0; color: #b06000; }
.md-typeset .workshop-security__none { margin: 8px 0 0; font-size: 12px; color: #5f6368; }
/* "i" button after a row label; its tooltip shows on hover or keyboard focus. */
.md-typeset .workshop-security__label { display: inline-flex; align-items: center; gap: 6px; }
.md-typeset .workshop-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 1px solid #9aa0a6; border-radius: 50%; background: none; color: #5f6368; font: italic 600 10px/1 Georgia, serif; cursor: help; }
.md-typeset .workshop-tip:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.md-typeset .workshop-tip__text { visibility: hidden; opacity: 0; position: absolute; z-index: 10; top: calc(100% + 6px); left: -8px; width: max-content; max-width: min(280px, 70vw); padding: 8px 10px; border-radius: 6px; background: #3c4043; color: #fff; font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.45; font-family: var(--md-text-font-family); text-align: left; white-space: normal; transition: opacity .15s; pointer-events: none; }
.md-typeset .workshop-tip:hover .workshop-tip__text, .md-typeset .workshop-tip:focus .workshop-tip__text { visibility: visible; opacity: 1; }
/* Step change: the new step slides in from the side it comes from. */
@keyframes workshop-from-right { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes workshop-from-left { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
/* Also used on "Last tested" and the security panel when step 1 comes back. */
.workshop-enter-next { animation: workshop-from-right .25s ease-out; }
.workshop-enter-prev { animation: workshop-from-left .25s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .workshop-enter-next, .workshop-enter-prev { animation: none; }
}
.workshop-stale { background: #fff8e1; border-left: 4px solid #ff8f00; padding: 12px 16px; margin-bottom: 16px; }

.workshop-draft { background: #ffebee; border-left: 4px solid #c62828; color: #b71c1c;
  font-weight: 500; padding: 12px 16px; margin-bottom: 16px; }
.independent-footer { padding: 16px; font-size: 12px; color: #5f6368; text-align: center; margin-left: var(--cl-side); }

/* Floating nav (needs JS to work) */
.workshop-nav { display: none; }
.js .workshop-nav { display: flex; gap: 8px; position: fixed; right: 24px; bottom: 24px; z-index: 6; }
.workshop-btn, .workshop-btn:hover { padding: 10px 24px; border-radius: 4px; text-decoration: none;
  font-weight: 500; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
/* "a." raises specificity above Material's .md-typeset a:focus/a:hover, which turned the
   clicked (still focused) Next button blue-on-blue. Covers every link state. */
.md-typeset a.workshop-btn--prev { background: #fff; color: #202124; }
.md-typeset a.workshop-btn--next { background: var(--md-primary-fg-color); color: #fff; }
.md-typeset a.workshop-btn:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
.workshop-btn[hidden] { display: none; }

/* claat asides */
.md-typeset .admonition.positive { border-color: #43a047; background: #e8f5e9; }
.md-typeset .positive > .admonition-title { background: #c8e6c9; }
.md-typeset .admonition.negative { border-color: #ef6c00; background: #fff3e0; }
.md-typeset .negative > .admonition-title { background: #ffe0b2; }

/* Narrow screens: sidebar behind a toggle */
@media (max-width: 959px) {
  .workshop-toggle { display: block; }
  .js .workshop-sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility 0s .2s;
    box-shadow: 2px 0 6px rgba(0, 0, 0, .2); }
  body.workshop-sidebar-open .workshop-sidebar { transform: none; visibility: visible; transition: transform .2s; }
  .md-content { padding-left: 0; }
  .workshop-remaining { display: none; }
  .independent-footer { margin-left: 0; }
}
/* Without JS the sidebar cannot be toggled, so keep it in the page flow. */
@media (max-width: 959px) {
  html:not(.js) .workshop-sidebar { position: static; width: auto; transform: none; border-right: 0;
    border-bottom: 1px solid #e0e0e0; }
  html:not(.js) .md-main { padding-top: var(--cl-bar); }
}
/* Wide screens: the sidebar foot button collapses the sidebar to a strip of step
   numbers. Needs JS, so without it the button is hidden and the sidebar stays full. */
@media (min-width: 960px) {
  .js .workshop-sidebar { transition: width .2s; }
  .js .md-content { transition: padding-left .2s; }
  .js .independent-footer { transition: margin-left .2s; }
  .js.workshop-collapsed .workshop-sidebar { width: var(--cl-rail); padding-left: 10px; padding-right: 10px; }
  .js.workshop-collapsed .md-content { padding-left: var(--cl-rail); }
  .workshop-animating .workshop-step-title { white-space: nowrap; overflow: hidden; min-width: 0; }
  .js.workshop-collapsed .independent-footer { margin-left: var(--cl-rail); }
  .js.workshop-collapsed #workshop-steps a { justify-content: center; padding: 10px 0; }
  .js.workshop-collapsed .workshop-step-title { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; }
  .js.workshop-collapsed .workshop-collapse { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .js .workshop-sidebar, .js .md-content, .js .independent-footer { transition: none; }
}

/* Dark code theme, switched by the button next to "copy" (workshop.js) and
   remembered in localStorage. Values are Material's slate scheme (hue 225). */
/* Icons: weather-night (switch to dark) and weather-sunny (switch to light),
   from Material Design Icons (bundled with Material for MkDocs). */
:root { --cl-code-theme-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3zm3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31"/></svg>'); }
.code-dark { --cl-code-theme-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44z"/></svg>'); }
.md-code__button[data-md-type=theme]:after {
  -webkit-mask-image: var(--cl-code-theme-icon);
          mask-image: var(--cl-code-theme-icon);
}
.code-dark .md-typeset .highlight {
  --md-default-fg-color: hsla(225, 15%, 90%, .82);
  --md-default-fg-color--light: hsla(225, 15%, 90%, .56);
  --md-default-fg-color--lighter: hsla(225, 15%, 90%, .32);
  --md-default-fg-color--lightest: hsla(225, 15%, 90%, .12);
  --md-code-fg-color: hsla(225, 18%, 86%, .82);
  --md-code-bg-color: hsla(225, 15%, 18%, 1);
  --md-code-bg-color--light: hsla(225, 15%, 18%, .9);
  --md-code-bg-color--lighter: hsla(225, 15%, 18%, .54);
  --md-code-hl-color: #2977ff;
  --md-code-hl-color--light: #2977ff1a;
  --md-code-hl-number-color: #e6695b;
  --md-code-hl-special-color: #f06090;
  --md-code-hl-function-color: #c973d9;
  --md-code-hl-constant-color: #9383e2;
  --md-code-hl-keyword-color: #6791e0;
  --md-code-hl-string-color: #2fb170;
  --md-code-hl-name-color: var(--md-code-fg-color);
  --md-code-hl-operator-color: var(--md-default-fg-color--light);
  --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
  --md-code-hl-comment-color: var(--md-default-fg-color--light);
  --md-code-hl-generic-color: var(--md-default-fg-color--light);
  --md-code-hl-variable-color: var(--md-default-fg-color--light);
  color-scheme: dark;
}

/* Fade between catalog and workshop pages (cross-document view transition; browsers
   without support just navigate normally). The header bar is named so it stays put. */
@view-transition { navigation: auto; }
.md-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
