.site-header { position: relative; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 10px; padding-block: 25px; }
.brand { display: block; flex-shrink: 0; }
.brand > span { display: block; font-family: var(--serif); font-size: 31px; line-height: 1.2; letter-spacing: -1.7px; }
.brand-dot { color: var(--accent-ink); }
.brand small { display: block; font-size: 10px; line-height: 1.5; margin-top: 6px; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 13px; flex-basis: 100%; }
.site-header nav a { display: flex; align-items: center; min-height: 44px; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--accent-ink); }
.header-cta { display: none; }
.menu-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; background: transparent; border: 1px solid var(--line); border-radius: 24px; font-size: 13px; }
.menu-icon { width: 18px; height: 8px; border-block: 1px solid currentColor; transition: transform 180ms ease; }
.menu-toggle[aria-expanded=true] .menu-icon { transform: rotate(45deg); }
/* Theme switcher: a swatch of the active palette and a short list of named solutions. */
.theme-switcher { position: relative; margin-left: auto; }
.theme-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 6px; background: transparent; border: 1px solid var(--line); border-radius: 24px; font-size: 13px; }
.theme-toggle:hover, .theme-toggle[aria-expanded=true] { border-color: var(--ink); }
.theme-swatch { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--deep) 0 50%, var(--accent) 0 75%, var(--paper) 0); box-shadow: inset 0 0 0 1px var(--line); transition: transform 240ms ease; }
.theme-toggle:hover .theme-swatch { transform: rotate(90deg); }
.theme-toggle-label { display: none; }
.theme-panel { position: absolute; top: calc(100% + 10px); right: 0; width: min(272px, calc(100vw - 32px)); display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 50px var(--shadow); }
.theme-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 12px; }
.theme-panel-title { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.theme-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
.theme-close:hover { background: var(--stone); }
.theme-option { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 12px; background: transparent; border: 0; border-radius: 16px; text-align: left; font-size: 15px; font-weight: 600; line-height: 1.3; }
.theme-option small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.theme-option:hover { background: var(--stone); }
.theme-option[aria-pressed=true] { background: var(--stone); }
.theme-option[aria-pressed=true]::after { content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--accent-ink); }
.theme-chip { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.section-heading { display: grid; gap: 20px; margin-bottom: 38px; }
.section-heading > p { color: var(--muted); max-width: 360px; }
.site-footer { padding-block: 44px 24px; }
.site-footer .small { margin-top: 20px; max-width: 440px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 14px; }
.site-footer nav a { display: flex; align-items: center; min-height: 44px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; font-size: 12px; color: var(--muted); }
.footer-bottom > p:last-child { max-width: 520px; }
.footer-bottom a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
/* Phone: the palettes open as a bottom sheet of four sample cards, within thumb reach. */
@media (max-width: 599px) {
  .theme-panel { position: fixed; top: auto; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 12px; border-radius: 28px; box-shadow: 0 -12px 60px var(--shadow); }
  .theme-panel-head { grid-column: 1 / -1; }
  .theme-option { position: relative; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 0; padding: 14px; border: 1px solid var(--line); border-radius: 20px; }
  .theme-option[aria-pressed=true] { border-color: var(--ink); }
  .theme-option[aria-pressed=true]::after { position: absolute; top: 16px; right: 16px; }
  .theme-chip { width: 40px; height: 40px; flex-basis: 40px; }
}
@media (min-width: 768px) {
  .section-heading { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 48px; margin-bottom: 44px; }
  .section-heading > p { justify-self: end; padding-bottom: 4px; }
  .site-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .site-footer nav { align-self: start; justify-content: flex-end; margin: 0; }
  .footer-bottom { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .site-header { flex-wrap: nowrap; gap: 28px; padding-block: 28px; }
  .site-header nav { order: 1; flex-basis: auto; gap: 22px; margin-inline: auto; }
  .theme-switcher { order: 2; margin-left: 0; }
  .theme-toggle { padding-right: 16px; }
  .theme-toggle-label { display: inline; }
  .site-header .mobile-contact { display: none; }
  .header-cta { order: 3; margin-left: -14px; display: flex; align-items: center; gap: 22px; min-height: 46px; padding: 10px 18px; background: var(--accent); color: var(--on-accent); border-radius: 30px; font-size: 13px; }
  .header-cta:hover { background: var(--accent-hover); }
  .menu-toggle { display: none; }
}
@media (max-width: 399px) {
  .brand > span { font-size: 27px; }
  .brand small { font-size: 9px; }
  .site-header { gap: 12px; }
}
