/* Design page. Sits on example.css and the UI library (loaded through kit.css), and lays out the specimens. */
.dz-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.dz-counts > div { display: grid; padding: var(--sp-3) var(--sp-4); }
.dz-counts b { font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.02em; }
.dz-counts span { font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-cov { margin-top: var(--sp-4); padding: 0; }
.dz-cov td { vertical-align: top; }
.dz-cov td:first-child { width: 30%; }
.dz-cov td:last-child { width: 1%; white-space: nowrap; }
.dz-item { display: block; }
.dz-sec, .dz-why { display: block; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-cov code { font-size: 12px; overflow-wrap: anywhere; }
.dz-a { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.dz-a-t { min-width: 0; }
.dz-see { flex: none; display: inline-flex; align-items: center; min-height: var(--h-1); font-size: 12px; color: var(--leaf-text); text-underline-offset: 3px; }

.dz-spec { margin-top: var(--sp-6); scroll-margin-top: 72px; }
.dz-spec > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-3); }
.dz-spec > header h3 { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: var(--lh-2); font-weight: 500; }
.dz-ans { font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-note { margin: calc(-1 * var(--sp-1)) 0 var(--sp-3); max-width: 40em; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.dz-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.dz-state { min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.dz-state.wide { grid-column: span 2; }
.dz-state.full { grid-column: 1 / -1; }
.dz-cap { display: block; margin-bottom: var(--sp-3); font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-live { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.dz-live > * { max-width: 100%; }
.dz-state.wide .dz-live > :only-child { flex: 1 1 100%; }
.dz-stack { display: grid; gap: var(--sp-2); width: 100%; }
.dz-mid { width: 100%; max-width: 440px; }
.dz-wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; }
.dz-lab { display: inline-flex; align-items: center; gap: var(--sp-4); font-size: 13px; line-height: var(--lh-2); }
.dz-big { font-size: 28px; line-height: 36px; font-weight: 500; }
.dz-said { font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-skel { display: grid; gap: var(--sp-2); width: 100%; }
.dz-prog { display: flex; justify-content: space-between; width: 100%; font-size: 13px; line-height: var(--lh-2); }
.dz-tile { width: 100%; }
.dz-live .field { width: 100%; }
.dz-live .table-wrap { width: 100%; }

/* Depth (depth.js). The map sits on the page ground, as on the home page, with its frosted card over it. */
.dz-map { width: 100%; height: 420px; border-radius: 10px; background: var(--surface-2); }
.dz-map .gpanel.dz-gp { width: min(280px, calc(100% - 2 * var(--sp-3))); }
.dz-gp-t { margin: var(--sp-2) 0 var(--sp-1); font-size: 16px; line-height: var(--lh-3); font-weight: 500; }
.dz-gp-p { margin: 0 0 var(--sp-3); font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.dz-flat { list-style: none; width: 100%; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-2) var(--sp-5); }
.dz-flat li { display: grid; font-size: 13px; line-height: var(--lh-2); }
.dz-flat span { font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-orb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-6); padding: var(--sp-4); }
.dz-orbx { width: 72px; height: 72px; }
.dz-grain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); width: 100%; }
.dz-grain > div { display: grid; gap: var(--sp-2); }
.dz-grain i { display: block; height: 64px; border-radius: 6px; background: var(--text-primary); }
.dz-grain span { font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-tooth { width: 100%; max-width: 280px; height: auto; }
@media (max-width: 560px) {
  .dz-map { height: 360px; }
  .dz-map .gpanel.dz-gp { top: auto; bottom: var(--sp-3); left: var(--sp-3); width: auto; }
}

/* Generated views (jev.js). */
.dz-jev { display: grid; gap: var(--sp-4); width: 100%; min-width: 0; }
.dz-jev > .g-segmented { justify-self: start; max-width: 100%; }
.dz-jev-q { margin: 0; max-width: 40em; font-size: 15px; line-height: var(--lh-3); }
.dz-jev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.dz-jev-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--sp-3); font-size: 13px; line-height: var(--lh-2); }
.dz-jev-a > span { color: var(--text-secondary); }
.dz-jev-a b { font-weight: 500; white-space: nowrap; }
.dz-jev-a b .num { margin-left: var(--sp-1); color: var(--text-secondary); font-weight: 400; font-variant-numeric: tabular-nums; }
.dz-jev-a.off { opacity: .45; }
.dz-jev-n { margin: var(--sp-3) 0 0; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.dz-jev-t td { vertical-align: top; white-space: normal; }
.dz-jev-t code { font-size: 12px; overflow-wrap: anywhere; }

/* Held states: hover and focus shown still, so a screenshot shows them. Live hover and focus still work. */
.is-hover .btn-primary { background: var(--accent-fill-hover); }
.is-hover .btn-secondary { background: var(--fill-hover); border-color: var(--border-hover); }
.is-hover .btn-tertiary { background: var(--fill-hover); color: var(--text-primary); border-color: var(--border); }
.is-hover .btn-go { background: var(--go-fill-hover); }
.is-hover .btn-danger { background: var(--danger-fill-hover); }
.is-hover .ui-btn-warn, .is-hover .ui-btn-info { background: color-mix(in oklab, var(--_fill) 88%, var(--text-primary)); }
.is-hover .btn { transform: scale(1.02); }
.is-focus .btn:first-child, .is-focus .input, .is-focus .ui-disclose summary, .is-focus .g-segmented > label:has(:checked) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 720px) {
  .dz-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dz-states { grid-template-columns: minmax(0, 1fr); }
  .dz-state.wide { grid-column: auto; }
  .dz-cov thead { display: none; }
  .dz-a { display: grid; gap: 0; }
  .dz-see { min-height: var(--h-4); justify-self: start; }
  .dz-cov td:last-child { padding-top: var(--sp-1); }
  .dz-cov table, .dz-cov tbody, .dz-cov tr, .dz-cov td { display: block; width: auto !important; }
  .dz-cov tr { padding: var(--sp-2) 0; border-bottom: 1px solid var(--border-subtle); }
  .dz-cov td { height: auto; padding-top: 0; padding-bottom: var(--sp-1); border: 0; white-space: normal !important; }
}

/* The coverage table eases to its new height when the filter changes, and the new rows wipe in. */
.dz-cov { overflow-x: auto; overflow-y: hidden; transition: height var(--dur-sheet) var(--ease-out); }
.dz-cov tbody.reveal { --fx-reveal-ms: 360; }
@media (prefers-reduced-motion: reduce) { .dz-cov { transition: none; } }

/* Touch: every link, summary and label answers a 40px tap. The box grows outward only on the side that is short,
   so neighbours side by side do not steal each other's taps. The graph places its own labels and gives them their own
   tap layer (os/graph/graph.css), so the rule stays out of it: made relative, the map's labels fell under the canvas. */
@media (pointer: coarse), (max-width: 720px) {
  .ex :is(a, summary, label, button):not(.btn, .graph *) { position: relative; }
  .ex :is(a, summary, label, button):not(.btn, .graph *)::before { content: ""; position: absolute; inset: min(0px, calc((100% - 40px) / 2)); }
}

/* The page is drawn by script: hold a screen of room so nothing below it moves when it lands. */
#dz, #kit { min-height: 100vh; }
/* In-page links ease there and stop with the heading clear of the header. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.ex-sec, .ex-sec[id], .dz-spec, [id] { scroll-margin-top: 72px; }
@media (pointer: coarse), (max-width: 720px) { .ex .ex-toc { row-gap: 2px; } .ex .ex-toc a { min-height: 40px; } }
@media (pointer: coarse), (max-width: 720px) { .ex .g-segmented > label { min-width: 44px; justify-content: center; } }
@media (pointer: coarse), (max-width: 720px) { .ex .top a.mark { display: inline-flex; align-items: center; min-height: 40px; } .ex footer a { display: inline-flex; align-items: center; min-height: 40px; } .ex .ex-hero-ctl .g-segmented { height: auto; } .ex .ex-hero-ctl .g-segmented > label { min-height: 40px; } .ex :is(input.input, input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"]) { min-height: 40px; } .ex .ui-field > label.label { min-height: 40px; display: flex; align-items: center; } }

/* Studio's stage (stage.js): only the part being shown, on the page ground, with room around it. */
html.gs-stage body > :not(#gs-stage) { display: none !important; }
html.gs-stage body { margin: 0; padding: 24px; min-height: 0; background: var(--bg); }
#gs-stage { display: flow-root; }
