/* Shyo2 hw-removal v4.1 — Tinker-inspired editorial & studio workspace */

.model-page {
  --footer-max: var(--wide-max);
  --surface-card: #f8f8f7;
  --surface-pill: #f1f1ef;
}

.t-main {
  flex: 1 0 auto;
  width: 100%;
  padding-top: var(--site-header-height);
}

.t-wrap {
  width: 100%;
  max-width: calc(var(--wide-max) + 2 * var(--content-pad));
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

.t-narrow {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--content-pad));
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

/* ── Hero (Tinker centered geometric artwork + typography) ─────── */

.t-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(20px, 4.5vh, 46px) var(--content-pad) clamp(36px, 6vh, 60px);
}

.hero-artwork {
  width: 100%;
  max-width: 580px;
  margin-bottom: clamp(20px, 3.6vh, 36px);
}

.lattice-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.lattice-svg .e-blue {
  stroke: var(--azure);
  stroke-width: 1.55;
  stroke-linecap: round;
  fill: none;
}

.lattice-svg .e-red {
  stroke: var(--red);
  stroke-width: 1.55;
  stroke-linecap: round;
  fill: none;
}

.lattice-svg .e-yellow {
  stroke: var(--yellow);
  stroke-width: 1.65;
  stroke-linecap: round;
  fill: none;
}

.lattice-svg .e-emerald {
  stroke: var(--emerald);
  stroke-width: 1.55;
  stroke-linecap: round;
  fill: none;
}

.lattice-svg .node {
  fill: var(--spool);
  stroke: #ffffff;
  stroke-width: 1.3;
}

@media (prefers-reduced-motion: no-preference) {
  .lattice-svg .edge {
    opacity: 0;
    animation: lattice-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
  }

  .lattice-svg .node {
    opacity: 0;
    animation: lattice-node-in 0.45s ease forwards;
    animation-delay: calc(var(--d, 0s) + 0.14s);
  }
}

@keyframes lattice-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lattice-node-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 14px;
}

.hero-title {
  max-width: 16em;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 470;
  line-height: 1.24;
  letter-spacing: -0.03em;
  color: #181816;
  text-wrap: balance;
}

.hero-desc {
  max-width: 34em;
  margin-top: 16px;
  font-size: clamp(15px, 1.5vw, 16.5px);
  line-height: 1.68;
  letter-spacing: -0.01em;
  color: var(--fg-3);
  text-wrap: balance;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
}

/* ── Interactive Demo Showcase (Tinker Card Container) ─────────── */

.demo-section {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.demo-shell {
  position: relative;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.demo-shell.is-dragging {
  border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(3, 135, 231, 0.12);
}

.drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 20;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--azure);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--cobalt);
  font-size: 15.5px;
  font-weight: 560;
  letter-spacing: -0.015em;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.demo-shell.is-dragging .drop-overlay {
  opacity: 1;
  visibility: visible;
}

/* Model version selector bar (top of demo workspace) */

.version-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 12px clamp(16px, 2.5vw, 24px);
  background: var(--surface-card);
  border-bottom: 1px solid var(--rule);
}

.version-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.version-label {
  font-size: 12.5px;
  font-weight: 540;
  color: var(--fg-3);
  white-space: nowrap;
}

.version-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(40, 40, 40, 0.06);
}

.version-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.version-tabs button:hover:not([aria-pressed="true"]):not(:disabled) {
  color: var(--fg);
}

.version-tabs button[aria-pressed="true"] {
  background: #ffffff;
  color: #111111;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.09);
}

.version-tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ver-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(3, 135, 231, 0.11);
  color: var(--cobalt);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.version-summary {
  font-size: 12.5px;
  color: var(--fg-3);
  line-height: 1.45;
}

/* Empty dropzone */

.empty-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 4vw, 48px);
  cursor: pointer;
  background: var(--bg);
  transition: background-color 0.15s ease;
}

.empty-canvas:hover {
  background: #fcfcfb;
}

.empty-glyph {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
}

.empty-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 520;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.empty-sub {
  max-width: 34em;
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg-3);
}

.empty-cta {
  margin-top: 22px;
}

.empty-specs {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-4);
}

.spec-sep {
  opacity: 0.45;
}

/* Document toolbar (shown once files are loaded) */

.doc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 16px clamp(16px, 2.5vw, 24px);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
}

.doc-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.doc-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-name {
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--fg);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.doc-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Unified orientation option & privacy strip */

.option-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 13px clamp(16px, 2.5vw, 24px);
  background: var(--surface-card);
  border-top: 1px solid var(--rule);
}

.demo-shell:not([data-state="empty"]) .option-bar {
  border-top: 0;
  border-bottom: 1px solid var(--rule);
}

.option-control {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.option-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  font-size: 14px;
  font-weight: 530;
  color: var(--fg);
  cursor: pointer;
}

.option-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #242422;
  cursor: pointer;
  flex: none;
}

.option-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.option-hint {
  padding-left: 26px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-3);
}

.option-privacy {
  font-size: 12.5px;
  color: var(--fg-4);
}

/* Status banner */

.status-banner {
  padding: 12px clamp(16px, 2.5vw, 24px);
  background: var(--danger-bg);
  border-top: 1px solid var(--danger-rule);
  color: var(--danger-fg);
  font-size: 13.5px;
  line-height: 1.55;
}

.status-banner:empty {
  display: none;
}

/* Processing panel */

.working-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: clamp(44px, 7vw, 72px) 24px;
  background: var(--bg-subtle);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: t-spin 0.9s linear infinite;
}

@keyframes t-spin {
  to {
    transform: rotate(360deg);
  }
}

.stage-text {
  font-size: 15.5px;
  font-weight: 540;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.progress-track {
  position: relative;
  width: min(320px, 100%);
  height: 3px;
  border-radius: 999px;
  background: rgba(40, 40, 40, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--fg);
  transition: width 0.2s ease;
}

.progress-track.is-indeterminate .progress-fill {
  width: 38%;
  animation: t-indeterminate 1.4s ease-in-out infinite;
}

@keyframes t-indeterminate {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(290%);
  }
}

.working-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.working-hint {
  font-size: 13px;
  color: var(--fg-4);
}

/* Error panel */

.error-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: clamp(40px, 6vw, 60px) 24px;
  background: var(--danger-bg);
}

.error-title {
  font-size: 16px;
  font-weight: 560;
  color: var(--danger-fg);
}

.error-text {
  max-width: 34em;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-2);
}

.error-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Viewer bar & studio stage */

.viewer-panel {
  background: var(--bg-desk);
}

.viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px clamp(16px, 2.5vw, 24px);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.viewer-heading {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--fg-2);
}

/* Tinker-style segmented pill tabs */

.mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-pill);
}

.mode-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 480;
  color: var(--fg-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mode-tabs button:hover:not([aria-pressed="true"]) {
  color: var(--fg);
}

.mode-tabs button[aria-pressed="true"] {
  background: #ffffff;
  color: #111111;
  font-weight: 540;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.viewer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.gallery-count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pager button:hover:not(:disabled) {
  background: var(--bg-subtle);
}

.pager button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.page-count {
  min-width: 68px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

.page-dl-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 530;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.page-dl-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: rgba(40, 40, 40, 0.28);
}

.page-dl-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.viewer-fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 530;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.viewer-fs-btn:hover {
  background: var(--bg-subtle);
  border-color: rgba(40, 40, 40, 0.28);
}

.viewer-fs-btn[aria-pressed="true"] {
  background: #242422;
  border-color: #242422;
  color: #ffffff;
}

.viewer-fs-btn[aria-pressed="true"]:hover {
  background: #3a3a37;
  border-color: #3a3a37;
}

/* Fullscreen viewer overlay */

body.viewer-fullscreen {
  overflow: hidden;
}

.viewer-panel.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-desk);
}

.viewer-panel.is-fullscreen .viewer-bar {
  flex: none;
  padding: 12px clamp(16px, 2.5vw, 28px);
  box-shadow: 0 1px 0 var(--rule);
}

.viewer-panel.is-fullscreen .viewer-desk {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 2.4vw, 32px);
}

.viewer-panel.is-fullscreen .gallery-stage {
  max-width: 1760px;
  width: 100%;
  margin-inline: auto;
}

.viewer-panel.is-fullscreen .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(14px, 1.8vw, 20px);
}

.demo-shell[data-state] .viewer-panel.is-fullscreen .sheet-card {
  max-width: 1120px;
  width: 100%;
  margin-inline: auto;
}

.demo-shell[data-state="done"][data-view="split"] .viewer-panel.is-fullscreen .panels {
  max-width: 1760px;
  width: 100%;
  margin-inline: auto;
  gap: clamp(16px, 2vw, 24px);
}

.demo-shell[data-state="done"][data-view="split"] .viewer-panel.is-fullscreen .sheet-card {
  max-width: none;
}

.viewer-panel.is-fullscreen .slider-stage {
  max-width: 1120px;
  width: 100%;
}

.viewer-panel.is-fullscreen .downloads-panel,
.viewer-panel.is-fullscreen .telemetry-bar {
  display: none;
}

/* All-pages gallery grid (Gradio-like full overview, Tinker polish) */

.viewer-desk {
  padding: clamp(16px, 2.4vw, 24px);
}

.gallery-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-hint {
  font-size: 12.5px;
  color: var(--fg-3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 18px);
}

.gallery-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(40, 40, 40, 0.1);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gallery-card:hover {
  border-color: rgba(40, 40, 40, 0.24);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.gallery-thumb-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: #fafaf8;
  cursor: pointer;
  overflow: hidden;
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.gallery-skeleton {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-4);
}

.gallery-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-top: 1px solid var(--rule);
  background: #ffffff;
}

.gallery-page-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 540;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

.gallery-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gallery-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 520;
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.gallery-mini-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: #000000;
}

.gallery-mini-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* Document sheet panels */

.panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 2vw, 20px);
  align-items: start;
}

.demo-shell[data-state="done"][data-view="split"] .panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-shell[data-state="ready"] .sheet-card,
.demo-shell[data-state="done"][data-view="result"] .sheet-card,
.demo-shell[data-state="done"][data-view="original"] .sheet-card {
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
}

.sheet-card {
  min-width: 0;
}

.sheet-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 12.5px;
  font-weight: 540;
  color: var(--fg-3);
}

.sheet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--azure);
}

.sheet-card-result .sheet-dot {
  background: var(--red);
}

.sheet-frame {
  min-height: 220px;
  background: #ffffff;
  border: 1px solid rgba(40, 40, 40, 0.1);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 24px rgba(0, 0, 0, 0.04);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.sheet-frame canvas,
.sheet-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.sheet-placeholder {
  padding: 32px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--fg-3);
  line-height: 1.6;
}

/* Interactive before/after comparison slider */

.slider-stage {
  max-width: 700px;
  margin-inline: auto;
}

.slider-note {
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--fg-3);
  text-align: center;
}

.slider-box {
  position: relative;
  border: 1px solid rgba(40, 40, 40, 0.12);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 24px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
  --split: 50%;
}

.slider-layer {
  width: 100%;
}

.slider-layer canvas,
.slider-layer img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.slider-layer-orig {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 1.5px;
  background: #242422;
  transform: translateX(-0.75px);
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #242422;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #242422;
}

.slider-tag {
  position: absolute;
  top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule-strong);
  font-size: 11.5px;
  font-weight: 550;
  color: var(--fg);
  pointer-events: none;
}

.slider-tag-left {
  left: 10px;
}

.slider-tag-right {
  right: 10px;
}

.slider-range-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--fg-3);
}

.slider-range {
  flex: 1;
  accent-color: #242422;
  cursor: pointer;
}

/* Downloads drawer inside workspace (Full PDF + Individual Pages) */

.downloads-panel {
  padding: 18px clamp(16px, 2.5vw, 24px) 20px;
  background: #ffffff;
  border-top: 1px solid var(--rule);
}

.downloads-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.downloads-head h3 {
  font-size: 13.5px;
  font-weight: 580;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.downloads-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-4);
}

.dl-featured {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface-card);
  margin-bottom: 12px;
}

.dl-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 200px;
}

.dl-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fg-2);
}

.dl-tag-pdf {
  color: var(--cobalt);
  border-color: rgba(1, 85, 191, 0.22);
  background: rgba(3, 135, 231, 0.06);
}

.dl-item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dl-item-name {
  font-size: 13.5px;
  font-weight: 540;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-item-sub {
  font-size: 12px;
  color: var(--fg-3);
}

.dl-pages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dl-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #ffffff;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.dl-page-row:hover {
  border-color: var(--rule-strong);
  background: #fcfcfb;
}

.dl-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dl-page-idx {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
}

.dl-page-name {
  font-size: 13px;
  color: var(--fg-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-page-jump:hover .dl-page-name {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dl-more-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* Telemetry footer inside workspace */

.telemetry-bar {
  padding: 12px clamp(16px, 2.5vw, 24px);
  background: var(--surface-card);
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--fg-3);
}

.telemetry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.telemetry-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}

.telemetry-details summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--fg-3);
  list-style: none;
}

.telemetry-details summary::-webkit-details-marker {
  display: none;
}

.telemetry-details summary:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.telemetry-details pre {
  margin: 10px 0 2px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-2);
  overflow-x: auto;
  white-space: pre-wrap;
}

/* ── Tinker Section Headings & Hairline 2×2 Grid ───────────────── */

.t-section {
  padding-block: clamp(52px, 8vw, 96px);
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto clamp(32px, 5vw, 48px);
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 470;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: #181816;
}

.section-head p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-3);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.how-cell {
  padding: clamp(24px, 3.6vw, 36px) clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--rule);
}

.how-cell:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.how-cell:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.how-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
}

.how-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 560;
  color: var(--fg);
  margin-bottom: 8px;
}

.how-title {
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 6px;
}

.how-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg-3);
}

/* ── Tinker FAQ Accordion ──────────────────────────────────────── */

.faq-list {
  max-width: var(--content-max);
  margin-inline: auto;
  border-top: 1px solid var(--rule);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  font-size: 15.5px;
  font-weight: 480;
  letter-spacing: -0.015em;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--fg-3), var(--fg-3)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--fg-3), var(--fg-3)) center / 1.5px 14px no-repeat;
  transition: transform 0.22s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 28px 20px 4px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--fg-2);
}

/* ── Tinker-style monochrome lattice footer strip ──────────────── */

.lattice-band {
  width: 100%;
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--rule);
  overflow: hidden;
  line-height: 0;
}

.lattice-band svg {
  width: 100%;
  min-width: 720px;
  height: 108px;
  margin-inline: auto;
}

/* ── Responsive breakpoints ────────────────────────────────────── */

@media (max-width: 820px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dl-pages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .t-hero {
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .hero-artwork {
    max-width: 340px;
    margin-bottom: 18px;
  }

  .hero-actions {
    width: 100%;
  }

  .version-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .version-group {
    width: 100%;
    justify-content: space-between;
  }

  .doc-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .doc-meta {
    flex: none;
  }

  .doc-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-actions .btn-wide-mobile {
    grid-column: 1 / -1;
  }

  .option-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .option-privacy {
    padding-left: 26px;
  }

  .viewer-bar {
    gap: 10px;
  }

  .mode-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .mode-tabs button {
    flex: 1;
    padding: 0 8px;
    font-size: 12.5px;
  }

  .mode-tabs button[data-mode="split"] {
    display: none;
  }

  .demo-shell[data-state="done"][data-view="split"] .panels {
    grid-template-columns: minmax(0, 1fr);
  }

  .viewer-right {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    margin-left: 0;
  }

  .pager {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .page-dl-btn,
  .viewer-fs-btn {
    padding: 0 10px;
    font-size: 12px;
  }

  .viewer-desk {
    padding: 12px;
  }

  .viewer-panel.is-fullscreen .viewer-bar {
    padding: 10px 12px;
  }

  .viewer-panel.is-fullscreen .viewer-desk {
    padding: 12px;
  }

  .gallery-grid,
  .viewer-panel.is-fullscreen .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .demo-shell[data-state="done"][data-view="split"] .viewer-panel.is-fullscreen .panels {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-card-foot {
    padding: 8px;
  }

  .dl-pages-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-cell:nth-child(odd) {
    border-right: 0;
  }

  .how-cell:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .how-cell:last-child {
    border-bottom: 0;
  }
}
