.stencil-page h1, .stencil-page h2, .stencil-page h3 { overflow-wrap: anywhere; text-wrap: balance; }
.stencil-page a:focus-visible, .stencil-page button:focus-visible, .stencil-page input:focus-visible, .stencil-page select:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.stencil-page ::selection { background: var(--yellow); color: var(--ink-deep); }
.stencil-page .article-content { min-width: 0; }
.stencil-intro { background: var(--mint); padding: 36px 0 48px; }
.stencil-intro > .section-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 370px); gap: 64px; align-items: center; }
.stencil-intro h1, .stencil-catalog-intro h1 { margin: 0 0 20px; color: var(--ink); font-size: 42px; line-height: 1.14; }
.stencil-intro p { max-width: 60ch; }
.stencil-facts { display: flex; flex-wrap: wrap; padding: 0; margin: 24px 0; gap: 12px 24px; list-style: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.stencil-hero-preview { display: block; justify-self: center; width: 100%; max-width: 310px; }
.stencil-hero-preview img { width: 100%; height: auto; border: 1px solid var(--line); background: white; }
.stencil-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.stencil-actions .button { border-radius: 6px; min-height: 48px; }
.stencil-open { text-underline-offset: 4px; font-weight: 700; }
.stencil-file-note { color: var(--ink); font-size: 13px; margin: 12px 0 0; }
.stencil-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.stencil-sheet { margin: 0; min-width: 0; }
.stencil-sheet:only-child { grid-column: 1 / -1; max-width: 480px; }
.stencil-sheet img { width: 100%; height: auto; background: white; border: 1px solid var(--line); }
.stencil-sheet figcaption { font-size: 13px; margin-top: 10px; color: var(--muted); }
.stencil-page .download-panel { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 28px; border-left: 0; }
.stencil-page .download-panel h3 { margin-top: 0; }
.stencil-page .side-offer { align-self: start; }
.stencil-related { padding-top: 16px; padding-bottom: 64px; }
.stencil-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.stencil-section-heading h2 { font-size: 28px; margin: 0; }
.stencil-section-heading > a { flex-shrink: 0; text-underline-offset: 4px; }
.stencil-catalog-intro { padding-top: 24px; padding-bottom: 24px; }
.stencil-catalog-intro p { max-width: 68ch; margin-bottom: 0; }
.stencil-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 24px 0; border-block: 1px solid var(--line); }
.stencil-filters[hidden], .stencil-card[hidden], .stencil-empty[hidden] { display: none; }
.stencil-filters label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; flex: 1 1 180px; min-width: 0; }
.stencil-filters .stencil-search { flex: 2 1 300px; }
.stencil-filters input, .stencil-filters select { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--text); background: white; border: 1px solid #879b95; border-radius: 4px; font-size: 15px; font-weight: 400; }
.stencil-filters input::placeholder { color: #596a70; }
.stencil-reset { border: 0; background: transparent; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; padding: 11px 0; min-height: 46px; cursor: pointer; }
.stencil-results { margin: 20px 0; font-size: 14px; min-height: 22px; color: var(--muted); }
.stencil-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.stencil-related .stencil-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stencil-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: white; }
.stencil-card-image { display: flex; align-items: center; justify-content: center; height: 258px; background: #edf3f2; padding: 16px; }
.stencil-card-image img { height: 100%; width: 100%; object-fit: contain; }
.stencil-card-body { padding: 18px; }
.stencil-card-category { color: var(--muted); font-size: 12px; }
.stencil-card h2 { margin: 5px 0 8px; font-size: 20px; line-height: 1.25; min-height: 50px; }
.stencil-card h2 a { text-decoration: none; }
.stencil-card h2 a:hover, .stencil-card-link:hover { color: var(--coral); }
.stencil-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.stencil-card-link { display: inline-block; font-weight: 700; font-size: 14px; text-underline-offset: 4px; }
.stencil-empty { padding: 24px 0; }
.stencil-catalog-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.stencil-catalog-help h2 { font-size: 25px; }
.stencil-intro--demo { padding-block: 28px; }
.stencil-intro--demo > .section-inner { grid-template-columns: 1fr; }
.stencil-intro--demo h1 { max-width: 1000px; }
.stencil-intro--demo p { max-width: 80ch; }
.stencil-demo { background: #fff; padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.stencil-demo [hidden] { display: none !important; }
.stencil-demo-heading { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 44px; }
.stencil-demo-heading h2 { font-size: 28px; line-height: 1.2; margin: 0; }
.stencil-demo-figure { margin: 0; }
.stencil-demo-stage { position: relative; height: 520px; width: 100%; background: #fff; }
.stencil-demo-stage picture { display: block; width: 100%; height: 100%; }
.stencil-demo-stage img { width: 100%; height: 100%; object-fit: contain; }
.stencil-demo-scene { position: absolute; inset: 0; }
.stencil-demo-scene canvas { display: block; width: 100%; height: 100%; touch-action: pan-y pinch-zoom; }
.stencil-demo-scene canvas:focus-visible { outline: 3px solid var(--coral); outline-offset: -4px; }
.stencil-demo-scene .model-labels { display: none; }
.stencil-demo-figure figcaption { min-height: 24px; color: var(--muted); text-align: center; font-size: 13px; margin: 8px 0 16px; }
.stencil-demo-toolbar { min-height: 52px; display: flex; justify-content: center; }
.stencil-demo-launch { display: inline-flex; gap: 10px; align-items: center; justify-content: center; min-width: 226px; border-radius: 6px; cursor: pointer; }
.stencil-demo-launch:disabled { opacity: .65; cursor: wait; }
.stencil-demo-controls { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.stencil-demo button { font-size: 14px; }
.stencil-demo button svg { flex-shrink: 0; pointer-events: none; }
.stencil-demo-icon, .stencil-demo-photo, .stencil-demo-poses button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; cursor: pointer; }
.stencil-demo-photo { padding: 8px 12px; }
.stencil-demo-icon { position: relative; width: 44px; flex: 0 0 44px; }
.stencil-demo-icon:hover, .stencil-demo-photo:hover, .stencil-demo-poses button:hover { background: #edf5f2; }
.stencil-demo-icon[data-assembly-play] { color: #fff; background: var(--ink); border-color: var(--ink); }
.stencil-demo-icon[data-assembly-play]:hover { background: var(--ink-deep); }
.stencil-demo-icon:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); color: #fff; background: var(--ink-deep); font-size: 12px; padding: 5px 9px; border-radius: 4px; white-space: nowrap; pointer-events: none; z-index: 2; }
.stencil-demo-poses { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: 3px; }
.stencil-demo-poses button { padding: 6px 12px; border-color: transparent; border-radius: 4px; min-height: 38px; }
.stencil-demo-poses button[aria-pressed="true"] { background: var(--mint); color: var(--ink-deep); }
.stencil-demo-progress { display: flex; gap: 12px; align-items: center; flex: 1 1 250px; max-width: 420px; min-width: 180px; font-size: 13px; }
.stencil-demo-progress input { min-width: 0; flex: 1; accent-color: var(--ink); height: 32px; margin: 0; cursor: pointer; }
.stencil-demo-progress output { width: 40px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.stencil-demo-error { margin: 16px auto 0; max-width: 60ch; text-align: center; color: var(--coral); font-size: 14px; }
.stencil-card-image--demo { background: #fff; padding: 0; }
.stencil-card-image--demo img { object-fit: contain; }
@media (max-width: 1100px) {
  .stencil-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stencil-intro > .section-inner { gap: 32px; }
}
@media (max-width: 760px) {
  .stencil-intro--demo { padding-block: 24px; }
  .stencil-demo { padding-block: 20px 28px; }
  .stencil-demo-heading h2 { font-size: 24px; }
  .stencil-demo-stage { height: 340px; }
  .stencil-demo-controls { flex-wrap: wrap; gap: 10px; }
  .stencil-demo-toolbar { min-height: 92px; align-items: flex-start; }
  .stencil-demo-poses button { padding-inline: 8px; font-size: 13px; gap: 6px; }
  .stencil-demo-poses button svg { width: 16px; height: 16px; }
  .stencil-demo-progress { flex-basis: 100%; max-width: none; }
  .stencil-demo-icon:hover::after { display: none; }
  .stencil-intro > .section-inner { grid-template-columns: 1fr; gap: 28px; }
  .stencil-intro h1, .stencil-catalog-intro h1 { font-size: 30px; }
  .stencil-intro { padding-top: 24px; }
  .stencil-hero-preview { max-width: 270px; }
  .stencil-grid, .stencil-related .stencil-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .stencil-card-image { height: 208px; padding: 12px; }
  .stencil-card-body { padding: 13px; }
  .stencil-card h2 { font-size: 18px; }
  .stencil-card-link { font-size: 13px; }
  .stencil-section-heading { align-items: start; }
  .stencil-section-heading h2 { font-size: 24px; }
  .stencil-catalog-help { grid-template-columns: 1fr; gap: 20px; padding-block: 40px; }
  .stencil-preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 374px) {
  .stencil-demo-photo { width: 44px; flex: 0 0 44px; padding: 10px; }
  .stencil-demo-photo span { display: none; }
  .stencil-demo-stage { height: 300px; }
  .stencil-demo-controls { gap: 6px; }
  .stencil-demo-poses button { padding-inline: 6px; }
  .stencil-demo-poses button svg { display: none; }
  .stencil-grid, .stencil-related .stencil-grid { grid-template-columns: 1fr; }
  .stencil-card h2 { min-height: 0; }
  .stencil-card-image { height: 280px; }
  .stencil-section-heading { flex-wrap: wrap; }
}
