/* Theme components and homepage treatment. Palettes are generated from src/themes.js. */
.edition-picker { position: relative; flex: 0 0 44px; }
.edition-picker > summary { display: flex; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; cursor: pointer; list-style: none; }
.edition-picker > summary::-webkit-details-marker { display: none; }
.edition-swatch, .edition-chip { width: 15px; height: 15px; border-radius: 50%; background: linear-gradient(135deg,var(--metal),var(--accent) 55%,var(--metal-deep)); border: 1px solid color-mix(in srgb,var(--text) 35%,transparent); }
.edition-chevron { color: var(--muted); font-size: 12px; }
.edition-panel { position: absolute; right: 0; top: calc(100% + 12px); width: min(280px,calc(100vw - 40px)); max-height: calc(100dvh - 104px); overflow-y: auto; padding: 18px; border: 1px solid var(--line2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); z-index: 95; }
.edition-panel legend { padding: 0 0 12px; color: var(--text); font: 11px/1.5 var(--mono); }
.edition-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; color: var(--muted); font-size: 13px; }
.edition-option:has(:checked) { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.edition-option:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.edition-option:hover { background: var(--accent-soft); color: var(--text); }
.edition-option input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
.edition-option:has(:checked)::after { content: '✓'; margin-left: auto; color: var(--accent); }
.edition-panel p { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); }
.official-pa-logo { display: none; }
.theme-home .official-pa-logo { display: block; width: 144px; height: 144px; object-fit: contain; margin-bottom: 22px; border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: 0 8px 28px var(--glow); }
.theme-home .signature-hero { background: radial-gradient(ellipse at 77% 40%,var(--glow),transparent 55%),var(--bg); }
.theme-home .button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.theme-home .button.primary:hover { background: var(--accent2); border-color: var(--accent2); }
.theme-home .closing-section { background: linear-gradient(115deg,var(--surface),var(--bg) 75%); }
.theme-home .footer { background: var(--surface); }
.theme-home .portfolio-logo-surface { background: radial-gradient(ellipse at 70% 20%,var(--glow),transparent 65%),var(--surface); }
@media (min-width:941px) and (max-width:1200px) { .desktop-nav { gap: 13px; } .header-inner { gap: 12px; } .desktop-nav a { font-size: 11px; } .header-actions { margin-left: 0; gap: 0; } }
@media (max-width:360px) { .header-inner { gap: 5px; } .brand { font-size: 8px; } .header-actions .icon-button, .header-actions .nav-mini, .edition-picker > summary { width: 38px; } .edition-picker { flex-basis: 38px; } }
@media (prefers-reduced-motion:no-preference) {
  html[data-theme-ready] body, html[data-theme-ready] .site-header, html[data-theme-ready] .footer, html[data-theme-ready] .section, html[data-theme-ready] .closing-section, html[data-theme-ready] .edition-panel { transition: background-color .22s ease,color .22s ease,border-color .22s ease; }
}
/* Anchor narrow-screen panels to the header shell, not the swatch's right edge. */
@media (max-width:700px) {
  .edition-picker { position: static; }
  .edition-panel { top: calc(100% + 8px); }
}

/* Phase 1B: editorial polish; the Phase 1 state/interaction code stays unchanged. */
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; }
.header-pa-logo { display: block; width: 60px; height: 60px; object-fit: contain; flex: 0 0 auto; border-radius: 3px; border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--line)); box-shadow: 0 3px 16px color-mix(in srgb,var(--accent) 6%,transparent); }
.brand > .brand-wordmark { display: block; font: 600 9px/1.6 var(--sans); letter-spacing: .16em; }
.brand-wordmark > span { display: block; }
.brand-wordmark i { color: var(--accent); font-style: normal; margin-left: 3px; }
.site-header { background: linear-gradient(110deg,var(--bg),var(--surface)); }
.desktop-nav a { position: relative; }
.desktop-nav a:not(.nav-contact)::after { content: ''; position: absolute; bottom: 6px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.desktop-nav a:hover::after, .desktop-nav a[aria-current]::after { transform: scaleX(1); }
.edition-picker > summary { border-radius: 3px; border: 1px solid transparent; }
.edition-picker > summary:hover, .edition-picker[open] > summary { border-color: var(--line2); background: var(--accent-soft); }
.edition-panel { padding: 20px; background: linear-gradient(145deg,var(--surface2),var(--surface) 55%); border-color: var(--line2); box-shadow: var(--shadow),inset 0 1px 0 color-mix(in srgb,var(--text) 5%,transparent); }
.edition-panel legend { font-size: 10px; letter-spacing: .07em; }
.edition-chip { flex: 0 0 15px; box-shadow: inset 0 0 0 1px #ffffff15,0 2px 5px #0002; }
.edition-option { gap: 13px; border-radius: 2px; }
.edition-option:has(:checked) { box-shadow: inset 2px 0 0 var(--accent); }
.theme-home .signature-hero { background: radial-gradient(ellipse at var(--hero-x) var(--hero-y),var(--glow),transparent 61%),linear-gradient(var(--hero-angle),var(--bg) 35%,var(--hero-secondary) 100%); border-bottom: 1px solid var(--line); }
.material-reflection { opacity: var(--reflection-opacity); }
.material-grain { opacity: var(--grain-opacity); }
.theme-home .hero-overline { padding-top: 29px; }
.theme-home .hero-baseline { border-top-color: color-mix(in srgb,var(--line) 80%,var(--accent)); }
.theme-home .signature-copy em { text-shadow: 0 3px 24px var(--glow); }
.theme-home .signature-copy .button.primary { box-shadow: inset 0 1px 0 #ffffff26,0 6px 24px var(--glow); }
.theme-home .button.primary:hover { box-shadow: inset 0 1px 0 #ffffff26,0 9px 28px var(--glow); }
.theme-home .portfolio-logo-surface { background: radial-gradient(ellipse at var(--hero-x) var(--hero-y),var(--glow),transparent 70%),linear-gradient(var(--hero-angle),var(--surface2),var(--surface) 70%); box-shadow: inset 0 1px 0 color-mix(in srgb,var(--metal) 6%,transparent); }
.theme-home .entry-art-link:hover .portfolio-logo-surface { border-color: var(--line2); box-shadow: inset 0 1px 0 color-mix(in srgb,var(--metal) 13%,transparent),0 12px 32px color-mix(in srgb,var(--accent) 5%,transparent); }
.theme-home .services-section { background: linear-gradient(var(--hero-angle),var(--surface),var(--bg)); }
.theme-home .marketplace-note { background: linear-gradient(var(--hero-angle),var(--surface2),var(--surface)); }
.theme-home .closing-section { background: radial-gradient(ellipse at 50% 100%,var(--glow),transparent 65%),var(--bg); }
.theme-home .footer { background: linear-gradient(var(--hero-angle),var(--surface),var(--bg)); }
.theme-home .official-pa-logo { width: 160px; height: 160px; border-radius: 3px; border-color: color-mix(in srgb,var(--accent) 30%,var(--line)); box-shadow: 0 12px 35px color-mix(in srgb,var(--accent) 7%,transparent); }
@media (min-width:941px) and (max-width:1200px) {
  .brand { gap: 9px; }
  .header-pa-logo { width: 52px; height: 52px; }
  .brand > .brand-wordmark { font-size: 8px; letter-spacing: .12em; }
  .desktop-nav { gap: 12px; }
}
@media (max-width:940px) {
  .brand { gap: 10px; min-height: 52px; }
  .header-pa-logo { width: 48px; height: 48px; }
}
@media (max-width:700px) {
  .brand { gap: 8px; }
  .brand > .brand-wordmark { font-size: 8px; letter-spacing: .1em; }
  .theme-home .hero-overline { padding-top: 24px; }
}
@media (max-width:380px) {
  /* The complete approved lockup remains intact. Hide only the extra text identity. */
  .brand > .brand-wordmark { display: none; }
}
@media (prefers-reduced-motion:reduce) {
  .desktop-nav a::after { transition: none; }
}

/* Unapproved reconstructed candidates are explicitly opt-in on localhost only.
   The bootstrap sets this attribute before first paint; normal branding is unchanged. */
.brand > .brand-candidate, .footer-brand-candidate { display: none; }
html[data-brand-review] .brand { gap: 0; }
html[data-brand-review] .brand > .header-pa-logo,
html[data-brand-review] .brand > .brand-wordmark,
html[data-brand-review] .footer-intro > .official-pa-logo { display: none; }
html[data-brand-review] .brand > .brand-candidate { display: block; width: 208px; height: 55px; background: var(--brand-stacked) center / contain no-repeat; }
html[data-brand-review="inline"] .brand > .brand-candidate { width: 244px; height: 44px; background-image: var(--brand-inline); }
html[data-brand-review] .theme-home .footer-brand-candidate { display: block; width: 180px; height: 180px; margin-bottom: 22px; background: var(--brand-square) center / contain no-repeat; }
@media (min-width:941px) and (max-width:1200px) {
  html[data-brand-review] .brand > .brand-candidate { width: 158px; height: 43px; }
  html[data-brand-review="inline"] .brand > .brand-candidate { width: 184px; height: 34px; }
}
@media (max-width:940px) {
  html[data-brand-review] .brand > .brand-candidate { width: 178px; height: 47px; }
  html[data-brand-review="inline"] .brand > .brand-candidate { width: 206px; height: 37px; }
}
@media (max-width:700px) {
  html[data-brand-review] .brand > .brand-candidate,
  html[data-brand-review="inline"] .brand > .brand-candidate { width: 64px; height: 44px; background-image: var(--brand-symbol); }
}


/* Retain the approved Blue Dark header surface without the rejected opaque asset. */
html[data-edition="blue"][data-theme="dark"] .site-header { background: #030719; }
