/* Interactive Szept demos for the blog. Chrome comes from the blog's own tokens (theme.css), so the
   demos follow light and dark; the product itself keeps Szept's blue. Every demo rests in a complete
   frame and only moves while on screen; nothing moves under prefers-reduced-motion. */
.sz { --sz-blue: #2563eb; --sz-blue-wash: rgba(37, 99, 235, .1); --sz-red: #e5484d; --sz-green: #16a34a;
  margin: 2rem 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  padding: 18px; display: grid; gap: 14px; font-family: var(--font-sans); color: var(--text); }
[data-theme="dark"] .sz { --sz-blue: #4f86ff; --sz-blue-wash: rgba(79, 134, 255, .16); }
.sz-cap { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
.sz-stage { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 16px; display: grid; gap: 12px; overflow: hidden; }
.sz-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 7px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface);
  font: 500 12.5px/1 var(--font-mono); color: var(--text); transition: transform .12s, background .12s, border-color .12s, color .12s; }
.sz-kbd.down { transform: translateY(1px); border-bottom-width: 1px; background: var(--sz-blue-wash); border-color: var(--sz-blue); color: var(--sz-blue); }

/* hero video */
.sz-video { padding: 0; overflow: hidden; }
.sz-video video { display: block; width: 100%; aspect-ratio: 1920 / 800; object-fit: cover; }
.sz-video .sz-cap { padding: 0 16px 14px; }

/* dictation: a note, the pill, the fn key */
.sz-doc { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.sz-doc-head { display: block; padding: 6px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.sz-doc-body { display: block; padding: 10px 12px; min-height: 58px; font-size: 15px; line-height: 1.5; }
.sz-doc-body .fresh { background: var(--sz-blue-wash); border-radius: 3px; transition: background 1.2s; }
.sz-doc-body .fresh.settled { background: transparent; }
.sz-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--sz-blue); vertical-align: -2px; margin-left: 1px; animation: sz-blink 1.1s steps(1) infinite; }
.sz-pill { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .35), 0 0 0 1px var(--border); transition: opacity .35s, transform .35s; min-width: 0; }
.sz-pill.away { opacity: 0; transform: translateY(8px) scale(.97); }
.sz-meter { display: inline-flex; align-items: center; gap: 3px; height: 18px; flex: none; }
.sz-meter i { width: 3px; height: 4px; border-radius: 2px; background: var(--sz-blue); animation: sz-bars 1s ease-in-out infinite; }
.sz-meter i:nth-child(2) { animation-delay: .12s } .sz-meter i:nth-child(3) { animation-delay: .24s }
.sz-meter i:nth-child(4) { animation-delay: .36s } .sz-meter i:nth-child(5) { animation-delay: .48s }
.sz-pill .check { display: none; color: var(--sz-green); font-weight: 600; }
.sz-pill.done .sz-meter { display: none; } .sz-pill.done .check { display: inline; }
.sz-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.sz-text .prov { color: var(--muted); }
.sz-text .w { animation: sz-in .28s both; }
.sz-hold { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }

/* cleanup: said vs pasted, per destination */
.sz-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sz-tabs button { font: 500 13px/1 var(--font-sans); padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.sz-tabs button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.sz-tabs .hint { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.sz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sz-col { border-radius: 10px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; min-height: 150px; background: var(--surface); }
.sz-col.said { border: 1px dashed var(--border-strong); color: var(--text-2); }
.sz-col.said del { color: var(--muted); text-decoration-color: var(--sz-red); text-decoration-thickness: 1.5px; }
.sz-col.said.keep del { text-decoration: none; color: var(--text-2); }
.sz-col.pasted { border: 1px solid var(--border); white-space: pre-line; }
.sz-label { display: flex; justify-content: space-between; font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sz-col.pasted .sz-label { color: var(--sz-blue); }
.sz-wand { opacity: 0; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); transition: opacity .2s; }
.sz-col.working .sz-wand { opacity: 1; animation: sz-pulse 1s ease-in-out infinite; }
.sz-out { display: block; transition: opacity .25s, filter .25s, transform .25s; }
.sz-col.working .sz-out { opacity: 0; filter: blur(4px); transform: translateY(4px); }

/* cost and weight bars, to scale */
.sz-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sz-chart { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 14px; display: grid; gap: 10px; align-content: start; }
.sz-chart h4 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.sz-bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.sz-bar-head b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.sz-bar.us .sz-bar-head, .sz-bar.us .sz-bar-head b { color: var(--sz-blue); font-weight: 600; }
.sz-track { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sz-track i { display: block; height: 100%; min-width: 3px; border-radius: 4px; background: var(--border-strong); transform-origin: left; }
.sz-bar.us .sz-track i { background: var(--sz-blue); }
.sz-chart.grow .sz-track i { animation: sz-grow .9s cubic-bezier(.22, .68, .24, 1) both; }
.sz-chart.grow .sz-bar:nth-child(3) i { animation-delay: .06s } .sz-chart.grow .sz-bar:nth-child(4) i { animation-delay: .12s }
.sz-chart.grow .sz-bar:nth-child(5) i { animation-delay: .18s } .sz-chart.grow .sz-bar:nth-child(6) i { animation-delay: .24s }
.sz-chart.grow .sz-bar:nth-child(7) i { animation-delay: .3s }
.sz-rest { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sz-rest div { padding: 12px 14px; display: grid; gap: 2px; }
.sz-rest div + div { border-left: 1px solid var(--border); }
.sz-rest b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sz-rest span { font-size: 12.5px; color: var(--text-2); }

@keyframes sz-bars { 0%, 100% { height: 4px } 45% { height: 16px } }
@keyframes sz-blink { 50% { opacity: 0 } }
@keyframes sz-in { from { opacity: 0; filter: blur(3px) } to { opacity: 1; filter: none } }
@keyframes sz-pulse { 50% { opacity: .45 } }
@keyframes sz-grow { from { transform: scaleX(.02) } to { transform: none } }

@media (max-width: 640px) {
  .sz-two, .sz-charts { grid-template-columns: minmax(0, 1fr); }
  .sz-rest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sz-rest div:nth-child(3) { border-left: 0; }
  .sz-rest div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .sz-tabs .hint { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sz *, .sz *::before, .sz *::after { animation: none !important; transition: none !important; }
}
