/* Python catalog: original screenshots, grouped studies, and a readable gallery. */
.assembly-theme .python-section{
  --py-ink:#eef6fa;--py-muted:#a8bfce;--py-line:#38505f;--py-blue:#acd7ef;
  background:linear-gradient(145deg,#14222df9,#10202bf9);padding:48px 25px;color:var(--py-ink)
}
.python-section .section-head{margin-bottom:32px}
.python-section .section-head .eyebrow,.python-section .section-head h2 span{color:var(--py-blue)}
.python-section .section-head>p{max-width:550px;color:var(--py-muted);font-size:13px;line-height:1.8}
.python-collection-summary{font:500 11px/1.8 Arial,sans-serif;color:#acd7ef;margin:0 0 20px}
.python-empty button{background:#acd7ef;color:#142635;border:0;border-radius:4px;padding:11px 16px;margin-top:10px;font-size:11px}
.python-section button:focus-visible,.python-section input:focus-visible,.python-detail button:focus-visible{
  outline:3px solid #acd7ef;outline-offset:4px
}
.python-catalog-tools{border-top:1px solid var(--py-line);border-bottom:1px solid var(--py-line);padding:22px 0;margin-bottom:35px}
.python-search{display:block;max-width:440px;margin-bottom:17px;color:#bbd1df;font-size:10px;font-weight:500}
.python-search>span{display:block;margin-bottom:9px;letter-spacing:.06em}
.python-search input{display:block;width:100%;height:43px;margin-top:8px;padding:0 14px;background:#0b1923;border:1px solid #4c6779;border-radius:4px;color:#eef6fa;font-size:12px;outline-offset:3px}
.python-search input::placeholder{color:#8ba5b8;opacity:1}
.python-search input::-webkit-search-cancel-button{cursor:pointer}
.python-category-filters{display:flex;flex-wrap:wrap;gap:7px}
.python-category-filters button{padding:10px 12px;min-height:36px;background:#152a37;border:1px solid #3b5769;border-radius:3px;color:#bed2e0;font-size:10px;line-height:1.4;text-align:left;transition:background .15s,border-color .15s}
.python-category-filters button:hover{background:#213c4d;border-color:#729bb4}
.python-category-filters button[aria-pressed=true]{background:#acd7ef;border-color:#acd7ef;color:#142635}
.python-category-filters button span{margin-left:7px;opacity:.75;font-size:9px}
.python-catalog-count{display:block;margin:15px 0 0;color:#9cb8ca;font:400 10px/1.6 Arial,sans-serif}
.python-projects{display:flex;flex-direction:column;gap:44px}
.python-group{min-width:0;scroll-margin-top:115px}
.python-group+.python-group{border-top:1px solid var(--py-line);padding-top:30px}
.python-group-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px 12px;margin:0 0 20px}
.python-group-index{color:#8db8d2;font:600 9px/1.4 Arial,sans-serif;letter-spacing:.12em}
.python-group-head h3{flex:1;margin:0;color:#eef6fa;font:400 26px/1.2 Arial,sans-serif;letter-spacing:-.035em}
.python-group-head p{flex:0 0 100%;margin:0;color:#a1bacb;font:400 12px/1.75 Arial,sans-serif;max-width:none}
.python-group-count,.python-group-head>small{font:400 9px/1.4 Arial,sans-serif;color:#9bb6c8;white-space:nowrap}
.python-project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.python-project{display:flex;flex-direction:column;min-width:0;background:#192d3a;border:1px solid #3b5363;border-radius:5px;overflow:hidden}
.python-project-preview{display:block;position:relative;width:100%;aspect-ratio:16/10;min-height:0;border:0;border-bottom:1px solid #3b5363;padding:0;background:#0b1822;overflow:hidden;cursor:zoom-in}
.python-project-preview img{display:block;width:100%;height:100%;object-fit:contain}
.python-view-count{position:absolute;bottom:10px;right:10px;background:#0b1822ef;border:1px solid #6a889d;border-radius:3px;padding:6px 8px;color:#e1f1fb;font:500 8px/1.3 Arial,sans-serif;box-shadow:0 2px 10px #0002}
.python-project-body{display:flex;flex-direction:column;flex:1;min-width:0;padding:21px 20px}
.python-project-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.python-number{font:600 8px/1.4 Arial,sans-serif;letter-spacing:.14em;color:#9bb9cd}
.python-year{font:400 9px/1.4 Arial,sans-serif;color:#9bb9cd}
.python-project h4{font:400 23px/1.15 Arial,sans-serif;letter-spacing:-.035em;color:#f0f7fb;margin:0 0 12px;overflow-wrap:anywhere}
.python-summary{font:400 12px/1.75 Arial,sans-serif;color:#b1c6d4;margin:0 0 17px}
.python-tags{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-top:auto;color:#a2c5dc}
.python-tags span{font:500 9px/1.7 Arial,sans-serif;white-space:normal}
.python-tags span+span:before{content:'·';display:inline-block;color:#69879b;margin-right:12px}
.python-project-open{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;min-height:41px;margin-top:19px;padding:13px 0 0;border:0;border-top:1px solid #3c5668;background:transparent;color:#d8edfa;font:600 11px/1.5 Arial,sans-serif;text-align:left}
.python-project-open:hover{color:#fff}
.python-project-open span{color:#acd7ef;font-size:15px}
.python-empty{margin:0;padding:35px 20px;border:1px dashed #527287;border-radius:5px;color:#c0d5e3;font:400 13px/1.8 Arial,sans-serif;text-align:center}
.python-section-note{display:flex;align-items:flex-start;gap:10px;margin:28px 0 0;border-top:1px solid var(--py-line);padding-top:20px;font:400 10px/1.7 Arial,sans-serif;color:#9ab5c8}
.python-section-note>span{width:5px;height:5px;border-radius:50%;background:#8ebad4;margin-top:6px;flex-shrink:0}
.python-section noscript{font:400 12px/1.8 Arial,sans-serif;color:#a6bfce}
.python-section [hidden],.python-detail [hidden]{display:none!important}

/* Native dialog keeps focus, Escape support, and the existing site hierarchy. */
dialog.python-detail{width:min(1160px,calc(100% - 36px));max-height:93vh;padding:0;background:#10212d;border:1px solid #466175;border-radius:9px;color:#edf6fc;overflow:auto}
.python-detail::backdrop{background:#06111ce8;backdrop-filter:blur(7px)}
.python-dialog-top{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 24px;border-bottom:1px solid #3c5668;background:#10212df5;backdrop-filter:blur(12px)}
.python-dialog-top>span{color:#acd7ef;font:600 9px/1.4 Arial,sans-serif;letter-spacing:.13em}
.python-dialog-top button{border:1px solid #66879d;background:#183447;border-radius:3px;padding:9px 13px;color:#e2f2fc;font:500 11px/1.4 Arial,sans-serif}
.python-dialog-top button:hover{background:#244b64}
.python-dialog-heading{padding:26px 24px 24px}
.python-dialog-heading h2{margin:0 0 12px;color:#f0f7fc;font:400 34px/1.12 Arial,sans-serif;letter-spacing:-.045em}
.python-dialog-heading>p{font:400 13px/1.8 Arial,sans-serif;color:#b3c9d8;max-width:850px;margin:0}
.python-dialog-heading .python-project-meta{justify-content:flex-start;margin:0 0 12px;gap:15px}
.python-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:23px;padding:0 24px 24px;align-items:start}
.python-evidence-main{min-width:0;margin:0}
.python-evidence-main>button{position:relative;display:block;width:100%;height:425px;padding:0;border:1px solid #4a6578;background:#0a1721;border-radius:5px;overflow:hidden;cursor:zoom-in}
.python-enlarge{position:absolute;right:10px;bottom:10px;background:#10212def;border:1px solid #7094ac;border-radius:3px;color:#e1f2fd;padding:8px 11px;font:500 10px Arial,sans-serif}
.python-evidence-main>button img{display:block;width:100%;height:100%;object-fit:contain}
.python-gallery-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.python-gallery-nav button{min-height:37px;padding:8px 12px;border:1px solid #4f6e84;border-radius:3px;background:#172f40;color:#d6eaf8;font:500 10px/1.5 Arial,sans-serif}
.python-gallery-nav button:hover:not(:disabled){background:#24485f}
.python-gallery-nav button:disabled{opacity:.4;cursor:default}
.python-gallery-nav span{color:#a4c0d3;font:400 10px/1.5 Arial,sans-serif;white-space:nowrap}
.python-evidence-main figcaption,.python-image-caption{margin:12px 0 0;color:#a3bdce;font:400 11px/1.7 Arial,sans-serif}
.python-detail-notes{padding:22px;border:1px solid #3d586a;border-radius:5px;background:#172c3a}
.python-detail-notes h3{font:400 20px/1.2 Arial,sans-serif;color:#edf6fc;letter-spacing:-.025em;margin:0 0 13px}
.python-detail-notes>p{font:400 12px/1.8 Arial,sans-serif;color:#b0c8d7;margin:0 0 18px;overflow-wrap:anywhere}
.python-detail-notes dl{margin:0;display:grid;gap:17px}
.python-detail-notes dl>div{border-top:1px solid #3a5467;padding-top:14px}
.python-detail-notes dt{font:600 9px/1.5 Arial,sans-serif;color:#acd7ef;text-transform:uppercase;letter-spacing:.08em}
.python-detail-notes dd{font:400 11px/1.8 Arial,sans-serif;color:#c1d6e3;margin:5px 0 0;overflow-wrap:anywhere}
.python-detail-notes .python-tags{border-top:1px solid #3a5467;padding-top:16px;margin-top:19px}
.python-thumb-strip{display:flex;gap:10px;padding:0 24px 23px;overflow-x:auto;scrollbar-color:#597c94 #142937;scrollbar-width:thin}
.python-thumb-strip button{flex:0 0 150px;padding:0;overflow:hidden;text-align:left;border:1px solid #3e5c70;border-radius:4px;background:#172d3d;color:#bad1e1}
.python-thumb-strip button[aria-pressed=true],.python-thumb-strip button.selected{border-color:#acd7ef;box-shadow:inset 0 0 0 1px #acd7ef}
.python-thumb-strip img{display:block;width:100%;height:86px;object-fit:contain;background:#091721}
.python-thumb-strip span{display:block;padding:9px 10px;font:400 9px/1.5 Arial,sans-serif}
.python-evidence-scope{margin:0 24px 24px;padding-top:16px;border-top:1px solid #385368;color:#92afc3;font:400 10px/1.8 Arial,sans-serif}

@media(max-width:1150px){
  .assembly-theme .python-section{padding:40px 22px}
  .python-project-grid{gap:13px}
  .python-project-body{padding:18px 15px}
  .python-project h4{font-size:21px}
  .python-summary{font-size:11px}
  .python-detail-layout{grid-template-columns:minmax(0,1fr) 260px;gap:18px}
  .python-detail-notes{padding:18px}
}
@media(max-width:800px){
  .assembly-theme .python-section{padding:42px 22px}
  .python-group-head h3{font-size:26px}
  .python-project-body{padding:21px 19px}
  .python-summary{font-size:12px}
  .python-project h4{font-size:23px}
  .python-detail-layout{grid-template-columns:1fr}
  .python-evidence-main>button{height:390px}
  .python-detail-notes dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  .python-detail-notes .python-tags{margin-top:16px}
}
@media(max-width:560px){
  .assembly-theme .python-section{padding:35px 16px}
  .python-section .section-head h2{font-size:35px}
  .python-section .section-head>p{font-size:12px}
  .python-catalog-tools{padding:20px 0;margin-bottom:28px}
  .python-search{max-width:none}
  .python-category-filters{gap:6px}
  .python-category-filters button{font-size:10px;padding:9px 10px;min-height:37px}
  .python-projects{gap:35px}
  .python-project-grid{grid-template-columns:1fr;gap:17px}
  .python-group-head{gap:10px 8px;margin-bottom:18px}
  .python-group-head h3{font-size:25px}
  .python-group-head p{font-size:11px}
  .python-group-count{flex-basis:100%;padding-left:0}
  .python-project-body{padding:21px 19px}
  .python-project h4{font-size:25px}
  .python-project-open{min-height:43px}
  .python-section-note{font-size:9px}
  .assembly-theme .nav-shell nav{gap:16px}
  .assembly-theme .nav-shell nav a[href="#python"]{white-space:nowrap}
  dialog.python-detail{width:calc(100% - 16px);max-height:95vh;border-radius:6px}
  .python-dialog-top{padding:12px 15px}
  .python-dialog-top>span{font-size:8px}
  .python-dialog-heading{padding:22px 16px}
  .python-dialog-heading h2{font-size:28px}
  .python-dialog-heading>p{font-size:12px}
  .python-detail-layout{padding:0 15px 18px;gap:18px}
  .python-evidence-main>button{height:300px}
  .python-gallery-nav button{padding:8px 10px;font-size:10px}
  .python-detail-notes{padding:19px 17px}
  .python-detail-notes dl{grid-template-columns:1fr}
  .python-thumb-strip{padding:0 15px 20px;gap:8px}
  .python-thumb-strip button{flex-basis:127px}
  .python-thumb-strip img{height:78px}
  .python-evidence-scope{margin:0 15px 20px;font-size:9px}
}
@media(prefers-reduced-motion:reduce){.python-section *,.python-detail *{transition:none!important;scroll-behavior:auto}}
