/* Public-reference measurements and app-header adaptation: reference/README.md. */
:root {
  --ink: #141414;
  --muted: #707070;
  --line: #e9e9e9;
  --surface: #f5f5f5;
  --chip: rgba(64, 64, 64, .08);
  --focus: #4169df;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .3; cursor: default; }
button, a, select, input, summary { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--focus); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; padding: 12px 20px; background: var(--ink); color: #fff; z-index: 10; border-radius: 12px; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 88px; padding: 0 32px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 29px; font-weight: 750; letter-spacing: -1.6px; line-height: 1; }
.header-divider { height: 20px; width: 1px; background: #dedede; }
.site-label { font-weight: 500; color: var(--muted); }
.quiet-link { color: var(--muted); font-size: 13px; }
.quiet-link:hover { color: var(--ink); }
.provenance-link { margin-left: auto; }
.provenance-link span { margin-left: 8px; }
.page { max-width: 1440px; padding: 0 32px; margin: 0 auto; }
.app-header { padding: 48px 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.app-identity { display: flex; align-items: center; gap: 24px; min-width: 0; }
.app-icon { width: 88px; height: 88px; flex-shrink: 0; overflow: hidden; border-radius: 22px; background: #0b75ff; }
.app-icon img { width: 100%; height: 100%; transform: translateY(-.78125%) scale(1.08); }
.app-name-row { display: flex; align-items: center; gap: 14px; }
h1 { font-size: 38px; line-height: 1.2; letter-spacing: -1.4px; font-weight: 650; }
.platform-label { font-size: 12px; line-height: 20px; color: var(--muted); background: var(--surface); padding: 1px 8px; border-radius: 6px; }
.app-description { margin-top: 7px; font-size: 16px; }
.app-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.capture-stamp { text-align: right; color: var(--muted); font-size: 12px; }
.capture-stamp strong { display: block; color: var(--ink); font-size: 13px; font-weight: 500; margin-top: 4px; }
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); }
.tab { position: relative; display: flex; align-items: center; gap: 8px; padding: 15px 0 19px; font-size: 16px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; height: 2px; position: absolute; background: var(--ink); left: 0; right: 0; bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab-count { font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 6px; border-radius: 5px; background: var(--surface); color: var(--muted); }
.tab[aria-selected="true"] .tab-count { background: #ebebeb; color: var(--ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; }
.filter-group { display: flex; gap: 10px; }
.select-wrap { display: flex; align-items: center; position: relative; height: 42px; }
.select-wrap > .icon { position: absolute; left: 14px; width: 18px; height: 18px; pointer-events: none; }
.select-wrap select { appearance: none; height: 100%; width: 154px; padding: 0 34px 0 40px; background: #fff; border: 1px solid #dedede; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; }
.select-wrap select:hover { background: #fafafa; border-color: #c2c2c2; }
.select-wrap select.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.select-wrap:has(.is-active) { color: #fff; }
.chevron { pointer-events: none; position: absolute; right: 13px; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.search-wrap { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid transparent; border-radius: 999px; width: 320px; height: 44px; padding: 0 16px; color: var(--muted); }
.search-wrap:focus-within { border-color: #b6b6b6; background: #fff; }
.search-wrap input { outline: 0; min-width: 0; width: 100%; border: 0; background: transparent; font-size: 13px; height: 100%; }
.search-wrap input::placeholder { color: #797979; }
kbd { font-family: inherit; border: 1px solid #ddd; border-radius: 4px; min-width: 20px; text-align: center; font-size: 11px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 12px; font-size: 12px; color: var(--muted); }
.text-button { text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.screen-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; margin: 0; padding: 0; list-style: none; align-items: start; }
.screen-card { min-width: 0; }
.screen-open { display: block; width: 100%; text-align: left; border-radius: 12.22% / 5.65%; position: relative; cursor: zoom-in; }
.screen-image { display: block; width: 100%; position: relative; overflow: hidden; border-radius: 12.22% / 5.65%; background: var(--surface); }
.screen-image::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(0,0,0,.07); pointer-events: none; }
.screen-image img { width: 100%; height: auto; }
.screen-open::after { content: "↗"; display: grid; place-items: center; position: absolute; width: 36px; height: 36px; right: 12px; bottom: 14px; color: var(--ink); background: rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 2px 10px #0001; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.screen-open:hover::after, .screen-open:focus-visible::after { opacity: 1; transform: translateY(0); }
[data-device="ipad"] .screen-image { border-radius: 5.65%; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; max-width: 100%; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .2px; background: var(--chip); text-align: left; overflow-wrap: anywhere; }
button.chip:hover { background: #dedede; }
.card-title { display: flex; align-items: baseline; gap: 8px; width: 100%; margin-top: 9px; text-align: left; font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; }
.empty-state { text-align: center; padding: 90px 24px 110px; background: #fafafa; border-radius: 24px; }
.empty-symbol { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; background: #eee; display: grid; place-items: center; color: var(--muted); font-size: 24px; }
.empty-state h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto; }
.empty-state button { margin-top: 20px; }
.pill-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 17px; border: 1px solid #ddd; border-radius: 999px; font-size: 13px; font-weight: 500; background: #fff; }
.pill-button:hover { background: #f1f1f1; }
.pill-button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-button.primary:hover { background: #333; }
.loading-state { min-height: 320px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.loading-dot { width: 8px; height: 8px; background: #aaa; border-radius: 50%; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .3; } }
.element-group + .element-group { margin-top: 48px; }
.group-heading { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.group-heading span { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.element-preview { min-height: 200px; height: 240px; padding: 24px; display: flex; align-items: center; justify-content: center; border-radius: 24px; background: var(--surface); overflow: hidden; }
.element-preview img { max-height: 100%; width: auto; object-fit: contain; border-radius: 8px; }
.element-open { border-radius: 24px; }
.flow-list { display: grid; gap: 56px; }
.flow-card { min-width: 0; border-radius: 32px; }
.flow-strip-wrap { position: relative; border-radius: 32px; }
.flow-strip { display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 0 0 12px; margin: 0; list-style: none; scrollbar-width: thin; scrollbar-color: #d8d8d8 transparent; }
.flow-step { flex: 0 0 256px; min-width: 0; scroll-snap-align: start; }
.flow-step[data-device="ipad"] { flex-basis: 360px; }
.step-caption { margin-top: 10px; font-size: 12px; display: flex; gap: 8px; color: var(--muted); }
.step-number { color: #939393; font-variant-numeric: tabular-nums; }
.strip-next { position: absolute; right: 12px; top: 45%; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.94); box-shadow: 0 2px 12px #0002; }
.flow-caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 14px; }
.flow-title { font-size: 20px; font-weight: 600; line-height: 26px; letter-spacing: -.4px; text-align: left; }
.flow-title .on { font-weight: 440; color: var(--muted); margin: 0 4px; }
.flow-app-icon { display: inline-block; width: 26px; height: 26px; vertical-align: -6px; margin: 0 7px 0 3px; border-radius: 7px; background: #0b75ff; }
button.flow-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.flow-meta { font-size: 12px; color: var(--muted); margin-top: 7px; }
.flow-caption .card-tags { margin-top: 10px; }
.flow-unavailable { min-height: 200px; display: grid; place-items: center; padding: 28px; border-radius: 32px; background: var(--surface); color: var(--muted); text-align: center; }
.gallery-footer { margin-top: 80px; padding: 24px 0 36px; border-top: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); font-weight: 650; white-space: nowrap; }
.footer-brand span { color: var(--muted); font-weight: 400; margin-left: 12px; }
.gallery-footer details { max-width: 680px; text-align: right; }
summary { cursor: pointer; }
#missing-count:not(:empty) { margin-left: 4px; }
.provenance-body { padding-top: 18px; text-align: left; overflow-wrap: anywhere; }
.provenance-body dl { display: grid; grid-template-columns: 110px 1fr; gap: 7px 16px; margin: 0 0 18px; }
.provenance-body dt { color: var(--muted); }
.provenance-body dd { margin: 0; color: var(--ink); white-space: pre-wrap; }
.provenance-body h3 { font-size: 12px; font-weight: 600; color: var(--ink); margin: 16px 0 8px; }
.provenance-body ul { padding-left: 17px; margin: 0; }
.provenance-body li + li { margin-top: 6px; }
.viewer { width: calc(100% - 48px); max-width: 1376px; height: calc(100dvh - 48px); max-height: none; padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: #fff; overflow: hidden; }
.viewer::backdrop { background: rgba(18,18,18,.52); backdrop-filter: blur(6px); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.viewer-heading { min-width: 0; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.viewer-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; overflow-wrap: anywhere; }
.viewer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.viewer-position { font-size: 12px; color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #e4e4e4; border-radius: 50%; background: #fff; }
.icon-button:hover:not(:disabled) { background: #f1f1f1; }
.close-button { margin-left: 8px; background: var(--surface); border-color: transparent; }
.viewer-body { overflow: auto; flex: 1; min-height: 0; }
.screen-detail { display: grid; grid-template-columns: minmax(0,1fr) 280px; min-height: 100%; }
.viewer-stage { min-width: 0; background: #f7f7f7; padding: 28px; display: flex; align-items: center; justify-content: center; }
.viewer-stage .screen-image { width: auto; max-width: 100%; }
.viewer-stage img { width: auto; height: auto; max-height: calc(100dvh - 220px); object-fit: contain; }
.viewer-stage .element-preview { background: transparent; height: auto; padding: 0; }
.viewer-sidebar { padding: 28px 24px; }
.viewer-sidebar h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 24px 0 10px; }
.viewer-sidebar h3:first-child { margin-top: 0; }
.viewer-sidebar p { font-size: 13px; overflow-wrap: anywhere; }
.viewer-sidebar .card-tags { margin-top: 0; }
.viewer-sidebar .pill-button { margin-top: 24px; }
.related-flow { display: block; text-align: left; margin: 10px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.flow-detail { padding: 28px; }
.flow-detail-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 20px; }
.flow-detail-heading h3 { font-size: 16px; font-weight: 600; }
.flow-detail .flow-strip { padding-bottom: 18px; }
.flow-notes { color: var(--muted); font-size: 13px; margin: 20px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.video-section { margin: 0 0 32px; background: #f5f5f5; padding: 24px; border-radius: 32px; }
.video-section video { max-height: 540px; width: auto; max-width: 100%; margin: 0 auto; border-radius: 20px; background: #eee; }
.video-controls { display: flex; align-items: center; gap: 14px; max-width: 640px; margin: 20px auto 0; }
.video-controls input { min-width: 40px; flex: 1; accent-color: var(--ink); }
.silent-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.media-unavailable { display: grid; place-items: center; min-height: 160px; padding: 24px; background: var(--surface); color: var(--muted); text-align: center; font-size: 13px; }
@media (min-width: 1441px) { .site-header { padding-inline: max(32px, calc((100% - 1376px) / 2)); } }
@media (max-width: 1279px) { .screen-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1023px) {
  .screen-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .screen-detail { grid-template-columns: minmax(0,1fr) 240px; }
}
@media (max-width: 759px) {
  .site-header { min-height: 72px; padding: 0 20px; gap: 16px; }
  .wordmark { font-size: 26px; }
  .provenance-link { font-size: 0; }
  .provenance-link span { font-size: 20px; }
  .page { padding: 0 20px; }
  .app-header { padding: 32px 0 28px; }
  .app-identity { gap: 16px; }
  .app-icon { width: 68px; height: 68px; border-radius: 18px; }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .app-description { font-size: 13px; margin-top: 5px; }
  .app-meta { font-size: 11px; }
  .capture-stamp { display: none; }
  .tabs { gap: 24px; }
  .tab { font-size: 14px; gap: 6px; padding: 14px 0 16px; }
  .tab-count { font-size: 11px; padding: 0 5px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 14px; padding-top: 24px; }
  .filter-group { gap: 8px; }
  .select-wrap select { width: 148px; }
  .search-wrap { width: 100%; }
  .search-wrap kbd { display: none; }
  .results-bar { min-height: 54px; }
  .screen-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px 12px; }
  .card-tags { margin-top: 10px; }
  .card-title { font-size: 13px; }
  .card-subtitle { font-size: 11px; }
  .flow-list { gap: 40px; }
  .flow-strip { gap: 12px; }
  .flow-step { flex-basis: 220px; }
  .flow-step[data-device="ipad"] { flex-basis: 290px; }
  .flow-caption { flex-wrap: wrap; gap: 14px; }
  .flow-title { font-size: 20px; }
  .element-preview { height: 190px; min-height: 0; padding: 16px; border-radius: 20px; }
  .gallery-footer { margin-top: 56px; flex-direction: column; gap: 18px; }
  .gallery-footer details { text-align: left; width: 100%; }
  .viewer { width: 100%; height: 100dvh; max-width: 100%; margin: 0; border-radius: 0; }
  .viewer-header { padding: 16px; gap: 10px; }
  .viewer-heading h2 { font-size: 16px; }
  .viewer-actions { gap: 4px; }
  .viewer-position { display: none; }
  .icon-button { width: 36px; height: 36px; }
  .close-button { margin-left: 2px; }
  .screen-detail { display: block; }
  .viewer-stage { padding: 24px; }
  .viewer-stage img { max-height: 65dvh; }
  .viewer-sidebar { padding: 24px; }
  .flow-detail { padding: 24px 16px; }
  .video-section { padding: 16px; }
  .video-section video { max-height: 55dvh; }
  .video-controls { flex-wrap: wrap; gap: 10px; }
  .silent-label { width: 100%; text-align: center; }
}
@media (max-width: 359px) {
  .page { padding-inline: 16px; }
  .tabs { gap: 17px; }
  .tab { font-size: 13px; }
  .select-wrap select { width: 140px; }
  .app-description { font-size: 12px; }
  .screen-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
