/* pelmet.app/paint: the photo-to-painting tool. Self-contained: the site's tokens, bar and
   grain are copied here so this page does not load the home page's stylesheet. */

:root {
  --bg: #07070a;
  --ink: #f4f1ea;
  --mute: rgba(244, 241, 234, .62);
  --faint: rgba(244, 241, 234, .16);
  --line: rgba(244, 241, 234, .1);
  --panel: rgba(244, 241, 234, .035);
  --c1: #ff7a3d;
  --c2: #ffd18a;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; scroll-padding-top: 72px; }
body {
  font: 400 17px/1.55 var(--sans); overflow-x: hidden; min-height: 100vh;
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(255, 122, 61, .13), transparent 62%),
    radial-gradient(700px 420px at -5% 4%, rgba(255, 209, 138, .07), transparent 60%),
    var(--bg);
}
a { color: inherit; }
img, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar (as on the home page) ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: 56px; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
}
.bar a { pointer-events: auto; position: relative; text-decoration: none; }
.bar::before { content: ''; position: absolute; inset: 0 0 -34px; background: linear-gradient(rgba(4, 4, 6, .92) 30%, transparent); pointer-events: none; }
.mark { font: 400 22px/1 var(--serif); letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.logo { width: 30px; height: 30px; display: block; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.get {
  font: 600 13px/1 var(--sans); padding: 10px 16px; border-radius: 99px;
  background: rgba(244, 241, 234, .1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--faint);
  transition: background .25s, color .25s;
}
.get:hover { background: var(--ink); color: #000; }

/* ---------- page ---------- */
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.kicker { font: 500 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.kicker b { color: var(--c2); font-weight: 500; }

.hero { padding: 96px 0 26px; }
.hero h1 { font: 400 clamp(40px, 6.2vw, 78px)/.98 var(--serif); letter-spacing: -.03em; margin: 16px 0 16px; max-width: 13ch; }
.hero h1 em { font-style: italic; font-weight: 300; color: var(--c2); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--mute); max-width: 62ch; }
.lede strong { color: var(--ink); font-weight: 600; }

section h2 { font: 400 clamp(32px, 4.6vw, 58px)/1 var(--serif); letter-spacing: -.025em; margin-bottom: 14px; }
.sec { padding-top: clamp(72px, 10vw, 120px); }
.sec-intro { color: var(--mute); max-width: 62ch; margin-bottom: 28px; }

.how-grid { display: grid; gap: 14px; margin-top: 26px; }
.how-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.how-grid h3 { font: 600 18px/1.25 var(--sans); margin: 14px 0 8px; }
.how-grid p { color: var(--mute); font-size: 15.5px; }
.how-grid svg { color: var(--c2); }

.faq-list { max-width: 820px; border-top: 1px solid var(--line); margin-top: 18px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font: 600 17px/1.35 var(--sans);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--mute); border-bottom: 1.5px solid var(--mute); transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list details p { color: var(--mute); padding: 0 0 20px; max-width: 68ch; font-size: 16px; }

/* ---------- style pages: the text about the medium, links to the styles ---------- */
.kicker a { text-decoration: none; }
.kicker a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 68ch; margin-top: 22px; }
.prose p { color: var(--mute); font-size: 17px; line-height: 1.65; }
.prose p + p { margin-top: 14px; }
.sec-intro a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--faint); }
.style-list {
  list-style: none; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.style-list a {
  display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); text-decoration: none; transition: border-color .25s, background .25s;
}
.style-list a:hover { border-color: var(--faint); background: rgba(244, 241, 234, .06); }
.style-list b { display: block; font: 400 21px/1.15 var(--serif); letter-spacing: -.01em; }
.style-list span { display: block; margin-top: 6px; color: var(--mute); font-size: 14px; line-height: 1.45; }

.pelmet {
  margin-top: clamp(80px, 11vw, 132px); padding: clamp(24px, 4.5vw, 52px); border-radius: 26px;
  border: 1px solid var(--faint);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 122, 61, .16), transparent 55%), rgba(244, 241, 234, .03);
  display: grid; gap: 22px; align-items: center;
}
.pelmet-icon { width: 76px; height: 76px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .55)); }
.pelmet h2 { margin: 12px 0 14px; }
.pelmet p { color: var(--mute); max-width: 60ch; }
.pelmet p + p { margin-top: 10px; }
.pelmet-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pelmet-req { font: 400 12px/1.5 var(--mono); color: var(--mute); margin-top: 16px; }
.pelmet-req a { text-underline-offset: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font: 600 15px/1 var(--sans); padding: 15px 24px; border-radius: 99px; text-decoration: none;
  transition: transform .3s var(--ease), background .25s, color .25s, box-shadow .3s;
}
.btn.solid { background: var(--ink); color: #0a0a0c; }
.btn.solid:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--c1); }
.btn.ghost { border: 1px solid var(--faint); }
.btn.ghost:hover { background: rgba(244, 241, 234, .1); }
.btn:active { transform: scale(.97); }

.foot {
  margin-top: 88px; padding: 22px 0 36px; border-top: 1px solid var(--faint);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font: 400 12px/1.6 var(--mono); color: var(--mute);
}
.foot a { margin-right: 18px; text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .legal { flex-basis: 100%; font: 400 11px/1.6 var(--sans); opacity: .75; max-width: 80ch; }
.foot nav { flex-basis: 100%; }

/* ================= the tool ================= */
.pt { --r: 20px; }
.pt-stage {
  position: relative; width: 100%; aspect-ratio: var(--sar, 1.5); max-height: min(72vh, 780px); min-height: 220px;
  container-type: size; border-radius: var(--r); overflow: hidden;
  background: rgba(244, 241, 234, .03); border: 1px solid var(--line);
}
.pt-stage[data-state=empty], .pt-stage[data-state=error] { min-height: 400px; }

/* --- the compare frame (tool and examples) --- */
.pt-frame { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; -webkit-touch-callout: none; }
.pt-before, .pt-after, .pt-after > * { position: absolute; inset: 0; width: 100%; height: 100%; }
img.pt-before, .pt-after > img { object-fit: cover; }
.pt-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.pt-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 44px; margin-left: -22px; z-index: 3;
  display: flex; align-items: center; justify-content: center; cursor: ew-resize; touch-action: none; outline: none;
}
.pt-divider::before { content: ''; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: rgba(255, 255, 255, .9); box-shadow: 0 0 10px rgba(0, 0, 0, .45); }
.pt-knob {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(10, 10, 12, .5); border: 1.5px solid rgba(255, 255, 255, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .4); transition: transform .2s var(--ease);
}
.pt-divider:focus-visible .pt-knob { outline: 2px solid var(--c2); outline-offset: 3px; }
.pt-frame:hover .pt-knob, .pt-dragging .pt-knob { transform: scale(1.08); }
.pt-dragging { cursor: ew-resize; }

/* in the tool: centered, as large as the stage allows */
.pt-stage .pt-frame {
  position: absolute; inset: 0; margin: auto; container-type: inline-size;
  width: min(100cqw, 100cqh * var(--ar, 1.5)); height: min(100cqh, 100cqw / var(--ar, 1.5));
}
.pt-stage[data-state=empty] .pt-frame, .pt-stage[data-state=error] .pt-frame { visibility: hidden; }
.pt-frame.pt-off .pt-after, .pt-frame.pt-off .pt-divider, .pt-frame.pt-off .pt-tag { display: none; }

.pt-tag {
  position: absolute; top: 10px; z-index: 2; pointer-events: none; transition: opacity .2s;
  font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 99px; background: rgba(8, 8, 10, .55); color: rgba(255, 255, 255, .9);
}
.pt-tag-l { left: 10px; }
.pt-tag-r { right: 10px; }
.pt-busy .pt-tag { opacity: 0; }

/* the mark as it will be drawn at export (sizes follow the image: see app.js drawMark) */
.pt-wm {
  position: absolute; inset: auto 1.1em 1.1em auto; width: auto; height: auto; pointer-events: none; white-space: nowrap;
  font: 600 calc(var(--wmf, .02) * 100cqw)/1 var(--sans); padding: .5em .75em; border-radius: 99px;
  background: rgba(8, 8, 10, .42); color: rgba(255, 255, 255, .94);
}
.pt-no-mark .pt-wm { display: none; }

/* --- empty state --- */
.pt-drop {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px 18px; text-align: center;
}
.pt-stage:not([data-state=empty]) .pt-drop { display: none; }
.pt-drop-icon { color: var(--c2); margin-bottom: 2px; }
.pt-drop-title { font: 400 clamp(24px, 3vw, 32px)/1.1 var(--serif); letter-spacing: -.02em; }
.pt-drop-sub { color: var(--mute); font-size: 14.5px; margin-bottom: 4px; }
.pt-samples { margin-top: 18px; display: grid; gap: 10px; justify-items: center; }
.pt-samples-label { font-size: 13.5px; color: var(--mute); }
.pt-sample-row { display: flex; gap: 10px; }
.pt-sample {
  padding: 0; width: 76px; height: 52px; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--faint); background: #111; transition: transform .2s var(--ease), border-color .2s;
}
.pt-sample img { width: 100%; height: 100%; object-fit: cover; }
.pt-sample:hover { border-color: var(--ink); transform: translateY(-2px); }
.pt-drop-note { margin-top: 14px; font: 400 11.5px/1.4 var(--mono); color: var(--mute); letter-spacing: .02em; }
.pt-drop-note::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6fdc8c; margin-right: 8px; vertical-align: 1px; }

.pt-dragover {
  position: absolute; inset: 8px; z-index: 7; display: grid; place-items: center; pointer-events: none;
  border: 2px dashed var(--c2); border-radius: calc(var(--r) - 6px); background: rgba(7, 7, 10, .78);
  font: 400 26px/1 var(--serif); opacity: 0; transition: opacity .15s;
}
.pt-over .pt-dragover { opacity: 1; }

/* --- progress and status: overlays, so nothing below moves --- */
.pt-progress { position: absolute; inset: 0 0 auto; height: 2px; z-index: 5; overflow: hidden; opacity: 0; transition: opacity .25s; }
.pt-progress::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%;
  background: linear-gradient(90deg, transparent, var(--c2), var(--c1), transparent);
  animation: pt-slide 1.3s ease-in-out infinite;
}
.pt-busy .pt-progress { opacity: 1; }
@keyframes pt-slide { to { left: 100%; } }

.pt-status {
  position: absolute; top: 12px; left: 50%; z-index: 5; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px;
  font: 500 11.5px/1.2 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(8, 8, 10, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line);
  opacity: 0; transform: translate(-50%, -6px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.pt-busy .pt-status { opacity: 1; transform: translate(-50%, 0); }
.pt-spin { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--faint); border-top-color: var(--c2); animation: pt-spin .8s linear infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }

.pt-msg {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 8; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 14px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.45;
  background: rgba(24, 14, 10, .94); border: 1px solid rgba(255, 122, 61, .45); box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.pt-msg p { flex: 1 1 240px; }
.pt-msg[hidden], .pt-msg [hidden] { display: none; }
.pt-stage[data-state=error] .pt-msg { top: 12px; bottom: auto; }

.pt-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; margin-top: 8px; font: 400 12px/1.3 var(--mono); color: var(--mute); }
.pt-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-stage[data-state=empty] + .pt-bar, .pt-stage[data-state=error] + .pt-bar { visibility: hidden; }

.pt-link {
  flex: none; background: none; border: 0; padding: 8px 0; cursor: pointer; color: var(--ink);
  font: 500 13px/1 var(--sans); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint);
}
.pt-link:hover { text-decoration-color: var(--ink); }
.pt-link:disabled { color: var(--mute); text-decoration: none; cursor: default; opacity: .6; }

/* --- buttons --- */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 99px; border: 0; cursor: pointer; font: 600 15px/1 var(--sans);
  transition: transform .25s var(--ease), background .2s, color .2s, opacity .2s, box-shadow .3s;
}
.pt-btn-solid { background: var(--ink); color: #0a0a0c; }
.pt-btn-solid:not(:disabled):hover { box-shadow: 0 12px 34px -12px var(--c1); transform: translateY(-1px); }
.pt-btn-ghost { background: transparent; border: 1px solid var(--faint); color: var(--ink); }
.pt-btn-ghost:hover { background: rgba(244, 241, 234, .08); }
.pt-btn:not(:disabled):active { transform: scale(.97); }
.pt-btn:disabled { opacity: .45; cursor: default; }

/* --- side panel --- */
.pt-side { display: grid; gap: 26px; margin-top: 16px; min-width: 0; }
.pt-group { border: 0; padding: 0; min-width: 0; }
.pt-h { display: block; float: left; width: 100%; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; padding: 0; }
.pt-h-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pt-h-row .pt-h { float: none; width: auto; margin: 0; }
.pt-chips, .pt-params, .pt-seg { clear: both; }

.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip, .pt-seg label { position: relative; cursor: pointer; }
.pt-chip input, .pt-seg input, .pt-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pt-chip span {
  display: flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 99px;
  border: 1px solid var(--faint); font: 600 14px/1 var(--sans); transition: background .2s, color .2s, border-color .2s;
}
.pt-chip:hover span { border-color: rgba(244, 241, 234, .4); }
.pt-chip input:checked + span { background: var(--ink); color: #0a0a0c; border-color: var(--ink); }
.pt-chip input:focus-visible + span, .pt-seg input:focus-visible + span, .pt-switch input:focus-visible + .pt-switch-ui { outline: 2px solid var(--c2); outline-offset: 2px; }
.pt-blurb { clear: both; margin-top: 12px; font-size: 14.5px; line-height: 1.5; color: var(--mute); min-height: 3em; }

.pt-params { display: grid; gap: 14px; }
.pt-param-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.pt-param output { font: 400 12px/1 var(--mono); color: var(--mute); font-variant-numeric: tabular-nums; }
.pt-param input[type=range] {
  --fill: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 2px 0 0; background: transparent; cursor: pointer;
}
.pt-param input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) var(--fill), var(--faint) var(--fill)); }
.pt-param input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5); transition: transform .15s;
}
.pt-param input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.pt-param input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--faint); }
.pt-param input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
.pt-param input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--ink); }
.pt-param input[type=range]:focus-visible { outline: none; }
.pt-param input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--c2); outline-offset: 3px; }
.pt-param input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--c2); outline-offset: 3px; }

.pt-export { display: grid; gap: 14px; }
.pt-export .pt-h { margin-bottom: 0; }
.pt-seg { display: inline-flex; justify-self: start; padding: 3px; border-radius: 99px; border: 1px solid var(--faint); }
.pt-seg span { display: flex; align-items: center; min-height: 36px; padding: 0 18px; border-radius: 99px; font: 600 13.5px/1 var(--sans); transition: background .2s, color .2s; }
.pt-seg input:checked + span { background: var(--ink); color: #0a0a0c; }
.pt-switch { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 14.5px; line-height: 1.35; }
.pt-switch-ui { flex: none; position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--faint); transition: background .2s; }
.pt-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .25s var(--ease); }
.pt-switch input:checked + .pt-switch-ui { background: var(--c1); }
.pt-switch input:checked + .pt-switch-ui::after { transform: translateX(16px); }
.pt-download { width: 100%; }
.pt-dl-meta { font: 400 11.5px/1.45 var(--mono); color: var(--mute); margin-top: -4px; overflow-wrap: anywhere; }

.pt-no-gl .pt-side { opacity: .45; pointer-events: none; }

/* ================= examples gallery ================= */
.pt-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)) 26px; padding: 2px var(--pad) 6px;
  scroll-padding-inline: var(--pad);
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tab {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--faint); background: none; cursor: pointer;
  font: 600 14px/1 var(--sans); transition: background .2s, color .2s, border-color .2s;
}
.pt-tab:hover { border-color: rgba(244, 241, 234, .4); }
.pt-tab[aria-selected=true] { background: var(--ink); color: #0a0a0c; border-color: var(--ink); }
.pt-ex-head { display: grid; gap: 8px; justify-items: start; margin-bottom: 20px; }
.pt-ex-head h3 { font: 400 clamp(26px, 3.2vw, 36px)/1.05 var(--serif); letter-spacing: -.02em; }
.pt-ex-head p { color: var(--mute); max-width: 62ch; }
.pt-ex-head .pt-btn { margin-top: 6px; min-height: 42px; font-size: 14px; }
.pt-ex-grid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; }
.pt-ex { min-width: 0; }
.pt-ex .pt-frame { width: 100%; aspect-ratio: var(--ar, 1.5); border-radius: 16px; background: rgba(244, 241, 234, .05); }
.pt-ex figcaption { margin-top: 9px; font-size: 12.5px; color: var(--mute); }
.pt-ex figcaption a { text-underline-offset: 2px; text-decoration-color: var(--faint); }
.pt-ex figcaption a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ================= wider screens ================= */
@media (min-width: 720px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
  .pelmet { grid-template-columns: auto 1fr; gap: 36px; align-items: start; }
  .pelmet-icon { width: 96px; height: 96px; }
  .pt-ex-head { grid-template-columns: 1fr auto; align-items: end; }
  .pt-ex-head h3, .pt-ex-head p { grid-column: 1; }
  .pt-ex-head .pt-btn { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
@media (min-width: 980px) {
  .pt { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
  .pt-side { margin-top: 0; position: sticky; top: 72px; }
  .pt-stage[data-state=empty], .pt-stage[data-state=error] { min-height: 460px; }
}
@media (max-width: 420px) {
  .pt { --r: 16px; }
  .pt-stage { max-height: 66vh; }
  .pt-sample { width: 68px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-duration: .01ms !important; }
  .pt-progress::after { animation: none; left: 0; width: 100%; opacity: .6; }
  .pt-spin { animation-duration: 2.4s; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
