.explore-width { width: min(1400px, calc(100% - 64px)); margin-inline: auto; }
.back-to-paper { font-size: .82rem; }
.explore-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 48px 0 28px; }
.explore-heading h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.2; font-weight: 750; letter-spacing: -.045em; margin-bottom: 16px; }
.explore-heading p:last-child { color: var(--text-secondary); max-width: 700px; font-size: .95rem; }
.collection-total { flex-shrink: 0; color: var(--primary-color); font-size: 1.35rem; text-align: right; font-weight: 650; }
.collection-total small { font-size: .72rem; font-weight: 400; color: var(--text-secondary); }
.collection-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.collection-buttons button { border: 1px solid var(--border-color); background: #fff; border-radius: 8px; padding: 11px 18px; font-size: .84rem; color: var(--text-secondary); cursor: pointer; }
.collection-buttons button span { margin-left: 14px; font-size: .72rem; }
.collection-buttons button[aria-pressed="true"] { color: white; background: var(--primary-color); border-color: var(--primary-color); }
.collection-buttons button[data-collection="amazon"][aria-pressed="true"] { background: #246b68; border-color: #246b68; }
.collection-description { margin: 18px 0 0; max-width: 1020px; font-size: .83rem; color: var(--text-secondary); min-height: 28px; }
.explore-status { font-size: .78rem; color: var(--primary-color); min-height: 24px; margin: 6px 0 12px; }
#reload-examples { border: 1px solid var(--border-color); border-radius: 6px; background: white; padding: 10px 16px; cursor: pointer; }
.explore-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px; margin-bottom: 70px; align-items: start; }
.sample-browser { position: sticky; top: 20px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
#sample-count { margin: 10px 0; }
.sample-list { overflow: auto; overscroll-behavior: contain; padding: 3px; }
.sample-item { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; border: 1px solid transparent; border-bottom-color: #eeeaf4; background: white; padding: 10px 8px; border-radius: 6px; cursor: pointer; }
.sample-item:hover { background: #faf9fc; }
.sample-item[aria-pressed="true"] { border-color: #b4a4d8; background: #f3f0fa; }
.sample-item img { width: 46px; height: 60px; object-fit: contain; flex-shrink: 0; background: #fff; }
.sample-item strong { display: block; font-size: .81rem; line-height: 1.4; font-weight: 650; }
.sample-item small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .65rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.sample-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.sample-heading .eyebrow { margin-bottom: 4px; font-size: .65rem; }
.sample-heading h2 { font-size: 1.6rem; font-weight: 700; line-height: 1.3; letter-spacing: -.025em; }
.sample-navigation { display: flex; gap: 7px; }
.sample-navigation button { width: 38px; height: 38px; background: white; color: var(--primary-color); border: 1px solid var(--border-color); border-radius: 7px; cursor: pointer; }
.sample-navigation button:disabled { opacity: .35; cursor: default; }
.stage-buttons { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 0 16px; }
.stage-buttons button { padding: 7px 10px; border: 1px solid var(--border-color); border-radius: 5px; background: white; color: var(--text-secondary); font-size: .73rem; cursor: pointer; min-height: 36px; }
.stage-buttons button[aria-pressed="true"] { background: #eee9f8; color: var(--primary-color); border-color: #bfb0db; font-weight: 650; }
.pipeline-navigation { display: block; padding: 0 0 20px; }
.pipeline-entry { display: grid; grid-template-columns: minmax(85px,.65fr) 20px minmax(100px,.8fr) 20px minmax(260px,2.5fr); align-items: center; gap: 8px; }
.pipeline-node { min-width: 0; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; background: #faf9fc; }
.pipeline-node[data-active="true"] { border-color: #b8a8d4; background: #f5f1fc; }
.pipeline-label { display: flex; align-items: center; gap: 6px; font-size: .65rem; font-weight: 600; color: #6b627a; margin-bottom: 9px; line-height: 1.4; }
.pipeline-label > span { display: inline-grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; color: var(--primary-color); background: #eae4f3; font-size: .6rem; }
.pipeline-navigation button[data-stage] { width: 100%; font-size: .72rem; padding: 7px 9px; }
.pipeline-navigation button small { display: block; font-size: .58rem; font-weight: 400; opacity: .8; margin-top: 2px; }
.pipeline-arrow { text-align: center; color: #a294b9; font-size: 1.1rem; line-height: 1; }
.pipeline-vlm { background: #f5f2fb; border-color: #d5c9e8; }
.vlm-outputs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.ocr-outputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.pipeline-navigation .ocr-outputs button[data-stage] { padding: 7px 3px; min-width: 0; font-size: .68rem; }
.pipeline-note { font-size: .6rem; color: #78678f; margin-top: 7px; }
.pipeline-bridge { display: block; width: 100%; height: 24px; overflow: visible; }
.pipeline-bridge > path { fill: none; stroke: #a294b9; stroke-width: 1; }
.pipeline-tail { display: grid; grid-template-columns: minmax(0,1fr) 20px minmax(115px,.28fr); align-items: center; gap: 9px; margin-left: 9%; }
.pipeline-branches { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 10px; }
.removal-outputs { display: grid; grid-template-columns: 1fr 16px 1fr; align-items: center; gap: 4px; }
.pipeline-output { background: #f4f1fa; }
.pipeline-caption { font-size: .69rem; color: var(--text-secondary); line-height: 1.65; margin-top: 11px; }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; background: #f7f6fa; border: 1px solid var(--border-color); border-bottom: 0; border-radius: 8px 8px 0 0; }
.viewer-toolbar > p { font-size: .79rem; font-weight: 650; }
.viewer-tools { display: flex; align-items: center; gap: 6px; font-size: .72rem; }
.viewer-tools button { padding: 4px 9px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--text-secondary); cursor: pointer; min-height: 30px; }
.viewer-tools button[aria-pressed="true"] { border-color: var(--border-color); background: white; color: var(--primary-color); }
.viewer-tools a { margin-left: 10px; }
.stage-viewport { height: min(68vh, 680px); min-height: 350px; overflow: auto; background: #f0eef4; border: 1px solid var(--border-color); border-radius: 0 0 8px 8px; padding: 16px; }
.viewer-result-row.has-style-panel { display: grid; grid-template-columns: minmax(0,1fr) 290px; }
.viewer-result-row.has-style-panel .stage-viewport { min-width: 0; border-radius: 0 0 0 8px; }
.font-style-panel { height: min(68vh,680px); min-height: 350px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border-color); border-left: 0; border-radius: 0 0 8px 0; padding: 18px; background: #f7f6fb; }
.font-style-panel h3 { color: #3c3150; font-size: .84rem; font-weight: 700; line-height: 1.5; }
.font-style-intro { font-size: .73rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.6; }
.font-style-card { padding: 13px 0; border-top: 1px solid var(--border-color); margin-top: 12px; }
.font-style-card-heading { display: flex; align-items: center; gap: 9px; font-size: .74rem; color: var(--text-secondary); margin-bottom: 10px; }
.font-style-variant { font-size: .77rem; line-height: 1.7; color: #5a5069; overflow-wrap: anywhere; }
.font-style-variant + .font-style-variant { margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--border-color); }
.font-style-family { font-weight: 650; color: #352b43; }
.font-style-variant .style-color-value { display: flex; margin-top: 3px; }
.stage-canvas { position: relative; margin: 0 auto; background: white; box-shadow: 0 2px 12px #332a4510; }
#stage-image { width: 100%; height: 100%; max-width: none; object-fit: fill; }
.html-layer, #filter-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
#sample-html { display: block; border: none; max-width: none; transform-origin: top left; }
#filter-overlay rect { vector-effect: non-scaling-stroke; stroke-width: 1.3; }
.html-compare { margin: 12px 0 0; }
.html-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #6350a3; box-shadow: 0 0 0 1px #ffffffc9; transform: translateX(-1px); z-index: 3; pointer-events: none; }
#html-divider-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #6350a3; color: #fff; font-size: 20px; box-shadow: 0 1px 7px #2c214c55; cursor: ew-resize; touch-action: none; pointer-events: auto; }
#html-divider-handle:focus-visible { outline: 3px solid #df7259; outline-offset: 3px; }
.split-label { position: absolute; top: 10px; z-index: 2; padding: 4px 7px; border-radius: 4px; background: #fffffff0; box-shadow: 0 1px 7px #30244122; color: #493e60; font-size: .6rem; font-weight: 600; pointer-events: none; }
.split-label-html { left: 10px; }.split-label-original { right: 10px; }
.html-view-buttons { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.html-view-buttons button { border: 1px solid var(--border-color); background: white; color: var(--text-secondary); padding: 6px 12px; border-radius: 5px; font-size: .72rem; cursor: pointer; }
.html-view-buttons button[aria-pressed="true"] { background: #eee9f8; border-color: #bfb0db; color: var(--primary-color); font-weight: 600; }
.filter-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: .7rem; margin: 12px 0; color: var(--text-secondary); }
.filter-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.kept-dot { background: #168278; }.removed-dot { background: #b34d50; }
.stage-description { color: var(--text-secondary); font-size: .82rem; line-height: 1.8; margin: 16px 0; }
.sample-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--border-color); padding: 18px 0; gap: 18px; }
.sample-stats dt { color: var(--primary-color); font-size: 1.3rem; line-height: 1.3; font-weight: 650; }
.sample-stats dd { font-size: .68rem; color: var(--text-secondary); margin-top: 4px; }
.module-inspector { margin: 18px 0 0; }
.module-inspector summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--primary-color); }
#inspector-content { max-height: 340px; overflow: auto; margin-top: 12px; font-size: .77rem; }
.inspector-table { border-collapse: collapse; width: 100%; }
.inspector-table th, .inspector-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.inspector-table th { font-weight: 600; background: #f7f6fb; font-size: .72rem; position: sticky; top: 0; }
.inspector-table td:first-child { white-space: nowrap; }
.inspector-table .word-excerpt { min-width: 140px; }
.style-group-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; color: #fff; background: #655581; font-weight: 600; font-size: .72rem; }
.style-color-value { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.style-color-value i { display: inline-block; width: 13px; height: 13px; border: 1px solid #aaa3b4; border-radius: 3px; }
.font-size-note { margin-top: 20px; padding: 18px 20px; background: #f7f6fb; border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-secondary); font-size: .76rem; line-height: 1.8; }
.font-size-note h3 { color: var(--text-primary); font-size: .84rem; font-weight: 600; margin-bottom: 8px; }
.font-size-note math[display="block"] { margin: 16px 0; color: var(--primary-color); font-size: 1.2rem; }
.stage-buttons button:disabled { opacity: .45; cursor: not-allowed; }
.qa-panel, .sample-files { border-top: 1px solid var(--border-color); margin-top: 35px; padding-top: 28px; }
.qa-panel h3, .sample-files h3 { font-size: 1.35rem; line-height: 1.3; font-weight: 650; margin-bottom: 12px; }
.qa-intro, .sample-files > div > p:last-child { color: var(--text-secondary); font-size: .81rem; margin-bottom: 18px; max-width: 680px; }
.qa-pair { border-bottom: 1px solid #ece8f2; padding: 15px 0; }
.qa-pair h4 { font-weight: 600; font-size: .86rem; line-height: 1.6; }
.qa-pair h4 span { color: var(--primary-color); margin-right: 8px; font-size: .72rem; }
.qa-pair p { font-size: .81rem; color: var(--text-secondary); padding-left: 29px; margin-top: 7px; }
.additional-qa { margin-top: 20px; }
.additional-qa > summary { color: var(--primary-color); cursor: pointer; font-size: .84rem; font-weight: 600; }
.file-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ece8f2; padding: 12px 0; }
.file-item strong { display: block; font-size: .79rem; font-weight: 550; }
.file-item small { display: block; font-size: .64rem; color: var(--text-secondary); margin-top: 3px; }
.file-actions { display: flex; gap: 12px; font-size: .7rem; white-space: nowrap; }
.footer .explore-width > a { font-size: .82rem; }
@media (max-width: 1100px) {
  .viewer-result-row.has-style-panel { display: block; }
  .viewer-result-row.has-style-panel .stage-viewport { border-radius: 0; }
  .font-style-panel { height: auto; max-height: 420px; min-height: 0; border-left: 1px solid var(--border-color); border-top: 0; border-radius: 0 0 8px 8px; }
}
@media (max-width: 1000px) {
  .pipeline-entry { grid-template-columns: minmax(70px,.6fr) 14px minmax(85px,.7fr) 14px minmax(230px,2.5fr); gap: 4px; }
  .pipeline-node { padding: 9px; }
  .pipeline-tail { margin-left: 0; }
  .explore-width { width: calc(100% - 40px); }
  .explore-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 22px; }
  .collection-total { display: none; }
  .file-list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .pipeline-entry { grid-template-columns: 1fr 20px 1fr; gap: 7px; }
  .pipeline-entry > .to-vlm { grid-column: 2; transform: rotate(90deg); }
  .pipeline-vlm { grid-column: 1 / -1; }
  .pipeline-tail { grid-template-columns: 1fr; gap: 8px; }
  .pipeline-tail > .pipeline-arrow { transform: rotate(90deg); }
  .pipeline-branches { gap: 8px; }
  .pipeline-node { padding: 10px; }
  .pipeline-output { display: flex; align-items: center; gap: 16px; }
  .pipeline-output .pipeline-label { margin: 0; flex: 1; }
  .pipeline-output button { width: auto; min-width: 115px; }
  .pipeline-navigation button[data-stage] { font-size: .65rem; padding-inline: 6px; }
  .pipeline-label { font-size: .61rem; }
  .explore-width { width: calc(100% - 32px); }
  .explore-heading { padding-top: 32px; }
  .explore-heading p:last-child { font-size: .86rem; }
  .collection-buttons { gap: 6px; }
  .collection-buttons button { flex: 1; padding: 9px 8px; font-size: .7rem; }
  .collection-buttons button span { margin-left: 5px; }
  .explore-layout { display: block; }
  .sample-browser { position: static; max-height: none; margin-bottom: 25px; }
  .sample-list { display: flex; gap: 8px; padding: 5px; max-height: 105px; }
  .sample-item { flex: 0 0 165px; border: 1px solid var(--border-color); padding: 8px; }
  .sample-item img { width: 34px; height: 50px; }
  .sample-item strong { font-size: .73rem; }
  .sample-item small { font-size: .6rem; }
  #sample-count { margin: 6px 0 0; font-size: .7rem; }
  .sample-heading h2 { font-size: 1.35rem; }
  .sample-heading { margin-bottom: 14px; }
  .stage-buttons { gap: 5px; }
  .stage-buttons button { padding-inline: 8px; font-size: .67rem; }
  .viewer-toolbar { align-items: start; flex-wrap: wrap; padding: 8px; gap: 4px; }
  .viewer-toolbar > p { font-size: .7rem; }
  .viewer-tools { margin-left: auto; font-size: .65rem; }
  .viewer-tools a { margin-left: 3px; }
  .stage-viewport { height: 55vh; min-height: 320px; padding: 10px; }
  .sample-stats { gap: 10px; }
  .sample-stats dt { font-size: 1.1rem; }
  .sample-stats dd { font-size: .62rem; }
  .qa-pair p { padding-left: 0; }
  .back-to-paper { font-size: .73rem; }
}
