/* Backgrounds and accents use the accepted catalog; text has three tones. */
/* Long and short pages reserve the same viewport space for a scrollbar. */
html { scrollbar-gutter: stable; }
:root { --appearance-duration: 300ms; --appearance-easing: ease-out; }
html[data-appearance-transitions="ready"] {
  transition-property: --paper, --ink, --work-title-color, --quiet, --rule,
    --accent, --accent-secondary, --theme-link, --theme-link-hover,
    --theme-focus, --theme-button-background, --theme-button-text;
  transition-duration: var(--appearance-duration);
  transition-timing-function: var(--appearance-easing);
}
@media (prefers-reduced-motion: reduce) {
  html[data-appearance-transitions="ready"] { transition: none; }
}
::selection { background: var(--ink); color: var(--paper); }
a:focus-visible { outline-color: var(--theme-focus, var(--ink)); }
.site-appearance button:focus-visible, .site-appearance input:focus-visible { outline-color: var(--theme-focus, var(--ink)); }
.work-link p { color: var(--quiet); }
.prose a, .project-actions a, .article-footer a, a.external-link { color: var(--theme-link, var(--ink)); }
.prose a:hover, .project-actions a:hover, .article-footer a:hover, a.external-link:hover { color: var(--theme-link-hover, var(--ink)); }
.work-title .all-items-link { transition-property: transform; }

.appearance-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.site-appearance {
  position: absolute; top: 0; left: 0; width: 100%; height: 280px;
  z-index: 5; pointer-events: none; overflow-x: clip; overflow-y: visible;
  /* Extend only the upper paint boundary; retain side and bottom clipping. */
  clip-path: inset(calc(0px - var(--overscroll-cord-clip,0px)) 0 0 0);
}
/* Measure the same region used by the reading grid; rem/zoom changes stay shared. */
.site-appearance-utility-region {
  position: absolute; top: 0; left: 0; width: 1px; height: var(--site-utilities-height);
  visibility: hidden; pointer-events: none;
}
.site-appearance-lamp { position: absolute; top: 0; pointer-events: none; }
.site-appearance-lamp .site-lamp-component { width: var(--lamp-canvas-width,220px); height: var(--lamp-canvas-height,280px); }
.site-appearance-lamp .site-environment-light { height: 100%; }
.site-appearance-palette { position: absolute; z-index: 2; pointer-events: auto; }
.site-appearance-mobile { display: none; height: var(--site-utilities-height); clip-path: none; }
.site-appearance-mobile-controls {
  position: absolute; top: calc(var(--utility-center) - 24px);
  right: max(0px, calc(var(--page-gutter) - 14px)); display: flex; pointer-events: auto;
}
.site-appearance-mobile button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 0;
  color: var(--ink); background: transparent; appearance: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.site-appearance-mobile button svg { display: block; width: 22px; height: 22px; flex: none; }
/* Match 1 CSS px strokes and painted diameter across different SVG viewBoxes. */
.site-appearance-mobile .site-appearance-mode svg { stroke-width: 1.090909; }
.site-appearance-mobile .appearance-mode-dark svg { width: 20px; height: 20px; stroke-width: 1.2; }
.site-appearance-mobile .site-appearance-color svg { width: 20px; height: 20px; }
.site-appearance-mobile button > span { display: inline-flex; }
.site-appearance-mobile .appearance-mode-dark { display: none; }
html[data-mode="dark"] .site-appearance-mobile .appearance-mode-light { display: none; }
html[data-mode="dark"] .site-appearance-mobile .appearance-mode-dark { display: inline-flex; }
.site-appearance-mobile button:focus-visible { outline: var(--focus-width) solid var(--theme-focus, var(--ink)); outline-offset: -4px; }
.site-appearance-mobile button:active svg { transform: scale(.92); }
@media (prefers-reduced-motion: no-preference) {
  .site-appearance-mobile button svg { transition: transform 120ms ease; }
}
@container site (width < 41rem) {
  .site-appearance-mobile { display: block; }
  .site-appearance-photographic, .appearance-lamp-pointer-hit, .appearance-hold-guide { display: none; }
}
/* Only the development fallback fixture opts into photographic phone controls. */
body[data-photographic-preview] .site-appearance-mobile { display: none; }
body[data-photographic-preview] .site-appearance-photographic { display: block; }
.site-palette-trigger[aria-busy="true"] .site-palette-art { opacity: .6; }
html[data-appearance-pointer]:not([data-appearance-pointer="touch"]) .site-appearance .site-lamp-hit { pointer-events: none; }
.appearance-lamp-pointer-hit { position: fixed; inset: 0; z-index: 6; pointer-events: none; cursor: pointer; }
.appearance-hold-guide[hidden] { display: none; }
.appearance-hold-guide {
  position: fixed; top: 0; height: var(--site-utilities-height); z-index: 7; pointer-events: none;
  border-inline: 1px dashed #b35a23; border-bottom: 1px dashed #b35a23; background: transparent;
}
.appearance-hold-guide[data-held="true"] { border-inline-style: solid; }
.appearance-hold-guide span {
  position: absolute; top: 8px; left: 4px; max-width: calc(100% - 8px);
  padding: 2px 4px; background: #fff8ed; color: #7a3d18;
  font: 10px/1.4 system-ui,sans-serif;
}
