/* Header uses flow layout; no navigation overlay. */
.masthead {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px 20px;min-height:0;padding:12px 2px;}
.masthead .brand {display:flex;align-items:center;min-width:0;width:auto;max-width:100%;gap:12px;}
.masthead .brand>div {display:block;min-width:0;}
.masthead .brandword {width:auto;max-width:100%;font-size:clamp(1.4rem,2.5vw,3rem);overflow-wrap:anywhere;}
.masthead .brandtag {padding:0;margin:4px 0 0;white-space:normal;max-width:none;}
.masthead .nav {position:static;width:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;align-self:start;}
.masthead .menu-toggle {display:none;}
.header-theme {grid-column:1/-1;justify-self:end;display:flex;align-items:center;gap:4px;font-size:.75rem;}
.header-theme button {display:grid;place-items:center;width:32px;height:32px;padding:4px;border:1px solid var(--line);background:transparent;cursor:pointer;}
.header-theme button span {display:block;width:18px;height:18px;background:var(--swatch);border:1px solid #777;}
.header-theme button[aria-pressed=true],.header-theme button:hover {border:2px solid var(--ink);}
.header-theme button:focus-visible {outline:2px solid var(--ink);outline-offset:2px;}
@media(max-width:1499px){.masthead .brand,.masthead .nav{grid-column:1/-1;}.masthead .nav{justify-content:flex-start;}}
@media(max-width:1000px){.masthead .brand{grid-column:1;}.masthead .menu-toggle{display:flex;position:static;align-items:center;gap:8px;min-height:44px;grid-column:2;grid-row:1;}.masthead .nav{display:none;}.masthead .nav.open{display:flex;flex-direction:column;align-items:stretch;width:100%;}.masthead .nav.open a{min-height:44px;width:100%;}.masthead .brandword{font-size:clamp(1rem,3.6vw,2.5rem);}.header-theme button{width:44px;height:44px;}}
.two-corner-page {--aug-tr:0px!important;--aug-bl:0px!important;}
.scan-grid {grid-template-columns:minmax(240px,1fr) minmax(0,3fr) minmax(190px,1fr);}
.scan-grid>.scan-choices {display:grid;grid-template-columns:minmax(0,1fr);}
.scan-grid>.scan-choices legend {grid-column:1/-1;float:none;display:block;width:100%;overflow-wrap:anywhere;}
.scan-grid label {min-width:0;max-width:100%;}
.instrument-choices label>span {gap:8px;padding:10px 8px 10px 26px;min-width:0;}
.instrument-choices label>span>span {min-width:0;overflow-wrap:anywhere;}
.instrument-choices svg {width:clamp(28px,3vw,48px);}
.scan-display canvas {max-width:100%;height:auto;}
.scan-choices img {max-width:100%;}
@media(max-width:1350px){.scan-grid{grid-template-columns:minmax(0,1fr);}.scan-grid>.scan-choices{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));}.scan-display{grid-row:3;}}
@media(max-width:500px){.scan-grid>.scan-choices{grid-template-columns:repeat(2,minmax(0,1fr));}.instrument-choices label>span{flex-direction:column;align-items:flex-start;}.instrument-choices svg{width:32px;}}

/* V119: shared two-corner geometry and compact header. */
.dm-panel {--aug-tr:0px!important;--aug-bl:0px!important;}
.theme-card {clip-path:polygon(16px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 16px);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;container-type:inline-size;}
.theme-card-title {min-width:0;gap:6px;}
.theme-card-title strong {overflow-wrap:anywhere;}
.theme-card .theme-swatches {justify-self:end;gap:3px;}
.theme-card .theme-swatches i {width:12px;height:12px;}
.theme-card .theme-select {grid-column:1/-1;box-sizing:border-box;overflow-wrap:anywhere;}
.theme-card[data-theme-choice=blue] .theme-swatches i:nth-child(4){background:var(--sample);}
@container (max-width:260px){.theme-swatches i:not(:nth-child(4)){display:none;}}
.home-pathway-title {min-width:0;overflow-wrap:anywhere;flex-wrap:wrap;}
@media(max-width:1000px){
 .masthead .menu-toggle {position:relative;isolation:isolate;clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px);border:1px solid var(--cyan);background:var(--panel);color:var(--ink);padding:8px 12px;font-family:var(--font-display);text-transform:uppercase;}
 .masthead .menu-toggle::before,.masthead .menu-toggle::after {display:none;}
 .masthead .menu-toggle .menu-glyph {display:grid;gap:4px;width:18px;flex:none;}
 .masthead .menu-toggle .menu-glyph i {display:block;width:18px;height:2px;background:currentColor;}
 .masthead .menu-toggle .menu-glyph i:nth-child(2){width:12px;}
 .masthead .menu-toggle:focus-visible{clip-path:none;outline:2px solid var(--ink);outline-offset:3px;}
}
@media(max-width:499px){
 .masthead {grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;}
 .masthead .brandtag {display:none;}
 .masthead .brand > img.logo {display:block;width:clamp(30px,10vw,48px);height:auto;flex:none;}
 .masthead .brand {gap:5px;}
 .masthead .brandword {font-size:clamp(.72rem,3.2vw,1.2rem);white-space:nowrap;overflow-wrap:normal;letter-spacing:0;}
 .masthead .menu-toggle {padding:6px;gap:4px;font-size:.75rem;}
 .masthead .menu-toggle .menu-glyph {width:14px;}
 .masthead .menu-toggle .menu-glyph i {width:14px;}
 .header-theme {max-width:100%;}
 .interior.dm-panel {padding:clamp(12px,4vw,20px);}
 .home-pathway-title {font-size:clamp(.95rem,4.5vw,1.2rem);display:block;}
}

/* V120: fixed brand dimensions and responsive flow. */
.masthead .brand {gap:12px;align-items:center;}
.masthead .brand > img.logo {display:block;width:78px;height:78px;flex:none;object-fit:contain;}
.masthead .brandword {font-size:2.35rem;line-height:1;letter-spacing:.045em;white-space:nowrap;overflow-wrap:normal;color:var(--theme-heading);}
.masthead .brandtag {font-size:.83rem;line-height:1.4;letter-spacing:.025em;max-width:570px;margin:4px 0 0;padding:0;text-wrap:balance;color:var(--theme-body);}
.masthead .nav {flex-wrap:nowrap;}
@media(min-width:1580px){.masthead .brand{grid-column:1;}.masthead .nav{grid-column:2;grid-row:1;}}
@media(min-width:1001px) and (max-width:1579px){.masthead .brand,.masthead .nav{grid-column:1/-1;}.masthead .nav{justify-content:flex-start;flex-wrap:wrap;}}
@media(max-width:1000px){.masthead .brandtag{display:none;}.masthead .brand{grid-column:1;}.masthead .menu-toggle{grid-column:2;grid-row:1;}.masthead .nav.open{grid-column:1/-1;}}
@media(max-width:600px){.masthead .brand{grid-column:1/-1;}.masthead .menu-toggle{grid-row:2;grid-column:2;}.masthead .nav.open{grid-row:3;}.header-theme{grid-row:auto;}}
@media(max-width:400px){.masthead .brandword{font-size:clamp(1.35rem,7vw,2.35rem);}.masthead .brand > img.logo{width:58px;height:58px;}}
body{background-color:var(--theme-bg);color:var(--theme-body);}
h1,h2,h3,h4,h5,h6{color:var(--theme-heading);}
.eyebrow,.scan-choices legend,.scan-display h3{color:var(--theme-accent);}
.header-theme button span{background:linear-gradient(135deg,var(--swatch) 50%,var(--swatch-accent) 50%);}
.header-theme button[aria-pressed=true]{outline:2px solid var(--theme-heading);outline-offset:1px;}
.header-theme button:focus-visible{outline:3px dashed var(--theme-accent);outline-offset:3px;}
.theme-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));}
.theme-card{grid-template-rows:1fr auto;align-items:center;min-height:110px;}
.theme-card-title{gap:5px;white-space:nowrap;}.theme-card-title strong{font-size:1.05rem;overflow-wrap:normal;}
.theme-card .theme-select{white-space:nowrap;min-height:40px;display:grid;place-items:center;}
.theme-card .theme-swatches i{opacity:1;}
.theme-card[data-theme-choice=slate] .theme-swatches i:nth-child(1){background:#050505;}
.theme-card[data-theme-choice=slate] .theme-swatches i:nth-child(2){background:#0b0b0b;}
.theme-card[data-theme-choice=slate] .theme-swatches i:nth-child(3){background:#477fa5;}
.theme-card[data-theme-choice=slate] .theme-swatches i:nth-child(4){background:#55c7ff;}
.theme-card[data-theme-choice=slate] .theme-swatches i:nth-child(5){background:#ffffff;}
.theme-card[data-theme-choice=graphite] .theme-swatches i:nth-child(1){background:#050505;}
.theme-card[data-theme-choice=graphite] .theme-swatches i:nth-child(2){background:#0b0b0b;}
.theme-card[data-theme-choice=graphite] .theme-swatches i:nth-child(3){background:#858585;}
.theme-card[data-theme-choice=graphite] .theme-swatches i:nth-child(4){background:#b3a0ff;}
.theme-card[data-theme-choice=graphite] .theme-swatches i:nth-child(5){background:#ffffff;}
.theme-card[data-theme-choice=moon] .theme-swatches i:nth-child(1){background:#050505;}
.theme-card[data-theme-choice=moon] .theme-swatches i:nth-child(2){background:#0b0b0b;}
.theme-card[data-theme-choice=moon] .theme-swatches i:nth-child(3){background:#a3a8ba;}
.theme-card[data-theme-choice=moon] .theme-swatches i:nth-child(4){background:#1ce8f3;}
.theme-card[data-theme-choice=moon] .theme-swatches i:nth-child(5){background:#ffffff;}
.theme-card[data-theme-choice=meteor] .theme-swatches i:nth-child(1){background:#050505;}
.theme-card[data-theme-choice=meteor] .theme-swatches i:nth-child(2){background:#0b0b0b;}
.theme-card[data-theme-choice=meteor] .theme-swatches i:nth-child(3){background:#779c87;}
.theme-card[data-theme-choice=meteor] .theme-swatches i:nth-child(4){background:#b0e58a;}
.theme-card[data-theme-choice=meteor] .theme-swatches i:nth-child(5){background:#ffffff;}

/* V121: fixed branding and neutral high-contrast surfaces. */
.masthead .brand > img.logo {display:block;width:100px;height:100px;min-width:100px;max-width:100px;flex:0 0 100px;object-fit:contain;}
.masthead .brand {gap:12px;align-items:center;}
.masthead .brandword {font-size:1.705rem;line-height:1.1;letter-spacing:.045em;color:#fff;white-space:nowrap;overflow-wrap:normal;}
.masthead .brandtag {font-size:.983rem;line-height:1.4;letter-spacing:.025em;max-width:none;width:auto;text-wrap:wrap;color:#eee;}
.masthead .brand>div {min-width:0;}
@media(min-width:1580px){.masthead .brandtag{max-width:850px;}}
@media(min-width:1001px) and (max-width:1579px){.masthead .brandtag{max-width:850px;}}
@media(max-width:1000px){.masthead .brandtag{display:none;}}
@media(max-width:600px){.masthead .brand{grid-column:1/-1;}.masthead .menu-toggle{grid-row:2;grid-column:2;}.masthead .nav.open{grid-row:3;}}
@media(max-width:420px){.masthead .brand{flex-wrap:wrap;gap:4px;}.masthead .brandword{white-space:normal;overflow-wrap:anywhere;}}
body{color:#eee;background-color:#050505;}
h1,h2,h3,h4,h5,h6,.home-pathway-title,.work-tile h2,.masthead .brandword{color:#fff;}
.eyebrow,.scan-choices legend,.scan-display h3{color:var(--theme-accent);}

/* V122: solid chamfered swatches and continuous two-corner borders. */
.header-theme button span {
  width:20px;height:20px;border:0;background:var(--swatch-accent);
  clip-path:polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px);
}
.header-theme button[aria-pressed=true]{border:2px solid #fff;outline:none;}
.header-theme button:focus-visible{outline:2px dashed #fff;outline-offset:3px;}
@media(max-width:1000px){
 .masthead .menu-toggle{position:relative;isolation:isolate;border:0;background:var(--theme-accent);clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);}
 .masthead .menu-toggle::before{display:block;content:"";position:absolute;inset:1px;z-index:-1;pointer-events:none;background:#0b0b0b;clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px);}
 .masthead .menu-toggle[aria-expanded=true]{color:#050505;}
 .masthead .menu-toggle[aria-expanded=true]::before{background:var(--theme-accent);}
 .masthead .menu-toggle:focus-visible{clip-path:none;outline:2px solid #fff;outline-offset:3px;}
 .masthead .menu-toggle:focus-visible::before{clip-path:none;}
}
.theme-card .theme-select{position:relative;isolation:isolate;border:0;background:var(--sample);clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);}
.theme-card .theme-select::after{content:"";position:absolute;inset:1px;z-index:-1;pointer-events:none;background:#0b0b0b;clip-path:polygon(0 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%);}
.theme-card[aria-pressed=true] .theme-select::after{background:var(--sample);}
.theme-card:focus-visible .theme-select{clip-path:none;outline:2px solid #fff;outline-offset:2px;}
.theme-card:focus-visible .theme-select::after{clip-path:none;}
/* Balanced theme cards: no orphan fourth card. */
.theme-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
@media(max-width:1100px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:550px){.theme-grid{grid-template-columns:minmax(0,1fr);}}

/* V123: stable mobile controls and theme-aware branding. */
:root[data-interface-theme="moon"] .masthead .brand > img.logo {content:url("assets/branding/logo-cyan.png");}
:root[data-interface-theme="slate"] .masthead .brand > img.logo {content:url("assets/branding/logo-azure.png");}
:root[data-interface-theme="meteor"] .masthead .brand > img.logo {content:url("assets/branding/logo-jade.png");}
:root[data-interface-theme="graphite"] .masthead .brand > img.logo {content:url("assets/branding/logo-violet.png");}

.masthead .brand:hover > img.logo,.masthead .brand:focus-visible > img.logo {filter:drop-shadow(0 0 5px var(--theme-accent)) drop-shadow(0 0 12px color-mix(in srgb,var(--theme-accent) 50%,transparent));}
.masthead .brand:hover .brandword,.masthead .brand:focus-visible .brandword {color:#fff;text-shadow:none;}
@media(max-width:1000px){
 .masthead .menu-toggle {box-sizing:border-box;width:132px;height:48px;min-height:48px;padding:8px 12px;gap:8px;font:600 .85rem var(--font-display,Arial,sans-serif);letter-spacing:.045em;justify-content:center;align-self:start;justify-self:end;}
 .masthead .menu-toggle .menu-glyph {width:18px;gap:4px;}
 .masthead .menu-toggle .menu-glyph i,.masthead .menu-toggle[aria-expanded=true] .menu-glyph i:nth-child(2){width:18px;height:2px;}
 .masthead .menu-toggle .menu-glyph i:nth-child(2){width:12px;}
 .masthead .nav.open {border-left:0;padding:0;gap:6px;}
 .masthead .brand {flex-wrap:nowrap;gap:12px;}
}
@media(max-width:700px){.masthead .brand{grid-column:1/-1;grid-row:1;}.masthead .menu-toggle{grid-row:2;grid-column:2;}.masthead .nav.open{grid-row:3;}}
@media(max-width:500px){.masthead .brand > img.logo{width:70px;height:70px;min-width:70px;max-width:70px;flex:0 0 70px;}.masthead .brandword{font-size:1.5rem;white-space:nowrap;letter-spacing:.045em;}.masthead .brand{gap:8px;}}
@media(max-width:380px){.masthead .brandword{font-size:clamp(1rem,5.5vw,1.5rem);letter-spacing:.015em;}}
/* V125: shaped focus and theme decoration */
.header-theme{font-size:1rem;}
.header-theme button{position:relative;isolation:isolate;border:0!important;background:var(--line);clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);}
.header-theme button::before{content:"";position:absolute;inset:1px;background:#050505;clip-path:inherit;z-index:-1;}
.header-theme button[aria-pressed=true]{background:#fff;}
.header-theme button[aria-pressed=true]::before{inset:2px;}
.header-theme button:focus-visible{outline:none;background:#fff;}
.header-theme button:focus-visible::before{inset:4px;}
.theme-card-title .theme-stripes{display:inline-block;width:40px;height:16px;flex:none;transform:skewX(-25deg);background:linear-gradient(90deg,var(--sample) 0 24%,transparent 24% 30%,var(--sample) 30% 48%,transparent 48% 54%,var(--sample) 54% 68%,transparent 68% 74%,var(--sample) 74% 85%,transparent 85% 91%,var(--sample) 91%);}
.theme-card:focus-visible{outline:none;background:#fff;}
.theme-card:focus-visible::before{inset:4px;}
.theme-card:focus-visible .theme-select,.theme-card:focus-visible .theme-select::after{clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);outline:none;}
@container(max-width:210px){.theme-card-title .theme-stripes{width:23px;}.theme-card .theme-swatches i:not(:nth-child(4)){display:none;}}
@media(forced-colors:active){.header-theme button,.theme-card{clip-path:none;border:1px solid ButtonText!important;}.header-theme button:focus-visible,.theme-card:focus-visible{outline:3px solid Highlight;outline-offset:2px;}}

/* V127: shared motion-bar theme controls. */
.header-theme > span {text-transform:uppercase;line-height:1;}
.header-theme button {width:54px;height:36px;min-width:0;}
.header-theme button span,.theme-card-title .theme-stripes {
 border:0;display:block;flex:none;width:2.15em;height:.74em;transform:skewX(-25deg);
 background:linear-gradient(90deg,var(--motion-color) 0 24%,transparent 24% 30%,var(--motion-color) 30% 48%,transparent 48% 54%,var(--motion-color) 54% 68%,transparent 68% 74%,var(--motion-color) 74% 85%,transparent 85% 91%,var(--motion-color) 91%);
}
.header-theme button span {--motion-color:var(--swatch-accent);font-size:1rem;clip-path:none;}
.header-theme button[aria-pressed=true]::before {background:var(--swatch-accent);}
.header-theme button[aria-pressed=true]::after {content:"";position:absolute;inset:4px;background:#050505;clip-path:inherit;z-index:-1;}
.header-theme button:focus-visible::before {inset:4px;}
.header-theme button:focus-visible::after {inset:6px;}
.theme-card-title {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding-right:5px;}
.theme-card-title .theme-stripes {--motion-color:var(--sample);font-size:1.05rem;width:2.5em;height:.78em;}
.theme-card .theme-swatches {display:none;}
@media(max-width:1000px){.header-theme button{height:44px;}}
@media(max-width:380px){.header-theme{gap:3px;}.header-theme button{width:46px;}}
@media(forced-colors:active){.header-theme button span,.theme-card-title .theme-stripes{forced-color-adjust:none;}.header-theme button[aria-pressed=true]{border:3px solid Highlight!important;}}

/* V128: compact four-bar glyph, centered with clear side margins. */
.header-theme button {box-sizing:border-box; padding:0; grid-template-columns:1fr; justify-items:center; align-items:center;}
/* Use a fixed-size vector mask: four independent tapered bars. */
.header-theme button span {width:28px;height:12px;transform:none;clip-path:none;background:var(--swatch-accent);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 12' preserveAspectRatio='none'%3E%3Cpath d='M6 0H12L6 12H0ZM14 0H19L13 12H8ZM21 0H24L18 12H15ZM26 0H28L22 12H20Z'/%3E%3C/svg%3E") center/contain no-repeat;}
@media(forced-colors:active){.header-theme button span{background:ButtonText;forced-color-adjust:auto;}}

/* V129: compact header selector, taller inset motion bars. */
.header-theme {font-size:.81rem;}
.header-theme > span {text-transform:none;line-height:1;}
.header-theme button {width:54px;height:24px;min-height:24px;}
.header-theme button span {width:32px;height:16px;mask-size:100% 100%;}
@media(max-width:380px){.header-theme button{width:46px;}}
