:root {
  color-scheme: dark;
  --background: #111214;
  --surface: #17191c;
  --surface-raised: #222325;
  --sidebar: #141517;
  --hover: #2c2d2f;
  --ink: #e6e7e9;
  --muted: #969799;
  --subtle: #8b8c8e;
  --border: #2f3032;
  --border-strong: #404143;
  --grid-line: #2d2e30;
  --accent: #c5e86b;
  --accent-hover: #d0ee8a;
  --accent-dim: #283120;
  --amber: #d3b47d;
  --brand-inner: #151811;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--background); color: var(--ink); font-size: 13px; line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
button { appearance: none; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button, input, textarea, select, a { -webkit-tap-highlight-color: transparent; }
button, a { -webkit-user-select: none; user-select: none; }
button:disabled { opacity: .34; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
input, textarea { min-width: 0; }
textarea { resize: none; }
svg { display: block; flex: 0 0 auto; }
[data-icon] { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; }
[data-icon] svg { width: 16px; height: 16px; }
[hidden] { display: none !important; }
::selection { background: #556d32; color: #f3f7eb; }
.app-shell { display: flex; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.workspace-shell { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.main-content { position: relative; display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; outline: none; }
.skip-link { position: fixed; top: -60px; left: 14px; z-index: 100; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: #191e12; text-decoration: none; }
.skip-link:focus { top: 10px; }

/* File navigation */
.sidebar { display: flex; flex: 0 0 208px; flex-direction: column; width: 208px; min-width: 0; min-height: 0; padding: 0 12px; border-right: 1px solid var(--border); background: var(--sidebar); }
.brand { display: flex; flex: 0 0 54px; align-items: center; align-self: stretch; gap: 8px; height: 54px; margin-bottom: 17px; padding: 0 7px; color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -.85px; line-height: 1; }
.brand-mark { width: 27px; height: 27px; color: var(--accent); }

.sidebar-section-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-bottom: 4px; padding-left: 10px; color: var(--subtle); font-size: 11px; font-weight: 500; letter-spacing: .55px; }
.open-file-list { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #48494b transparent; }
.open-file-list:empty { display: none; }
.file-item { position: relative; display: flex; flex: 0 0 auto; align-items: center; width: 100%; min-height: 54px; border: 1px solid transparent; border-radius: 6px; }
.file-item:hover { background: #202123; }
.file-item.active { border-color: #363f2e; background: #22291e; }
.file-item-main { display: flex; flex: 1 1 auto; align-items: center; align-self: stretch; gap: 8px; min-width: 0; padding: 9px 1px 9px 8px; text-align: left; }
.file-icon { display: flex; flex: 0 0 25px; align-items: center; justify-content: center; width: 25px; height: 29px; color: #a4b389; }
.file-icon svg { width: 18px; height: 18px; }
.file-icon.csv { color: #abacae; }
.file-item-text { display: block; flex: 1 1 auto; min-width: 0; }
.file-item-text strong, .file-item-text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-item-text strong { color: #cccdcf; font-size: 12px; font-weight: 500; line-height: 1.4; }
.file-item.active .file-item-text strong { color: #e2e8d8; }
.file-item-text small { margin-top: 3px; color: var(--subtle); font-size: 11px; line-height: 1.3; }
.dirty-dot, .file-dirty { display: inline-block; flex: 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.file-close { flex: 0 0 32px; width: 32px; height: 32px; margin-right: 2px; opacity: 0; }
.file-close svg { width: 13px; height: 13px; }
.file-item:hover .file-close, .file-item:focus-within .file-close, .file-item.active .file-close { opacity: 1; }
.sidebar-empty { flex: 0 0 auto; padding: 13px 10px; color: var(--subtle); font-size: 12px; }
.sidebar-empty p { margin: 0; }
.sidebar-bottom { flex: 0 0 auto; margin-top: auto; padding-top: 16px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; min-height: 47px; padding: 0 7px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.sidebar-footer > [data-icon] svg { width: 13px; height: 13px; }
.sidebar-footer .icon-button { margin-left: auto; }
.local-indicator { display: inline-block; flex: 0 0 auto; width: 4px; height: 4px; border-radius: 50%; background: #9fb473; }
.sidebar-scrim { display: none; }

/* Compact controls */
.button, .icon-button, .tool-button, .text-button, .file-item, .sheet-tab { transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: #28292b; color: #e3e4e6; font-size: 12px; font-weight: 500; white-space: nowrap; }
.button:hover:not(:disabled) { border-color: #565759; background: #333436; }
.button svg { width: 15px; height: 15px; }
.button-dark { border-color: #3f4042; background: #292a2c; color: #e7e9ec; }
.button-accent, .button-primary { border-color: var(--accent); background: var(--accent); color: #1b2112; font-weight: 600; }
.button-accent:hover:not(:disabled), .button-primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.button-quiet { border-color: var(--border-strong); background: transparent; color: #cacbcd; }
.button-danger { border-color: #824e43; background: #663e35; color: #f5ddd5; }
.button-danger:hover:not(:disabled) { border-color: #a66455; background: #7b483b; }
.button-small { height: 32px; padding: 0 10px; font-size: 12px; }
.icon-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 5px; color: var(--muted); }
.icon-button:hover:not(:disabled) { background: var(--hover); color: #e3e4e6; }
.icon-button.active { background: var(--accent-dim); color: var(--accent); }
.icon-button.small { width: 32px; height: 32px; }
.icon-button.small svg { width: 14px; height: 14px; }
.tool-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 5px; color: #afb0b2; font-size: 12px; white-space: nowrap; }
.tool-button:hover:not(:disabled) { background: var(--hover); color: #e4e5e7; }
.tool-button.active { background: #293122; color: #cde2a4; }
.tool-button svg { width: 15px; height: 15px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 4px; border-radius: 4px; color: #aeb8a2; font-size: 12px; white-space: nowrap; }
.text-button:hover { color: var(--accent); }
.text-button svg { width: 13px; height: 13px; }
.kbd, kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 20px; padding: 1px 5px; border: 1px solid #3b3c3e; border-radius: 4px; background: #1e1f21; color: #9c9d9f; font-family: var(--mono); font-size: 11px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.topbar { display: flex; flex: 0 0 54px; align-items: center; justify-content: space-between; gap: 12px; height: 54px; padding: 0 19px; border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-leading, .topbar-actions { display: flex; align-items: center; }
.topbar-leading { gap: 9px; min-width: 0; color: #bfc0c2; font-size: 13px; }
.topbar-actions { flex: 0 0 auto; gap: 8px; }
#breadcrumb-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.breadcrumb-tag { flex: 0 0 auto; padding: 1px 5px; border: 1px solid #3d3e40; border-radius: 4px; color: #a9aaac; font-size: 11px; line-height: 1.4; text-transform: uppercase; }
.topbar-divider { flex: 0 0 auto; width: 1px; height: 17px; background: #3a3b3d; }
.shortcut-hint { margin-left: 4px; padding-left: 9px; border-left: 1px solid #4f5052; color: #a5a6a8; font-family: var(--mono); font-size: 11px; font-weight: 400; }
.mobile-menu { display: none; }

/* File opener */
.welcome-view { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 32px 24px; overflow: auto; background: var(--background); }
.welcome-inner { flex: 0 0 auto; width: min(100%, 520px); margin: auto; padding: 16px 0 36px; text-align: center; }
.welcome-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 auto 18px; border: 1px solid #384331; border-radius: 7px; background: #1d2319; color: var(--accent); }
.welcome-mark svg { width: 21px; height: 21px; }
.welcome-view h1 { margin: 0 0 10px; color: #e8e9eb; font-size: 25px; font-weight: 550; letter-spacing: -.7px; line-height: 1.2; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 92px; margin-top: 14px; padding: 13px 16px; border: 1px dashed #48494b; border-radius: 6px; background: #191a1c; text-align: center; transition: border-color 130ms ease, background-color 130ms ease; }
.drop-zone:hover, .drop-zone.drag-over, .drop-zone.is-dragging { border-color: #9bb751; background: #1c2219; }
.drop-icon { margin-bottom: 3px; color: #9faa95; }
.drop-icon svg { width: 21px; height: 21px; }
.drop-zone > strong { color: #dedfe1; font-size: 13px; font-weight: 500; }
.drop-zone > span:not(.drop-icon):not(.supported-formats) { color: var(--muted); font-size: 12px; }
.browse-link { display: inline-flex; align-items: center; gap: 3px; color: #bbd68d; }
.browse-link svg { width: 12px; height: 12px; }
.drop-zone:hover .browse-link { color: var(--accent); }
.supported-formats { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: #9c9d9f; font-size: 11px; }
.supported-formats > span:not(.file-size-hint) { display: inline-flex; align-items: center; gap: 5px; min-height: 21px; padding: 2px 6px; border: 1px solid #3b3c3e; border-radius: 4px; color: #a6b09c; font-family: var(--mono); font-size: 11px; line-height: 1; }

.file-size-hint { color: var(--subtle); font-size: 11px; }
.welcome-demo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.welcome-separator { color: #66696b; }
.welcome-demo .text-button { gap: 5px; color: #a9b39e; }
.welcome-demo .text-button:hover { color: var(--accent); }

/* Spreadsheet controls */
.editor-view { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.file-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 16px 20px; background: #17191c; }
.file-heading-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-type-icon { display: flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 35px; border: 1px solid #3a4430; border-radius: 6px; background: #232b1c; color: #bfd499; }
.file-type-icon svg { width: 18px; height: 18px; }
.file-type-icon.csv { border-color: #404143; background: #27282a; color: #bfc0c2; }
.file-heading-text { min-width: 0; }
.file-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-title-line h1 { min-width: 0; margin: 0; overflow: hidden; color: #e3e4e6; font-size: 16px; font-weight: 550; letter-spacing: -.3px; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.demo-tag { flex: 0 0 auto; padding: 1px 5px; border: 1px solid #414244; border-radius: 4px; background: #28292b; color: #afb0b2; font-size: 11px; line-height: 1.4; }
.file-subtitle { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; white-space: nowrap; }
#file-details { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.file-detail-divider { color: #757678; }
.change-status { flex: 0 0 auto; color: #9a9b9d; }
.change-status.dirty { color: var(--amber); }
.download-control { position: relative; display: flex; flex: 0 0 auto; }
#download-button { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.download-menu-toggle { width: 30px; padding: 0; border-left-color: #9dbb50; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.download-menu-toggle svg { width: 13px; height: 13px; }
.editor-toolbar { display: flex; flex: 0 0 42px; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; height: 42px; padding: 0 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #1b1c1e; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 3px; min-width: 0; }
.toolbar-right { flex: 0 0 auto; }
.toolbar-divider { flex: 0 0 auto; width: 1px; height: 17px; margin: 0 5px; background: #3b3c3e; }
.tool-button kbd { min-height: 19px; margin-left: 6px; padding: 0 4px; }
.find-bar { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 42px; padding: 5px 16px; border-bottom: 1px solid #353c44; background: #1d2126; color: #adaeb0; }
.find-bar > [data-icon] svg { width: 14px; height: 14px; }
.find-bar input { width: min(290px, 48%); height: 32px; padding: 0 9px; border: 1px solid #3c444f; border-radius: 5px; background: #14171b; color: #e3e4e6; font-size: 12px; }
.find-bar input::placeholder { color: #929395; }
.find-bar input:focus { border-color: #8aa253; outline: 1px solid #8aa253; outline-offset: -1px; }
.find-count { margin-left: auto; overflow: hidden; color: #afb0b2; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.notice-bar { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 34px; padding: 3px 16px; border-bottom: 1px solid #4a3e2c; background: #28241c; color: #c7b18a; font-size: 11px; line-height: 1.5; }
.notice-bar > [data-icon] svg { width: 13px; height: 13px; }
#notice-text { flex: 1 1 auto; min-width: 0; }
.notice-bar .icon-button { width: 28px; height: 28px; color: #cfb482; }
.notice-bar .icon-button:hover { background: #3d3525; color: #ead3a4; }
.formula-bar { display: flex; flex: 0 0 40px; align-items: center; min-width: 0; height: 40px; border-bottom: 1px solid var(--border); background: var(--surface); }
.cell-address { flex: 0 0 67px; width: 67px; height: 100%; padding: 0 8px; border: 0; border-radius: 0; background: #1d2024; color: #b8c7a1; font-family: var(--mono); font-size: 11px; text-align: center; text-transform: uppercase; }
.cell-address:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
.formula-divider { flex: 0 0 auto; width: 1px; height: 18px; background: #414244; }
.formula-symbol { flex: 0 0 auto; margin: 0 12px; color: #949597; font-family: Georgia, serif; font-size: 15px; font-style: italic; line-height: 1; }
.formula-input { flex: 1 1 auto; width: 0; height: 36px; margin: 0; padding: 8px 9px 8px 0; overflow: auto; border: 0; border-radius: 0; outline: none; background: transparent; color: #dcdddf; font-size: 12.5px; line-height: 20px; white-space: pre; tab-size: 4; scrollbar-width: thin; scrollbar-color: #515254 transparent; }
.formula-input::placeholder { color: #8f9092; font-size: 12px; }
.formula-input:focus { outline: none; }
.formula-bar:focus-within { border-bottom-color: #9aae70; }
.formula-input.is-formula { color: #c8dca8; font-family: var(--mono); font-size: 12px; }
.formula-input.is-readonly, .formula-input[readonly] { color: #9c9d9f; cursor: default; }
.cell-type { flex: 0 0 auto; margin-right: 10px; padding: 1px 5px; border: 1px solid #434446; border-radius: 4px; color: #a8a9ab; font-size: 11px; line-height: 1.4; }
.cell-type.formula-type { border-color: #46563b; background: #232d1e; color: #becfa6; }
.formula-commit { margin-right: 7px; background: #29371f; color: var(--accent); }

/* Virtual grid: 36 px rows, 34 px column headings, 46 px gutter. */
.grid-viewport { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; outline: none; background: var(--surface); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #454c56 #1b1e22; }
.grid-viewport::-webkit-scrollbar { width: 10px; height: 10px; }
.grid-viewport::-webkit-scrollbar-track { background: #1e1f21; }
.grid-viewport::-webkit-scrollbar-thumb { border: 2px solid #1e1f21; border-radius: 5px; background: #4f5052; }
.grid-viewport::-webkit-scrollbar-thumb:hover { background: #6c6d6f; }
.grid-viewport::-webkit-scrollbar-corner { background: #1e1f21; }
.grid-canvas { position: relative; min-width: 100%; min-height: 100%; }
.grid-column-headers { position: absolute; top: 0; left: 0; z-index: 7; width: 100%; height: 34px; border-bottom: 1px solid #32363d; background: #202328; will-change: transform; }
.grid-column-header { position: absolute; top: 0; display: flex; align-items: center; justify-content: center; height: 34px; overflow: hidden; border-right: 1px solid #2d3137; border-bottom: 1px solid #32363d; background: #202328; color: #929aa5; font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; user-select: none; }
.grid-corner, .grid-corner-header { position: absolute; top: 0; left: 0; z-index: 3; width: 46px; height: 34px; border-right: 1px solid #353a42; border-bottom: 1px solid #32363d; background: #24282d; }
.corner-triangle { position: absolute; right: 7px; bottom: 6px; width: 8px; height: 8px; background: #667257; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.grid-rows { position: absolute; top: 0; left: 0; width: 100%; }
.grid-row { position: absolute; left: 0; display: flex; width: 100%; height: 36px; }
.row-header { position: absolute; top: 0; left: 0; z-index: 5; display: flex; align-items: center; justify-content: center; width: 46px; height: 36px; border-right: 1px solid #353a42; border-bottom: 1px solid #2b2f35; background: #1d2024; color: #929aa5; font-size: 11px; line-height: 1; user-select: none; }
.grid-column-header.selected, .grid-column-header.active, .row-header.selected, .row-header.active { border-right-color: #45543a; background: #303d25; color: #d3e4b7; font-weight: 600; }
.grid-cell { position: absolute; top: 0; display: block; min-width: 0; height: 36px; padding: 0 11px; overflow: hidden; border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); background: var(--surface); color: #d1d6dd; font-size: 13px; font-weight: 400; line-height: 35px; white-space: pre; text-overflow: ellipsis; cursor: cell; user-select: none; }
.grid-cell.is-header-row { background: #252e22; color: #d6e2cb; font-weight: 550; }
.grid-cell.is-number { font-variant-numeric: tabular-nums; text-align: right; }
.grid-cell.is-formula { color: #b3c6a1; }
.grid-cell.is-readonly { background: #16181b; color: #929aa4; cursor: default; }
.grid-cell.in-range { background: #242f1e; }
.grid-cell.selected { background: #2b3723; }
.grid-cell.edited::after { position: absolute; top: 0; right: 0; width: 0; height: 0; border-top: 5px solid #c4a06b; border-left: 5px solid transparent; content: ""; }
.grid-cell.find-match { background: #413b25; }
.grid-cell.find-match.selected { background: #3e472b; }
.formula-corner { position: absolute; top: 0; left: 0; width: 0; height: 0; border-top: 5px solid #779575; border-right: 5px solid transparent; }
.formula-corner.stale { border-top-color: #c4a06b; }
.cell-badge { display: inline-flex; align-items: center; height: 21px; max-width: 100%; padding: 0 7px; overflow: hidden; border-radius: 4px; background: #333436; color: #c4c5c7; font-size: 11px; font-weight: 500; line-height: 1; vertical-align: middle; white-space: nowrap; text-overflow: ellipsis; }
.cell-badge.done { background: #2c3d24; color: #bed9a3; }
.cell-badge.progress { background: #38393b; color: #c9cacc; }
.cell-badge.review { background: #3b3327; color: #d7bb90; }
.cell-badge.planned { background: #323335; color: #bebfc1; }
.grid-selection { position: absolute; z-index: 4; border: 2px solid var(--accent); background: transparent; pointer-events: none; }
.cell-editor { position: absolute; z-index: 9; height: 36px; margin: 0; padding: 6px 9px; overflow: auto; border: 2px solid var(--accent); border-radius: 0; outline: none; background: #222c1e; color: #e3ecda; font-size: 13px; font-weight: 400; line-height: 20px; white-space: pre; tab-size: 4; scrollbar-width: thin; scrollbar-color: #647747 #222c1e; }
.cell-editor:focus { outline: none; }
.cell-editor.is-number { font-variant-numeric: tabular-nums; text-align: right; }
.cell-editor.is-formula { font-family: var(--mono); font-size: 12px; }
.sheet-bar { display: flex; flex: 0 0 39px; align-items: stretch; gap: 16px; height: 39px; min-width: 0; padding: 0 12px; border-top: 1px solid #343a42; background: var(--surface); }
.sheet-tabs { display: flex; flex: 1 1 auto; align-items: stretch; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.sheet-tabs::-webkit-scrollbar { display: none; }
.sheet-tab { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; height: 100%; padding: 0 13px; color: #abacae; font-size: 12px; font-weight: 400; white-space: nowrap; }
.sheet-tab svg { width: 13px; height: 13px; }
.sheet-tab:hover { background: #323335; color: #dfe0e2; }
.sheet-tab.active, .sheet-tab[aria-selected="true"] { background: #283421; color: #d2e4b5; font-weight: 500; }
.sheet-tab.active::after, .sheet-tab[aria-selected="true"]::after { position: absolute; right: 11px; bottom: 0; left: 11px; height: 2px; background: var(--accent); content: ""; }
.sheet-tab:focus-visible { outline-offset: -4px; }

.status-bar { display: flex; flex: 0 0 32px; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; height: 32px; padding: 0 16px; border-top: 1px solid #2d3239; background: #15171a; color: #929aa5; font-size: 11px; }
.status-left, .status-right { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; }
.status-left { flex: 1 1 auto; }
.status-right { flex: 0 1 auto; justify-content: flex-end; }
.status-separator { color: #7f8082; }
#sheet-stats, #selection-status, #selection-aggregate { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#selection-status { font-family: var(--mono); font-size: 11px; }
#selection-aggregate { font-variant-numeric: tabular-nums; }
.status-bar .text-button { color: #aaabad; font-size: 11px; }
.status-bar .text-button:hover { color: var(--accent); }
.status-bar .text-button svg { width: 12px; height: 12px; }

/* Menus and dialogs */
.popover { position: absolute; z-index: 30; min-width: 218px; padding: 5px; border: 1px solid #3c444e; border-radius: 7px; background: #22262c; }
.download-menu { top: calc(100% + 7px); right: 0; }
.menu-heading { padding: 8px 9px; color: #abacae; font-size: 11px; font-weight: 500; letter-spacing: .6px; }
.download-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 8px; border-radius: 5px; color: #e5e6e8; text-align: left; }
.download-menu > button:hover { background: #414244; }
.download-menu strong { display: block; font-size: 12px; font-weight: 500; }
.download-menu small { display: block; margin-top: 3px; color: #b3b4b6; font-size: 11px; }
.menu-format { display: flex; flex: 0 0 29px; align-items: center; justify-content: center; width: 29px; height: 32px; border: 1px solid #526640; border-radius: 4px; background: #303e26; color: #c4dda7; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.menu-format.csv { border-color: #5f6062; background: #3f4042; color: #cccdcf; }
.app-dialog { position: fixed; inset: 0; width: min(480px, calc(100vw - 36px)); max-height: min(84dvh, 720px); margin: auto; padding: 22px; overflow-y: auto; border: 1px solid #3b434d; border-radius: 8px; background: #1c2025; color: var(--ink); scrollbar-width: thin; scrollbar-color: #535d69 #1c2025; }
.app-dialog::backdrop { background: rgb(6 9 13 / 72%); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-icon { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border: 1px solid #4d633b; border-radius: 6px; background: #2b3b21; color: #bed79c; }
.dialog-icon svg { width: 17px; height: 17px; }
.app-dialog h2 { margin: 0 0 14px; color: #eaebed; font-size: 20px; font-weight: 550; letter-spacing: -.4px; line-height: 1.3; }
.dialog-body { color: #c0c1c3; font-size: 13px; line-height: 1.65; }
.dialog-body p { margin: 0 0 12px; }
.dialog-body p:last-child { margin-bottom: 0; }
.dialog-body strong { color: #eaebed; font-weight: 550; }
.dialog-body a { color: var(--accent); text-underline-offset: 3px; }
.dialog-body ul, .dialog-body ol { margin: 12px 0; padding-left: 20px; }
.dialog-body li + li { margin-top: 6px; }
.dialog-body hr { height: 1px; margin: 16px 0; border: 0; background: #525355; }
.dialog-body code { padding: 2px 4px; border-radius: 3px; background: #404143; color: #d8d9db; font-family: var(--mono); font-size: 11px; }
.dialog-body dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 16px; margin: 14px 0; padding: 12px; border: 1px solid #343d47; border-radius: 6px; background: #171b20; font-size: 12px; }
.dialog-body dt { color: #afb0b2; }
.dialog-body dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #e0e1e3; text-align: right; }
.dialog-body table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dialog-body th, .dialog-body td { padding: 8px 0; border-bottom: 1px solid #4c4d4f; text-align: left; }
.dialog-body th { color: #dbdcde; font-weight: 550; }
.dialog-body th:last-child, .dialog-body td:last-child { text-align: right; }
.dialog-body tr:last-child td { border-bottom: 0; }
.shortcut-list, .shortcuts-list { display: flex; flex-direction: column; margin: 4px 0; }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #4c4d4f; color: #c1c2c4; font-size: 12px; }
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row > span:last-child { display: inline-flex; flex: 0 0 auto; gap: 4px; }
.dialog-callout { margin: 14px 0; padding: 11px 12px; border: 1px solid #4b613a; border-radius: 6px; background: #27391e; color: #bfd2a7; font-size: 12px; line-height: 1.6; }
.dialog-callout.warning { border-color: #665333; background: #342c1d; color: #dac08c; }
.dialog-option { display: flex; align-items: flex-start; gap: 9px; margin: 10px 0; padding: 11px; border: 1px solid #39434f; border-radius: 6px; background: #22282e; color: #d3d4d6; }
.dialog-option input { flex: 0 0 auto; margin: 4px 0 0; accent-color: var(--accent); }
.dialog-option small { display: block; margin-top: 3px; color: #b1b2b4; font-size: 11px; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #525355; }

/* Feedback */
.drag-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; border: 3px solid var(--accent); background: rgb(16 22 28 / 96%); pointer-events: none; }
.drag-overlay-card { width: min(380px, 100%); padding: 34px 24px; border: 1px dashed #6d884d; border-radius: 7px; background: #222f1b; text-align: center; }
.drag-overlay-card > [data-icon] { color: var(--accent); }
.drag-overlay-card > [data-icon] svg { width: 28px; height: 28px; }
.drag-overlay h2 { margin: 16px 0 9px; color: #dbe8cc; font-size: 22px; font-weight: 550; letter-spacing: -.5px; }
.drag-overlay p { margin: 0; color: #a8bd93; font-size: 12px; }
.busy-overlay { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgb(6 13 19 / 64%); }
.busy-card { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; padding: 24px 30px; border: 1px solid #3b4550; border-radius: 8px; background: #21262c; text-align: center; }
.busy-card strong { color: #e8e9eb; font-size: 13px; font-weight: 500; }
.busy-card > span:last-child { color: #b9babc; font-size: 12px; }
.spinner { width: 22px; height: 22px; border: 2px solid #67686a; border-top-color: var(--accent); border-radius: 50%; animation: spin 850ms linear infinite; }
.toast-region { position: fixed; right: 18px; bottom: 46px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid #424d59; border-radius: 7px; background: #242a31; color: #d8dfe7; font-size: 12px; line-height: 1.5; pointer-events: auto; animation: toast-in 140ms ease-out both; }
.toast > [data-icon] { margin-top: 1px; color: var(--accent); }
.toast > [data-icon] svg { width: 16px; height: 16px; }
.toast strong { color: #ecedef; font-weight: 550; }
.toast-message { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast .icon-button { width: 28px; height: 28px; margin: -3px -5px -3px auto; }
.toast.error, .toast.is-error { border-color: #845543; background: #452f26; color: #e9c8b7; }
.toast.error > [data-icon], .toast.is-error > [data-icon] { color: #dfaf8d; }
.toast.leaving, .toast.is-leaving { animation: toast-out 140ms ease-in forwards; }
.noscript { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; padding: 14px; background: #35481f; color: #e5f0d3; text-align: center; font-size: 13px; }

@keyframes spin {to { transform: rotate(360deg); } }
@keyframes toast-in {from { opacity: 0; transform: translateY(4px); }to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out {to { opacity: 0; transform: translateY(3px); } }


/* Filter strip and column width handles */
.paste-box { display:block; width:100%; min-height:165px; padding:12px; resize:vertical; border:1px solid #45494b; border-radius:7px; background:#151819; color:#e6e7e9; font:12px/1.6 var(--mono); outline:none; }
.paste-box:focus { border-color:var(--accent); }
.filter-bar { display:flex; flex:0 0 auto; align-items:center; gap:8px; min-height:44px; padding:5px 16px; border-bottom:1px solid var(--border); background:#1c2021; color:#a7b0a7; }
.filter-bar [data-icon] svg { width:14px; height:14px; }
.filter-prefix { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:12px; }
.filter-bar input { height:31px; padding:0 9px; border:1px solid #404446; border-radius:5px; outline:none; color:var(--ink); background:#131516; font-size:12px; }
.filter-bar input:focus { border-color:#b2ce72; }
.filter-column { width:54px; text-transform:uppercase; font-family:var(--mono); text-align:center; }
.filter-input { flex:0 1 250px; min-width:70px; }
.filter-count { margin-left:auto; font-size:11px; color:#abb6a2; white-space:nowrap; }
.column-resize-handle { position:absolute; z-index:2; top:0; right:0; width:9px; height:100%; cursor:col-resize; touch-action:none; }
.column-resize-handle:hover, .column-resize-handle:focus-visible { background:#c5e86b55; outline:none; border-right:2px solid var(--accent); }
body.resizing-column, body.resizing-column * { cursor:col-resize !important; user-select:none !important; }
.grid-row.filtered-header .row-header { background:#242e22; color:#c5e86b; }
@media (max-width: 640px) {
 .filter-bar { padding:6px 9px; flex-wrap:wrap; gap:6px; }
 .filter-bar .filter-prefix { font-size:11px; }
 .filter-bar .filter-input { flex:1 1 90px; width:100px; }
 .filter-count { order:8; margin-left:0; flex:1 1 auto; }
 .filter-bar .button-small { padding:0 7px; }
}
@media (max-width: 900px) {
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 51; width: 208px; max-width: calc(100vw - 48px); height: 100vh; height: 100dvh; visibility: hidden; transform: translateX(-100%); transition: transform 170ms ease, visibility 170ms ease; }
.sidebar-open .sidebar { visibility: visible; transform: translateX(0); }
.sidebar-scrim { position: fixed; inset: 0; z-index: 50; display: block; background: rgb(4 10 15 / 68%); }
.mobile-menu { display: inline-flex; }
.topbar { padding-right: 16px; padding-left: 10px; }
.topbar-leading { gap: 7px; }
.shortcut-hint { display: none; }
.file-heading { padding-right: 17px; padding-left: 17px; }

}

@media (max-width: 640px) {
.topbar { gap: 8px; padding: 0 10px 0 6px; }
.topbar-leading { gap: 6px; font-size: 12px; }
.topbar-actions { gap: 5px; }
.topbar-divider { display: none; }
.button-small { padding: 0 9px; }
.welcome-view { padding: 24px 18px; }
.welcome-inner { padding-bottom: 35px; }
.welcome-view h1 { margin-bottom: 22px; font-size: 24px; }
.drop-zone { min-height: 158px; padding: 24px 18px 21px; }
.file-heading { gap: 10px; min-height: 70px; padding: 13px 12px; }
.file-heading-main { gap: 9px; }
.file-type-icon { flex-basis: 30px; width: 30px; height: 33px; }
.file-title-line { gap: 6px; }
.file-title-line h1 { font-size: 15px; }
.file-subtitle { gap: 5px; }
#file-details { max-width: 170px; }
#download-button { width: 35px; padding: 0; }
.download-menu-toggle { width: 30px; }
#download-button > span:not([data-icon]), #grid-view-button > span:not([data-icon]), [data-action="add-row"].tool-button > span:not([data-icon]) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
#grid-view-button, [data-action="add-row"].tool-button { width: 32px; padding: 0; }
.editor-toolbar { gap: 6px; padding: 0 9px; }
.toolbar-left, .toolbar-right { gap: 2px; }
.toolbar-divider { margin: 0 4px; }
.tool-button { padding: 0 7px; }
.tool-button kbd { display: none; }
.find-bar { gap: 5px; padding: 5px 10px; }
.find-bar input { flex: 1 1 auto; width: 0; }
.find-count { max-width: 78px; }
.notice-bar { gap: 6px; padding: 3px 11px; }
.cell-address { flex-basis: 57px; width: 57px; padding: 0 6px; }
.formula-symbol { margin: 0 9px; }
.cell-type { margin-right: 7px; padding: 1px 4px; }
.formula-commit { margin-right: 5px; }
.sheet-bar { padding: 0 4px; }
.sheet-tab { padding: 0 12px; }
.status-bar { gap: 8px; padding: 0 10px; }
.status-left, .status-right { gap: 6px; }
#sheet-stats { max-width: 170px; }
#selection-aggregate { max-width: 135px; }
.status-right > .text-button, .status-right > .status-separator { display: none; }
.app-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 18px; }
.app-dialog h2 { font-size: 20px; }
.dialog-actions { margin-top: 19px; padding-top: 15px; }
.dialog-actions .button { min-height: 36px; }
.drag-overlay { padding: 18px; }
.drag-overlay-card { padding: 29px 20px; }
.toast-region { right: 12px; bottom: 43px; width: calc(100vw - 24px); }
}

@media (max-width: 420px) {
#file-details { max-width: 130px; }
.demo-tag { display: none; }
#sheet-stats { max-width: 153px; }
#selection-aggregate { max-width: 92px; }
}

@media (hover: none) {
.file-close { opacity: 1; }
.file-item { min-height: 57px; }
}

@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
.grid-selection { border-color: Highlight; }
.grid-cell.selected { outline: 1px solid Highlight; outline-offset: -1px; }
.sheet-tab.active::after, .sheet-tab[aria-selected="true"]::after { background: Highlight; }
.local-indicator { border: 1px solid currentColor; }
}


/* Text and JSON */
.text-view { display:flex; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0; background:var(--surface); }
.text-mode-switch { display:inline-flex; align-items:center; gap:2px; padding:2px; border:1px solid #373a3d; border-radius:6px; background:#151719; }
.text-mode-switch .tool-button { height:27px; min-width:58px; font-size:12px; }
.text-mode-switch .tool-button.active { background:#34412a; color:var(--accent); }
.text-toolbar { flex-wrap:nowrap; }
.text-source-pane, .text-tree-pane { flex:1 1 auto; min-width:0; min-height:0; overflow:auto; }
.text-source-pane { display:flex; background:#151719; }
.text-editor { flex:1 1 auto; width:100%; height:100%; padding:22px 30px 48px; border:0; outline:0; border-radius:0; background:#151719; color:#d3d9df; font:13px/1.7 var(--mono); resize:none; white-space:pre; overflow:auto; tab-size:2; caret-color:var(--accent); scrollbar-width:thin; scrollbar-color:#44484c #151719; }
.text-editor:focus { outline:0; }
.text-editor.wrapped { white-space:pre-wrap; overflow-wrap:anywhere; }
.text-editor::selection { background:#3d5133; color:#f5f9f1; }
.text-warning { flex:0 0 auto; padding:9px 18px; border-bottom:1px solid #55452d; background:#2b251b; color:#d6bc90; font:12px/1.5 var(--mono); overflow-wrap:anywhere; }
.text-tree-pane { padding:18px clamp(15px,3vw,38px) 56px; background:#17191b; scrollbar-width:thin; }
.text-tree { max-width:1100px; margin:0 auto; color:#c9cdd2; font:12px/1.75 var(--mono); }
.json-branch { min-width:0; }
.json-summary { display:flex; gap:13px; align-items:baseline; min-height:28px; padding:2px 8px; border-radius:4px; list-style-position:inside; cursor:pointer; user-select:text; }
.json-summary:hover { background:#24292a; }
.json-summary::marker { color:#9bb774; }
.json-summary .json-key { font-weight:550; }
.json-meta { color:#858e93; font-size:11px; }
.json-children { min-width:0; margin:1px 0 5px 13px; padding-left:15px; border-left:1px solid #34383a; }
.json-leaf { display:flex; align-items:baseline; gap:9px; min-width:0; padding:3px 8px; border-radius:4px; overflow-wrap:anywhere; }
.json-leaf:hover { background:#24292a; }
.json-key { color:#c1d69b; }
.json-colon { color:#858c93; }
.json-value { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; color:#cbd1d8; }
.json-string { color:#bfcda9; }
.json-number { color:#dabb98; }
.json-boolean { color:#a2bde0; }
.json-null { color:#98a1aa; font-style:italic; }
.json-more { margin:6px 0 12px 7px; padding:5px 12px; border:1px solid #454d43; border-radius:4px; color:#c3d6a5; font:12px var(--mono); text-align:left; }
.json-more:hover { border-color:#839a59; background:#242b20; }
.json-empty, .json-limit { padding:11px; color:#959c9f; }
.file-icon.json, .file-icon.jsonl, .file-type-icon.json, .file-type-icon.jsonl { color:#adc1df; }
.file-type-icon.json, .file-type-icon.jsonl { border-color:#374554; background:#202932; }
.file-icon.txt, .file-icon.log, .file-type-icon.txt, .file-type-icon.log { color:#abb2b8; }
.file-type-icon.txt, .file-type-icon.log { border-color:#434547; background:#28292b; }
@media(max-width:700px) {
  .text-editor { padding:16px 13px 40px; font-size:12px; }
  .text-tree-pane { padding:12px 10px 40px; }
  .text-toolbar { padding:0 8px; }
  #text-download { height:32px; padding:0 9px; font-size:11px; }
  #text-file-title { max-width:100%; }
}


/* Archive explorer */
.archive-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:var(--surface)}
.file-icon.zip,.file-icon.epub{color:#bccba5}
.file-type-icon.zip,.file-type-icon.epub{border-color:#43543b;background:#283025;color:#bdd5a0}
.archive-layout{display:grid;grid-template-columns:252px minmax(0,1fr);flex:1 1 auto;min-height:0;min-width:0;border-top:1px solid var(--border)}
.archive-navigation{display:flex;flex-direction:column;min-height:0;min-width:0;padding:13px 9px 12px;border-right:1px solid var(--border);background:#181a1c}
.archive-nav-title{padding:0 10px 11px;color:#8d9497;font-size:10px;font-weight:650;letter-spacing:.7px}
.archive-filter-wrap{display:flex;align-items:center;gap:7px;margin:0 5px 12px;padding:0 9px;border:1px solid #393e3d;border-radius:6px;background:#121517;color:#939d9b}
.archive-filter-wrap:focus-within{border-color:#7b9852}
.archive-filter-wrap svg{width:14px;height:14px}
.archive-filter-wrap input{flex:1;min-width:0;height:32px;padding:0;border:0;outline:0;background:transparent;color:#d4d8d3;font-size:12px}
.archive-tree{min-height:0;flex:1 1 auto;overflow:auto;scrollbar-width:thin;scrollbar-color:#454c43 transparent}
.archive-tree-row{padding-left:calc(var(--depth)*14px)}
.archive-entry{display:flex;align-items:center;gap:6px;width:100%;min-height:30px;padding:4px 8px;border-radius:5px;color:#bcc2be;font:12px/1.45 var(--mono);text-align:left}
.archive-entry:hover{background:#272b2b;color:#e8ebe7}
.archive-entry.selected{background:#293621;color:#d2e4b6}
.archive-entry.dirty .archive-entry-label:after,.archive-search-hit.dirty:after{content:' •';color:var(--amber)}
.archive-disclosure{flex:0 0 12px;color:#929a90;text-align:center}
.archive-glyph{flex:0 0 15px;color:#8a9f88;text-align:center;font-size:13px}
.archive-entry-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.archive-nothing{padding:10px;color:var(--muted);font-size:12px}
.archive-search-hit{overflow-wrap:anywhere;white-space:normal}
.archive-detail{display:flex;flex-direction:column;min-height:0;min-width:0;background:#151719}
.archive-file-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid var(--border);min-height:60px}
.archive-file-title-wrap{display:flex;align-items:center;gap:8px;min-width:0}
.archive-file-title-wrap strong{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:550;color:#e1e6df}
.archive-file-title-wrap small{color:#919a98;font-size:11px;white-space:nowrap}
.archive-member-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.archive-modebar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:45px;padding:7px 18px;border-bottom:1px solid #2f3633;background:#1b1e1d}
.archive-modebar .tool-button{min-width:64px}
.archive-path{overflow:hidden;text-align:right;white-space:nowrap;text-overflow:ellipsis;color:#929b95;font:11px var(--mono)}
.archive-preview,.archive-source-pane,.archive-details{flex:1 1 auto;min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#4a5150 transparent}
.archive-preview{padding:0;background:#151719}
.archive-source-pane{display:flex}
.archive-source-pane .text-editor{padding:20px 24px}
.archive-details{padding:20px 28px}
.archive-details dl{max-width:730px}
.archive-image-frame{display:flex;align-items:center;justify-content:center;min-height:100%;padding:36px;background:radial-gradient(circle at center,#242927,#171a1b 70%)}
.archive-image{max-width:100%;max-height:65vh;object-fit:contain;filter:drop-shadow(0 10px 35px #0006)}
.archive-code-preview{max-width:1100px;min-height:100%;margin:0 auto;padding:26px 31px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#c7d0ca;font:12px/1.7 var(--mono)}
.archive-preview-blank{display:flex;align-items:center;justify-content:center;min-height:200px;padding:32px;color:#8f9895;font-size:12px;text-align:center}
.archive-markdown{max-width:840px;margin:0 auto;padding:30px clamp(16px,4vw,54px) 64px;color:#d5dcd6;font:14px/1.8 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;overflow-wrap:anywhere}
.archive-markdown h1,.archive-markdown h2,.archive-markdown h3,.archive-markdown h4{color:#ebf0e8;line-height:1.35;letter-spacing:-.025em}
.archive-markdown h1{font-size:26px}.archive-markdown h2{font-size:21px}.archive-markdown h3{font-size:17px}
.archive-markdown h1,.archive-markdown h2{padding-bottom:10px;border-bottom:1px solid #303933}
.archive-markdown p{white-space:pre-wrap}
.archive-markdown ul{padding-left:24px}
.archive-markdown blockquote{margin-left:0;padding-left:18px;border-left:3px solid #748b53;color:#aab8ae}
.archive-md-code{overflow:auto;padding:16px;background:#222624;border:1px solid #343b36;border-radius:6px;color:#cadacf;font:12px/1.65 var(--mono)}
@media(max-width:850px){.archive-layout{grid-template-columns:190px minmax(0,1fr)}.archive-file-toolbar{padding:10px}.archive-modebar{padding:7px 10px}.archive-path{display:none}.archive-file-title-wrap small{display:none}}
@media(max-width:560px){.archive-layout{display:flex;flex-direction:column}.archive-navigation{flex:0 0 155px;border-right:0;border-bottom:1px solid var(--border)}.archive-tree{overflow:auto}.archive-detail{flex:1 1 auto}.archive-file-toolbar{min-height:44px}.archive-member-actions .button{padding:0 6px}.archive-markdown{padding:18px 15px}.archive-source-pane .text-editor{padding:14px}}


/* Folder collections: lazy browser with a compact Quick Look. */
.folder-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:#17191b}
.file-type-icon.folder,.file-icon.folder{color:#bed29a}
.file-type-icon.folder{border-color:#43513b;background:#283122}
.folder-layout{display:grid;grid-template-columns:300px minmax(0,1fr);flex:1 1 auto;min-height:0;min-width:0;border-top:1px solid var(--border)}
.folder-navigation{display:flex;flex-direction:column;min-height:0;min-width:0;background:#171a1a;border-right:1px solid #323735}
.folder-navigation-top{display:flex;justify-content:space-between;gap:10px;padding:16px 16px 10px;color:#9fa6a3;font-size:10px;font-weight:650;letter-spacing:.6px}
.folder-navigation-top span:last-child{font-weight:450;letter-spacing:0;color:#8d9791}
.folder-search-wrap{display:flex;align-items:center;gap:6px;margin:0 11px 9px;padding:0 6px 0 10px;border:1px solid #393e3b;border-radius:6px;background:#111414;color:#97a19a}
.folder-search-wrap:focus-within{border-color:#99b86b}
.folder-search-wrap svg{width:14px;height:14px}
.folder-search-wrap input{height:34px;flex:1;min-width:0;padding:0;border:0;outline:0;background:none;color:#dce4da;font-size:12px}
.folder-search-wrap input:focus{outline:0}
.folder-search-wrap .icon-button{width:25px;height:25px}
.folder-list-viewport{flex:1 1 auto;min-height:0;overflow:auto;outline:0;scrollbar-width:thin;scrollbar-color:#444b46 transparent}
.folder-list-viewport:focus-visible{outline:1px solid #7c975c;outline-offset:-1px}
.folder-list-inner{position:relative;min-height:100%}
.folder-row{position:absolute;left:0;right:0;display:flex;align-items:center;gap:7px;height:37px;padding:0 10px 0 11px;text-align:left;color:#bac2bd;font:12px/1.3 var(--mono);border:0;border-radius:0;white-space:nowrap}
.folder-row:hover{background:#252b27;color:#e6ebe3}
.folder-row.selected,.folder-row[aria-selected=true]{background:#2d3a27;color:#dbe8c9}
.folder-row-chevron{flex:0 0 13px;color:#8d9b8c;text-align:center}
.folder-row-glyph{flex:0 0 17px;color:#a9c38b;text-align:center;font-size:14px}
.folder-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}
.folder-row-size{color:#818c87;font-size:10px;flex:0 0 auto}
.folder-nav-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-top:1px solid var(--border);color:#818a83;font:10px/1.2 var(--mono)}
.folder-details{display:flex;flex-direction:column;min-width:0;min-height:0;background:#151819}
.folder-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px;padding:11px 17px;border-bottom:1px solid var(--border)}
.folder-current-heading{display:flex;flex-direction:column;gap:4px;min-width:0}
.folder-current-heading strong{font-size:13px;font-weight:550;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#e0e6e0}
.folder-current-heading small{font-size:11px;color:#939e98}
.folder-preview-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.folder-preview-actions kbd{min-height:15px;font-size:10px;border:0;background:none;padding:0 2px;color:#a9b3a3}
.folder-preview-body{flex:1 1 auto;min-height:0;overflow:auto;background:#141719;scrollbar-width:thin}
.folder-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;min-height:100%;padding:38px;text-align:center;color:#aab4ac;font-size:12px}
.folder-placeholder p{max-width:420px;line-height:1.7;margin:0}
.folder-placeholder-mark{display:flex;align-items:center;justify-content:center;width:61px;height:61px;border:1px solid #3b483d;border-radius:12px;background:#212923;color:#b9d795;font-size:28px}
.folder-image-frame{display:flex;min-height:100%;align-items:center;justify-content:center;padding:42px;background:radial-gradient(circle,#262b27 0%,#171a1b 70%)}
.folder-image{max-width:100%;max-height:64vh;object-fit:contain;filter:drop-shadow(0 13px 33px #0008)}
.folder-code{max-width:1120px;min-height:100%;margin:0 auto;padding:25px 30px 52px;overflow:auto;color:#c6d5cb;font:12px/1.72 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}
.folder-truncation{padding:12px 27px;color:#b7a786;border-top:1px solid #463d31;font-size:11px}
.folder-markdown{max-width:850px;margin:0 auto;padding:30px 35px 60px;color:#d8e0da;font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.folder-markdown h1,.folder-markdown h2,.folder-markdown h3,.folder-markdown h4{color:#ecf2e9;line-height:1.3;letter-spacing:-.025em}
.folder-markdown h1{font-size:26px}.folder-markdown h2{font-size:21px}.folder-markdown h3{font-size:17px}
.folder-markdown p{white-space:pre-wrap}.folder-markdown ul{padding-left:24px}
.folder-markdown blockquote{margin-left:0;padding-left:18px;border-left:3px solid #809965;color:#b0c0b6}
.folder-md-code{padding:15px 17px;overflow:auto;background:#222825;border:1px solid #3a453d;border-radius:6px;color:#d0ddd2;font:12px/1.65 var(--mono)}
.folder-welcome-action{display:flex;justify-content:center;margin-top:15px}
.folder-welcome-action .button{height:36px;background:#242922;color:#c9deaa;border-color:#4b5a40}
.folder-welcome-action .button:hover{background:#2e372a;border-color:#809b6a}
.folder-quicklook{width:min(92vw,1024px);height:min(85vh,760px);max-width:none;max-height:none;padding:0;overflow:hidden;background:#171b1a;border:1px solid #52604c;border-radius:11px;box-shadow:0 23px 95px #000b;color:#e5ebe4}
.folder-quicklook::backdrop{background:rgba(5,7,6,.82);backdrop-filter:blur(7px)}
.folder-quicklook-heading{height:63px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 20px;border-bottom:1px solid #344039}
.folder-quicklook-heading-text{display:flex;flex-direction:column;min-width:0;gap:5px}
.folder-quicklook-heading-text strong{font-size:14px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.folder-quicklook-heading-text small{color:#94a097;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.folder-quicklook-controls{display:flex;align-items:center;gap:5px}
.folder-quicklook-body{height:calc(100% - 63px);overflow:auto;background:#151918}
.folder-quicklook-body .folder-image-frame{height:100%;min-height:100%}
.folder-quicklook-body .folder-image{max-height:68vh}
.folder-quicklook-body .folder-placeholder{min-height:400px}
@media(max-width:1050px){.folder-layout{grid-template-columns:245px minmax(0,1fr)}.folder-preview-actions kbd{display:none}}
@media(max-width:790px){.folder-layout{grid-template-columns:190px minmax(0,1fr)}.folder-preview-toolbar{flex-wrap:wrap;padding:9px;gap:8px}.folder-preview-actions{flex-wrap:wrap}.folder-code{padding:13px;font-size:11px}.folder-markdown{padding:20px;font-size:12px}.folder-nav-bottom{display:none}.folder-top-open{padding:0 8px}}
@media(max-width:540px){.folder-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(170px,38%) minmax(0,1fr)}.folder-navigation{border-right:0;border-bottom:1px solid #303933}.folder-preview-actions .button{height:28px;padding:0 7px;font-size:11px}.folder-top-open{font-size:0}.folder-top-open svg{width:15px;height:15px}.folder-quicklook{width:98vw;height:88vh}.folder-welcome-action{margin-top:10px}}

.welcome-demo{flex-wrap:wrap}

.folder-media-frame{display:flex;align-items:center;justify-content:center;min-height:100%;padding:35px;background:radial-gradient(circle,#262a27 0%,#141719 70%)}
.folder-audio{width:min(100%,560px);height:56px;accent-color:#c5e86b}
.folder-video{display:block;max-width:100%;max-height:70vh;border-radius:8px;background:#080b08;box-shadow:0 16px 45px #0007}
.folder-quicklook-body .folder-video{max-height:66vh}


/* Specialist file views: WebGL geometry and browser-native type specimens. */
.special-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:#17191b}
.file-icon.stl,.file-icon.obj{color:#b3d397}
.file-icon.ttf,.file-icon.otf,.file-icon.woff,.file-icon.woff2{color:#b0c9e8}
.file-type-icon.special-kind{border-color:#506349;background:#293325;color:#d1e9aa}
.special-toolbar{display:flex;align-items:center;gap:12px;min-height:46px;flex:0 0 auto;padding:6px 18px;border-bottom:1px solid var(--border);background:#1b1e1d}
.special-tools{display:flex;align-items:center;gap:14px}
.special-wire-label{display:inline-flex;align-items:center;gap:8px;color:#bfc8bd;font-size:12px;cursor:pointer}
.special-wire-label input{accent-color:var(--accent);width:15px;height:15px}
.special-toolbar-note{margin-left:auto;color:#88958b;font-size:11px}
.special-content{display:grid;grid-template-columns:minmax(0,1fr) 245px;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden}
.special-model-stage{position:relative;display:flex;align-items:stretch;justify-content:stretch;flex:1 1 auto;min-width:0;min-height:0;background:radial-gradient(ellipse at center,#2b392b 0%,#171d1b 58%,#131817 100%)}
.special-canvas{display:block;width:100%;height:100%;min-height:200px;cursor:grab;touch-action:none}
.special-canvas:active{cursor:grabbing}
.special-canvas-hint{pointer-events:none;position:absolute;left:50%;bottom:18px;transform:translateX(-50%);white-space:nowrap;padding:8px 12px;background:#111a16d6;border:1px solid #4a6143;border-radius:6px;color:#b5c8ab;font:11px var(--mono)}
.special-fallback{display:flex;align-items:center;justify-content:center;width:100%;min-height:280px;padding:30px;color:#b7c0b8;text-align:center;font-size:13px}
.special-file-stats{min-height:0;overflow:auto;background:#1b1d1d;border-left:1px solid #353b37;padding:23px 17px}
.special-stat-list{display:grid;grid-template-columns:minmax(0,1fr);gap:2px 0;margin:0}
.special-stat-list dt{margin-top:13px;color:#849087;font-size:11px;letter-spacing:.02em}
.special-stat-list dt:first-child{margin-top:0}
.special-stat-list dd{margin:0;padding:1px 0 3px;color:#d4dfd1;font:12px/1.5 var(--mono);overflow-wrap:anywhere}
.special-font-stage{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:radial-gradient(ellipse at 80% 10%,#262e27 0%,#161b19 63%)}
.special-font-controls{display:flex;align-items:center;gap:7px;flex:0 0 auto;min-height:58px;padding:9px 18px;border-bottom:1px solid #343a36}
.special-size-label{display:flex;align-items:center;gap:11px;min-width:0;flex:1 1 auto;color:#aebba9;font-size:11px}
.special-size-label input[type=range]{accent-color:var(--accent);flex:1 1 auto;min-width:40px;max-width:220px}
.special-size-value{font:11px var(--mono);min-width:40px;text-align:right;color:#d4e7bd}
.special-font-specimen{display:block;flex:1 1 auto;width:100%;min-height:0;resize:none;border:0;outline:0;padding:30px 32px 45px;background:transparent;color:#e5efe3;font-family:Georgia,serif;font-size:52px;line-height:1.38;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap}
.special-font-specimen:focus{outline:0}
.special-font-status{padding:8px 18px;flex:0 0 auto;color:#a2b19e;font-size:11px;border-top:1px solid #313932}
.folder-special-preview{position:relative;display:flex;flex:1 1 auto;min-width:0;min-height:340px;height:100%;width:100%;overflow:hidden}
.folder-special-preview .special-font-specimen{padding:18px 20px;font-size:39px;min-height:320px}
.folder-special-preview .special-font-status{padding:7px 13px}
.folder-special-preview .special-canvas{min-height:340px}
.folder-quicklook-body .folder-special-preview{min-height:100%;height:100%}
@media(max-width:900px){.special-content{grid-template-columns:minmax(0,1fr) 180px}.special-file-stats{padding:14px}}
@media(max-width:680px){.special-content{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.special-file-stats{max-height:150px;border-left:0;border-top:1px solid #343e37;padding:13px 16px}.special-stat-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}.special-font-specimen{padding:15px;font-size:40px}.special-canvas-hint{font-size:10px;padding:6px}}

.special-canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.special-font-axes{display:flex;flex-wrap:wrap;gap:10px 21px;padding:12px 19px;border-bottom:1px solid #343a36;background:#1c211f}
.special-font-axis{display:flex;align-items:center;gap:9px;min-width:180px;color:#b4c1b0;font:11px var(--mono)}
.special-font-axis span:first-child{min-width:32px}
.special-font-axis input{accent-color:var(--accent);min-width:45px;max-width:140px;flex:1}
.special-font-axis-value{min-width:35px;text-align:right;color:#deebcb}


/* SQLite: compact, read-only table inspector. */
.sqlite-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:var(--surface)}
.file-type-icon.sqlite-kind{background:#242b24;border-color:#4e6546;color:#c3df9e}
.file-icon.db,.file-icon.sqlite,.file-icon.sqlite3{color:#a8cea0}
.sqlite-layout{display:grid;grid-template-columns:238px minmax(0,1fr);flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;border-top:1px solid #343c35}
.sqlite-navigation{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid #343b36;background:#181b1b}
.sqlite-nav-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:17px 13px 11px;color:#9ba99a;letter-spacing:.06em;font-size:10px;font-weight:650}
.sqlite-nav-title span:last-child{font-weight:400;letter-spacing:0;color:#7d8b80}
.sqlite-search{display:flex;align-items:center;gap:9px;margin:0 12px 10px;padding:0 10px;border:1px solid #39453a;background:#131717;border-radius:6px;color:#9aa79a}
.sqlite-search:focus-within{border-color:#9bb879}
.sqlite-search svg{width:15px;height:15px}
.sqlite-search input{width:100%;min-width:0;height:34px;border:none;background:none;color:#e5eee3;outline:none;font-size:12px}
.sqlite-table-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:2px 7px 16px;scrollbar-width:thin}
.sqlite-table-item{display:flex;align-items:center;gap:8px;width:100%;height:35px;padding:0 9px;text-align:left;color:#adb9ae;border-radius:5px;font-size:12px}
.sqlite-table-item:hover{background:#242a26;color:#e2eadc}
.sqlite-table-item.selected{color:#e4f0db;background:#293727}
.sqlite-table-icon{width:19px;flex:0 0 19px;color:#9dc98a}
.sqlite-table-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.sqlite-table-hint{font-size:9px;color:#8e9a8d;text-transform:uppercase}
.sqlite-list-empty{padding:15px 12px;color:#9aa89e;font-size:12px}
.sqlite-nav-footer{flex:0 0 auto;border-top:1px solid #313a33;padding:12px 17px;color:#859686;font-size:11px}
.sqlite-main{display:flex;flex-direction:column;min-width:0;min-height:0;background:#151919}
.sqlite-table-titlebar{flex:0 0 auto;min-height:60px;padding:10px 17px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #333b36}
.sqlite-table-heading{display:flex;align-items:center;gap:10px;min-width:0}
.sqlite-table-heading strong{font-size:14px;font-weight:550;color:#ebf1e6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sqlite-tabs{flex:0 0 auto;display:flex;align-items:center;gap:3px;height:43px;padding:5px 12px;border-bottom:1px solid #343d36;background:#1a201d}
.sqlite-tab{padding:0 14px;height:32px;border-radius:5px;color:#a0afa2;font-size:12px}
.sqlite-tab:hover{color:#e5ede2;background:#2b352e}
.sqlite-tab.active{background:#2d3c29;color:#d8e8bf}
.sqlite-tabs .icon-button{margin-left:auto}
.sqlite-rows-panel{display:flex;flex:1 1 auto;min-height:0;min-width:0;flex-direction:column}
.sqlite-row-scroll{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#4c5d4e #1c221e}
.sqlite-grid{border-collapse:separate;border-spacing:0;min-width:100%;width:max-content;color:#d4dfd1;font:12px/1.5 var(--mono)}
.sqlite-grid th,.sqlite-grid td{min-width:112px;max-width:280px;padding:9px 12px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #313932;border-right:1px solid #2e3530}
.sqlite-grid th{position:sticky;top:0;z-index:2;background:#232c24;color:#d1dfca;font-size:11px;font-weight:600}
.sqlite-grid td{background:#181c19}
.sqlite-grid tr:nth-child(even) td{background:#1b201d}
.sqlite-grid tr:hover td{background:#29362b}
.sqlite-grid td.sqlite-data-cell{cursor:pointer}
.sqlite-grid td.sqlite-data-cell:focus-within{outline:1px solid #9db67b}
.sqlite-grid .sqlite-rowid{min-width:66px;max-width:170px;text-align:right;color:#9eaf9e;background:#202820}
.sqlite-grid .sqlite-null{color:#7e9081;font-style:italic}
.sqlite-pagination{flex:0 0 auto;min-height:43px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 16px;border-top:1px solid #363f38;color:#a4b1a5;font-size:11px}
.sqlite-pagination-controls{display:flex;align-items:center;gap:9px}
.sqlite-pagination-controls input{width:58px;height:29px;padding:0 6px;border-radius:5px;border:1px solid #475349;background:#121a15;color:#e4f0de;font:12px var(--mono);text-align:center}
.sqlite-empty{padding:30px 20px;color:#9fada0;font-size:13px}
.sqlite-schema-panel{flex:1 1 auto;min-height:0;overflow:auto;padding:24px 27px 55px;scrollbar-width:thin}
.sqlite-schema-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px}
.sqlite-schema-keyval{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #353f38;border-radius:6px;background:#202621}
.sqlite-schema-keyval span{font-size:10px;color:#98a699}
.sqlite-schema-keyval strong{font:12px/1.4 var(--mono);color:#deead8;overflow-wrap:anywhere}
.sqlite-columns-table{width:100%;border-collapse:collapse;font-size:12px}
.sqlite-columns-table th,.sqlite-columns-table td{padding:9px 12px;text-align:left;border-bottom:1px solid #38413a}
.sqlite-columns-table th{color:#a9c49b;background:#222c24;font-size:11px}
.sqlite-columns-table td{color:#d3e3d2}
.sqlite-column-name{font:12px var(--mono)}
.sqlite-schema-heading{margin:22px 0 11px;color:#b7c9ab;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.sqlite-ddl{padding:16px 18px;background:#111811;border:1px solid #3a453b;border-radius:6px;color:#c7dbbc;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.75 var(--mono)}
.sqlite-schema-warning{margin-bottom:18px;padding:11px 13px;background:#292b20;border:1px solid #4f5240;border-radius:6px;color:#e0d3a9;font-size:12px}
.sqlite-index-item strong{color:#d6e7c8;font:12px var(--mono)}
.sqlite-cell-detail{flex:0 0 auto;max-height:220px;overflow:auto;border-top:1px solid #485b43;background:#1b271e}
.sqlite-cell-header{display:flex;justify-content:space-between;align-items:center;padding:6px 12px;color:#cedbc6}
.sqlite-cell-header strong{font:11px var(--mono)}
.sqlite-cell-detail pre{padding:0 13px 12px;margin:0;white-space:pre-wrap;word-break:break-word;font:12px/1.6 var(--mono);color:#d3e5c9}
.sqlite-cell-detail pre.sqlite-blob{font-size:11px;color:#c2d3c2}
@media(max-width:900px){.sqlite-layout{grid-template-columns:175px minmax(0,1fr)}.sqlite-schema-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){.sqlite-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(140px,32%) minmax(0,1fr)}.sqlite-navigation{border-right:none;border-bottom:1px solid #343b36}.sqlite-schema-panel{padding:14px}.sqlite-table-titlebar{padding:8px}.sqlite-pagination{padding:6px 8px}}


/* EPUB: restrained reader, separate from the underlying ZIP explorer. */
.archive-download-actions,.epub-file-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.file-type-icon.epub-icon{border-color:#495a42;background:#263321;color:#ccdfae}
.file-icon.epub{color:#b9d49c}
.epub-view{position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:#171919;overflow:hidden}
.epub-layout{display:grid;grid-template-columns:235px minmax(0,1fr);flex:1 1 auto;min-height:0;min-width:0;border-top:1px solid #343b35}
.epub-navigation{display:flex;flex-direction:column;min-height:0;min-width:0;background:#191d1b;border-right:1px solid #374039;transition:grid-template-columns .14s ease}
.epub-navigation.collapsed{display:none}
.epub-view.epub-toc-collapsed .epub-layout{grid-template-columns:minmax(0,1fr)}
.epub-nav-heading{flex:0 0 auto;padding:20px 18px 11px;color:#94a69a;font-size:10px;font-weight:650;letter-spacing:.08em}
.epub-toc-search{display:flex;align-items:center;gap:9px;margin:0 12px 12px;padding:0 10px;border:1px solid #38463d;border-radius:5px;background:#111714;color:#9aa99b}
.epub-toc-search:focus-within{border-color:#9ab67a}
.epub-toc-search svg{width:14px;height:14px}
.epub-toc-search input{width:100%;min-width:0;height:34px;background:none;color:#dee9dd;border:0;outline:0;font-size:12px}
.epub-toc{flex:1 1 auto;min-height:0;overflow:auto;padding:3px 9px 20px;scrollbar-width:thin}
.epub-chapter-link{display:block;width:100%;min-height:34px;padding:10px 12px;text-align:left;border-radius:5px;font-size:12px;line-height:1.45;color:#afbcad;overflow-wrap:anywhere}
.epub-chapter-link:hover{background:#262d26;color:#edf1e7}
.epub-chapter-link.selected{background:#2c3828;color:#e0eed1;font-weight:550}
.epub-toc-empty{color:#8fa18e;padding:10px;font-size:12px}
.epub-nav-end{padding:13px 18px;color:#809386;border-top:1px solid #334036;font-size:11px}
.epub-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.epub-toolbar{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-height:50px;padding:7px 15px;background:#1a1f1b;border-bottom:1px solid #354035}
.epub-toc-toggle{flex:0 0 auto}
.epub-current-title{font-size:12px;color:#b6c2b2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}
.epub-reading-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.epub-control{display:inline-flex;align-items:center;justify-content:center;min-width:29px;height:29px;padding:0 7px;color:#c2d2bc;border-radius:5px;font:12px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.epub-control:hover{background:#303b2f;color:#e9f4e7}
.epub-text-control{font-size:11px}
.epub-size-label{min-width:34px;color:#9db497;font:10px var(--mono);text-align:center}
#epub-theme{height:30px;border:1px solid #425245;border-radius:5px;background:#232c24;color:#d5e2d0;padding:0 6px;font-size:11px;max-width:90px}
.epub-page{display:flex;flex:1 1 auto;min-height:0;overflow:hidden;--epub-font-size:18px;--epub-line-height:1.75;--epub-content-width:690px;background:#181e1c;color:#dfe9dd;transition:background .15s ease,color .15s ease}
.epub-page[data-theme="night"]{background:#181e1c;color:#dfe9dd;--epub-soft:#a8b5a7;--epub-rule:#465749;--epub-link:#c8e8ad}
.epub-page[data-theme="paper"]{background:#f4f0e7;color:#292a25;--epub-soft:#5e655d;--epub-rule:#d9d0bf;--epub-link:#3c7146}
.epub-page[data-theme="sepia"]{background:#e9ddc6;color:#423526;--epub-soft:#786c55;--epub-rule:#cdbba0;--epub-link:#745c38}
.epub-scroll{width:100%;height:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#72846d55 transparent;outline:0;overscroll-behavior:contain}
.epub-scroll:focus-visible{outline:2px solid #a1c18b;outline-offset:-3px}
.epub-content{max-width:var(--epub-content-width);width:calc(100% - 72px);min-height:100%;margin:0 auto;padding:56px 0 94px;overflow-wrap:anywhere;font:400 var(--epub-font-size)/var(--epub-line-height) Georgia,'Iowan Old Style','Palatino Linotype',serif;word-spacing:.01em}
.epub-sans .epub-content{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
.epub-content p{margin:0 0 1.35em}
.epub-content h1,.epub-content h2,.epub-content h3,.epub-content h4,.epub-content h5,.epub-content h6{font-family:inherit;line-height:1.28;font-weight:650;letter-spacing:-.02em;overflow-wrap:anywhere}
.epub-content h1{font-size:2em;margin:0 0 1.25em}
.epub-content h2{font-size:1.5em;margin:2em 0 1em}
.epub-content h3{font-size:1.2em;margin:1.7em 0 .8em}
.epub-content h4,.epub-content h5,.epub-content h6{font-size:1em;margin:1.4em 0 .7em}
.epub-content blockquote{margin:1.7em 0;padding:.15em 1.1em;border-left:3px solid var(--epub-rule);color:var(--epub-soft);font-style:italic}
.epub-content a{color:var(--epub-link);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.epub-content img{display:block;max-width:100%;max-height:70vh;width:auto;height:auto;margin:1.5em auto;object-fit:contain;border-radius:3px}
.epub-content figure{margin:1.6em auto}
.epub-content figcaption{margin-top:.8em;color:var(--epub-soft);font-size:.8em;text-align:center}
.epub-content ul,.epub-content ol{margin:1em 0 1.5em;padding-left:1.8em}
.epub-content li{padding-left:.2em;margin-bottom:.35em}
.epub-content pre{padding:1em;overflow:auto;white-space:pre-wrap;border:1px solid var(--epub-rule);border-radius:6px;font:.75em/1.65 var(--mono)}
.epub-content code{font:.8em var(--mono)}
.epub-content hr{margin:2.5em 0;border:0;border-top:1px solid var(--epub-rule)}
.epub-content table{display:block;max-width:100%;overflow:auto;border-collapse:collapse;margin:1.2em 0}
.epub-content th,.epub-content td{padding:.55em;border:1px solid var(--epub-rule);font-size:.83em;text-align:left}
.epub-content ruby{ruby-position:over}
.epub-content .epub-error{color:#cfa67e}
.epub-progress-track{height:3px;flex:0 0 3px;background:#29382c}
.epub-progress{height:3px;width:0;background:#c2e698;transition:width .12s}
.epub-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;flex:0 0 44px;padding:0 15px;background:#171c19;color:#9eaf9e;font:11px var(--mono)}
.epub-chapter-nav{display:inline-flex;align-items:center;gap:7px;color:#baceb3;font-size:11px;border-radius:5px;padding:7px 10px}
.epub-chapter-nav:hover{background:#2a372b;color:#f0f4e9}
.epub-chapter-nav svg{width:13px;height:13px}
.epub-chapter-nav[disabled]{opacity:.28}
.epub-floating-arrows{display:none}
@media(max-width:1000px){.epub-layout{grid-template-columns:185px minmax(0,1fr)}.epub-toolbar{flex-wrap:wrap}.epub-reading-controls{margin-left:auto}.epub-current-title{min-width:100px}}
@media(max-width:750px){.epub-layout{grid-template-columns:minmax(0,1fr)}.epub-navigation{position:absolute;z-index:18;top:125px;bottom:45px;left:0;width:min(300px,76vw);box-shadow:8px 0 40px #0006}.epub-navigation.collapsed{display:none}.epub-content{width:calc(100% - 38px);padding:36px 0 66px}.epub-current-title{font-size:11px}.epub-file-actions .button{padding:0 8px;font-size:11px}}
@media(max-width:570px){.epub-file-heading{padding:10px;flex-wrap:wrap}.epub-file-actions{width:100%;justify-content:flex-end}.epub-toolbar{padding:5px 8px;gap:4px;min-height:46px}.epub-reading-controls{flex-wrap:wrap;gap:2px}.epub-current-title{max-width:95px}.epub-control{min-width:25px;padding:0 5px}.epub-text-control{font-size:10px}.epub-size-label{display:none}.epub-reading-controls .toolbar-divider{display:none}#epub-theme{max-width:72px}.archive-download-actions{flex-wrap:wrap;justify-content:flex-end}.epub-content{font-size:min(var(--epub-font-size),24px)}}


/* GPX route inspector. Offline geometry only: no map network requests. */
.gpx-view{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;min-width:0;background:#17191b}
.file-type-icon.gpx-kind{background:#242e22;border-color:#4d6342;color:#cdeba6}
.file-icon.gpx{color:#b8daa3}
.gpx-heading-actions{display:flex;align-items:center;gap:7px}
.gpx-layout{display:grid;grid-template-columns:236px minmax(0,1fr);flex:1 1 auto;min-height:0;min-width:0;overflow:hidden;border-top:1px solid #353d35}
.gpx-sidebar{min-height:0;min-width:0;display:flex;flex-direction:column;background:#181c19;border-right:1px solid #343c36}
.gpx-sidebar-head{padding:18px 14px 12px;display:flex;align-items:center;justify-content:space-between;gap:9px;color:#9eab99;font-size:10px}
.gpx-sidebar-head strong{font-weight:650;letter-spacing:.075em}
.gpx-sidebar-head span{font-size:10px;color:#829387}
.gpx-search{display:flex;align-items:center;gap:7px;margin:0 10px 12px;padding:0 10px;border:1px solid #3a473e;border-radius:6px;background:#101813;color:#9eae9f}
.gpx-search:focus-within{border-color:#95bd7b}
.gpx-search svg{height:15px;width:15px}
.gpx-search input{flex:1;min-width:0;height:33px;background:transparent;border:0;outline:0;color:#e8f1e5;font-size:12px}
.gpx-tracks{flex:1 1 auto;min-height:0;overflow:auto;padding:2px 7px;scrollbar-width:thin}
.gpx-track-item{display:flex;align-items:center;gap:8px;width:100%;min-height:37px;border-radius:5px;text-align:left;padding:6px 9px;color:#b8c8b6;font-size:12px}
.gpx-track-item:hover{background:#273329;color:#edf5e9}
.gpx-track-item.selected{background:#30432c;color:#ddf1ce}
.gpx-track-glyph{flex:0 0 19px;color:#b0d39c;text-align:center;font:14px var(--mono)}
.gpx-track-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gpx-track-count{font:11px var(--mono);color:#8ca489}
.gpx-sidebar-bottom{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-top:1px solid #313f35;color:#869b89;font-size:11px}
.gpx-workspace{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#141b16}
.gpx-topline{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:0 0 auto;min-height:49px;padding:7px 17px;border-bottom:1px solid #344338}
.gpx-topline>div:first-child{display:flex;align-items:center;gap:9px;min-width:0}
.gpx-topline strong{color:#e0ebdc;font-size:12px;font-weight:550;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gpx-unit-control{display:flex;align-items:center;flex:0 0 auto;gap:2px;padding:3px;border:1px solid #405241;border-radius:6px;background:#1b261d}
.gpx-unit-control button{height:25px;padding:0 9px;border-radius:4px;font:10px var(--mono);color:#9baf97}
.gpx-unit-control button.active{background:#3a5131;color:#e1f5d2}
.gpx-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));flex:0 0 auto;border-bottom:1px solid #3a483d;background:#19221b}
.gpx-stat{display:flex;flex-direction:column;gap:5px;padding:12px 13px;min-width:0;border-right:1px solid #344135}
.gpx-stat:last-child{border-right:0}
.gpx-stat-label{font:10px var(--mono);letter-spacing:.06em;color:#8ba084}
.gpx-stat-value{font-size:16px;line-height:1.3;font-weight:550;color:#edf5e8;overflow-wrap:anywhere}
.gpx-stat-extra{font-size:10px;color:#a7b6a2;line-height:1.25}
.gpx-visual-scroll{display:grid;grid-template-rows:minmax(260px,1fr) 228px;flex:1 1 auto;min-height:0;min-width:0;overflow:hidden}
.gpx-map-panel{position:relative;min-height:0;min-width:0;overflow:hidden;background-color:#18241d;background-image:linear-gradient(#b8d5ac08 1px,transparent 1px),linear-gradient(90deg,#b8d5ac08 1px,transparent 1px),radial-gradient(ellipse at 50% 42%,#263b27 0%,#17221b 68%);background-size:42px 42px,42px 42px,100% 100%}
.gpx-visual-title{position:absolute;z-index:2;top:13px;left:18px;display:flex;align-items:center;gap:13px;color:#a6c3a0;font:10px var(--mono);letter-spacing:.05em;pointer-events:none}
.gpx-visual-title span:last-child{color:#819985;letter-spacing:0;text-transform:none}
.gpx-map-svg{display:block;width:100%;height:100%;cursor:grab;touch-action:none;outline:0}
.gpx-map-svg:active{cursor:grabbing}
.gpx-map-svg:focus-visible{outline:1px solid #88b875;outline-offset:-1px}
.gpx-route-path{fill:none;stroke:#bde887;stroke-width:3.6;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 4px #85bd594a)}
.gpx-route-secondary{stroke:#8cc1b0}
.gpx-terminal{stroke:#162218;stroke-width:3;vector-effect:non-scaling-stroke}
.gpx-start{fill:#d1f5a2}
.gpx-end{fill:#f4c080}
.gpx-current-pin{fill:#e8f9d4;stroke:#202f1d;stroke-width:3;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 8px #a7eb79b0)}
.gpx-waypoint-dot{fill:#f1d18c;stroke:#23321e;stroke-width:2;cursor:pointer;vector-effect:non-scaling-stroke}
.gpx-map-controls{display:flex;align-items:center;gap:7px;position:absolute;z-index:2;right:13px;top:10px;padding:5px;border:1px solid #435344;border-radius:8px;background:#17251de9}
.gpx-map-controls .icon-button{width:27px;height:27px;color:#cfdfc9}
.gpx-map-controls #gpx-zoom-value{min-width:40px;color:#adc3a8;font:11px var(--mono);text-align:center}
.gpx-north{position:absolute;z-index:2;right:19px;bottom:16px;color:#b9d0b2;font:12px var(--mono);pointer-events:none}
.gpx-elevation-panel{display:flex;flex-direction:column;min-width:0;min-height:0;border-top:1px solid #3b4c3f;background:#1a241d;padding:12px 18px 8px}
.gpx-elevation-head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#a9c5a1;font:10px var(--mono);letter-spacing:.05em}
.gpx-elevation-head span:last-child{color:#d2e5cb;letter-spacing:0}
.gpx-elevation-graph{flex:1 1 auto;min-width:0;min-height:0;position:relative;margin-top:4px;overflow:hidden;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),#607b4b24 calc(25% - 1px),#607b4b24 25%)}
.gpx-elevation-graph svg{display:block;width:100%;height:100%;cursor:crosshair}
.gpx-elevation-line{fill:none;stroke:#bcdf9b;stroke-width:2.2;vector-effect:non-scaling-stroke}
.gpx-elevation-cursor{stroke:#efdca5;stroke-width:1.8;vector-effect:non-scaling-stroke}
.gpx-elevation-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#95a994;font-size:12px}
#gpx-scrub{display:block;width:100%;height:15px;accent-color:#b4dd8b;margin:6px 0}
.gpx-point-readout{color:#c2d6bc;font:11px/1.5 var(--mono);min-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1200px){.gpx-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.gpx-visual-scroll{grid-template-rows:minmax(220px,1fr) 215px}.gpx-stat{padding:8px 11px}.gpx-stat-value{font-size:14px}}
@media(max-width:840px){.gpx-layout{grid-template-columns:177px minmax(0,1fr)}.gpx-map-controls{top:35px}.gpx-stat-value{font-size:13px}.gpx-stat-label{font-size:9px}}
@media(max-width:600px){.gpx-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(105px,25%) minmax(0,1fr)}.gpx-sidebar{border-right:0;border-bottom:1px solid #40503e}.gpx-sidebar-head{padding:8px 10px 4px}.gpx-sidebar-bottom{display:none}.gpx-tracks{display:flex;gap:6px;padding:4px 8px;overflow:auto}.gpx-track-item{min-width:110px;width:auto;padding:5px 7px}.gpx-topline{min-height:37px;padding:4px 9px}.gpx-stat{padding:6px 8px}.gpx-stat-value{font-size:12px}.gpx-elevation-panel{padding:8px}.gpx-point-readout{font-size:10px}.gpx-heading-actions button{padding:0 9px}}


/* Subtitle studio – file-backed cues and native browser video. */
.subtitle-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:#171b19}
.file-type-icon.subtitle-kind{background:#283425;border-color:#516e4d;color:#d9f5ba}
.file-icon.srt,.file-icon.vtt{color:#bada9a}
.subtitle-heading-actions{display:flex;align-items:center;gap:7px}
.subtitle-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:47px;padding:7px 15px;border-top:1px solid #354036;border-bottom:1px solid #354036;background:#1a211b}
.subtitle-toolbar-group{display:flex;align-items:center;gap:5px}
.subtitle-toolbar>.icon-button{margin-left:auto}
.subtitle-toolbar .button{height:29px;font-size:11px}
.subtitle-shift-label{display:flex;align-items:center;gap:6px;margin-left:8px;color:#a9baab;font-size:11px}
.subtitle-shift-label input{width:78px;height:29px;border:1px solid #425243;border-radius:5px;background:#101a12;color:#e1ebdc;text-align:right;padding:0 7px;font:12px var(--mono)}
.subtitle-layout{display:grid;grid-template-columns:250px minmax(0,1fr);flex:1 1 auto;min-width:0;min-height:0;overflow:hidden}
.subtitle-navigation{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid #364338;background:#171c19}
.subtitle-nav-heading{display:flex;align-items:center;justify-content:space-between;padding:14px 13px 10px;gap:12px;font-size:10px;letter-spacing:.08em;color:#9cad99}
.subtitle-nav-heading span:last-child{letter-spacing:0;color:#829581}
.subtitle-search-wrap{display:flex;align-items:center;gap:7px;margin:0 10px 10px;padding:0 10px;border:1px solid #3c4b3d;border-radius:6px;background:#101811;color:#93ac93}
.subtitle-search-wrap:focus-within{border-color:#91b781}
.subtitle-search-wrap svg{width:15px;height:15px}
.subtitle-search-wrap input{height:33px;min-width:0;width:100%;border:0;outline:0;background:transparent;color:#dfeada;font-size:12px}
.subtitle-cue-viewport{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin;outline:0}
.subtitle-cue-viewport:focus-visible{outline:1px solid #96b783;outline-offset:-1px}
.subtitle-cue-inner{position:relative;min-height:100%}
.subtitle-cue-row{position:absolute;left:0;right:0;height:68px;display:grid;grid-template-columns:25px minmax(0,1fr);grid-template-rows:21px 28px;gap:0 8px;padding:8px 11px;border-bottom:1px solid #29382e;text-align:left;color:#bbcbb9;overflow:hidden}
.subtitle-cue-row:hover{background:#283628}
.subtitle-cue-row.selected{background:#2f4530;color:#edfae4}
.subtitle-cue-row.active-playing .subtitle-cue-index{color:#e6cc97}
.subtitle-cue-index{grid-row:span 2;font:11px var(--mono);color:#8fa78a;align-self:start;padding-top:1px}
.subtitle-cue-time{font:10px var(--mono);color:#9ab89c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.subtitle-cue-body{font:12px/1.4 var(--mono);color:#d4e2d3;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.subtitle-nav-bottom{display:flex;align-items:center;gap:7px;padding:10px;border-top:1px solid #3b483c}
.subtitle-nav-bottom .button{flex:1;font-size:11px}
.subtitle-main{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;background:#131a15;scrollbar-width:thin}
.subtitle-video-pane{flex:0 0 auto;display:flex;flex-direction:column;min-width:0;border-bottom:1px solid #37483b}
.subtitle-player-wrap{position:relative;min-height:160px;height:clamp(160px,30vh,360px);background:radial-gradient(ellipse at center,#243225 0%,#101811 76%);overflow:hidden}
.subtitle-player-wrap video{display:block;width:100%;height:100%;object-fit:contain;background:#0c110e}
.subtitle-player-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;position:absolute;inset:0;color:#bbd2b4;text-align:center}
.subtitle-player-empty svg{width:38px;height:38px;color:#9fba97}
.subtitle-player-empty strong{font-size:13px;font-weight:550}
.subtitle-player-empty small{font-size:11px;color:#8fa18f}
.subtitle-live-caption{position:absolute;pointer-events:none;bottom:18%;left:50%;width:min(87%,850px);transform:translateX(-50%);color:#fff6de;font:clamp(14px,2vw,23px)/1.36 sans-serif;font-weight:600;text-align:center;white-space:pre-wrap;text-shadow:0 2px 8px #000,0 2px 3px #000,0 0 15px #000;overflow-wrap:anywhere}
.subtitle-video-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:8px 12px;background:#1b241d}
.subtitle-video-tools .button{height:29px}
#subtitle-video-name{max-width:210px;font:10px var(--mono);color:#c1d3c0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#subtitle-live-note{margin-left:auto;color:#91a78f;font:10px var(--mono)}
.subtitle-timeline-pane{flex:0 0 auto;border-bottom:1px solid #3b4a3e;background:#1b251e;padding:11px 16px 8px}
.subtitle-timeline-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#a9beac;font:10px var(--mono);letter-spacing:.08em}
.subtitle-timeline-head>div{display:flex;align-items:center;gap:10px}
.subtitle-timeline-head strong{letter-spacing:0;color:#e1eeca;font-size:12px;font-weight:500}
.subtitle-timeline-canvas{display:block;width:100%;height:98px;margin:7px 0 0;border:1px solid #405543;border-radius:6px;cursor:crosshair;touch-action:pan-y}
#subtitle-scrub{width:100%;height:14px;margin:7px 0 0;accent-color:#b4d98c}
.subtitle-edit-pane{padding:13px 17px 25px;min-width:0;flex:1 1 auto}
.subtitle-edit-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.subtitle-edit-title strong{color:#a5c59e;font:11px var(--mono);letter-spacing:.07em}
.subtitle-time-fields{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.subtitle-time-fields label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:175px;color:#99af9a;font:11px var(--mono)}
.subtitle-time-fields input{width:100%;height:36px;padding:0 12px;border:1px solid #415542;border-radius:6px;outline:none;color:#e4eee0;background:#142017;font:13px var(--mono)}
.subtitle-time-fields input:focus{border-color:#a7d082}
.subtitle-timing-error{padding:9px 11px;margin-top:10px;color:#ead1b7;background:#443326;border:1px solid #69513d;border-radius:5px;font-size:11px}
.subtitle-text-label{display:flex;flex-direction:column;gap:8px;margin-top:13px;color:#a2b5a3;font:11px var(--mono)}
.subtitle-text-label textarea{min-height:105px;width:100%;resize:vertical;border:1px solid #3d5540;border-radius:6px;padding:12px;color:#e7f3e3;background:#17231a;outline:0;font:13px/1.65 var(--mono)}
.subtitle-text-label textarea:focus{border-color:#9cbe85}
@media(max-width:1000px){.subtitle-layout{grid-template-columns:195px minmax(0,1fr)}.subtitle-video-tools #subtitle-live-note{display:none}}
@media(max-width:720px){.subtitle-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(130px,25%) minmax(0,1fr)}.subtitle-navigation{border-right:0;border-bottom:1px solid #354235}.subtitle-cue-viewport{max-height:200px}.subtitle-toolbar{gap:6px;padding:6px}.subtitle-toolbar .button{padding:0 8px}.subtitle-player-wrap{height:210px}.subtitle-time-fields label{min-width:100px}.subtitle-edit-pane{padding:10px}.subtitle-video-pane{min-height:0}}
@media(max-width:500px){.subtitle-heading-actions .button{padding:0 8px;font-size:10px}.subtitle-file-title{max-width:130px}.subtitle-shift-label{margin:0}.subtitle-shift-label input{width:65px}.subtitle-timeline-pane{padding:8px}.subtitle-live-caption{font-size:15px}}


/* V11 — PDF reader. All PDF rendering happens locally in a sandboxed PDF.js worker. */
.pdf-view{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;background:#171b19}
.file-type-icon.pdf-kind{background:#302a25;border-color:#665342;color:#e6c9a4}
.file-icon.pdf{color:#e0bc95}
.pdf-toolbar{display:flex;flex:0 0 auto;align-items:center;gap:10px;flex-wrap:wrap;min-height:52px;padding:7px 13px;border-top:1px solid #343d36;border-bottom:1px solid #343d36;background:#1c211e}
.pdf-toolbar-group{display:flex;align-items:center;gap:5px}
.pdf-toolbar .icon-button.small{width:30px;height:30px}
.pdf-toolbar input[type=number]{width:56px;height:30px;padding:0 5px;border:1px solid #445348;border-radius:5px;background:#121a15;color:#eef3e9;text-align:center;font:12px var(--mono)}
.pdf-toolbar input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}
.pdf-toolbar select{height:30px;padding:0 7px;border:1px solid #405147;border-radius:5px;background:#18221b;color:#d7e4d6;font:11px var(--mono)}
.pdf-page-total{min-width:40px;white-space:nowrap;color:#afc0aa;font:11px var(--mono)}
.pdf-toolbar-find{margin-left:auto;display:flex;align-items:center;gap:5px;min-width:160px}
.pdf-search-wrap{display:flex;align-items:center;gap:6px;min-width:105px;width:175px;height:30px;padding:0 9px;border:1px solid #3c4d40;border-radius:5px;background:#121a16;color:#a1b5a0}
.pdf-search-wrap:focus-within{border-color:#97be7c}
.pdf-search-wrap svg{width:14px;height:14px}
.pdf-search-wrap input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#e4efe0;font:12px var(--mono)}
.pdf-find-count{min-width:48px;color:#a9bca4;font:10px var(--mono);white-space:nowrap}
.pdf-body{display:flex;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden}
.pdf-thumbnails-pane{width:190px;flex:0 0 190px;min-height:0;min-width:0;display:flex;flex-direction:column;border-right:1px solid #3a423b;background:#1b211d}
.pdf-thumbnails-head{flex:0 0 auto;padding:14px 13px;color:#8fa58b;font:10px var(--mono);letter-spacing:.08em}
.pdf-thumbnails{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;gap:15px;padding:4px 7px 23px;overflow:auto;scrollbar-width:thin}
.pdf-thumb{display:flex;align-items:center;flex-direction:column;gap:6px;width:100%;max-width:158px;padding:7px 5px;border:1px solid transparent;border-radius:7px;color:#a3b9a3;background:transparent;transition:background .12s ease,border-color .12s ease}
.pdf-thumb:hover{background:#293329}
.pdf-thumb.active{border-color:#7c9c6f;background:#303f2e;color:#e8f3db}
.pdf-thumb-paper{display:flex;justify-content:center;align-items:center;width:109px;height:146px;padding:3px;background:#e9eae6;border:1px solid #6b766b;box-shadow:0 4px 13px #0006;overflow:hidden}
.pdf-thumb-paper canvas{display:block;max-width:100%;max-height:100%;object-fit:contain}
.pdf-thumb-number{font:11px var(--mono)}
.pdf-thumb.unavailable .pdf-thumb-paper{background:#343c36}
.pdf-thumb-note{padding:13px 11px;color:#a4b4a1;border-top:1px solid #344034;font:10px/1.5 var(--mono)}
.pdf-reader{position:relative;flex:1 1 auto;min-width:0;min-height:0;background:radial-gradient(ellipse at 55% 20%,#303833 0%,#232925 57%,#1c211e 100%)}
.pdf-page-scroll{width:100%;height:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#5f725e #1c241d;outline:0}
.pdf-page-scroll:focus-visible{outline:1px solid #8fb576;outline-offset:-1px}
.pdf-page-frame{position:relative;display:block;margin:31px auto 55px;background:white;box-shadow:0 20px 65px #000a,0 0 0 1px #141c15b8}
.pdf-page-canvas{display:block;background:#fff}
.pdf-text-layer{position:absolute;inset:0;overflow:hidden;opacity:1;line-height:1;z-index:2;user-select:text;-webkit-user-select:text;--scale-factor:1;--user-unit:1}
.pdf-text-layer span,.pdf-text-layer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%;line-height:1;user-select:text;-webkit-user-select:text}
.pdf-text-layer span[role=presentation]{user-select:none;-webkit-user-select:none}
.pdf-text-layer ::selection{background:rgba(155,194,108,.36)}
.pdf-text-layer .pdf-search-highlight{background:rgba(186,226,117,.35);border-radius:1px}
.pdf-text-layer .markedContent{top:0;height:0}
.pdf-text-layer .markedContent span{height:100%}
.pdf-loading{position:absolute;top:22px;left:50%;transform:translateX(-50%);padding:9px 14px;background:#1b281fdc;border:1px solid #526a4d;border-radius:7px;color:#d4eac5;white-space:nowrap;font-size:12px;pointer-events:none;z-index:3}
.pdf-error{position:absolute;z-index:3;top:38%;left:50%;transform:translateX(-50%);width:min(500px,85%);padding:24px 25px;text-align:center;border:1px solid #62584a;border-radius:9px;background:#292721;color:#ebd8b6;font:13px/1.6 var(--mono)}
.pdf-password-panel{position:absolute;z-index:4;top:40%;left:50%;transform:translate(-50%,-50%);width:min(390px,92%);padding:24px;border:1px solid #5e6f52;border-radius:9px;background:#202820;box-shadow:0 15px 60px #0009;color:#e8efe2}
.pdf-password-panel strong{font-size:16px}
.pdf-password-panel p{font-size:12px;color:#b8c8b6;line-height:1.6}
.pdf-password-panel input{display:block;width:100%;height:37px;margin:15px 0;padding:0 11px;border:1px solid #556a51;border-radius:5px;background:#131b14;color:#e5f0e2}
.pdf-password-panel>div{display:flex;justify-content:flex-end;gap:7px}
@media(max-width:1080px){.pdf-toolbar{gap:6px;padding:6px 8px}.pdf-toolbar-find{margin-left:0;flex:1 1 auto;justify-content:flex-end}.pdf-thumbnails-pane{width:145px;flex-basis:145px}.pdf-search-wrap{width:145px}.pdf-page-frame{margin-top:22px}}
@media(max-width:660px){.pdf-toolbar{min-height:43px}.pdf-toolbar-find{order:3;flex-basis:100%}.pdf-search-wrap{flex:1 1 auto;max-width:none}.pdf-thumbnails-pane{width:105px;flex-basis:105px}.pdf-thumbnails{gap:6px;padding:6px 2px}.pdf-thumb-paper{width:82px;height:106px}.pdf-page-frame{margin-top:14px}.pdf-toolbar-group{gap:2px}}
@media(max-width:445px){.pdf-page-total{min-width:24px}.pdf-toolbar select{max-width:88px}.pdf-thumbnails-pane{width:80px;flex-basis:80px}.pdf-thumb-paper{width:60px;height:82px}.pdf-thumb{padding:6px 2px}.pdf-thumb-number{font-size:10px}.pdf-page-frame{margin:12px auto 30px}}


/* V12: browser-local image inspector */
.image-view{height:100%;min-height:0;display:flex;flex-direction:column}
.image-view[hidden]{display:none}
.image-kind{color:#c5e86b}
.image-toolbar{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid var(--border, #323638);flex-wrap:wrap}
.image-toolbar-group{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.image-zoom-value{min-width:48px;text-align:center;color:var(--text-primary,#e9f0ea);font-variant-numeric:tabular-nums;font-size:12px}
.image-layout{display:flex;flex:1;min-height:0;min-width:0}
.image-stage{flex:1;min-width:0;min-height:0;overflow:auto;background:#171a1b;cursor:grab;touch-action:pan-x pan-y}
.image-stage.dragging{cursor:grabbing}
.image-stage.sampling{cursor:crosshair}
.image-canvas-space{min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;background:#171a1b}
.image-canvas-space.checkered{background-color:#24282a;background-image:linear-gradient(45deg,#34383a 25%,transparent 25%),linear-gradient(-45deg,#34383a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#34383a 75%),linear-gradient(-45deg,transparent 75%,#34383a 75%);background-position:0 0,0 12px,12px -12px,-12px 0;background-size:24px 24px}
.image-display{display:block;flex:none;max-width:none;user-select:none;-webkit-user-drag:none;box-shadow:0 7px 32px #0007}
.image-inspector{width:252px;flex:none;overflow-y:auto;padding:18px 18px 28px;border-left:1px solid var(--border,#333)}
.image-inspector-heading{font-size:10px;font-weight:700;letter-spacing:.1em;opacity:.6;margin-bottom:13px}
.image-metadata{margin-bottom:28px}
.image-meta-list{display:grid;grid-template-columns:minmax(0,85px) minmax(0,1fr);column-gap:8px;row-gap:11px;margin:0;font-size:12px}
.image-meta-list dt{opacity:.62}
.image-meta-list dd{margin:0;overflow-wrap:anywhere;color:var(--text-primary,#e9f0ea)}
.image-metadata-note{opacity:.55;font-size:11px;line-height:1.6;margin:20px 0 0}
.image-sample{font-size:12px;line-height:1.6;display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}
.image-swatch{display:inline-block;flex:none;width:24px;height:24px;border:1px solid #aaa8;border-radius:5px;box-shadow:0 1px 4px #0008}
@media(max-width:850px){.image-inspector{width:198px;padding:14px}.image-toolbar{padding:9px 12px;gap:8px}}
@media(max-width:650px){.image-layout{flex-direction:column}.image-stage{min-height:220px}.image-inspector{width:auto;flex:none;max-height:180px;border-left:0;border-top:1px solid var(--border,#333)}.image-meta-list{grid-template-columns:95px minmax(0,1fr)}}


/* V13: browser-local data extraction; intentionally consistent with graphite/lime UI */
.text-extract-pane{flex:1 1 auto;min-width:0;min-height:0;overflow:auto;background:#17191b;padding:20px clamp(14px,3vw,35px) 50px;}
.extract-wrap{width:100%;max-width:1250px;margin:0 auto;display:flex;flex-direction:column;gap:14px;}
.extract-intro strong{font-size:19px;letter-spacing:-.025em;font-weight:630;color:#e6ece4;}
.extract-intro p{font-size:12px;color:var(--muted);margin:3px 0 2px;line-height:1.55;}
.extract-path-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;}
.extract-path-row label{font-size:12px;color:#b2b8af;font-weight:550;}
.extract-path-row input,.extract-custom-row input{flex:1 1 220px;max-width:620px;min-width:140px;padding:9px 12px;border:1px solid #3d4140;border-radius:6px;background:#121416;color:#e3e9e1;font:12px/1.5 var(--mono);}
.extract-path-row input:focus,.extract-custom-row input:focus{border-color:var(--accent);outline:0;}
.extract-status{min-height:19px;font-size:12px;color:#b6c5a8;}
.extract-status.error{color:#e5aa93;}
.extract-fields-panel{border:1px solid #303433;background:#1b1e1d;border-radius:8px;padding:13px 14px 15px;}
.extract-section-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.extract-section-heading strong{font-size:12px;letter-spacing:.02em;}
.extract-section-heading span{font-size:11px;color:var(--muted);}
.extract-fields{display:flex;flex-wrap:wrap;gap:7px;max-height:170px;overflow:auto;}
.extract-field{display:inline-flex;align-items:center;gap:7px;border:1px solid #3d4340;border-radius:5px;padding:6px 9px;background:#191d1b;cursor:pointer;font:12px var(--mono);color:#c7cfca;max-width:100%;overflow-wrap:anywhere;}
.extract-field:has(input:checked){background:#2a3523;border-color:#6c8750;color:#e2f2ce;}
.extract-field input{accent-color:var(--accent);margin:0;}
.extract-field span{overflow-wrap:anywhere;}
.extract-no-fields{font-size:12px;color:var(--muted);}
.extract-field-note{flex:1 1 100%;font-size:11px;line-height:1.5;color:var(--muted);}
.extract-custom-row{display:flex;align-items:center;gap:9px;margin-top:12px;flex-wrap:wrap;}
.extract-results-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:1px solid #363c37;padding:2px 0 10px;color:#c9d9ba;font-size:12px;}
.extract-results-actions{display:flex;flex-wrap:wrap;gap:7px;}
.extract-table-scroll{width:100%;overflow:auto;max-height:440px;min-height:90px;border:1px solid #343838;border-radius:7px;background:#141718;}
.extract-table{min-width:100%;border-collapse:separate;border-spacing:0;font:12px/1.55 var(--mono);}
.extract-table th,.extract-table td{text-align:left;min-width:120px;max-width:390px;padding:9px 12px;border-right:1px solid #2a2f2e;border-bottom:1px solid #2b302f;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;}
.extract-table th{background:#222923;color:#c9e6ab;position:sticky;top:0;z-index:1;font-weight:600;white-space:nowrap;}
.extract-table td{color:#d2dbd8;}
.extract-table tbody tr:hover td{background:#1e2522;}
.extract-preview-note{font-size:11px;color:var(--muted);margin:0;line-height:1.6;}
@media(max-width:620px){.text-extract-pane{padding:14px 12px 30px}.extract-path-row label{width:100%}.extract-results-actions{width:100%}.extract-results-actions button{flex:1 1 auto}.extract-table th,.extract-table td{min-width:105px;padding:8px}}

.sqlite-cell-header #sqlite-cell-copy{margin-left:auto;flex-shrink:0;}

/* V13.1: filtered, stable-sorted structured projections */
.extract-transform-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:9px;padding:12px 13px;border:1px solid #343b36;border-radius:7px;background:#1c201f}
.extract-transform-row label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:550;color:#aebcb0}
.extract-transform-row select,.extract-transform-row input{min-width:140px;max-width:300px;min-height:34px;border:1px solid #3c443e;border-radius:5px;background:#131715;color:#e1e9de;padding:5px 9px;font:12px/1.4 var(--mono)}
.extract-transform-row input{min-width:180px}
.extract-transform-row select:focus,.extract-transform-row input:focus{outline:1px solid var(--accent,#c5e86b);border-color:var(--accent,#c5e86b)}
.extract-transform-row button{min-height:34px}
@media(max-width:620px){.extract-transform-row label{flex:1 1 135px}.extract-transform-row select,.extract-transform-row input{width:100%;min-width:0}}

/* V13.1: inspect and extract from JSON tree without manual path typing */
.json-summary .json-meta{margin-right:auto}
.json-leaf .json-value{flex:1 1 auto}
.json-action{flex:0 0 auto;align-self:center;margin-left:5px;border:1px solid transparent;border-radius:4px;padding:2px 6px;background:transparent;color:#a8bea2;font:10px/1.4 var(--mono);cursor:pointer;white-space:nowrap}
.json-action:hover,.json-action:focus-visible{outline:none;border-color:#78935d;background:#283225;color:#d0ecb3}
.json-action-extract{color:#c8e6a4;border-color:#465b38}
.json-leaf .json-action:first-of-type{margin-left:auto}
@media(max-width:620px){.json-summary,.json-leaf{flex-wrap:wrap;gap:6px}.json-action{margin-left:2px}}

/* V13.2: background extraction progress and cancellation */
.extract-status-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:26px;}
.extract-status-row .extract-status{flex:1 1 auto;min-width:0;}
.extract-status-row button{flex:0 0 auto;}
.extract-status-row button[hidden]{display:none;}


/* V13.3 — shared, read-only Data Tools for SQLite and spreadsheets */
.sheet-tools-panel{flex:0 0 auto;max-height:min(51vh,510px);min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 17px 13px;background:#171c19;border-bottom:1px solid #45503e;scrollbar-width:thin;}
.sheet-tools-panel[hidden],.sqlite-tools-panel[hidden]{display:none!important;}
.sheet-tools-options{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:9px 0;border-bottom:1px solid #303d34;font-size:12px;color:#c2d4b6;}
.sheet-tools-options label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;}
.sheet-tools-options input{accent-color:var(--accent);}
.sheet-tools-options span{color:#9cad9d;flex:1 1 auto;font-size:11px;}
.sqlite-tools-panel{flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;padding:17px 20px 40px;background:#151a17;scrollbar-width:thin;}
.table-tools-widget{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;}
.table-tools-widget[hidden]{display:none!important;}
.table-tools-title{display:block;font-size:16px;font-weight:620;color:#e0ebda;}
.table-tools-note,.table-tools-tip{font-size:11px;line-height:1.5;color:#a6b3a5;margin:0;}
.table-tools-column-search{display:flex;align-items:center;gap:12px;font-size:12px;color:#b3c6ac;}
.table-tools-column-search>span{white-space:nowrap;}
.table-tools-column-search input{min-width:110px;width:260px;max-width:100%;padding:8px 11px;border:1px solid #405045;background:#111714;color:#e2e9db;border-radius:6px;font:12px var(--mono);}
.table-tools-columns{display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px;max-height:124px;min-height:37px;overflow-y:auto;padding:8px;border:1px solid #334238;background:#1a221c;border-radius:6px;scrollbar-width:thin;}
.table-tools-field{display:inline-flex;align-items:center;gap:7px;border:1px solid #39493c;background:#172019;border-radius:5px;padding:5px 9px;max-width:100%;font:11px var(--mono);color:#cad7c5;cursor:pointer;overflow-wrap:anywhere;}
.table-tools-field:has(input:checked){border-color:#799854;background:#2a3727;color:#e0f0cc;}
.table-tools-field input{accent-color:var(--accent);margin:0;}
.table-tools-field span{min-width:0;overflow-wrap:anywhere;}
.table-tools-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;padding:10px;background:#202820;border-radius:6px;border:1px solid #354639;}
.table-tools-filters label{display:flex;flex-direction:column;gap:4px;min-width:140px;flex:1 1 140px;font-size:11px;color:#b6c6b2;}
.table-tools-filters label:nth-child(2){flex:2 1 190px;}
.table-tools-filters select,.table-tools-filters input{width:100%;min-width:0;padding:8px 10px;border:1px solid #435248;border-radius:5px;background:#121814;color:#e1e8dc;font:12px var(--mono);}
.table-tools-status{font-size:12px;color:#b6d4a3;min-height:18px;}
.table-tools-status.error{color:#efae95;}
.table-tools-results-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:5px 0;border-bottom:1px solid #3b4a3c;}
.table-tools-result-count{font-size:12px;color:#cbdeb8;}
.table-tools-actions{display:flex;flex-wrap:wrap;gap:7px;}
.table-tools-preview-scroll{min-height:70px;max-height:260px;overflow:auto;border:1px solid #354336;border-radius:6px;background:#131915;}
.table-tools-preview{border-collapse:separate;border-spacing:0;min-width:100%;font:12px/1.5 var(--mono);}
.table-tools-preview th,.table-tools-preview td{padding:8px 12px;min-width:100px;max-width:300px;text-align:left;vertical-align:top;overflow-wrap:anywhere;white-space:pre-wrap;border-right:1px solid #2d382e;border-bottom:1px solid #2e392f;}
.table-tools-preview th{position:sticky;top:0;background:#253126;color:#d3edc0;z-index:1;}
.table-tools-preview td{color:#d1decf;}
.table-tools-preview tbody tr:hover td{background:#202b21;}
.table-tools-widget button:focus-visible,.table-tools-widget input:focus-visible,.table-tools-widget select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
@media(max-width:650px){.sheet-tools-panel{padding:0 10px 10px;max-height:58vh}.sqlite-tools-panel{padding:11px}.table-tools-filters label{flex:1 1 130px}.table-tools-actions{width:100%;gap:5px}.table-tools-actions button{flex:1 1 auto}.table-tools-column-search{flex-wrap:wrap}.table-tools-column-search input{width:100%}}

/* V13.4: read-only duplicate removal and per-field data quality */
.table-tools-unique{display:inline-flex!important;flex:0 0 auto!important;min-width:auto!important;align-items:center;flex-direction:row!important;gap:7px;padding:7px 8px;border:1px solid #485748;border-radius:5px;color:#d1e8bc!important;cursor:pointer;}
.table-tools-unique input{width:auto!important;margin:0;accent-color:var(--accent);}
.table-tools-quality{display:flex;flex-direction:column;gap:6px;border:1px solid #334237;border-radius:7px;padding:9px 11px;background:#19221b;}
.table-tools-quality:empty{display:none}
.table-tools-quality-title{font-size:11px;color:#cde4b9;}
.table-tools-quality-list{display:flex;gap:6px;flex-wrap:wrap;max-height:115px;overflow-y:auto;}
.table-tools-quality-item{display:flex;align-items:center;gap:8px;padding:6px 9px;border:1px solid #394a3e;border-radius:5px;background:#202c24;font:11px var(--mono);color:#b4c4b5;}
.table-tools-quality-item strong{color:#e3efd7;font-weight:550;}

/* V13.4 JSON Extract deduplication and missing-field quality */
.extract-unique-label{display:inline-flex!important;flex:0 0 auto!important;min-width:auto!important;align-items:center;flex-direction:row!important;gap:7px;padding:8px;border:1px solid #445240;border-radius:5px;color:#d3e8be!important;cursor:pointer;}
.extract-unique-label input{width:auto!important;min-width:0!important;margin:0;accent-color:var(--accent);}
.extract-quality{display:flex;flex-direction:column;gap:7px;padding:9px 11px;border:1px solid #354337;border-radius:6px;background:#1a221d;}
.extract-quality:empty{display:none}
.extract-quality-heading{font-size:11px;color:#c4e1ae;}
.extract-quality-list{display:flex;gap:6px;flex-wrap:wrap;max-height:110px;overflow-y:auto;}
.extract-quality-item{display:flex;gap:8px;align-items:center;background:#253026;padding:6px 9px;border:1px solid #435343;border-radius:5px;color:#aebfad;font:11px var(--mono);}
.extract-quality-item strong{font-weight:550;color:#deebd6;}

/* V13.4 cross-dataset comparison: common across JSON/SQLite/spreadsheets */
.compare-panel{display:flex;flex-direction:column;gap:10px;border:1px solid #425442;border-radius:8px;background:#1c251e;padding:13px 14px;min-width:0;}
.compare-panel[hidden]{display:none!important}
.compare-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;}
.compare-heading strong{font-size:14px;color:#ddf0cc;}
.compare-heading span,.compare-footer{color:#a7b7a6;font-size:11px;margin:0;line-height:1.5;}
.compare-primary-actions,.compare-export-buttons{display:flex;gap:8px;flex-wrap:wrap;}
.compare-saved,.compare-status{font-size:12px;color:#bcd6ad;}
.compare-status.error{color:#edae94;}
.compare-key-row{display:flex;gap:10px;flex-wrap:wrap;}
.compare-key-row label{display:flex;flex-direction:column;gap:5px;flex:1 1 180px;font-size:11px;color:#b9c8b6;}
.compare-key-row select{min-width:0;width:100%;padding:8px 10px;color:#e2edda;background:#141d15;border:1px solid #53624e;border-radius:5px;font:12px var(--mono);}
.compare-stats{display:flex;gap:6px;flex-wrap:wrap;}
.compare-stat{display:flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #40503f;border-radius:5px;color:#a9c0a7;font-size:11px;background:#243026;}
.compare-stat strong{color:#def3ce;font-variant-numeric:tabular-nums;}
.compare-results{max-height:280px;overflow:auto;border:1px solid #405041;border-radius:5px;}
.compare-results:empty{display:none}
.compare-table{width:100%;min-width:650px;border-collapse:collapse;font:11px/1.5 var(--mono);}
.compare-table th,.compare-table td{padding:7px 10px;text-align:left;border-bottom:1px solid #334334;border-right:1px solid #344234;max-width:220px;overflow-wrap:anywhere;vertical-align:top;}
.compare-table th{position:sticky;top:0;background:#293b2c;color:#d4eac4;}
.compare-status-cell{font-weight:650;color:#d6eaae;}
.compare-panel button:focus-visible,.compare-panel select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
@media(max-width:600px){.compare-panel{padding:10px}.compare-primary-actions button,.compare-export-buttons button{flex:1 1 auto}}

/* V13.5: manual compare field mapping and per-field value review */
.compare-field-mapping{border:1px solid #374b39;border-radius:6px;background:#18231b;padding:7px 10px;}
.compare-field-mapping-title{cursor:pointer;font-size:12px;font-weight:600;color:#cde9b9;}
.compare-field-mapping-title:hover{color:#e6f7d6;}
.compare-mapping-note{font-size:11px;color:#aabfa9;line-height:1.5;margin:7px 0;}
.compare-field-mapping-list{display:flex;flex-direction:column;gap:7px;max-height:250px;overflow:auto;padding-right:5px;}
.compare-map-row{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#d3e1c9;font:11px var(--mono);}
.compare-map-left{overflow-wrap:anywhere;flex:1 1 140px;}
.compare-map-select{flex:2 1 150px;min-width:0;max-width:440px;background:#141e16;border:1px solid #4c604e;border-radius:5px;padding:6px;color:#e1eddb;font:11px var(--mono);}
.compare-key-row .compare-normalization-label{flex:1 1 180px;}
.compare-inspection{min-width:190px;}
.compare-inspect-row{display:block;margin-top:6px;max-width:100%;white-space:normal;text-align:left;}
/* Duplicate groups: independently paged ten-row slices, never side-by-side paired. */
.compare-duplicate-review{border-top:1px solid #3d523f;padding-top:8px;margin-top:8px;max-width:230px;}
.compare-duplicate-review>summary{cursor:pointer;color:#d3e9b5;font-weight:650;white-space:normal;}
.compare-duplicate-note{margin:7px 0;color:#aabfa8;font-size:11px;line-height:1.45;}
.compare-duplicate-side{margin:8px 0;padding:7px;background:#17251b;border:1px solid #3b4d3d;border-radius:5px;min-width:0;}
.compare-duplicate-side>strong{color:#d7ecc7;}
.compare-duplicate-list{max-height:170px;overflow:auto;padding:4px 0;}
.compare-duplicate-item{padding:5px 0;border-bottom:1px solid #304033;overflow-wrap:anywhere;}
.compare-duplicate-item span{display:block;color:#bdceba;white-space:pre-wrap;}
.compare-duplicate-item button{margin-top:5px;white-space:normal;text-align:left;}
.compare-duplicate-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding-top:6px;}
.compare-duplicate-navigation button{min-height:27px;white-space:normal;}
.compare-duplicate-page{flex:1 1 100%;color:#b2c6ab;font-variant-numeric:tabular-nums;}
.compare-duplicate-empty{margin:3px 0;color:#acbca8;}
.compare-duplicate-search{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0;}
.compare-duplicate-search input{flex:1 1 100%;min-width:0;border:1px solid #4b614b;border-radius:5px;padding:6px 8px;font:11px var(--mono);background:#121e15;color:#e0edd8;}
.compare-duplicate-search input:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
.compare-duplicate-search button{flex:1 1 auto;white-space:normal;}

.compare-row-details summary{cursor:pointer;white-space:nowrap;color:#cfe6b4;}
.compare-row-details summary:hover{color:#eafdde;}
.compare-change-list{display:flex;flex-direction:column;gap:6px;padding:8px 0;}
.compare-change-item{padding:8px;border:1px solid #3d5241;background:#1a291e;border-radius:5px;}
.compare-change-item strong{color:#d7edc4;font:11px var(--mono);}
.compare-change-values{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px;}
.compare-change-values div{font:11px/1.5 var(--mono);min-width:105px;max-height:160px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#172018;border:1px solid #374637;border-radius:4px;padding:7px;color:#cfddc7;}
.compare-row-details button{margin:4px 0;}
@media(max-width:620px){.compare-change-values{grid-template-columns:1fr}.compare-map-row{flex-wrap:wrap}.compare-map-select{flex:1 1 100%}}


/* V13.6: comparison coverage and bounded in-tab history */
.compare-coverage{display:flex;flex-direction:column;gap:5px;padding:9px 11px;border:1px solid #394a3c;border-radius:6px;background:#1b281f;font-size:11px;line-height:1.55;color:#b9cbb7;}
.compare-coverage:empty{display:none;}
.compare-coverage strong{color:#d7edc9;font-weight:650;}
.compare-coverage.warning{border-color:#846b42;background:#29261d;color:#ead8ba;}
.compare-coverage.warning strong{color:#f1dda7;}
.compare-coverage p{margin:0;}
.compare-unmapped{font:11px/1.45 var(--mono);overflow-wrap:anywhere;color:#b5c5b0;}
.compare-history{border:1px solid #38483b;border-radius:6px;background:#18231a;padding:8px 10px;}
.compare-history-title{cursor:pointer;color:#cde4b7;font-size:12px;font-weight:600;}
.compare-history-note{color:#9fb39b;font-size:11px;line-height:1.5;margin:7px 0;}
.compare-history-list{display:flex;flex-direction:column;gap:6px;max-height:265px;overflow:auto;margin:8px 0;}
.compare-history-item{border:1px solid #415646;border-radius:5px;background:#202b22;color:#cbdac6;text-align:left;cursor:pointer;padding:7px 10px;display:flex;flex-direction:column;gap:4px;font-size:11px;}
.compare-history-item strong{font:600 11px/1.4 var(--mono);color:#d1e8c5;overflow-wrap:anywhere;}
.compare-history-item span{color:#a8b8a4;}
.compare-history-item:hover,.compare-history-item:focus-visible{border-color:#8ba867;background:#2c3d2d;outline:0;}
.compare-history-item.selected{border-color:#9aba6f;}
.compare-history>button{margin-top:3px;}

/* Avoid empty comparison tables and disabled report controls before a result exists. */
.compare-stats[hidden],.compare-results[hidden],.compare-export-buttons[hidden]{display:none!important;}


/* V13.7: Search and navigate differences without cloning full reports into DOM. */
.compare-browse{display:flex;flex-direction:column;gap:9px;padding:11px 12px;border:1px solid #3b513f;border-radius:7px;background:#1b271d;min-width:0;}
.compare-browse[hidden]{display:none!important}
.compare-browse-heading{color:#d4eabc;font-size:12px;font-weight:650;}
.compare-browse-filters{display:flex;align-items:end;flex-wrap:wrap;gap:9px;}
.compare-browse-filters label,.compare-export-scope-label{display:flex;flex-direction:column;gap:5px;color:#b6c9b3;font-size:11px;min-width:140px;flex:1 1 160px;}
.compare-browse-filters .compare-filter-search-label{flex:2 1 230px;}
.compare-browse select,.compare-browse input{border:1px solid #455b48;border-radius:5px;background:#151f18;color:#e1efd8;padding:7px 10px;font:12px var(--mono);min-width:0;width:100%;}
.compare-browse input[type=number]{width:65px;text-align:center;padding:6px 7px;}
.compare-browse button{height:32px;flex:0 0 auto;}
.compare-browse select:focus-visible,.compare-browse input:focus-visible,.compare-browse button:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.compare-navigation,.compare-selection-bar,.compare-export-scope-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:#b5c6b0;font-size:11px;min-width:0;}
.compare-navigation{border-top:1px solid #364938;padding-top:9px;}
.compare-page-summary,.compare-selected-summary{flex:1 1 auto;color:#c6dfb7;font-size:11px;font-variant-numeric:tabular-nums;}
.compare-navigation>.compare-page-input{width:65px;flex:0 0 65px;}
.compare-selection-bar{padding-top:2px;}
.compare-export-scope-row{border-top:1px solid #354a39;padding-top:9px;gap:12px;}
.compare-export-scope-label{flex:0 1 250px;}
.compare-export-scope-note{flex:1 1 200px;line-height:1.45;color:#9caf99;}
.compare-select-cell{min-width:65px!important;max-width:70px!important;text-align:center!important;}
.compare-select-row{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;}
.compare-select-cell input{accent-color:var(--accent);cursor:pointer;}
.compare-table{min-width:730px;}
@media(max-width:620px){.compare-browse{padding:9px 10px}.compare-browse-filters label{flex:1 1 135px}.compare-browse-filters .compare-filter-search-label{flex:1 1 100%}.compare-navigation{gap:6px}.compare-navigation button{padding:6px 9px}.compare-export-scope-label{flex:1 1 100%}}


/* V13.8: fast field-change review across bounded difference reports. */
.compare-hotspots{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid #445943;border-radius:7px;background:#1c2b20;min-width:0;}
.compare-hotspots[hidden]{display:none!important;}
.compare-hotspots-heading{font-size:12px;color:#d4edc3;font-weight:650;}
.compare-hotspots-note{color:#a6bba6;line-height:1.5;font-size:11px;margin:0;}
.compare-hotspots-list{display:flex;align-items:center;flex-wrap:wrap;gap:7px;max-height:125px;overflow:auto;}
.compare-hotspot-chip{display:inline-flex;gap:7px;align-items:center;padding:7px 10px;border:1px solid #4c6946;background:#263629;border-radius:16px;cursor:pointer;color:#d5ead0;font-size:11px;}
.compare-hotspot-chip strong{color:#c6e86b;font-variant-numeric:tabular-nums;}
.compare-hotspot-chip span{overflow-wrap:anywhere;}
.compare-hotspot-chip:hover,.compare-hotspot-chip:focus-visible{background:#384b36;border-color:#b5d786;outline:0;}
.compare-hotspot-chip.active{border-color:var(--accent);background:#3c5036;}
.compare-hotspots>button{align-self:flex-start;}
.compare-browse-filters .compare-filter-field-label{flex:1 1 155px;}
.compare-selection-bar>button:last-child{margin-left:auto;}
@media(max-width:620px){.compare-hotspot-chip{border-radius:6px}.compare-selection-bar>button:last-child{margin-left:0}}


/* V13.9: display only a bounded window of full local comparison values. */
.compare-value-inspector{display:flex;flex-direction:column;gap:11px;min-width:0;padding:13px 15px;border:1px solid #7c9860;border-radius:8px;background:#1b281d;}
.compare-value-inspector[hidden]{display:none!important;}
.compare-value-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;}
.compare-value-heading strong{font:600 13px/1.5 var(--mono);color:#e5f1d9;overflow-wrap:anywhere;}
.compare-value-hint{font-size:11px;line-height:1.55;color:#a6c09c;margin:0;}
.compare-value-panes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;min-width:0;}
.compare-value-pane{display:flex;flex-direction:column;gap:9px;min-width:0;border:1px solid #3f5141;border-radius:7px;background:#152018;padding:10px;}
.compare-value-side-title{color:#d3e9c1;font-size:12px;font-weight:650;}
.compare-value-length,.compare-value-range{font-size:11px;color:#9cba9c;font-variant-numeric:tabular-nums;}
.compare-value-navigation,.compare-value-actions,.compare-value-search{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0;}
.compare-value-navigation .compare-value-range{flex:1 1 auto;text-align:center;}
.compare-value-text{margin:0;min-height:100px;max-height:230px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:2;padding:9px 11px;border:1px solid #394b3c;border-radius:5px;background:#111913;color:#e4eedf;font:12px/1.5 var(--mono);user-select:text;}
.compare-value-text:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.compare-value-search input{flex:1 1 145px;min-width:0;padding:8px 10px;border:1px solid #455b48;border-radius:5px;background:#151f17;color:#dfeeda;font:12px var(--mono);}
.compare-value-status{color:#afd4a1;font-size:11px;margin:0;line-height:1.5;min-height:17px;}
.compare-value-status.error{color:#eeb294;}
.compare-value-pane button,.compare-value-heading button{flex:0 0 auto;}
.compare-change-item>button{margin-top:8px;}
@media(max-width:850px){.compare-value-panes{grid-template-columns:1fr;}.compare-value-inspector{padding:10px;}.compare-value-text{max-height:200px;}}

/* Search matches use text nodes rather than injected markup. */
.compare-value-match{background:#c5e86b;color:#1c2619;padding:0 1px;border-radius:2px;}

/* Async JSON Worker export: fresh-click clipboard fallback. */
#text-extract-copy-ready[hidden]{display:none!important}
#text-extract-copy-ready:not([hidden]){border-color:#91b26e;color:#d9edc4}


/* Direct workspace compare: source selection is separate from the shared report. */
.workspace-compare-toggle[aria-pressed="true"]{border-color:#83a765;color:#d7ecc5;background:#263224;}
.workspace-compare-view{display:block;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;padding:25px clamp(16px,3vw,35px) 40px;background:#141916;}
.workspace-compare-view[hidden]{display:none!important;}
.workspace-compare-layout{max-width:1160px;margin:0 auto;display:flex;flex-direction:column;gap:13px;min-width:0;}
.workspace-compare-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:5px;}
.workspace-compare-eyebrow{font:600 10px var(--mono);letter-spacing:.12em;color:#a6bb99;}
.workspace-compare-heading h1{font-size:25px;font-weight:590;letter-spacing:-.035em;line-height:1.3;color:#e7ecdf;margin:7px 0;}
.workspace-compare-heading p{font-size:12px;line-height:1.6;color:#a8b8aa;max-width:720px;margin:0;}
.workspace-compare-pickers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
.workspace-compare-picker{display:flex;flex-direction:column;gap:8px;min-width:0;padding:15px 16px;border:1px solid #384a3d;border-radius:8px;background:#1b241d;}
.workspace-compare-side{font:650 11px var(--mono);letter-spacing:.05em;color:#c6e86b;margin-bottom:4px;}
.workspace-compare-picker>label:not(.workspace-compare-header-option){font-size:11px;color:#adbfae;}
.workspace-compare-picker select{font:12px var(--mono);width:100%;min-width:0;padding:10px 11px;border:1px solid #415644;border-radius:5px;color:#deead7;background:#141d16;}
.workspace-compare-picker select:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
.workspace-compare-header-option{font:11px var(--mono);color:#c0d0b9;display:flex;align-items:center;gap:8px;margin-top:4px;}
.workspace-compare-header-option[hidden]{display:none!important;}
.workspace-compare-header-option input{accent-color:var(--accent);}
.workspace-compare-action-bar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:4px;}
.workspace-compare-action-bar>span{font:11px/1.5 var(--mono);color:#8f9e90;flex:1 1 240px;text-align:right;}
.workspace-compare-status,.workspace-compare-source-note{margin:0;font:11px/1.55 var(--mono);overflow-wrap:anywhere;}
.workspace-compare-status{color:#c6dbbc;min-height:17px;}
.workspace-compare-status.error{color:#e8aa90;}
.workspace-compare-source-note{color:#9db19a;}
#workspace-compare-results{min-width:0;}
.workspace-compare-view .compare-panel{padding:15px;border-color:#455a42;}
@media(max-width:720px){.workspace-compare-pickers{grid-template-columns:1fr}.workspace-compare-heading h1{font-size:22px}.workspace-compare-view{padding:17px 12px}.workspace-compare-action-bar>span{text-align:left;flex-basis:100%}}
@media(max-width:430px){.workspace-compare-label{display:none}.workspace-compare-toggle{padding:8px!important}}


/* V13.26: paged Data Tools results, actions from quality signals, full value review. */
.table-tools-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;}
.table-tools-page-summary{font:11px/1.5 var(--mono);color:#c6dcb9;flex:1 1 180px;font-variant-numeric:tabular-nums;}
.table-tools-page-input{width:64px!important;min-width:0;padding:7px 8px;border:1px solid #455746;border-radius:5px;background:#141c16;color:#e0eed9;font:12px var(--mono);text-align:center;}
.table-tools-pagination button:disabled{opacity:.43;}
.table-tools-preview .table-tools-row-number{position:sticky;left:0;z-index:1;min-width:49px;max-width:68px;width:55px;text-align:right;color:#8da487;background:#1a241c;font:10px/1.5 var(--mono);font-variant-numeric:tabular-nums;}
.table-tools-preview thead .table-tools-row-number{z-index:3;background:#253126;}
.table-tools-preview tbody tr:hover .table-tools-row-number{background:#233027;}
.table-tools-cell-inspect{display:block;border:0;background:transparent;padding:0;width:100%;max-width:100%;min-height:16px;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;color:inherit;cursor:pointer;}
.table-tools-cell-inspect:hover{color:#e6f4d5;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;}
.table-tools-cell-inspect:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px;}
.table-tools-quality-hint{font:10px/1.5 var(--mono);color:#93b091;margin:0;}
.table-tools-quality-action{border:1px solid #495e49;border-radius:5px;background:#29392c;color:#d9ecd3;padding:5px 8px;font:11px var(--mono);white-space:nowrap;cursor:pointer;}
.table-tools-quality-action:hover{border-color:#bad889;background:#3e5438;}
.table-tools-quality-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.table-tools-inspector-host:empty{display:none;}
.table-tools-inspector-host .compare-value-inspector{margin-top:2px;}
.compare-value-inspector.single-value .compare-value-panes{grid-template-columns:minmax(0,1fr);}
.compare-value-inspector.single-value .compare-value-pane:nth-child(2){display:none;}
@media(max-width:620px){.table-tools-pagination{gap:6px;}.table-tools-quality-item{flex-wrap:wrap;}.table-tools-page-summary{flex-basis:100%;}}


/* Portable, file-only Data Tools recipes (validated before use). */
.table-tools-recipes{display:flex;flex-direction:column;gap:7px;min-width:0;padding:10px 12px;border:1px solid #3b4e40;border-radius:7px;background:#19241d;}
.table-tools-recipes>strong{font-size:12px;color:#d9ebc6;}
.table-tools-recipes .table-tools-tip{margin:0;}
.table-tools-recipe-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;}
.table-tools-recipe-preview{margin:0;max-height:130px;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap;border:1px solid #668459;background:#27372b;border-radius:5px;color:#e2efd8;padding:9px 10px;font:11px/1.55 var(--mono);}
.table-tools-recipe-preview[hidden]{display:none!important;}
@media(max-width:550px){.table-tools-recipe-actions .button{flex:1 1 auto;}}


/* Source spreadsheet row provenance in read-only Data Tools. */
.table-tools-preview .table-tools-row-number:has(.table-tools-source-link){padding:0!important;}
.table-tools-source-link{display:block;width:100%;height:100%;min-height:34px;padding:8px 11px;border:0;background:transparent;color:#c5e86b;text-align:right;font:11px var(--mono);cursor:pointer;}
.table-tools-source-link:hover{background:#2d4529;text-decoration:underline;text-underline-offset:3px;}
.table-tools-source-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;}
.table-tools-source-link:disabled{opacity:.5;cursor:default;}


/* Opt-in acknowledgment for comparing edited workbooks with cached formulas. */
.workspace-compare-formula-warning{display:flex;align-items:flex-start;gap:10px;border:1px solid #716544;border-radius:6px;background:#29271e;color:#e4dcc6;padding:11px 13px;font:11px/1.6 var(--mono);}
.workspace-compare-formula-warning[hidden]{display:none!important;}
.workspace-compare-formula-warning input{flex:0 0 auto;margin:3px 0 0;accent-color:var(--accent);}
.workspace-compare-formula-warning strong{font-weight:650;color:#f4e6bf;}
.workspace-compare-formula-warning:focus-within{outline:2px solid var(--accent);outline-offset:2px;}
/* Primary sample workflows stay visible; specialist examples are optional. */
.welcome-examples{margin-top:19px;text-align:left}
.welcome-examples-title{margin:0 0 8px;color:var(--muted);font-size:11px;font-weight:600;text-transform:uppercase}
.welcome-examples-primary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.welcome-examples-primary .text-button{min-height:38px;min-width:0;white-space:normal;text-align:center;padding:8px;border:1px solid var(--border-strong);border-radius:6px;background:#1d201b;color:#c3d9ac}
.welcome-examples-primary .text-button:hover{border-color:#839d64;background:#283122}
.welcome-more-examples{margin-top:11px;border-top:1px solid var(--border);padding-top:8px}
.welcome-more-examples summary{width:max-content;max-width:100%;padding:7px 4px;color:#b0bca9;font-size:12px;cursor:pointer}
.welcome-more-examples summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.welcome-examples-more{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 9px;margin-top:6px}
.welcome-examples-more .text-button{justify-content:flex-start;min-width:0;white-space:normal;text-align:left;padding:4px 6px}
@media(max-width:440px){.welcome-examples-primary,.welcome-examples-more{grid-template-columns:1fr}.welcome-examples-primary .text-button{justify-content:space-between;text-align:left}}

/* Task-based first use, without hiding the existing format samples. */
.welcome-intro{margin:0 auto 20px;max-width:410px;color:var(--muted);font-size:12px;line-height:1.6}
.welcome-task-grid{display:grid;grid-template-columns:1fr;gap:8px;text-align:left}
.welcome-task{display:flex;align-items:center;gap:12px;width:100%;min-height:62px;padding:11px 13px;border:1px solid var(--border-strong);border-radius:7px;background:#1d1f20;color:var(--ink);text-align:left}
.welcome-task:hover{background:#242b20;border-color:#718954}
.welcome-task-icon{display:flex;align-items:center;justify-content:center;flex:0 0 35px;width:35px;height:35px;border-radius:6px;background:#2a3325;color:#bbdc91}
.welcome-task-copy{flex:1 1 auto;min-width:0}
.welcome-task-copy strong,.welcome-task-copy small{display:block}
.welcome-task-copy strong{font-size:13px;font-weight:600}
.welcome-task-copy small{margin-top:3px;color:#a6a8a6;font-size:11px;line-height:1.35}
.welcome-task>span:last-child{color:#93a583}
.welcome-input-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;margin-top:11px}
.welcome-input-actions .button{min-height:35px}
.paste-format-select{width:100%;height:36px;margin-bottom:11px;padding:0 9px;border:1px solid var(--border-strong);border-radius:6px;background:#1c1e1f;color:var(--ink)}
.paste-format-note{margin:9px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.paste-format-note.error{color:#dda28f}
@media(max-width:540px){.welcome-inner{width:100%;padding-top:8px}.welcome-view{padding:20px 14px}.welcome-task{padding:10px}.welcome-task-copy small{font-size:11px}}

/* Data Tools: show the current result first, keep optional recipes secondary. */
.table-tools-recipe-details{margin-top:11px;padding:11px 0 0;border-top:1px solid #354739}
.table-tools-recipe-details>summary{display:list-item;width:fit-content;max-width:100%;padding:5px 4px;color:#bfdaae;font-size:12px;cursor:pointer}
.table-tools-recipe-details>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.table-tools-recipe-details .table-tools-recipes{margin-top:11px}
.table-tools-compare-guide{margin:0 0 -5px;color:#b7c9b1}
.sheet-tools-panel .table-tools-results-head{position:sticky;top:0;z-index:5;padding:9px 0;background:#171c19}
@media(max-width:600px){.sheet-tools-panel .table-tools-results-head{position:static}}

/* Folder text content search is deliberate and bounded: no scan per keystroke. */
.folder-search-options{display:flex;align-items:center;gap:7px;margin:0 11px 7px;color:#adb9af;font-size:11px}
.folder-search-options label{white-space:nowrap}
.folder-search-options select{flex:1 1 auto;min-width:0;height:32px;padding:0 6px;border:1px solid #48574a;border-radius:5px;background:#19201a;color:#dae8d7;font-size:11px}
.folder-search-options select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.folder-search-options .button{flex:0 0 auto;height:32px;padding:0 9px}
.folder-search-status{margin:0 11px 9px;color:#a0b19e;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.folder-row.with-snippet{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:3px;overflow:hidden}
.folder-row-main{display:flex;align-items:center;gap:7px;min-width:0;width:100%}
.folder-row-snippet{display:block;padding-left:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#99a99b;font:11px/1.2 var(--mono)}
.folder-row.selected .folder-row-snippet{color:#c3ddad}

/* Deliberate, bounded search inside text-like ZIP/EPUB members. */
.archive-search-options{display:flex;align-items:center;gap:6px;margin:0 5px 9px;color:#b2beb1;font-size:11px}
.archive-search-options label{white-space:nowrap}
.archive-search-options select{flex:1 1 auto;min-width:0;height:32px;padding:0 5px;border:1px solid #435046;border-radius:5px;background:#171d19;color:#d4e2cf;font-size:11px}
.archive-search-options select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.archive-search-options .button{height:32px;flex:0 0 auto;padding:0 9px}
.archive-search-status{margin:0 5px 10px;color:#9fb09c;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.archive-content-hit{flex-direction:column;align-items:stretch;gap:4px;padding:8px 9px;white-space:normal}
.archive-content-path{display:block;overflow-wrap:anywhere;color:#c3d4c0;font-size:11px}
.archive-content-snippet{display:block;overflow-wrap:anywhere;color:#9aaa9f;font-size:11px}
.archive-content-hit.selected .archive-content-snippet{color:#cce0ba}
@media(max-width:600px){.archive-search-options{flex-wrap:wrap}.archive-search-options label{min-width:48px}}

/* PDF page order exports use an explicit local-only copy, never alter the source. */
.pdf-download-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.pdf-pages-panel{flex:0 1 auto;max-height:min(43vh,420px);overflow-y:auto;min-height:0;padding:12px 16px 14px;border-bottom:1px solid #506047;background:#1b251c;scrollbar-width:thin}
.pdf-pages-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.pdf-pages-heading strong{font-size:13px;color:#dbeed4;font-weight:650}
.pdf-pages-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:11px}
.pdf-pages-controls label{white-space:nowrap;color:#b3c6ad;font-size:12px}
.pdf-pages-controls input{flex:1 1 220px;min-width:100px;height:33px;padding:0 10px;border:1px solid #50624b;border-radius:6px;background:#101911;color:#edf4e9;font:12px var(--mono)}
.pdf-pages-help{margin:9px 0 5px;color:#a9bca5;line-height:1.5;font-size:11px}
.pdf-pages-status{min-height:19px;margin:6px 0;color:#b8d4a8;font-size:12px}
.pdf-pages-status.error{color:#e9a295}
.pdf-pages-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:5px;max-height:135px;overflow:auto}
.pdf-pages-entry{display:flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid #425441;border-radius:5px;background:#172019}
.pdf-pages-entry-label{flex:1 1 auto;min-width:0;color:#e0ecd6;font:11px var(--mono)}
.pdf-pages-entry .icon-button{width:27px;height:27px;color:#b4caa8}
.pdf-pages-entry .icon-button:hover{color:#e9f6dc}
@media(max-width:690px){.pdf-pages-panel{max-height:45vh;padding:10px}.pdf-pages-controls{align-items:stretch}.pdf-pages-controls label{width:100%}.pdf-pages-controls input{flex-basis:100%}.pdf-download-actions .button{height:31px;font-size:11px}}

/* Prepared Compare sources are bounded in-tab copies and not filesystem documents. */
.workspace-compare-prepared-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid #324435;padding:9px 0;color:#b7c7b2;font-size:11px;line-height:1.5}
.workspace-compare-prepared-note>span{min-width:0;flex:1 1 260px;overflow-wrap:anywhere}
.workspace-compare-prepared-note button{flex:0 0 auto}

/* Multi-condition rules are drafts until the user selects Apply. */
.table-tools-more-filters{padding:10px 0;border-bottom:1px solid var(--border)}
.table-tools-more-heading{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:6px}
.table-tools-more-heading strong{color:#d7e6d0;font-size:12px;font-weight:650}
.table-tools-combine-label{display:flex;align-items:center;gap:6px;margin-left:auto;font-size:11px;color:#b4c3ad}
.table-tools-combine{height:30px;max-width:145px;padding:0 6px;border:1px solid #475d46;border-radius:5px;background:#19251a;color:#e0eedb}
.table-tools-more-filters .table-tools-tip{margin:5px 0 8px}
.table-tools-extra-list{display:flex;flex-direction:column;gap:6px}
.table-tools-extra-row{display:grid;grid-template-columns:minmax(115px,1.2fr) minmax(110px,1fr) minmax(100px,1fr) auto;gap:6px;align-items:center}
.table-tools-extra-row select,.table-tools-extra-row input{width:100%;min-width:0;height:32px;padding:0 7px;background:#152017;border:1px solid #405344;border-radius:5px;color:#e3eedd;font-size:11px}
.table-tools-extra-row .button{height:32px;white-space:nowrap}
@media(max-width:600px){.table-tools-combine-label{margin-left:0}.table-tools-extra-row{grid-template-columns:1fr 1fr}.table-tools-extra-row .table-tools-extra-value{grid-column:1/2}.table-tools-extra-row .button{grid-column:2/3}}

/* Output-only columns: alias and transform the projection, never source files. */
.table-tools-output-details{padding:10px 0;border-bottom:1px solid var(--border)}
.table-tools-output-summary{cursor:pointer;font-size:12px;font-weight:650;color:#d7e8d2}
.table-tools-output-details .table-tools-tip{margin:9px 0;color:#aabbac;line-height:1.5}
.table-tools-output-list{display:flex;flex-direction:column;gap:7px;padding:5px 0 9px}
.table-tools-output-row{display:grid;grid-template-columns:minmax(90px,1fr) minmax(110px,1.1fr) minmax(110px,.9fr);align-items:center;gap:7px}
.table-tools-output-source{font:11px var(--mono);color:#bdd2b7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table-tools-output-row input,.table-tools-output-row select{min-width:0;width:100%;height:32px;padding:0 8px;border:1px solid #445947;border-radius:5px;background:#152018;color:#e4f0df;font-size:11px}
.table-tools-output-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.table-tools-output-hint{margin:8px 0 0;font-size:11px;color:#b3c7a8;line-height:1.5}
@media(max-width:640px){.table-tools-output-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.table-tools-output-source{grid-column:1/-1}.table-tools-output-actions button{flex:1 1 auto}}

/* Own-file task entry and optional portable comparison setup. */
.workspace-compare-open{justify-content:center;min-height:40px;margin-bottom:4px;width:100%;}
.workspace-compare-job{border:1px solid #354438;border-radius:6px;padding:11px 13px;background:#171d19;}
.workspace-compare-job>summary{cursor:pointer;color:#c6d5bf;font-size:12px;}
.workspace-compare-job>p{font-size:11px;line-height:1.6;color:#9eae9b;margin:10px 0;}
.workspace-compare-job-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.workspace-compare-job-controls>label{font-size:11px;color:#b8c5b3;}
.workspace-compare-job-controls>input{flex:1 1 180px;min-width:0;max-width:320px;border:1px solid #415644;border-radius:5px;background:#101713;color:#dce7d5;padding:8px 10px;font:12px var(--mono);}
.workspace-compare-job-controls>input:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
.workspace-compare-job-status.error{color:#e8aa90;}
.table-tools-result-summary{display:grid;gap:3px;min-width:0;}
.table-tools-result-source{font-size:11px;color:var(--muted,#a8afa8);overflow-wrap:anywhere;}
.clean-source-select{width:100%;padding:10px;border:1px solid var(--border-strong);border-radius:5px;background:#181b19;color:var(--ink);font:12px var(--mono);}
.download-control .button-quiet.download-menu-toggle{border-left-color:var(--border-strong);}
@media(max-width:540px){.workspace-compare-job-controls>label{flex-basis:100%;}.workspace-compare-job-controls>input{max-width:none;flex-basis:100%;}.workspace-compare-job-controls>.button{flex:1 1 auto;}}


/* Repeatable batch cleaning — task-first local workflow. */
.batch-clean-view { flex: 1 1 auto; min-width: 0; width: 100%; overflow: auto; background: var(--background); }
.batch-clean-layout { max-width: 970px; margin: 0 auto; padding: 36px clamp(18px,4vw,46px) 80px; }
.batch-clean-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.batch-clean-heading h1 { font-size: 26px; letter-spacing: -.6px; font-weight: 670; margin: 9px 0 10px; }
.batch-clean-heading p { color: var(--muted); max-width: 680px; line-height: 1.6; margin: 0; }
.batch-clean-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.batch-clean-step { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 21px; min-width: 0; }
.batch-clean-step h2 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.batch-clean-step h2 span { background: var(--accent-dim); color: var(--accent); border-radius: 50%; width: 26px; height: 26px; display: inline-grid; place-items: center; font-size: 12px; }
.batch-clean-step label { display: block; font-size: 12px; color: var(--ink); margin-bottom: 8px; }
.batch-clean-step input[type="file"] { max-width: 100%; display: block; color: var(--muted); font-size: 12px; }
.batch-clean-step input[type="file"]::file-selector-button { background: #282d25; border: 1px solid #4b5740; border-radius: 6px; padding: 9px 11px; margin-right: 10px; color: var(--ink); cursor: pointer; font: inherit; }
.batch-clean-step small { display: block; line-height: 1.5; color: var(--subtle); }
.batch-clean-choice-status { font-size: 12px; line-height: 1.6; color: #c1cdb2; margin: 16px 0 7px; overflow-wrap: anywhere; }
.batch-clean-file-list,.batch-clean-result-list { list-style: none; padding: 0; margin: 10px 0 0; }
.batch-clean-file-list li,.batch-clean-results li { padding: 6px 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); }
.batch-clean-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 22px; }
.batch-clean-actions .button { min-height: 39px; padding: 9px 15px; }
.batch-clean-status { padding: 14px 0; font-size: 12px; color: #c1cdb2; min-height: 48px; overflow-wrap: anywhere; }
.batch-clean-status.error { color: #e9a098; }
.batch-clean-results { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 14px 18px; }
.batch-clean-results:has(>strong:empty) { display: none; }
.batch-clean-results strong { font-size: 13px; }
.batch-clean-fine-print { margin-top: 22px; font-size: 12px; line-height: 1.6; color: var(--subtle); }
@media(max-width:680px) {
 .batch-clean-heading { flex-direction: column; gap: 12px; }
 .batch-clean-heading h1 { font-size: 22px; }
 .batch-clean-steps { grid-template-columns: minmax(0,1fr); }
 .batch-clean-layout { padding: 22px 17px 60px; }
}


/* Browser-local read-only CSV quality audit. */
.csv-audit-view {flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.csv-audit-layout {max-width:1050px;margin:0 auto;padding:32px clamp(17px,4vw,46px) 68px}
.csv-audit-heading {display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:24px}
.csv-audit-heading h1 {font-size:26px;letter-spacing:-.6px;margin:8px 0 10px;font-weight:670}
.csv-audit-heading p {max-width:720px;color:var(--muted);line-height:1.55}
.csv-audit-controls {display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:19px;background:var(--surface);border:1px solid var(--border);border-radius:10px}
.csv-audit-controls label {font-size:12px;font-weight:650}
.csv-audit-controls input[type=file] {max-width:100%;font-size:12px}
.csv-audit-controls input[type=file]::file-selector-button {background:#282d25;color:var(--ink);border:1px solid #4b5740;border-radius:6px;padding:8px 11px;margin-right:8px;cursor:pointer;font:inherit}
.csv-audit-controls select {border:1px solid var(--border-strong);border-radius:6px;padding:9px 12px;background:var(--surface-raised);max-width:100%;min-width:140px}
.csv-audit-help {width:100%;margin:4px 0 0;color:var(--subtle);line-height:1.55;font-size:12px}
.csv-audit-status {min-height:24px;margin:16px 0 6px;font-size:12px;color:#c1cdb2;overflow-wrap:anywhere}
.csv-audit-status.error {color:#e9a098}
.csv-audit-file-summary {font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.csv-audit-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:17px 0}
.csv-audit-metric {display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface);min-width:0}
.csv-audit-metric strong {font-size:23px;color:var(--ink);font-variant-numeric:tabular-nums}
.csv-audit-metric span {font-size:11px;color:var(--muted)}
.csv-audit-results {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.csv-audit-panel {min-width:0;border:1px solid var(--border);background:var(--surface);border-radius:9px;padding:16px 18px}
.csv-audit-panel:first-child {grid-column:1/-1}
.csv-audit-panel h2 {margin:0 0 12px;font-size:14px}
.csv-audit-panel ul {margin:0;padding-left:21px;overflow-wrap:anywhere;font-size:12px;color:#c9cfca}
.csv-audit-panel li {margin-bottom:6px}
.csv-audit-table-scroll {overflow:auto}
.csv-audit-table-scroll table {width:100%;border-collapse:collapse;font-size:12px}
.csv-audit-table-scroll th,.csv-audit-table-scroll td {text-align:left;padding:9px 10px;border-bottom:1px solid var(--border)}
.csv-audit-table-scroll th {font-weight:600;color:var(--muted)}
.csv-audit-actions {display:flex;flex-wrap:wrap;gap:10px;margin-top:19px}
.csv-audit-actions button {padding:9px 14px;min-height:40px}
.csv-audit-note {max-width:850px;font-size:12px;line-height:1.6;color:var(--subtle);margin-top:16px}
@media(max-width:700px){.csv-audit-heading{flex-direction:column;gap:10px}.csv-audit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.csv-audit-results{grid-template-columns:minmax(0,1fr)}.csv-audit-layout{padding:20px 15px 55px}.csv-audit-heading h1{font-size:22px}}


/* Strict or union CSV combination, shown as its own task-first workspace. */
.csv-combine-view {flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.csv-combine-layout {max-width:1050px;margin:0 auto;padding:32px clamp(17px,4vw,46px) 72px}
.csv-combine-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:25px}
.csv-combine-heading h1 {font-size:26px;letter-spacing:-.6px;margin:8px 0 10px;font-weight:670}
.csv-combine-heading p {max-width:730px;line-height:1.55;color:var(--muted)}
.csv-combine-inputs,.csv-combine-plan {background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:19px;margin:14px 0}
.csv-combine-inputs label,.csv-combine-options label {font-weight:650;font-size:12px;display:block;margin-bottom:9px}
.csv-combine-inputs input[type=file] {font-size:12px;max-width:100%;display:block}
.csv-combine-inputs input[type=file]::file-selector-button {padding:9px 12px;border-radius:6px;border:1px solid #4b5740;background:#282d25;color:var(--ink);margin-right:9px;font:inherit;cursor:pointer}
.csv-combine-hint {font-size:12px;color:var(--subtle);line-height:1.55;max-width:800px}
.csv-combine-status {min-height:24px;color:#c1cdb2;font-size:12px;overflow-wrap:anywhere}
.csv-combine-status.error {color:#e9a098}
.csv-combine-plan h2 {font-size:15px;margin:0 0 12px}
.csv-combine-columns {font-size:12px;color:#d5ddd1;line-height:1.6;overflow-wrap:anywhere}
.csv-combine-file-list {list-style:none;margin:12px 0 18px;padding:0}
.csv-combine-file-list li {font:12px/1.6 var(--mono);padding:9px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.csv-combine-file-list li.csv-combine-schema-issue {color:#e1be86}
.csv-combine-options {display:flex;flex-direction:column;align-items:start;gap:8px}
.csv-combine-options select {max-width:100%;min-width:min(100%,380px);padding:10px;border-radius:6px;border:1px solid var(--border-strong);background:var(--surface-raised)}
.csv-combine-source-option {display:flex!important;align-items:center;gap:8px;font-weight:400!important;margin:7px 0!important;cursor:pointer}
.csv-combine-source-option input {flex-shrink:0}
.csv-combine-actions {display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 8px}
.csv-combine-actions button {padding:9px 14px;min-height:40px}
.csv-combine-output-summary {min-height:20px;color:#c1cdb2;font-size:12px}
@media(max-width:700px) {
 .csv-combine-heading{flex-direction:column;gap:10px}
 .csv-combine-heading h1{font-size:22px}
 .csv-combine-layout{padding:20px 15px 55px}
 .csv-combine-options select{min-width:0;width:100%}
}


/* Exact CSV key matching, two local files, with review-first export. */
.csv-match-view{flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.csv-match-layout{max-width:1040px;margin:0 auto;padding:32px clamp(17px,4vw,46px) 72px}
.csv-match-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}
.csv-match-heading h1{font-size:26px;font-weight:670;letter-spacing:-.6px;margin:8px 0 10px}
.csv-match-heading p{max-width:700px;line-height:1.55;color:var(--muted)}
.csv-match-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.csv-match-input-card{min-width:0;background:var(--surface);border:1px solid var(--border);padding:20px;border-radius:9px}
.csv-match-input-card h2{font-size:14px;margin:0 0 20px}
.csv-match-input-card label{display:block;font-size:12px;margin:12px 0 8px}
.csv-match-input-card input[type=file]{max-width:100%;font-size:12px;display:block}
.csv-match-input-card input[type=file]::file-selector-button{padding:8px 11px;border-radius:6px;border:1px solid #4b5740;background:#282d25;color:var(--ink);cursor:pointer;margin-right:8px;font:inherit}
.csv-match-input-card select,.csv-match-options select{display:block;width:100%;max-width:100%;padding:10px 12px;border-radius:6px;border:1px solid var(--border-strong);background:var(--surface-raised);color:var(--ink)}
.csv-match-status{font-size:12px;color:#c1cdb2;min-height:20px;overflow-wrap:anywhere;margin:17px 0 8px}
.csv-match-status.error{color:#e9a098}
.csv-match-source-note{font-size:12px;color:var(--muted);line-height:1.55;overflow-wrap:anywhere}
.csv-match-preview{padding:17px 20px;border:1px solid var(--border);border-radius:9px;margin:16px 0;background:var(--surface)}
.csv-match-preview h2{font-size:14px;margin:0 0 14px}
.csv-match-preview p,.csv-match-options p,.csv-match-footnote{font-size:12px;color:var(--subtle);line-height:1.6}
.csv-match-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.csv-match-metric{padding:12px;border:1px solid var(--border);border-radius:7px;min-width:0}
.csv-match-metric strong{display:block;font-size:22px;font-variant-numeric:tabular-nums}
.csv-match-metric span{display:block;margin-top:5px;color:var(--muted);font-size:11px}
.csv-match-options{max-width:720px;margin:18px 0}
.csv-match-options label{font-size:12px;font-weight:650;display:block;margin-bottom:9px}
.csv-match-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.csv-match-actions button{padding:9px 14px;min-height:40px}
.csv-match-output-summary{color:#c1cdb2;font-size:12px;overflow-wrap:anywhere}
.csv-match-footnote{max-width:820px;margin-top:15px}
@media(max-width:800px){.csv-match-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.csv-match-layout{padding:20px 15px 55px}.csv-match-heading{flex-direction:column;gap:10px}.csv-match-heading h1{font-size:22px}.csv-match-inputs{grid-template-columns:minmax(0,1fr)}.csv-match-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Grouped CSV summary task; isolated read-only tables and explicit export. */
.csv-summary-view{flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.csv-summary-layout{max-width:1050px;margin:0 auto;padding:32px clamp(17px,4vw,46px) 72px}
.csv-summary-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}
.csv-summary-heading h1{font-size:26px;font-weight:670;letter-spacing:-.6px;margin:8px 0 10px}
.csv-summary-heading p{max-width:730px;line-height:1.55;color:var(--muted)}
.csv-summary-controls,.csv-summary-preview{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px}
.csv-summary-picker-row label,.csv-summary-field-grid label{display:block;font-size:12px;font-weight:650}
.csv-summary-picker-row label{margin-bottom:9px}
.csv-summary-picker-row input[type=file]{max-width:100%;font-size:12px}
.csv-summary-picker-row input[type=file]::file-selector-button{padding:8px 11px;border:1px solid #4b5740;background:#282d25;color:var(--ink);border-radius:6px;margin-right:9px;font:inherit;cursor:pointer}
.csv-summary-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0 8px}
.csv-summary-field-grid select{display:block;margin-top:9px;width:100%;max-width:100%;padding:10px;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface-raised)}
.csv-summary-hint,.csv-summary-footnote{font-size:12px;line-height:1.6;color:var(--subtle);overflow-wrap:anywhere}
.csv-summary-status{min-height:23px;margin:17px 0 7px;font-size:12px;color:#c1cdb2;overflow-wrap:anywhere}
.csv-summary-status.error{color:#e9a098}
.csv-summary-source,.csv-summary-output-summary{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.csv-summary-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.csv-summary-actions button{padding:9px 14px;min-height:40px}
.csv-summary-preview{margin-top:17px}
.csv-summary-preview h2{margin:0 0 15px;font-size:14px}
.csv-summary-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:15px}
.csv-summary-stat{border:1px solid var(--border);border-radius:7px;padding:12px;min-width:0}
.csv-summary-stat strong{display:block;font-size:22px;font-variant-numeric:tabular-nums}
.csv-summary-stat span{display:block;margin-top:4px;font-size:11px;color:var(--muted)}
.csv-summary-scroll{overflow:auto}
.csv-summary-scroll table{border-collapse:collapse;width:100%;font-size:12px}
.csv-summary-scroll th,.csv-summary-scroll td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--border);max-width:240px;overflow-wrap:anywhere}
.csv-summary-scroll th{white-space:nowrap;color:var(--muted);font-weight:650}
.csv-summary-footnote{max-width:850px;margin-top:18px}
@media(max-width:670px){
 .csv-summary-layout{padding:20px 15px 55px}
 .csv-summary-heading{flex-direction:column;gap:10px}
 .csv-summary-heading h1{font-size:22px}
 .csv-summary-field-grid{grid-template-columns:minmax(0,1fr)}
 .csv-summary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* Read-only grouped CSV ZIP export. */
.csv-split-view{flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.csv-split-layout{max-width:1000px;margin:0 auto;padding:32px clamp(17px,4vw,46px) 72px}
.csv-split-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}
.csv-split-heading h1{font-size:26px;font-weight:670;letter-spacing:-.6px;margin:8px 0 10px}
.csv-split-heading p{max-width:750px;line-height:1.55;color:var(--muted)}
.csv-split-controls,.csv-split-preview{border:1px solid var(--border);border-radius:10px;background:var(--surface);padding:19px}
.csv-split-controls label{display:block;font-size:12px;font-weight:650;margin:12px 0 9px}
.csv-split-controls label:first-child{margin-top:0}
.csv-split-controls input[type=file]{max-width:100%;display:block;font-size:12px}
.csv-split-controls input[type=file]::file-selector-button{padding:8px 11px;border:1px solid #4b5740;background:#282d25;color:var(--ink);border-radius:6px;margin-right:8px;cursor:pointer;font:inherit}
.csv-split-controls select{display:block;width:min(100%,500px);max-width:100%;background:var(--surface-raised);border:1px solid var(--border-strong);padding:10px;border-radius:6px}
.csv-split-help{font-size:12px;line-height:1.6;color:var(--subtle);overflow-wrap:anywhere}
.csv-split-status{color:#c1cdb2;font-size:12px;min-height:22px;margin:15px 0 7px;overflow-wrap:anywhere}
.csv-split-status.error{color:#e9a098}
.csv-split-source,.csv-split-output-summary{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.csv-split-preview{margin:16px 0}
.csv-split-preview h2{font-size:14px;margin:0 0 14px}
.csv-split-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.csv-split-metric{border:1px solid var(--border);border-radius:7px;padding:13px;min-width:0}
.csv-split-metric strong{display:block;font-size:22px;font-variant-numeric:tabular-nums}
.csv-split-metric span{display:block;margin-top:5px;color:var(--muted);font-size:11px}
.csv-split-group-list{list-style:none;padding:0;margin:15px 0}
.csv-split-group-list li{padding:9px 0;font-size:12px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.csv-split-group-list strong{font-family:var(--mono);font-size:11px}
.csv-split-group-list span{color:var(--muted);white-space:pre-wrap}
.csv-split-actions{display:flex;flex-wrap:wrap;gap:10px;margin:19px 0}
.csv-split-actions button{min-height:40px;padding:9px 14px}
.csv-split-note{margin-top:20px;max-width:800px}
@media(max-width:640px){.csv-split-layout{padding:20px 15px 55px}.csv-split-heading{flex-direction:column;gap:10px}.csv-split-heading h1{font-size:22px}.csv-split-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* A file workspace: intake, context, retained tasks and deliberate collections. */
.sidebar{flex-basis:244px;width:244px}
.open-file-list{flex:0 1 auto;min-height:54px}
.workspace-file-checkbox{width:14px;height:14px;flex:0 0 14px;margin:0 0 0 7px;accent-color:var(--accent);cursor:pointer}
.file-item-main{gap:5px;padding-left:4px}
.file-item-text small{font-size:10px}
.workspace-selection{flex:0 0 auto;margin:10px 2px;padding:11px 9px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface)}
.workspace-selection p{margin:0 0 8px;font-weight:600;color:var(--ink)}
.workspace-selection>div{display:flex;gap:5px;flex-wrap:wrap}
.workspace-selection>.text-button{display:block;margin-top:8px;font-size:11px;color:var(--muted)}
.workspace-selection .button{padding:6px 8px}
.workspace-tasks{flex:0 1 auto;min-height:0;margin-top:14px;overflow:auto;max-height:34vh;scrollbar-width:thin}
.workspace-tasks .sidebar-section-heading{font-size:10px;letter-spacing:.7px}
.workspace-task-item{display:flex;align-items:center;gap:3px;border:1px solid transparent;border-radius:7px;margin-bottom:4px}
.workspace-task-item:hover{background:var(--surface-raised)}
.workspace-task-item.active{background:var(--accent-dim);border-color:#3c4a2f}
.workspace-task-open{flex:1;min-width:0;text-align:left;padding:9px 7px}
.workspace-task-open strong,.workspace-task-open small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-task-open strong{font-size:12px;font-weight:500;color:var(--ink)}
.workspace-task-open small{font-size:10px;color:var(--muted);margin-top:3px}
.workspace-task-item>.icon-button{flex:0 0 25px;width:25px;margin-right:3px}
.workspace-context{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:10px;min-height:43px;padding:7px 20px;border-bottom:1px solid var(--border);background:#151719}
.workspace-source-context{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap;font-size:12px}
.workspace-source-link{max-width:260px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--accent);text-align:left}
.workspace-source-link:hover{text-decoration:underline}
.workspace-context-path{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:470px;color:var(--ink)}
.workspace-context-note{font-size:11px;color:var(--muted);max-width:350px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-context-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.workspace-action-select{max-width:240px;min-width:184px;padding:6px 26px 6px 9px;border:1px solid var(--border-strong);border-radius:5px;background:var(--surface-raised);font-size:12px}
.workspace-input-choices{display:flex;flex-direction:column;gap:7px;max-height:320px;overflow:auto}
.workspace-input-choice{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid var(--border);border-radius:6px;cursor:pointer}
.workspace-input-choice input{accent-color:var(--accent)}
.workspace-input-choice span{flex:1;overflow-wrap:anywhere}
.workspace-input-choice small{color:var(--muted);font-size:11px;flex-shrink:0}
.welcome-inner{width:min(100%,790px);padding:20px 0 32px}
.welcome-inner h1{font-size:30px;letter-spacing:-1px}
.welcome-intro{max-width:530px;margin-left:auto;margin-right:auto}
.welcome-mark{margin-bottom:17px}
.welcome-inner .drop-zone{margin-top:25px;min-height:160px}
.welcome-input-actions{margin-top:13px}
.welcome-input-actions .button{padding:10px 16px}
.welcome-local-note{display:flex;justify-content:center;align-items:center;gap:7px;color:var(--subtle);font-size:11px;margin:17px 0 27px}
.welcome-local-note svg{width:12px;height:12px}
.welcome-tools{border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:13px 0;text-align:left;margin-top:20px}
.welcome-tools>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--ink);padding:3px 2px}
.welcome-tools>summary span{margin-left:8px;font-size:12px;font-weight:400;color:var(--muted)}
.welcome-tools .welcome-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:15px}
.welcome-tools .welcome-task{min-height:73px;padding:11px;border-radius:7px}
.welcome-tools .welcome-task-copy strong{font-size:12px}
.welcome-tools .welcome-task-copy small{font-size:11px}
.welcome-examples{margin-top:24px}
.collection-selection-bar{display:flex;flex:0 0 auto;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap;padding:9px 13px;border-bottom:1px solid var(--border);background:#1a1e18}
.collection-selection-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.collection-selection-bar button{padding:5px 8px;border:1px solid var(--border-strong);border-radius:5px;font-size:11px;background:var(--surface-raised)}
.collection-selection-bar button:last-child:not(:disabled){color:var(--accent)}
.collection-selection-status{margin:0;color:var(--muted);font-size:11px}
.collection-selectable-row{position:relative;display:flex;align-items:center}
.folder-row.collection-selectable-row{position:absolute}
.collection-select-check,.collection-file-checkbox{width:14px;height:14px;margin:0 6px 0 8px;flex:0 0 14px;accent-color:var(--accent);cursor:pointer}
.collection-is-selected,.collected{box-shadow:inset 3px 0 0 var(--accent)}
.archive-tree-row.collection-selectable-row>.archive-entry{min-width:0;flex:1;width:auto}
.file-inline-preview{display:flex;flex-direction:column;gap:0;min-width:0;width:100%;height:100%;min-height:230px;background:var(--background)}
.file-inline-controls{display:flex;flex:0 0 auto;gap:7px;align-items:center;flex-wrap:wrap;padding:11px 12px;border-bottom:1px solid var(--border);background:var(--surface)}
.file-inline-controls button,.file-inline-controls select{padding:6px 9px;border:1px solid var(--border-strong);border-radius:5px;background:var(--surface-raised);font-size:12px}
.file-inline-controls button:last-child{margin-left:auto;color:var(--accent)}
.file-inline-controls select{max-width:240px}
.file-inline-page-label{min-width:74px;text-align:center;font-size:11px;color:var(--muted)}
.file-inline-status{flex:0 0 auto;padding:8px 13px;margin:0;font-size:11px;color:var(--muted);border-bottom:1px solid var(--border);line-height:1.6}
.file-inline-status.error{color:var(--amber)}
.file-inline-content{flex:1 1 auto;min-width:0;min-height:150px;overflow:auto;position:relative;max-height:70vh}
.file-inline-table-wrap{min-width:0;overflow:auto;max-height:65vh}
.file-inline-table{border-collapse:collapse;font-family:var(--mono);font-size:11px;min-width:100%}
.file-inline-table caption{text-align:left;padding:10px 12px;font-family:inherit;font-size:11px;font-weight:600;color:var(--muted);background:var(--surface)}
.file-inline-table th,.file-inline-table td{border:1px solid var(--border);padding:7px 10px;max-width:340px;min-width:70px;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;font-weight:400}
.file-inline-table thead th{position:sticky;top:0;background:#202420;color:var(--accent);z-index:1}
.file-inline-table tr>th:first-child{min-width:44px;width:44px;color:var(--subtle);text-align:right;background:var(--surface)}
.file-inline-pdf-frame{position:relative;margin:12px auto;background:#fff;box-shadow:0 2px 12px #0005;flex-shrink:0}
.file-inline-pdf-canvas{display:block;background:#fff}
.file-inline-pdf-text{position:absolute;inset:0;overflow:hidden;opacity:1;line-height:1;z-index:2;user-select:text;-webkit-user-select:text;--scale-factor:1;--user-unit:1}
.file-inline-pdf-text span,.file-inline-pdf-text br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%;line-height:1;user-select:text;-webkit-user-select:text}
.file-inline-pdf-text span[role=presentation]{user-select:none;-webkit-user-select:none}
.file-inline-pdf-text ::selection{background:rgba(155,194,108,.36)}
.file-inline-pdf-text .markedContent{top:0;height:0}
.file-inline-pdf-text .markedContent span{height:100%}
@media(max-width:560px){.archive-navigation{flex-basis:clamp(270px,45vh,340px);overflow:auto}.archive-tree{min-height:70px}}
@media(max-width:540px){.folder-layout{grid-template-rows:minmax(270px,45%) minmax(0,1fr)}.folder-navigation{overflow:auto}}
@media(max-width:800px){.workspace-context{padding:7px 12px;align-items:flex-start;flex-wrap:wrap}.workspace-source-context{flex:1 1 100%}.workspace-context-path{max-width:calc(100vw - 50px)}.workspace-context-actions{margin-left:auto}.workspace-tasks{max-height:36vh}}
@media(max-width:540px){.welcome-inner h1{font-size:25px}.welcome-inner .drop-zone{min-height:150px;margin-top:20px}.welcome-tools .welcome-task-grid{grid-template-columns:1fr}.welcome-tools>summary span{display:block;margin:5px 0 0 16px}.welcome-local-note{font-size:10px}.file-inline-controls{gap:5px;padding:8px}.file-inline-controls button,.file-inline-controls select{font-size:11px;padding:6px}.workspace-input-choice{flex-wrap:wrap}}

/* Assemble PDFs: retained source files, explicit output order, and a fixed-page preview. */
.pdf-assembly-view{flex:1 1 auto;min-width:0;width:100%;overflow:auto;background:var(--background)}
.pdf-assembly-layout{max-width:1480px;margin:0 auto;padding:28px clamp(16px,3vw,40px) 64px}
.pdf-assembly-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.pdf-assembly-heading h1{margin:0 0 8px;font-size:26px;font-weight:670;letter-spacing:-.6px}
.pdf-assembly-heading p{margin:0;max-width:730px;color:var(--muted);line-height:1.6}
.pdf-assembly-input-panel,.pdf-assembly-output-panel,.pdf-assembly-sequence-panel,.pdf-assembly-preview-panel{min-width:0;padding:18px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}
.pdf-assembly-input-panel>label,.pdf-assembly-output-panel>label{display:block;margin-bottom:9px;font-size:12px;font-weight:650}
.pdf-assembly-input-panel>input[type=file]{max-width:100%;font-size:12px}
.pdf-assembly-input-panel>input[type=file]::file-selector-button{padding:8px 11px;border:1px solid #4b5740;background:#282d25;color:var(--ink);border-radius:6px;margin-right:9px;font:inherit;cursor:pointer}
.pdf-assembly-hint{font-size:12px;line-height:1.6;color:var(--subtle);overflow-wrap:anywhere;margin:12px 0 0}
.pdf-assembly-source-summary{margin:17px 0 9px;font-size:12px;color:var(--muted)}
.pdf-assembly-source-summary:empty{display:none}
.pdf-assembly-sources{display:flex;flex-direction:column;gap:8px}
.pdf-assembly-source{display:flex;gap:18px;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--background)}
.pdf-assembly-source-name{min-width:0;flex:1 1 180px}
.pdf-assembly-source-name strong,.pdf-assembly-source-name small{display:block;overflow-wrap:anywhere}
.pdf-assembly-source-name strong{font-size:12px;font-weight:550}
.pdf-assembly-source-name small{font-size:11px;color:var(--muted);margin-top:3px}
.pdf-assembly-source-range{display:flex;align-items:center;gap:8px;flex:0 1 360px;min-width:0}
.pdf-assembly-source-range label{font-size:11px;color:var(--muted);flex:0 0 auto}
.pdf-assembly-source-range input{flex:1 1 130px;width:130px}
.pdf-assembly-view input[type=text],.pdf-assembly-view input[type=number]{border:1px solid var(--border-strong);border-radius:5px;padding:8px;background:var(--surface-raised);font-size:12px}
.pdf-assembly-status{min-height:22px;margin:15px 0;font-size:12px;line-height:1.6;color:#c1cdb2;overflow-wrap:anywhere}
.pdf-assembly-status.error{color:#e9a098}
.pdf-assembly-workspace{display:grid;grid-template-columns:minmax(340px,1fr) minmax(0,1.3fr);gap:16px;align-items:start;margin-bottom:18px}
.pdf-assembly-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.pdf-assembly-section-heading h2,.pdf-assembly-preview-caption{margin:0;font-size:13px;font-weight:600;line-height:1.6}
.pdf-assembly-output-list{list-style:none;margin:0;padding:0;max-height:480px;max-height:55vh;overflow:auto;scrollbar-width:thin}
.pdf-assembly-page{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:6px;border:1px solid transparent;border-bottom-color:var(--border);border-radius:5px;margin-bottom:4px}
.pdf-assembly-page:hover{background:var(--surface-raised)}
.pdf-assembly-page.selected{border-color:#4e603a;background:var(--accent-dim)}
.pdf-assembly-page-select{display:flex;align-items:center;gap:9px;flex:1 1 165px;min-width:0;padding:4px;text-align:left}
.pdf-assembly-page-number{display:flex;align-items:center;justify-content:center;flex:0 0 28px;min-height:30px;border-radius:4px;background:var(--background);font-family:var(--mono);font-size:11px;color:var(--accent)}
.pdf-assembly-page-details{display:block;min-width:0}
.pdf-assembly-page-details strong,.pdf-assembly-page-details small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdf-assembly-page-details strong{font-size:12px;font-weight:500}
.pdf-assembly-page-details small{font-size:10px;color:var(--muted);margin-top:3px}
.pdf-assembly-page-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto;margin-left:auto}
.pdf-assembly-page-action{padding:6px;font-size:10px;border-radius:4px;min-height:30px;min-width:26px;color:var(--muted)}
.pdf-assembly-page-action:hover:not(:disabled){background:var(--hover);color:var(--ink)}
.pdf-assembly-page-action[data-page-action=up],.pdf-assembly-page-action[data-page-action=down]{font-size:15px}
.pdf-assembly-move-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:12px;margin-top:12px}
.pdf-assembly-move-controls label{font-size:11px;color:var(--muted)}
.pdf-assembly-move-controls input{width:65px}
.pdf-assembly-empty{margin:0;padding:24px 12px;color:var(--muted);font-size:12px;line-height:1.65}
.pdf-assembly-preview-panel{position:sticky;top:12px;padding:0;overflow:hidden}
.pdf-assembly-preview-caption{padding:12px 14px;border-bottom:1px solid var(--border);overflow-wrap:anywhere;font-size:12px}
.pdf-assembly-preview{min-height:300px;height:56vh;max-height:720px}
.pdf-assembly-preview .file-inline-preview{height:100%;min-height:0}
.pdf-assembly-preview .file-inline-content{max-height:none;min-height:0}
.pdf-assembly-output-panel>input{width:min(100%,420px)}
.pdf-assembly-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
.pdf-assembly-actions .button{height:auto;min-height:38px;white-space:normal;text-align:center}
.pdf-assembly-output-summary{margin:13px 0 0;font-size:12px;line-height:1.6;color:var(--accent);overflow-wrap:anywhere}
.pdf-assembly-output-summary:empty{display:none}
@media(max-width:1000px){.pdf-assembly-workspace{grid-template-columns:minmax(0,1fr)}.pdf-assembly-preview-panel{position:static}.pdf-assembly-output-list{max-height:45vh}.pdf-assembly-preview{height:55vh}.pdf-assembly-page-select{flex-basis:200px}}
@media(max-width:650px){.pdf-assembly-layout{padding:20px 14px 50px}.pdf-assembly-heading{flex-wrap:wrap;gap:12px}.pdf-assembly-heading h1{font-size:23px}.pdf-assembly-input-panel,.pdf-assembly-output-panel,.pdf-assembly-sequence-panel{padding:13px}.pdf-assembly-source{flex-wrap:wrap;gap:10px}.pdf-assembly-source-name{flex-basis:100%}.pdf-assembly-source-range{flex:1 1 100%;flex-wrap:wrap}.pdf-assembly-source-range label{flex-basis:100%}.pdf-assembly-source-range input{flex:1 1 130px}.pdf-assembly-page-select{flex-basis:145px}.pdf-assembly-section-heading{flex-wrap:wrap}.pdf-assembly-preview{min-height:300px;height:52vh}}


/* Workspace-wide file search */
.workspace-search-view{display:block;flex:1 1 auto;overflow-y:auto;min-width:0;min-height:0;padding:34px clamp(18px,4vw,64px) 70px;scrollbar-width:thin}
.workspace-search-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;max-width:1020px;margin:0 auto 28px}
.workspace-search-heading h1{font-size:29px;letter-spacing:-.8px;margin:7px 0 8px;font-weight:650}
.workspace-search-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.6;max-width:670px}
.workspace-search-controls,.workspace-search-status,.workspace-search-results,.workspace-search-coverage{max-width:1020px;margin-left:auto;margin-right:auto}
.workspace-search-controls{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:18px 20px}
.workspace-search-controls label{display:block;font-size:11px;color:var(--muted);margin-bottom:10px}
.workspace-search-controls>div{display:flex;gap:9px;align-items:center}
.workspace-search-controls input{flex:1 1 300px;width:100%;min-width:80px;background:var(--background);border:1px solid var(--border-strong);border-radius:6px;padding:11px 12px;font-size:13px}
.workspace-search-controls .button{height:41px}
.workspace-search-status{margin-top:19px;margin-bottom:15px;color:#c8d4b6;line-height:1.6;min-height:19px}
.workspace-search-results{display:flex;flex-direction:column;gap:16px}
.workspace-search-group{border:1px solid var(--border);border-radius:8px;background:var(--surface);overflow:hidden}
.workspace-search-group h2{font-size:12px;font-weight:600;margin:0;padding:13px 17px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.workspace-search-hit{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;padding:13px 17px;border-bottom:1px solid var(--border);color:var(--ink);line-height:1.5}
.workspace-search-hit:last-child{border-bottom:0}
.workspace-search-hit:hover,.workspace-search-hit:focus-visible{background:var(--accent-dim)}
.workspace-search-hit strong{font-size:12px;color:var(--accent);font-weight:560}
.workspace-search-hit span{font-size:12px;overflow-wrap:anywhere;color:var(--muted)}
.workspace-search-empty{padding:18px;border:1px dashed var(--border-strong);border-radius:6px;color:var(--muted)}
.workspace-search-coverage{margin-top:24px;padding-top:14px;border-top:1px solid var(--border);font-size:11px;line-height:1.6;color:var(--subtle);overflow-wrap:anywhere}
.workspace-search-coverage-warning{color:var(--amber)}
.workspace-search-toggle[aria-pressed="true"]{border-color:#5b6c43;background:var(--accent-dim)}
@media(max-width:780px){.workspace-search-label{display:none}.workspace-search-heading h1{font-size:24px}}
@media(max-width:580px){.workspace-search-view{padding:20px 14px 50px}.workspace-search-heading{flex-wrap:wrap;gap:14px}.workspace-search-controls>div{flex-wrap:wrap}.workspace-search-controls .button{width:100%}}


/* Reusable clean → compare workflow */
.clean-compare-view{flex:1 1 auto;overflow-y:auto;min-width:0;min-height:0;scrollbar-width:thin}
.cc-layout{max-width:1170px;margin:0 auto;padding:32px clamp(18px,4vw,52px) 70px}
.cc-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:27px}
.cc-heading h1{font-size:29px;font-weight:650;letter-spacing:-.8px;margin:7px 0 9px}
.cc-heading p{max-width:690px;font-size:13px;line-height:1.6;color:var(--muted);margin:0}
.cc-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cc-side,.cc-job,.cc-settings,.cc-report{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:19px;min-width:0}
.cc-side-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid var(--border)}
.cc-side-heading strong{font-size:12px;color:var(--accent);letter-spacing:.5px}
.cc-side-heading span{font-size:11px;color:var(--subtle)}
.cc-side label,.cc-job-controls label{display:block;font-size:11px;color:var(--muted);margin:12px 0 7px}
.cc-side input[type=file],.cc-job input[type=file]{display:block;max-width:100%;font-size:11px;color:var(--muted);overflow:hidden}
.cc-side input[type=file]::file-selector-button,.cc-job input[type=file]::file-selector-button{background:var(--surface-raised);border:1px solid var(--border-strong);border-radius:5px;padding:7px 10px;color:var(--ink);margin-right:8px;cursor:pointer}
.cc-info,.cc-recipe-status,.cc-footnote{font-size:11px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.cc-recipe-status{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.cc-recipe-status .text-button{flex:0 0 auto;font-size:11px;color:var(--accent)}
.cc-job{margin-top:17px}
.cc-job>summary{font-size:13px;font-weight:600;cursor:pointer}
.cc-job>p{font-size:12px;line-height:1.6;color:var(--muted)}
.cc-job-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.cc-job-controls>input[type=text],.cc-key-controls select,.cc-mapping select{height:34px;border:1px solid var(--border-strong);background:var(--background);border-radius:5px;padding:6px 9px;max-width:100%}
.cc-job-controls>input[type=text]{flex:1 1 190px;min-width:130px}
.cc-job-controls>label{margin:0}
.cc-job-controls input[type=file]{flex:1 1 180px}
.cc-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 12px}
.cc-actions span{font-size:11px;color:var(--subtle)}
.cc-status{color:#c5d4af;font-size:12px;line-height:1.6;min-height:20px;margin:0 0 20px}
.cc-status.error{color:#e8a49a}
.cc-settings,.cc-report{margin-top:16px}
.cc-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:17px}
.cc-section-heading h2{font-size:14px;font-weight:600;margin:0}
.cc-section-heading span{font-size:11px;color:var(--muted)}
.cc-key-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.cc-key-controls label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:var(--muted)}
.cc-mapping{border-top:1px solid var(--border);margin:17px 0;padding:15px 0 0}
.cc-mapping>summary{cursor:pointer;font-size:12px;font-weight:600}
.cc-mapping>p{font-size:11px;color:var(--muted)}
.cc-mapping-rows{display:flex;flex-direction:column;gap:6px}
.cc-mapping-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:12px;padding:6px 0;border-bottom:1px solid var(--border);font-size:12px}
.cc-mapping-row span{overflow-wrap:anywhere}
.cc-source-summary,.cc-report-coverage{font-size:12px;color:var(--muted);line-height:1.7;overflow-wrap:anywhere}
.cc-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.cc-metric{border:1px solid var(--border);border-radius:6px;padding:12px;background:var(--background)}
.cc-metric strong,.cc-metric small{display:block}
.cc-metric strong{color:var(--accent);font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
.cc-metric small{font-size:11px;color:var(--muted);margin-top:5px}
.cc-report-actions{display:flex;gap:9px;flex-wrap:wrap;margin:20px 0}
.cc-differences{display:flex;flex-direction:column;gap:5px;max-height:490px;overflow-y:auto}
.cc-diff{border:1px solid var(--border);background:var(--background);border-radius:6px;padding:10px 12px}
.cc-diff>summary{font-size:12px;cursor:pointer;overflow-wrap:anywhere}
.cc-diff pre{padding:10px;max-height:250px;overflow:auto;background:var(--surface-raised);font:11px/1.55 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}
.cc-diff.empty{color:var(--muted);font-size:12px}
.cc-footnote{margin:23px 0 0}
@media(max-width:1000px){.cc-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:730px){.cc-inputs{grid-template-columns:1fr}.cc-key-controls{grid-template-columns:1fr}.cc-layout{padding:20px 14px 48px}.cc-heading{flex-wrap:wrap}.cc-heading h1{font-size:24px}.cc-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Exact source locations surfaced by global workspace search. */
.folder-global-match-note{padding:7px 10px;margin:0 0 8px;color:var(--accent);font-size:12px;letter-spacing:.1px}
.folder-global-match-highlight{background:var(--accent);color:#172010;border-radius:2px;box-shadow:0 0 0 2px var(--accent)}
.sqlite-data-cell.sqlite-global-match{background:var(--accent-dim);outline:2px solid var(--accent);outline-offset:-2px;color:var(--ink)}


/* Save/reopen deliberate, portable workspaces without persistent browser storage. */
.workspace-portable-actions{display:flex;flex-direction:column;gap:3px;padding:11px 5px;border-top:1px solid var(--border)}
.workspace-portable-button{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:7px 10px;border-radius:5px;text-align:left;font-size:12px;color:var(--muted)}
.workspace-portable-button:hover,.workspace-portable-button:focus-visible{background:var(--surface-raised);color:var(--ink)}
.workspace-portable-button [data-icon]{color:var(--accent)}
.workspace-portable-button [data-icon] svg{width:15px;height:15px}
.workspace-package-choices{display:flex;flex-direction:column;gap:7px;max-height:235px;overflow:auto;margin:13px 0;padding:9px;border:1px solid var(--border);border-radius:6px}
.workspace-package-choice{display:flex;align-items:flex-start;gap:10px;cursor:pointer;padding:5px;border-radius:4px;min-width:0}
.workspace-package-choice:hover{background:var(--hover)}
.workspace-package-choice input{margin:2px 0 0;flex:0 0 auto;accent-color:var(--accent)}
.workspace-package-choice span{min-width:0;overflow-wrap:anywhere}
.workspace-package-choice strong,.workspace-package-choice small{display:block}
.workspace-package-choice strong{font-size:12px;font-weight:550}
.workspace-package-choice small{font-size:11px;color:var(--muted);margin-top:2px}
.workspace-package-warning{margin:12px 0;color:var(--amber);font-size:12px;line-height:1.5}
.workspace-package-note{color:var(--muted);font-size:12px;line-height:1.6}
.workspace-package-setting{margin:12px 0;padding:8px 10px;border:1px solid var(--border);border-radius:5px}


/* Prepared-result chaining is a visible workspace operation, not a new converter. */
.workspace-chain-choice{display:flex;flex-direction:column;gap:8px;margin:16px 0 12px}
.workspace-chain-choice label{font-size:11px;color:var(--muted)}
.workspace-chain-target{width:100%;min-height:38px;background:var(--background);border:1px solid var(--border-strong);border-radius:6px;padding:8px 10px;color:var(--ink)}
.workspace-chain-note{font-size:12px;line-height:1.55;color:var(--accent);margin:10px 0}
.workspace-lineage-summary{display:block;max-width:100%;padding:4px 6px;border:1px solid var(--border);border-radius:4px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.workspace-chain-target:focus-visible{outline:2px solid var(--accent);outline-offset:2px}


/* Explicit worksheet scope → CSV task bridge; rows remain browser-local. */
.xlsx-task-dialog{min-width:0;max-width:100%;display:flex;flex-direction:column;gap:12px}
.xlsx-task-note,.xlsx-task-status,.xlsx-task-warning{font-size:12px;line-height:1.6;color:var(--muted);margin:2px 0;overflow-wrap:anywhere}
.xlsx-task-status{color:var(--accent)}
.xlsx-task-warning{padding:8px 10px;border:1px solid var(--border);background:var(--surface-raised);border-radius:5px}
.xlsx-task-warning.is-caution{color:var(--amber);border-color:var(--border-strong)}
.xlsx-task-warning.is-error{color:#e8a49a;border-color:#8d443f}
.xlsx-task-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.xlsx-task-label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--muted);min-width:0}
.xlsx-task-label select{min-height:38px;width:100%;max-width:100%;border:1px solid var(--border-strong);border-radius:5px;padding:6px 8px;background:var(--background);color:var(--ink)}
.xlsx-task-checks{display:flex;flex-direction:column;gap:9px}
.xlsx-task-check{display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.5;cursor:pointer;color:var(--ink)}
.xlsx-task-check input{accent-color:var(--accent);flex:0 0 auto}
.xlsx-task-check input:disabled+span{opacity:.65}
.xlsx-task-preview{max-width:100%;max-height:280px;overflow:auto;border:1px solid var(--border);border-radius:6px}
.xlsx-task-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px;text-align:left}
.xlsx-task-table th,.xlsx-task-table td{padding:7px 10px;border-bottom:1px solid var(--border);max-width:220px;overflow:hidden;text-overflow:ellipsis}
.xlsx-task-table thead th{position:sticky;top:0;background:var(--surface-raised);font-weight:600}
.xlsx-task-table .xlsx-source-row{font-variant-numeric:tabular-nums;color:var(--muted)}
@media(max-width:580px){.xlsx-task-controls{grid-template-columns:1fr}}

@media(min-width:581px){.xlsx-task-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}
