/* SignScribe additions to the shared product site system: the sign.js stage, picker and live library. */
.brand img { height: 32px; width: auto; display: block; }
.sign-head { position: relative; }
.sign-head .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sign-stage { background:
  radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--surface-2) 70%, transparent) 0%, transparent 70%), var(--bg-deep); }
.sign-select { width: 100%; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.sign-select:focus { outline: none; border-color: var(--text); }
.compose-json { width: 100%; min-height: 300px; resize: vertical; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; tab-size: 2; }
.compose-json:focus { outline: none; border-color: var(--text); }
.compose-error { min-height: 1.3em; margin: 2px 0 6px; font-size: 0.85rem; color: #e5484d; }
.sign-filters { margin-bottom: 22px; max-width: 100%; }
.sign-filters button { flex: 0 1 auto; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.sign-card { display: flex; flex-direction: column; gap: 0; padding: 0; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.25s; }
.sign-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sign-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sign-card[hidden] { display: none; }
.sign-tile { position: relative; display: block; aspect-ratio: 1; background: var(--bg-deep); border-bottom: 1px solid var(--border); }
.sign-meta { display: grid; gap: 2px; padding: 12px 14px 14px; }
.sign-code { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; color: var(--soft); font-variant-numeric: tabular-nums; }
.sign-name { font-size: 0.92rem; font-weight: 600; letter-spacing: -0.01em; }
.sign-motion { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 560px) { .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.sign-hero { position: relative; padding-bottom: 0; }
.sign-hero-copy { position: relative; z-index: 1; }
.sign-hero-stage { position: relative; height: clamp(260px, 30vw, 380px); margin-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-deep); }
.sign-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sign-card.wide { grid-column: span 2; }
.sign-card.wide .sign-tile { aspect-ratio: 2.1; }
@media (max-width: 560px) { .sign-card.wide { grid-column: span 2; } }
.lab-seg button:disabled { opacity: 0.35; cursor: not-allowed; }

/* home */
.home-hero .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.home-sign { position: relative; width: 100%; }
.home-sign.hero-sign { aspect-ratio: 16 / 10; }
.home-sign-frame { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-deep); padding: clamp(16px, 2.5vw, 28px); }
.home-sign-frame .home-sign { aspect-ratio: 16 / 10; }
.home-kickers > div { display: grid; gap: 8px; padding: 24px 26px; border-right: 1px solid var(--border); }
.home-kickers > div:last-child { border-right: 0; }
.home-kickers strong { font-size: 1.05rem; letter-spacing: -0.01em; }
.home-kickers span { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 900px) {
  .home-hero .hero-grid { grid-template-columns: 1fr; }
  .home-kickers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-kickers > div:nth-child(2) { border-right: 0; }
  .home-kickers > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 520px) { .home-kickers { grid-template-columns: 1fr; } .home-kickers > div { border-right: 0; border-bottom: 1px solid var(--border); } }

/* sign.js lab: stage, settings panel and code view. Fields use the site control height. */
.lab-lab { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: stretch; }
@media (max-width: 1080px) { .lab-lab { grid-template-columns: 1fr; } }
.lab-stage-wrap { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-deep); overflow: hidden; box-shadow: var(--shadow-sm); }
.lab-stage { position: relative; flex: 1 1 auto; min-height: 520px; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
@media (max-width: 1080px) { .lab-stage { flex: none; min-height: 0; aspect-ratio: 16 / 10; } }
@media (max-width: 680px) { .lab-stage { aspect-ratio: 4 / 5; } }
.lab-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lab-hint { color: var(--soft); }
.lab-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 22px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.lab-group { display: grid; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.lab-group h3 { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lab-ctl { display: grid; gap: 8px; }
.lab-ctl label, .lab-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.86rem; font-weight: 560; color: var(--text); }
.lab-ctl output { font-size: 0.8rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.lab-ctl input[type="text"] { width: 100%; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; height: var(--control-sm); padding: 0 12px; }
.lab-ctl input[type="text"]:focus { outline: none; border-color: var(--green-hi); }
.lab-ctl input[aria-invalid="true"] { border-color: var(--over); }
.lab-note { font-size: 0.76rem; color: var(--soft); }
.lab-ctl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.lab-ctl input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--border-strong); }
.lab-ctl input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--border-strong); }
.lab-ctl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.lab-ctl input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.lab-ctl input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.lab-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.lab-seg button { flex: 1 1 auto; font: inherit; font-size: 0.8rem; font-weight: 560; color: var(--muted); background: transparent; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.lab-seg button:hover { color: var(--text); }
.lab-seg button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); }
.lab-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.lab-toggle { display: flex; align-items: center; gap: 12px; font-size: 0.86rem; font-weight: 560; cursor: pointer; }
.lab-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lab-toggle .track { position: relative; width: 36px; height: 20px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background 0.2s; flex: none; }
.lab-toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.25s var(--ease), background 0.2s; }
.lab-toggle input:checked + .track { background: var(--primary); }
.lab-toggle input:checked + .track::after { transform: translateX(16px); background: var(--on-primary); }
.lab-toggle input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }
.lab-actions { display: flex; gap: 10px; padding-top: 18px; }
.lab-actions .button { flex: 1; justify-content: center; }
.lab-code { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.lab-code-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.lab-code-head h3 { font-size: 1.05rem; margin-bottom: 4px; }
.lab-code-head p { font-size: 0.86rem; }
.lab-code pre { margin: 0; border: 0; border-radius: 0; max-height: 360px; }
.lab-start > div h3 { margin-bottom: 6px; }
.lab-options td { vertical-align: top; }
.lab-options td:first-child { white-space: nowrap; }
.lab-options td:nth-child(2) { white-space: nowrap; color: var(--muted); }
.lab-mini { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.lab-mini-field { position: absolute; inset: 0; }
.lab-mini-card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; pointer-events: none; background: radial-gradient(closest-side at 50% 50%, color-mix(in srgb, var(--bg-deep) 82%, transparent) 0%, color-mix(in srgb, var(--bg-deep) 55%, transparent) 45%, transparent 100%); }
.lab-mini-card img { width: 150px; height: auto; }
.lab-mini-phase { font-size: 0.86rem; color: var(--muted); }
.lab-mini figcaption, .lab-mini > figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px; font-size: 0.78rem; color: var(--soft); }
.lab-spinner { width: 26px; height: 26px; border-radius: 50%; border: 1.7px solid var(--border-strong); border-top-color: var(--text); animation: lab-spin 1.1s linear infinite; }
@keyframes lab-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lab-spinner { animation: none; } }
.lab-mini-card .on-dark { display: var(--wordmark-light); }
.lab-mini-card .on-light { display: var(--wordmark-dark); }
.lab-start > div, .lab-lab > *, .lab-code { min-width: 0; }
.lab-download { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .lab-download p { max-width: 56ch; font-size: 0.9rem; }
.lab-panel select, .lab-panel input { max-width: 100%; box-sizing: border-box; }
.lab-ctl input[type="search"] { width: 100%; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; height: var(--control-sm); padding: 0 12px; }
.lab-ctl input[type="search"]:focus { outline: none; border-color: var(--green-hi); }
#create-sign { width: 100%; min-height: 176px; font: inherit; font-size: 0.86rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.create-colours { display: flex; flex-wrap: wrap; gap: 10px; }
.create-swatch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.create-swatch input[type="color"] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }
.lab-lab > .lab-panel { min-width: 0; }
