:root {
  color-scheme: light;
  --ink: #292929;
  --muted: #6e6e73;
  --line: #dedede;
  --line-strong: #c9c9c9;
  --canvas: #e8e8ea;
  --panel: #f7f7f8;
  --accent: #c93c2f;
  --accent-dark: #a92d22;
  --blue: #1473e6;
  --blue-soft: #e8f2ff;
  --green: #247a42;
  --focus: #1473e6;
  --header-height: 56px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; }
body { margin: 0; min-height: 100%; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, select, input[type="file"], input[type="range"], input[type="color"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .drop-zone:focus-within {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 46%);
  outline-offset: 2px;
}

.site-header {
  position: relative;
  z-index: 5;
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: white;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.header-identity, .header-actions { min-width: 0; display: flex; align-items: center; gap: 13px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: #222; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: -.015em; }
.brand-name { margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: 1.1; white-space: nowrap; }
.brand-icon { position: relative; width: 22px; height: 25px; border: 2px solid var(--accent); border-radius: 2px; transform: rotate(-2deg); }
.brand-icon::after { content: ""; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; background: white; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.brand-icon i { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--accent); }
.brand-icon i:nth-child(1) { top: 9px; }
.brand-icon i:nth-child(2) { top: 13px; }
.brand-icon i:nth-child(3) { top: 17px; right: 8px; }
.header-divider { width: 1px; height: 24px; background: var(--line); }
.header-document-name { min-width: 0; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #505050; font-size: 13px; }
.header-open-file {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  background: #323232;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.header-open-file:hover { background: #111; }
.header-note { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; font-weight: 650; white-space: nowrap; }
.header-note i, .local-pill i { width: 7px; height: 7px; border-radius: 50%; background: #39a85a; box-shadow: 0 0 0 3px rgba(57, 168, 90, .11); }
.header-help { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #555; text-decoration: none; font-size: 13px; font-weight: 700; }
.header-help:hover { background: #f3f3f3; }

.reader-main { height: calc(100dvh - var(--header-height)); }
.app-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: 70px minmax(0, 1fr); background: white; }
.tool-nav {
  min-height: 0;
  padding: 8px 12px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  background: white;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.tool-button {
  min-width: 105px;
  min-height: 52px;
  flex: 1 0 105px;
  margin: 0;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #3f3f42;
}
.tool-button:hover { background: #ececee; }
.tool-button.active { border-color: #bed9f7; background: var(--blue-soft); color: #105ba8; }
.tool-button > span:last-child { min-width: 0; display: grid; gap: 1px; }
.tool-button strong { font-size: 11px; }
.tool-button small { display: none; }
.tool-button.active small { color: #3f6f9f; }
.tool-glyph {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #c7c7ca;
  border-radius: 5px;
  background: white;
  color: #55555a;
  font-size: 14px;
  font-weight: 700;
}
.tool-button.active .tool-glyph { border-color: #8bbcf0; color: var(--blue); }

.work-area {
  --page-pane-width: 150px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--page-pane-width) 7px minmax(0, 1fr) 330px;
  background: var(--canvas);
}
.page-pane {
  min-width: 0;
  min-height: 0;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
}
.page-pane-resizer {
  position: relative;
  z-index: 2;
  min-width: 7px;
  cursor: col-resize;
  touch-action: none;
  background: var(--panel);
  border-inline: 1px solid transparent;
}
.page-pane-resizer::before {
  content: "";
  position: absolute;
  inset: 0 2px;
  background: var(--line);
  transition: background .15s, box-shadow .15s;
}
.page-pane-resizer:hover::before,
.page-pane-resizer:focus-visible::before,
.page-pane-resizer.dragging::before {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(20, 115, 230, .14);
}
.page-pane-resizer:focus-visible { outline-offset: -1px; }
body.resizing-page-pane { cursor: col-resize; user-select: none; }
.page-pane-heading { min-height: 42px; padding: 2px 3px 8px; display: grid; align-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.page-pane-heading strong { font-size: 11px; }
.page-pane-heading small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.page-pane-empty { margin: auto 8px; display: grid; place-items: center; gap: 9px; text-align: center; color: #85858a; }
.page-pane-empty span { width: 54px; aspect-ratio: .72; display: grid; place-items: center; border: 1px solid #c9c9cd; border-radius: 3px; background: white; box-shadow: 0 3px 8px rgba(0, 0, 0, .06); font-size: 15px; }
.page-pane-empty p { margin: 0; font-size: 9px; line-height: 1.4; }
.work-area.has-document .page-pane-empty { display: none; }

.document-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  background: var(--canvas);
}
.drop-zone {
  min-height: 280px;
  width: min(620px, calc(100% - 36px));
  margin: auto;
  padding: 36px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  text-align: center;
  border: 1.5px dashed #aaaab0;
  border-radius: 9px;
  background: white;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--blue); box-shadow: 0 7px 28px rgba(20, 115, 230, .13); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { width: 52px; height: 52px; margin-bottom: 4px; display: grid; place-items: center; border-radius: 50%; background: #f0f0f1; color: var(--accent); font-size: 25px; }
.drop-copy { display: grid; gap: 5px; }
.drop-zone strong { color: #303034; font-size: 16px; }
.drop-zone small { color: var(--muted); font-size: 11px; font-weight: 400; }
.drop-button { min-height: 34px; margin-top: 5px; padding: 8px 15px; border-radius: 4px; background: #323232; color: white; font-size: 11px; font-weight: 700; }
.drop-zone.compact {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 7px 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  text-align: left;
  border-style: solid;
  box-shadow: none;
}
.drop-zone.compact .drop-icon { width: 32px; height: 32px; margin: 0; font-size: 17px; }
.drop-zone.compact .drop-copy { min-width: 0; }
.drop-zone.compact strong, .drop-zone.compact small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-zone.compact strong { font-size: 11px; }
.drop-zone.compact small { font-size: 9px; }
.drop-zone.compact .drop-button { min-height: 30px; margin: 0; padding: 7px 10px; background: white; border: 1px solid var(--line-strong); color: #414145; }

.viewer-section {
  min-height: 480px;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #c7c7ca;
  border-radius: 6px;
  background: #d6d6d8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .09);
}
.viewer-toolbar {
  min-height: 48px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #38383a;
  color: white;
}
.viewer-identity { min-width: 0; display: flex; align-items: center; gap: 8px; }
.viewer-identity > span:last-child { min-width: 0; display: grid; gap: 1px; }
.viewer-identity strong, .viewer-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-identity strong { font-size: 10px; }
.viewer-identity small { max-width: 250px; color: #c9c9cb; font-size: 8px; }
.viewer-badge { width: 30px; height: 32px; display: grid; place-items: center; border-radius: 3px; background: var(--accent); color: white; font-size: 8px; font-weight: 800; }
.viewer-navigation { display: flex; align-items: center; gap: 5px; }
.viewer-navigation button, .viewer-navigation a {
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid #66666a;
  border-radius: 4px;
  background: #48484b;
  color: white;
  text-decoration: none;
  font-size: 9px;
}
.viewer-navigation button:hover:not(:disabled), .viewer-navigation a:hover { background: #57575b; }
.viewer-navigation button:disabled { cursor: not-allowed; opacity: .38; }
.viewer-navigation label { display: flex; align-items: center; gap: 5px; color: #dedee0; font-size: 9px; }
.viewer-navigation input { width: 48px !important; min-height: 31px !important; padding: 4px 6px !important; border: 1px solid #6c6c70 !important; border-radius: 4px !important; background: #252527 !important; color: white !important; text-align: center; }
.viewer-stage { position: relative; min-height: 380px; flex: 1 1 auto; background: #cfcfd1; }
#pdf-viewer { width: 100%; height: 100%; min-height: 380px; display: block; border: 0; background: #cfcfd1; }
.viewer-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 20px; background: #cfcfd1; color: #59595e; font-size: 11px; }
.viewer-help { margin: 0; padding: 6px 9px; background: #f6f6f7; color: var(--muted); font-size: 8px; line-height: 1.45; }

.page-section { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.section-line { min-height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.section-line > span { padding-bottom: 6px; color: #66666b; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.section-line small { padding-bottom: 6px; color: var(--muted); font-size: 8px; }
.section-line button { padding: 4px; border: 0; background: transparent; color: var(--accent-dark); font-size: 9px; font-weight: 800; }
.page-grid { height: 100%; padding: 9px 3px 3px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; overscroll-behavior-block: contain; }
.page-document { min-width: 0; flex: 0 0 auto; padding: 5px 6px; display: flex; align-items: center; gap: 6px; border: 1px solid #d7d7db; border-radius: 5px; background: #f1f1f3; }
.page-document + .page-card { margin-top: -3px; }
.page-document.active { border-color: #a8cbf3; background: #edf5ff; }
.page-document-index { flex: 0 0 auto; min-width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #cfcfd2; border-radius: 4px; background: white; color: #55555a; font-size: 8px; font-weight: 800; }
.page-document.active .page-document-index { border-color: #8bbcf0; color: var(--blue); }
.page-document-copy { min-width: 0; display: grid; gap: 1px; }
.page-document-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.page-document-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.page-document-use { flex: 0 0 auto; min-width: 27px; min-height: 25px; margin-left: auto; padding: 3px 5px; border: 1px solid #d2d2d5; border-radius: 4px; background: white; color: #55555a; font-size: 8px; font-weight: 800; }
.page-document-use:hover { border-color: var(--blue); color: #105ba8; }
.page-document-use[aria-pressed="true"] { border-color: #6da780; background: #edf7f0; color: #25603a; }
.page-card { position: relative; min-width: 0; width: 100%; flex: 0 0 auto; overflow: hidden; border: 1px solid #cfcfd2; border-radius: 5px; background: white; }
.page-card.passive { border-color: #dedee2; background: #fbfbfc; }
.page-card.passive .page-preview { background: #ededf0; }
.page-card.passive .page-card-footer strong { color: #6d6d73; }
.page-card[draggable="true"] { cursor: grab; }
.page-card[draggable="true"]:active { cursor: grabbing; }
.page-card.drag-target, .page-card.viewing { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(20, 115, 230, .14); }
.page-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(36, 122, 66, .14); }
.page-preview { position: relative; width: 100%; aspect-ratio: .72; padding: 6px; display: grid; place-items: center; border: 0; background: #e7e7e9; color: #58585c; font-size: 8px; }
.page-preview:hover, .page-preview:focus-within { background: #edf5ff; color: #105ba8; }
.page-preview-open { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.page-preview-open:focus-visible { outline-offset: -3px; }
.page-sheet { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; border: 1px solid #c8c8cb; border-radius: 2px; background: white; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); color: #77777b; font-size: 18px; pointer-events: none; }
.page-sheet iframe { width: 100%; height: 100%; display: block; border: 0; background: white; pointer-events: none; }
.page-sheet.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #d0d0d3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: thumbnail-spin .8s linear infinite;
}
.page-sheet.preview-error { padding: 10px; color: #77777b; font-size: 9px; line-height: 1.4; text-align: center; }
@keyframes thumbnail-spin { to { transform: rotate(360deg); } }
.page-card-footer { min-height: 36px; padding: 4px 5px; display: flex; align-items: center; justify-content: space-between; gap: 3px; border-top: 1px solid #e1e1e3; }
.page-card-footer strong { font-size: 8px; }
.page-card-footer span { display: flex; gap: 2px; }
.page-card-footer button { min-width: 25px; min-height: 25px; padding: 3px 5px; border: 1px solid #d2d2d5; border-radius: 4px; background: #fafafa; color: #55555a; font-size: 9px; }
.page-card-footer button:hover:not(:disabled) { border-color: var(--blue); color: #105ba8; }
.page-card-footer .page-remove:hover:not(:disabled) { border-color: #c85a50; background: #fff1ef; color: #9d2b21; }
.page-card-footer button:disabled { cursor: not-allowed; opacity: .35; }
.page-toggle { flex: 1; font-weight: 800; }
.page-toggle[aria-pressed="true"] { border-color: #6da780; background: #edf7f0; color: #25603a; }

.task-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid var(--line);
}
.task-pane-heading { min-height: 104px; padding: 13px 14px 12px; border-bottom: 1px solid var(--line); }
.tool-summary { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; }
.tool-summary > div { min-width: 0; }
.tool-summary p { margin: 0; }
#tool-kicker { color: var(--accent-dark); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.tool-summary h2 { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
#tool-description { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.45; }
.local-pill { align-self: start; display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.task-pane-scroll { min-height: 0; padding: 13px 14px 20px; overflow-y: auto; }
.task-pane-intro { min-height: 240px; padding: 28px 18px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; color: #4f4f54; }
.task-pane-intro strong { font-size: 13px; }
.task-pane-intro p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.intro-icon { width: 52px; height: 62px; display: grid; place-items: center; border: 2px solid #d3d3d6; border-radius: 5px; color: var(--accent); font-size: 10px; font-weight: 800; }
.work-area.has-files .task-pane-intro { display: none; }
.file-section, .options { margin-bottom: 18px; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-item { min-height: 57px; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #e8e8e9; }
.file-badge { width: 28px; height: 34px; display: grid; place-items: center; border: 1px solid #d0d0d3; border-radius: 3px; background: #fafafa; color: var(--accent-dark); font-size: 7px; font-weight: 800; }
.file-copy { min-width: 0; display: grid; gap: 2px; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.file-copy small { color: var(--muted); font-size: 8px; }
.file-actions { display: flex; align-items: center; gap: 3px; }
.file-actions button { min-width: 25px; height: 26px; padding: 0 6px; border: 1px solid #d4d4d6; border-radius: 4px; background: white; color: #5d5d62; font-size: 9px; }
.file-actions button:hover { border-color: var(--blue); color: #105ba8; }
.file-actions .file-choice { width: auto; color: #105ba8; font-size: 8px; font-weight: 800; }
.file-actions .file-choice[aria-pressed="true"] { border-color: #77a98a; background: #edf7f0; color: #25603a; }
.options .section-line { margin-bottom: 12px; }
.option-panel { display: grid; gap: 11px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 11px; }
label { display: grid; gap: 5px; color: #49494e; font-size: 9px; font-weight: 700; }
input:not([type="file"]):not([type="range"]):not([type="color"]):not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #c9c9cc;
  border-radius: 4px;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; line-height: 1.45; }
input[type="range"] { width: 100%; accent-color: var(--blue); }
input[type="color"] { width: 100%; height: 38px; padding: 3px; border: 1px solid #c9c9cc; border-radius: 4px; background: white; }
.option-help { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toggle { display: flex; align-items: center; gap: 8px; }
.toggle input { width: 16px; height: 16px; accent-color: var(--blue); }
.metadata-preview { padding: 10px; border-left: 3px solid #6da780; background: #edf7f0; color: #425b49; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }

.process-bar { padding: 11px 13px 13px; border-top: 1px solid var(--line); background: #fafafa; }
.status-copy { margin-bottom: 9px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.status-copy > span { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #b7b7ba; }
.status-copy > span.ready { background: #3ba45a; box-shadow: 0 0 0 4px rgba(59, 164, 90, .1); }
.status-copy > span.working { background: #e29a2d; animation: pulse 1s infinite alternate; }
.status-copy > span.error { background: #d64a3d; }
@keyframes pulse { to { opacity: .35; } }
.status-copy p { min-width: 0; margin: 0; display: grid; gap: 2px; }
.status-copy strong { font-size: 10px; }
.status-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.chain-toggle { margin-bottom: 9px; padding: 7px 8px; display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: white; cursor: pointer; }
.chain-toggle:hover { border-color: var(--line-strong); }
.chain-toggle input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--blue); }
.chain-toggle > span { min-width: 0; display: grid; gap: 3px; }
.chain-toggle strong { font-size: 9px; }
.chain-toggle small { color: var(--muted); font-size: 8px; font-weight: 400; line-height: 1.45; }
.chain-toggle:has(input:checked) { border-color: #77a98a; background: #f2f9f4; }

#process-button { width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; border-radius: 4px; background: var(--accent); color: white; font-size: 11px; font-weight: 800; }
#process-button:hover:not(:disabled) { background: var(--accent-dark); }
#process-button:disabled { cursor: not-allowed; opacity: .38; }
#process-button b { font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 21px; z-index: 10; transform: translate(-50%, 18px); padding: 10px 15px; border-radius: 999px; background: #252527; color: white; box-shadow: 0 12px 32px rgba(0, 0, 0, .24); font-size: 10px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript-note { padding: 14px 18px; border-bottom: 1px solid #e6c9a8; background: #fdf5e9; color: #5a4526; }
.noscript-note strong { font-size: 13px; }
.noscript-note p { margin: 5px 0 0; max-width: 78ch; font-size: 12px; line-height: 1.55; }
.noscript-note a { color: #8a5a1e; }

.page-content { padding: 34px 20px 46px; background: white; border-top: 1px solid var(--line); }
.content-inner { max-width: 900px; margin: 0 auto; }
.page-content h2 { margin: 34px 0 10px; font-size: 19px; line-height: 1.25; letter-spacing: -.015em; }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { margin: 0 0 5px; font-size: 12px; letter-spacing: -.005em; }
.page-content p { margin: 0 0 10px; color: #46464b; font-size: 12px; line-height: 1.65; }
.page-content p:last-child { margin-bottom: 0; }
.page-content a { color: #0f5ea8; }
.content-lead { max-width: 82ch; font-size: 13px !important; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 12px; }
.content-grid article { padding: 12px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.content-grid p { margin: 0; font-size: 11px; line-height: 1.6; }
.content-list { margin: 0; padding-left: 19px; display: grid; gap: 8px; color: #46464b; font-size: 12px; line-height: 1.6; }
.content-list strong { color: var(--ink); }
.content-faq { display: grid; gap: 14px; }
.content-faq article { padding-left: 13px; border-left: 3px solid #dcdce0; }
.content-faq h3 { font-size: 13px; }
.content-faq p { max-width: 84ch; }

@media (max-width: 1100px) {
  .tool-button { min-width: 92px; flex-basis: 92px; padding-inline: 6px; }
  .tool-glyph { width: 25px; height: 25px; }
  .work-area { --page-pane-width: 126px; grid-template-columns: var(--page-pane-width) 7px minmax(0, 1fr) 290px; }
}

@media (max-width: 760px) {
  html, body { height: auto; }
  body { overflow: auto; }
  .site-header { position: sticky; top: 0; height: 52px; padding-inline: 10px; }
  .brand .brand-name, .header-divider, .header-document-name, .header-note, .header-help { display: none; }
  .header-open-file { min-height: 38px; }
  .reader-main { height: auto; min-height: calc(100dvh - 52px); }
  .app-shell { height: auto; display: grid; grid-template-rows: 61px auto; }
  .tool-nav { position: sticky; top: 52px; z-index: 4; padding: 6px; gap: 4px; }
  .tool-button { min-width: 68px; width: 68px; height: 48px; min-height: 48px; flex: 0 0 auto; padding: 4px; flex-direction: column; gap: 2px; text-align: center; }
  .tool-button > span:last-child { display: block; }
  .tool-button strong { display: block; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
  .tool-glyph { width: 25px; height: 25px; font-size: 12px; }
  .work-area { display: flex; flex-direction: column; }
  .page-pane-resizer { display: none; }
  .page-pane { min-height: 190px; max-height: 230px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .page-pane-heading { min-height: 36px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
  .page-pane-heading small { text-align: right; }
  .page-pane-empty { min-height: 125px; margin: 0; align-content: center; }
  .page-pane-empty span { width: 42px; }
  .document-pane { min-height: 70vh; padding: 10px; overflow: visible; }
  .drop-zone { min-height: 230px; width: 100%; margin: 20px auto; }
  .drop-zone.compact { margin: 0; }
  .drop-zone.compact .drop-copy small { display: none; }
  .viewer-section { min-height: 65vh; }
  .viewer-toolbar { align-items: stretch; flex-direction: column; }
  .viewer-navigation { flex-wrap: wrap; }
  .viewer-navigation a { margin-left: auto; }
  .viewer-stage, #pdf-viewer { min-height: 58vh; }
  .page-section { width: 100%; overflow: hidden; }
  .page-grid { height: auto; padding: 7px 3px 4px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .page-card { min-width: 106px; width: 106px; }
  .page-card-footer button { min-width: 34px; min-height: 34px; }
  .page-document { min-width: 118px; width: 118px; align-items: stretch; flex-direction: column; justify-content: center; gap: 5px; }
  .page-document + .page-card { margin-top: 0; margin-left: -3px; }
  .page-document-use { min-height: 32px; margin-left: 0; }
  .task-pane { border-top: 1px solid var(--line); border-left: 0; }
  .task-pane-heading { min-height: 96px; }
  .task-pane-scroll { max-height: none; overflow: visible; }
  .task-pane-intro { min-height: 190px; }
  .process-bar { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -4px 12px rgba(0, 0, 0, .08); }
  .file-actions button { min-width: 34px; height: 34px; }
  .page-content { padding: 24px 14px 34px; }
  .page-content h2 { margin-top: 26px; font-size: 17px; }
  .chain-toggle input { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
