/* GENERATED by scripts/site/build.mjs from scripts/site/typeLab.css - edit that, not this file. */
/* fx2-art-type-fx: the live labs of the «Type effects, hands-on» articles (scripts/site/typeLab.mjs). Loaded by those
 * eight pages only. The stage is artwork (its colours are the look's own, the same in light and dark); the controls are
 * the site's: Inter/Google Sans 11/16, 24 px chips and fields (32 on a phone), the accent for what is on, an 8 px grid. */
.lab { display: grid; gap: 12px; margin: 0; padding: 0; text-align: left; }
.lab-stage { position: relative; overflow: hidden; aspect-ratio: 5 / 4; border-radius: 13px; background: #14112b; box-shadow: 0 0 0 1px var(--line); touch-action: pan-y; }
.lab-k-envelope .lab-stage { touch-action: none; background: #efe9dc; }
.lab-k-print .lab-stage { background: #f4eee2; }
.lab-k-glitch .lab-stage { background: #0a0a12; }
.lab-k-circle .lab-stage { background: #f6ead7; }
.lab-k-motion .lab-stage { background: #111; }
.lab-canvas, .lab-svg, .lab-still { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.lab-still { object-fit: cover; }
.lab-off .lab-stage::after { content: ''; position: absolute; inset: 0; background: var(--paper-2); }

/* the circle: an SVG, the type in the site's face at its heaviest */
.lab-svg text { fill: #1f3fbf; font-family: 'Fixel Display', var(--ui-face, Inter), system-ui, sans-serif; font-weight: 900; letter-spacing: 0.04em; }
.lab-svg .lab-guide { fill: none; stroke: rgba(31, 63, 191, 0.18); stroke-width: 1; stroke-dasharray: 3 4; }
.lab-svg.spin { animation: lab-spin 18s linear infinite; transform-origin: 50% 50%; }
@keyframes lab-spin { to { transform: rotate(360deg); } }

/* the motion: the word's letters, animated by the script (the Web Animations API) */
.lab-motion { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, #3a1d7a 0%, #120a26 60%, #07040f 100%); color: #fff; container-type: inline-size; }
.lab-motion .lab-line { display: inline-flex; flex-wrap: nowrap; align-items: baseline; max-width: 92%; overflow: visible; font-family: 'Fixel Display', var(--ui-face, Inter), system-ui, sans-serif; font-weight: 900; font-size: 15cqw; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.lab-motion .lab-line.long { font-size: 11.5cqw; }
.lab-motion .lab-line.xlong { font-size: 8cqw; }
.lab-motion .ch { display: inline-block; transform-origin: 50% 100%; will-change: transform, opacity; }
.lab-motion .ch.sp { width: 0.28em; }
.lab-motion .caret { display: inline-block; width: 0.08em; height: 0.9em; margin-left: 0.04em; background: #ff5ad1; animation: lab-blink 0.9s steps(1) infinite; }
@keyframes lab-blink { 50% { opacity: 0; } }
.lab-motion.m-ticker .lab-line { max-width: none; justify-self: start; overflow: visible; }
.lab-motion.m-ticker .lab-track { display: inline-flex; white-space: nowrap; }
.lab-motion.m-ticker .lab-track span { padding-right: 0.2em; }
.lab-motion.m-wave .lab-line, .lab-motion.m-jelly .lab-line { color: #ffd23f; }
.lab-motion.m-pop .lab-line { color: #ff7ac8; }
.lab-motion.m-type .lab-line { font-family: 'Fixel Display', var(--ui-face, Inter), system-ui, sans-serif; color: #7cf2c8; }

/* the envelope's handles, placed by the script (--x, --y) */
.lab-handle { position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 24px; height: 24px; margin: -12px 0 0 -12px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: grab; touch-action: none; }
.lab-handle::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 1px 3px rgba(0, 0, 0, 0.3); }
.lab-handle:active { cursor: grabbing; }
.lab-handle:focus-visible { outline: none; }
.lab-handle:focus-visible::before { box-shadow: 0 0 0 2px var(--brand), 0 0 0 4px var(--brand-tint); }

/* the controls */
.lab-ctl { display: grid; gap: 8px; }
.lab-word { display: grid; gap: 4px; margin: 0; }
.lab-word span, .lab-range span { font-size: 11px; line-height: 16px; font-weight: 550; color: var(--ink); }
.lab-word input { box-sizing: border-box; width: 100%; height: 32px; margin: 0; padding: 0 8px; border: 1px solid transparent; border-radius: 5px; background: var(--paper-2); color: var(--ink); font: 450 13px/22px var(--ui-face, Inter), system-ui, sans-serif; }
.lab-word input::placeholder { color: var(--ink-3); }
.lab-word input:hover { border-color: var(--line); }
.lab-word input:focus { outline: none; border-color: var(--brand-ring); box-shadow: inset 0 0 0 1px var(--brand-ring); }
.lab-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lab-chip, .lab-toggle { display: inline-flex; align-items: center; height: 24px; margin: 0; padding: 0 8px; border: 0; border-radius: 5px; background: var(--paper-2); color: var(--ink); font: 550 11px/16px var(--ui-face, Inter), system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.lab-chip:hover, .lab-toggle:hover { box-shadow: inset 0 0 0 1px var(--line); }
.lab-chip[aria-pressed='true'], .lab-toggle[aria-pressed='true'] { background: var(--brand-tint); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ring); }
.lab-chip:focus-visible, .lab-toggle:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 1px; }
.lab-toggle[hidden] { display: none; }
.lab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lab-range { display: grid; grid-template-columns: auto minmax(96px, 1fr) 28px; align-items: center; gap: 8px; flex: 1 1 200px; margin: 0; }
.lab-range input { width: 100%; margin: 0; accent-color: var(--brand); }
.lab-range output { color: var(--ink-3); font: 450 11px/16px var(--ui-face, Inter), system-ui, sans-serif; font-variant-numeric: tabular-nums; text-align: right; }
.lab-hint { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.lab-go { margin: 4px 0 0; }
.lab-go .btn { max-width: 100%; white-space: normal; text-align: left; }

/* the article's own parts around the lab */
.tfx-answer { margin: 0 0 32px; padding: 16px 16px 16px 20px; border-left: 3px solid var(--brand); border-radius: 0 5px 5px 0; background: var(--paper-2); }
.tfx-answer h2 { margin: 0 0 4px; font-size: 13px; line-height: 22px; }
.tfx-answer p { margin: 0; }
.tfx-lab-note { margin: 8px 0 0; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.tfx-series { margin: 32px 0; padding: 16px; border-radius: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.tfx-series h2 { margin: 0 0 8px; font-size: 13px; line-height: 22px; }
.tfx-series ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; counter-reset: tfx; }
.tfx-series li { counter-increment: tfx; margin: 0; font-size: 11px; line-height: 16px; }
.tfx-series li::before { content: counter(tfx, decimal-leading-zero) ' '; color: var(--ink-3); font-family: ui-monospace, Menlo, Consolas, monospace; }
.tfx-series li[aria-current='page'] { font-weight: 550; }
.tfx-shot { margin: 16px 0 0; }
.tfx-shot img { display: block; width: 100%; height: auto; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.tfx-shot figcaption { margin: 8px 0 0; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.tfx-ex figcaption a { color: inherit; }

/* the hero: the lab takes the poster's place — on the hero's grey band its fields and chips are white, so they show */
.a-hero-art.tfx-art { align-self: start; }
.a-hero-art.tfx-art .lab-go a.btn { display: inline-flex; align-items: center; width: auto; min-height: 24px; height: auto; padding: 4px 8px; border-radius: 5px; }
.a-hero .lab-word input, .a-hero .lab-chip, .a-hero .lab-toggle { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.a-hero .lab-chip[aria-pressed='true'], .a-hero .lab-toggle[aria-pressed='true'] { background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-ring); }
.a-hero .lab-stage { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 24px 56px -12px rgba(0, 0, 0, 0.35); }
.a-hero-art.tfx-art figcaption { margin-top: 8px; }

@media (max-width: 760px) {
  /* a phone's own sizes: 32 px to tap, 16 px in the field so the browser does not zoom into it */
  .lab-word input { height: 40px; font-size: 16px; }
  .lab-chip, .lab-toggle { height: 32px; padding: 0 12px; }
  .lab-range { grid-template-columns: auto minmax(80px, 1fr) 28px; flex-basis: 100%; }
  .lab-range input { height: 32px; }
  .tfx-series ol { grid-template-columns: minmax(0, 1fr); }
  .lab-handle { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .lab-handle::before { inset: 12px; }
}
@media (prefers-reduced-motion: reduce) { .lab-svg.spin { animation: none; } .lab-motion .caret { animation: none; } }
