/* Code tutorial adapter for shared v3 (3.1.0). No legacy shell or provider CSS. */
html { scrollbar-gutter: stable; }
/* Retain Code's existing narrow article measure and aligned shell. */
.code-site .dpu-site-subnav nav { gap: 0 24px; }
.code-article { min-width: 0; }
.code-article .dpu-page-title { margin: 0 0 18px; overflow-wrap: anywhere; }
.article-intro { font-size: 15px; line-height: 1.65; color: var(--dpu-text); margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--dpu-muted); margin-bottom: 28px; }
.article-hero { margin-bottom: 30px; }
.article-hero > a { display: block; }
.code-article img { max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.code-article .dpu-prose img { padding: 0; border: 0; box-shadow: none; border-radius: 0; }
/* Legacy captures include a five-pixel shadow inset. Keep its alignment. */
.article-hero img:not([data-dpw-screenshot="framed"]),
.article-text img:not([data-dpw-screenshot="framed"]) { margin-left: -5px; }
/* Raw captures explicitly opted into CSS framing; never frame baked-in shadows. */
.code-article img[data-dpw-screenshot="framed"],
.related-bottom .article[data-screenshot-presentation="css-framed-v1"] img {
  display: block; border-radius: 6px; box-shadow: 0 0 0 1px var(--dpu-line), 0 4px 18px #20313f14;
}
.code-article .dpu-prose img[data-dpw-screenshot="framed"] { border-radius: 6px; box-shadow: 0 0 0 1px var(--dpu-line), 0 4px 18px #20313f14; margin-block: 20px 26px; }
.article-summary { margin: 0 0 32px; scroll-margin-top: 18px; }
.article-summary .dpu-overview { font-size: 14px; }
.article-summary .dpu-overview th { width: 142px; }
.article-summary .dpu-overview :is(th,td) { padding: 12px 16px; }
.article-summary .summary-cta { width: 180px; }
.article-summary .summary-cta--github { background: #24292e; border-color: #24292e; color: #fff; }
.article-summary .summary-cta--github:hover { background: #161b22; border-color: #161b22; color: #fff; }
.code-brand-icon { width: 16px; height: 16px; flex: none; fill: currentColor; }
.article-summary a:not(.dpu-btn) { color: var(--dpu-blue); text-underline-offset: 3px; }
.article-summary a:not(.dpu-btn):hover { color: var(--dpu-blue-hover); }
.downloads { display: grid; gap: 12px; }
.download-item { display: grid; grid-template-columns: 180px minmax(0,1fr); align-items: center; gap: 8px 16px; min-width: 0; }
.download-meta { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; line-height: 1.55; white-space: nowrap; color: var(--dpu-muted); }
.download-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-size, .download-sep { flex: none; white-space: nowrap; }
.summary-languages, .summary-technologies { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.code-technology { color: var(--dpu-text); }
.article-text :is(h2,h3,pre) { scroll-margin-top: 20px; }
.article-text pre { margin: 16px 0 24px; }
.code-tools { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.code-tools .dpu-btn { min-height: 28px; height: 28px; padding: 3px 8px; font-size: 12px; }
.code-share { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--dpu-line); display: flex; gap: 8px; align-items: center; }
.share-title { color: var(--dpu-muted); font-size: 13px; margin-right: 8px; }
.share-button svg { width: 17px; height: 17px; }
.share-button svg path { fill: currentColor; }
.share-button.sb-x { color: #000; }
.related-bottom { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 24px; margin-top: 32px; }
.related-bottom .article { min-width: 0; }
.related-bottom .image { aspect-ratio: 16 / 10; padding: 6px; box-sizing: border-box; margin-bottom: 14px; }
.related-bottom .image > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.related-bottom .image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.related-article-title { font-size: 17px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.related-article-title a { color: var(--dpu-ink); text-decoration: none; }
.related-article-title a:hover { color: var(--dpu-blue); text-decoration: underline; }
.related-article-description { font-size: 14px; line-height: 1.6; color: var(--dpu-muted); }
.code-site main a:focus-visible { outline: 2px solid var(--dpu-focus); outline-offset: 3px; }
.code-technology + .code-technology::before { content: "·"; color: var(--dpu-muted); margin-right: 14px; }
.code-article ul.download { list-style: none; padding: 0; }
.code-article ul.download > li { margin-bottom: 16px; }
.code-article ul.download > li > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.app-banner { margin-block: 24px; }
.app-banner .app-banner-button { margin-top: 12px; }
.app-banner .app-banner-button a { width: 180px; }
/* Authored legacy Code articles use em for inline technical identifiers. */
.article-text em { font-family: var(--dpu-mono); font-style: normal; font-size: 13px; padding: 2px 5px; border-radius: 4px; background: var(--dpu-wash); }
/* Stored article HTML retains these Code-owned helpers. Do not import v1
 * resets or rewrite authored markup merely to attach presentation classes. */
.article-text :is(a.inline-btn,a.inline-btn-lighter,a.action-button):not(:where(.dpu-no-prose,.dpu-no-prose *)) {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; max-width: 100%; padding: 7px 14px; border: 1px solid var(--dpu-blue);
  border-radius: var(--dpu-radius); background: var(--dpu-blue); color: #fff;
  font-size: 14px; font-weight: 500; line-height: 1.4; text-align: center; text-decoration: none;
}
.article-text :is(a.inline-btn,a.action-button):hover:not(:where(.dpu-no-prose,.dpu-no-prose *)) {
  background: var(--dpu-blue-hover); border-color: var(--dpu-blue-hover); color: #fff;
}
.article-text a.inline-btn-lighter:not(:where(.dpu-no-prose,.dpu-no-prose *)) {
  background: var(--dpu-wash); border-color: var(--dpu-line); color: var(--dpu-blue);
}
.article-text a.inline-btn-lighter:hover:not(:where(.dpu-no-prose,.dpu-no-prose *)) { background: #e9f0f5; color: var(--dpu-blue-hover); }
.article-text a.action-button:not(:where(.dpu-no-prose,.dpu-no-prose *)) { width: 200px; }
.article-text td a.inline-btn:not(:where(.dpu-no-prose,.dpu-no-prose *)) { width: 100%; }
.article-text p.image-left img:not(:where(.dpu-no-prose,.dpu-no-prose *)) { max-width: 50%; float: left; margin-right: 20px; }
.article-text p.image-right img:not(:where(.dpu-no-prose,.dpu-no-prose *)) { max-width: 50%; float: right; margin-left: 20px; }
.article-text :is(h1,h2,h3,h4,table):not(:where(.dpu-no-prose,.dpu-no-prose *)) { clear: both; }
.article-text table:not(:where(.dpu-no-prose,.dpu-no-prose *)) { width: 100%; border-collapse: collapse; margin-block: 24px; font-size: 14px; }
.article-text :is(th,td):not(:where(.dpu-no-prose,.dpu-no-prose *)) { padding: 12px; border: 1px solid var(--dpu-line); text-align: center; }
.article-text th:not(:where(.dpu-no-prose,.dpu-no-prose *)) { background: var(--dpu-wash); font-size: 14px; }
.article-text th:first-child:not(:where(.dpu-no-prose,.dpu-no-prose *)) { text-align: start; }
/* Agate token adapter: keep Code's existing worker/highlighter, use v3 palette. */
.article-text pre :is(.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-selector-tag) { color: #fcc28c; }
.article-text pre :is(.hljs-meta-string,.hljs-string,.hljs-regexp) { color: #a2fca2; }
.article-text pre :is(.hljs-code,.hljs-comment,.hljs-formula) { color: #aaa; }
.article-text pre :is(.hljs-number,.hljs-symbol,.hljs-meta) { color: #f19b9b; }
.article-text pre :is(.hljs-attribute,.hljs-title,.hljs-type) { color: #ffffaa; }
.article-text pre :is(.hljs-section,.hljs-tag) { color: #62c8f3; }
.article-text pre :is(.hljs-attr,.hljs-quote,.hljs-selector-attr) { color: #7bd694; }
.article-text pre :is(.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable) { color: #ade5fc; }
.article-text pre :is(.hljs-name,.hljs-strong) { font-weight: bold; }
.article-text pre .hljs-emphasis { font-style: italic; }
@media (max-width: 600px) {
  .article-summary .dpu-overview th { width: auto; padding-block: 6px; }
  .article-summary .dpu-overview td { padding-block: 0 8px; }
  .download-item { grid-template-columns: minmax(0,1fr); }
  .related-bottom { grid-template-columns: minmax(0,1fr); }
}
