@charset "UTF-8";
/* Visual tokens and header mark follow ThaneJoss/webapps. */
:root {
  color-scheme: light;
  font-family: Inter, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --surface-base: #f6f7f9;
  --ink-strong: #182230;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --border: #e2e6ec;
  --muted: #526075;
  --subtle: #667085;
  --soft-blue: #eff4ff;
  --success: #0b5945;
  --warning: #936019;
  --motion-fast: 120ms;
  --motion-standard: 180ms;
  color: var(--ink-strong);
  background: var(--surface-base);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; scroll-padding-top: 96px; }
body { margin: 0; min-width: 320px; line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, p { margin: 0; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
img { display: block; max-width: 100%; }
:where(a, button, input, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; box-shadow: 0 0 0 5px var(--soft-blue); }
[hidden] { display: none !important; }
::selection { background: rgba(102, 228, 255, .28); }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.clipboard-fallback { position: fixed; left: -9999px; top: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; border-radius: 8px; padding: 12px 16px; color: #fff; background: #071729; transform: translateY(-160%); }
.skip-link:focus-visible { transform: translateY(0); }

/* Shared Web Apps shell */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: #fff; }
.site-header-inner { display: flex; min-height: 72px; max-width: 1248px; padding: 0 48px; margin: auto; align-items: center; gap: 16px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; flex-shrink: 0; }
.site-brand img { width: 36px; height: 36px; border-radius: 10px; }
.site-divider { color: #cbd5e1; font-weight: 400; }
.product-name { color: var(--muted); font-size: 14px; font-weight: 550; }
.site-nav { display: flex; min-width: 0; margin-left: auto; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; gap: 7px; border-radius: 8px; padding: 8px 12px; color: var(--muted); font-size: 14px; transition: background-color var(--motion-standard), color var(--motion-standard); }
.nav-link.active { color: var(--brand-dark); background: var(--soft-blue); font-weight: 600; }
.nav-link:hover { color: var(--brand-dark); background: var(--soft-blue); }
.nav-count { border-radius: 5px; background: #f1f3f6; padding: 0 5px; font-size: 11px; min-width: 20px; text-align: center; }
main { max-width: 1248px; padding: 0 48px 32px; margin: auto; }
.hero { padding: 52px 0 32px; }
.eyebrow, .guide-eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--muted); text-transform: uppercase; }
h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.3; font-weight: 650; letter-spacing: -.025em; margin: 16px 0 20px; }
h1 em, h1 span { color: var(--brand); font-style: normal; }
.hero-description { max-width: 820px; font-size: 16px; line-height: 1.9; color: var(--muted); }
.hero-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hero-tags li { border-radius: 6px; padding: 5px 10px; background: #eef0f4; color: var(--muted); font-size: 12px; }
.hero-bottom .quiet-button { margin-left: 6px; }

/* Buttons and fields */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 550; white-space: nowrap; transition: background-color var(--motion-standard), border-color var(--motion-standard); }
.button svg { width: 16px; height: 16px; }
.button:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.button:active:not(:disabled) { transform: scale(.985); }
.button.secondary { background: #fff; color: var(--brand-dark); border-color: #cbd5e1; }
.button.secondary:hover:not(:disabled) { background: var(--soft-blue); border-color: #b6c9ed; }
.button.small { font-size: 12px; min-height: 38px; padding: 7px 12px; }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.quiet-button:hover:not(:disabled) { color: var(--brand-dark); background: var(--soft-blue); }
.quiet-button svg { width: 17px; height: 17px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 4px 0; color: var(--brand-dark); font-size: 12px; line-height: 1.6; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.text-button span { margin-left: 6px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { color: var(--brand-dark); background: var(--soft-blue); }
textarea { width: 100%; min-height: 130px; resize: vertical; border: 1px solid #cbd5e1; border-radius: 8px; padding: 12px; background: #fff; color: var(--ink-strong); line-height: 1.65; font: 12px/1.7 'SFMono-Regular', Consolas, monospace; }
textarea::placeholder { color: #667085; }
code { background: #e8efff; border-radius: 4px; padding: 2px 5px; color: var(--brand-dark); font: 11px Consolas, monospace; }

/* Three-step workspace */
.workflow { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--border); margin-bottom: 20px; }
.step { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--subtle); white-space: nowrap; }
.step b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #eaeef3; color: var(--subtle); font-size: 11px; font-weight: 600; }
.step.current { color: var(--brand-dark); font-weight: 600; }
.step.current b { background: #e4edff; color: var(--brand-dark); }
.workflow > i { height: 1px; width: 55px; background: #d7dee7; }
.workflow-end { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; color: var(--subtle); font: 11px Consolas, monospace; }
.workflow-end svg { width: 15px; height: 15px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .04); overflow: hidden; }
.import-panel { padding: 26px 28px 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-no { color: var(--brand); font-size: 12px; font-weight: 600; }
h2 { font-size: 18px; line-height: 1.45; font-weight: 600; letter-spacing: -.015em; }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.tag.neutral { background: #f1f3f6; color: var(--muted); font: 11px Consolas, monospace; }
.tag.high, .tag.confirmed { background: #edf6f2; color: var(--success); }
.tag.review { background: #fdf4e4; color: var(--warning); }
.tag.existing { background: #f1f3f6; color: var(--subtle); }
.tag.ready, .tag.querying { background: var(--soft-blue); color: var(--brand-dark); }
.tag.error, .tag.invalid { background: #fef0ee; color: #a83f36; }
.tag.none { background: #f1f3f6; color: var(--subtle); }
.tag svg { width: 12px; height: 12px; }
.input-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); margin: 20px 0 18px; }
.input-tab { min-height: 42px; border-bottom: 2px solid transparent; padding: 7px 0 10px; color: var(--subtle); font-size: 13px; }
.input-tab.selected { color: var(--brand-dark); border-color: var(--brand); font-weight: 600; }
.dropzone { min-height: 222px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #b6c9ed; border-radius: 10px; background: #f8faff; transition: background-color var(--motion-standard); }
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--soft-blue); }
.upload-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px; color: var(--brand-dark); background: #e8efff; margin-bottom: 5px; }
.upload-icon svg { width: 22px; height: 22px; }
.dropzone strong { color: #344054; font-size: 15px; font-weight: 550; }
.dropzone > span:not(.upload-icon) { color: var(--subtle); font-size: 13px; }
.dropzone u { color: var(--brand-dark); text-decoration: none; }
.dropzone small { font-size: 11px; color: var(--subtle); margin-top: 5px; }
.import-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; color: var(--subtle); font-size: 12px; }
#import-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#import-info + button { flex-shrink: 0; }
#paste-input { height: 173px; }
.paste-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; }
.paste-actions > span { color: var(--subtle); font-size: 11px; }
.guide-panel { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 26px 22px; box-shadow: 0 1px 3px rgba(16, 24, 40, .04); }
.guide-eyebrow { color: var(--brand-dark); font-size: 10px; margin-bottom: 11px; }
.guide-panel h2 { font-size: 24px; font-weight: 600; }
.mini-guide { display: flex; flex-direction: column; gap: 20px; list-style: none; margin: 25px 0 24px; padding: 0; }
.mini-guide li { display: flex; gap: 12px; align-items: flex-start; }
.mini-guide li > span { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border-radius: 6px; background: var(--soft-blue); color: var(--brand-dark); font-size: 11px; font-weight: 600; }
.mini-guide strong { color: #344054; font-weight: 550; font-size: 13px; }
.mini-guide p { color: var(--subtle); font-size: 11px; line-height: 1.8; margin-top: 4px; }
.guide-bottom { display: flex; gap: 9px; border-top: 1px solid var(--border); padding-top: 18px; }
.guide-bottom svg { width: 16px; height: 16px; color: #526075; margin-top: 3px; }
.guide-bottom p { font-size: 11px; line-height: 1.8; color: var(--subtle); }

/* Results */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--border); border-radius: 16px; margin: 24px 0; overflow: hidden; }
.stats > div { position: relative; padding: 21px 26px; }
.stats > div + div::before { content: ''; position: absolute; top: 24px; bottom: 24px; left: 0; width: 1px; background: var(--border); }
.stats > div > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.stats strong { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats small { font-size: 11px; color: var(--subtle); margin-left: 10px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: #167258; }
.dot.amber { background: #b7791f; }
.result-heading { padding: 25px 26px 22px; }
.count-label { color: var(--subtle); font-size: 12px; margin-left: 3px; white-space: nowrap; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.settings-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 23px 26px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f8faff; margin-bottom: 20px; }
.settings-panel label, .settings-panel strong { display: block; font-size: 13px; font-weight: 550; margin-bottom: 9px; }
.settings-panel label small { font-size: 11px; color: var(--subtle); margin-left: 6px; }
.settings-panel input { width: 100%; max-width: 350px; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px 12px; background: #fff; font-size: 13px; color: var(--ink-strong); }
.settings-panel p { font-size: 12px; line-height: 1.8; color: var(--subtle); margin-top: 8px; }
.settings-panel a { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--brand-dark); }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 26px 20px; }
.filters { display: flex; gap: 5px; flex-wrap: wrap; }
.filters button { min-height: 38px; border-radius: 6px; padding: 7px 12px; color: var(--muted); font-size: 12px; }
.filters button.active { background: var(--soft-blue); color: var(--brand-dark); font-weight: 600; }
.filters button:hover { background: #f1f4f9; }
.search-box { display: flex; align-items: center; gap: 8px; min-height: 40px; max-width: 230px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--subtle); }
.search-box svg { width: 15px; height: 15px; }
.search-box input { border: 0; outline: 0; min-width: 0; width: 100%; color: var(--ink-strong); background: none; font-size: 12px; }
.search-box input::placeholder { color: var(--subtle); }
.search-box:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.table-area { overflow-x: auto; }
.table-area table { border-collapse: collapse; width: 100%; min-width: 720px; text-align: left; table-layout: fixed; }
.table-area th { padding: 13px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f8f9fb; color: var(--muted); font-size: 11px; font-weight: 550; }
.table-area th.select-cell { width: 40px; padding-left: 23px; padding-right: 0; }
.table-area th:nth-child(2) { width: 39%; }
.table-area th:nth-child(3) { width: 139px; }
.table-area th:nth-child(4) { width: 26%; }
.table-area th.action-cell { width: 78px; }
.table-area td { padding: 19px 14px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.table-area td:first-child { padding-left: 23px; padding-right: 0; }
.table-area tbody tr:hover { background: #fafbfe; }
.table-area input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.paper-title { font-size: 13px; font-weight: 550; line-height: 1.65; color: #344054; overflow-wrap: anywhere; }
.paper-meta { font-size: 11px; line-height: 1.75; color: var(--subtle); margin-top: 5px; }
.doi-link { display: inline-block; font: 11px/1.8 'SFMono-Regular', Consolas, monospace; color: var(--brand-dark); overflow-wrap: anywhere; }
.doi-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.score-text { display: block; margin-top: 5px; font-size: 10px; color: var(--subtle); }
.table-action { min-height: 36px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 10px; background: #fff; color: var(--brand-dark); font-size: 12px; white-space: nowrap; }
.table-action:hover:not(:disabled) { background: var(--soft-blue); }
.missing-text { color: var(--subtle); font-size: 11px; }
.error-text { font-size: 11px; line-height: 1.7; color: #a83f36; margin-top: 5px; }
.empty-state { text-align: center; padding: 44px 20px 47px; }
.empty-icon { display: grid; place-items: center; position: relative; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; color: var(--brand-dark); background: var(--soft-blue); }
.empty-icon svg { width: 25px; height: 25px; }
.empty-icon span { display: grid; place-items: center; position: absolute; right: -3px; bottom: -3px; width: 21px; height: 21px; border: 3px solid #fff; border-radius: 50%; font-size: 13px; background: #dce8ff; }
.empty-state h3 { font-size: 15px; color: #344054; font-weight: 550; margin-bottom: 8px; }
.empty-state p { font-size: 12px; color: var(--subtle); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 22px; color: var(--subtle); font-size: 12px; }
.table-footer > div { display: flex; gap: 6px; }
.results-note { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; border-top: 1px solid var(--border); padding: 14px 26px; color: var(--subtle); font-size: 11px; }
.results-note > span:first-child { display: flex; align-items: center; gap: 7px; }
.progress-box { padding: 16px 26px 18px; background: #f4f7ff; border-top: 1px solid #dce5f7; margin-bottom: 18px; }
.progress-box > div { display: flex; justify-content: space-between; gap: 14px; color: var(--brand-dark); font-size: 12px; margin-bottom: 11px; }
#progress-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#progress-numbers { flex-shrink: 0; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; background: #dce7ff; }
progress::-webkit-progress-bar { background: #dce7ff; }
progress::-webkit-progress-value { background: var(--brand); transition: width var(--motion-standard); }
progress::-moz-progress-bar { background: var(--brand); }

/* Bulk export */
.export-strip { display: flex; align-items: center; gap: 17px; margin-top: 24px; padding: 25px; border: 1px solid #bfd2fc; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .04); }
.export-icon { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; color: var(--brand-dark); background: var(--soft-blue); }
.export-info { min-width: 0; }
.export-info > div { display: flex; align-items: center; gap: 9px; }
.export-info h2 { font-size: 16px; }
.export-info p { font-size: 12px; color: var(--subtle); margin-top: 7px; }
.export-info p strong { color: var(--brand-dark); }
.export-actions { display: flex; gap: 10px; margin-left: auto; }
.export-actions .button { font-size: 12px; padding: 10px 13px; }
.page-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 25px; color: var(--subtle); font-size: 11px; }
.page-footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.page-footer a:hover { color: var(--brand-dark); }
.page-footer small { font-size: 11px; width: 100%; text-align: right; margin-top: -6px; }
.notice { padding: 14px 18px; margin-bottom: 20px; border: 1px solid #bfd2fc; border-radius: 8px; color: #274d97; background: #f1f6ff; font-size: 13px; line-height: 1.8; }
.notice.error { background: #fef3f0; border-color: #f4d0c8; color: #a83f36; }

/* Review and copy dialogs */
.dialog { padding: 30px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--ink-strong); width: 720px; max-width: calc(100vw - 32px); max-height: 90dvh; overflow: auto; box-shadow: 0 24px 80px rgba(10, 22, 40, .2); }
.dialog::backdrop { background: rgba(24, 34, 48, .42); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 25px; font-weight: 600; margin-top: 10px; }
.dialog-heading .eyebrow { font-size: 10px; color: var(--brand-dark); }
.candidate-original { border: 1px solid #d7e3fc; border-radius: 10px; background: #f6f9ff; padding: 18px 20px; }
.candidate-original .small-label { color: var(--brand-dark); font-size: 10px; letter-spacing: .08em; font-weight: 600; margin-bottom: 8px; }
.candidate-original h3 { font-size: 15px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.candidate-original p { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.candidate-note { font-size: 12px; line-height: 1.8; color: var(--subtle); margin: 17px 0; }
.candidate-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 14px 0; background: #fff; }
.candidate-card.chosen { border-color: #7ca4f4; box-shadow: 0 0 0 1px #bfd2fc; }
.candidate-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.candidate-card h3 { font-size: 14px; line-height: 1.7; font-weight: 550; color: #344054; overflow-wrap: anywhere; }
.candidate-meta { font-size: 12px; color: var(--subtle); line-height: 1.8; margin-top: 7px; }
.match-score { font-size: 22px; font-weight: 600; color: var(--brand-dark); white-space: nowrap; }
.match-score small { font-size: 10px; color: var(--subtle); font-weight: 400; }
.candidate-evidence { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.candidate-evidence span { padding: 4px 7px; border-radius: 4px; color: var(--muted); background: #f1f3f6; font-size: 10px; }
.candidate-evidence span.conflict { color: var(--warning); background: #fcf2df; }
.candidate-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.candidate-bottom a { max-width: 72%; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.callout { display: flex; align-items: flex-start; gap: 13px; padding: 17px; border: 1px solid #d5e2fc; border-radius: 9px; background: #f4f7ff; color: var(--brand-dark); }
.callout svg { margin-top: 3px; width: 20px; height: 20px; }
.callout strong { color: #274d97; font-size: 13px; font-weight: 550; line-height: 1.8; }
.callout p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 4px; }
.export-steps { list-style: none; display: flex; flex-direction: column; gap: 23px; padding: 0; margin: 26px 0; }
.export-steps li { display: flex; align-items: flex-start; gap: 13px; }
.export-steps li > b { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px; color: var(--brand-dark); background: var(--soft-blue); font-size: 12px; }
.export-steps strong { font-size: 13px; line-height: 1.8; font-weight: 600; }
.export-steps p { color: var(--subtle); font-size: 12px; line-height: 1.8; margin-top: 5px; }
.script-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.script-actions .button { min-height: 48px; }
.script-details, .other-exports { border-top: 1px solid var(--border); padding: 16px 0 3px; margin-top: 14px; }
summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.script-mode { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--subtle); padding: 12px 0 7px; }
#script-output { height: 240px; font-size: 11px; background: #f8f9fb; }
.script-details > button { margin-top: 8px; }
.other-exports > p { font-size: 12px; line-height: 1.8; color: #8f6424; background: #fcf5e8; padding: 12px; border-radius: 6px; margin: 14px 0; }
.other-exports > div { display: flex; gap: 8px; flex-wrap: wrap; }
.footnote { margin-top: 24px; color: var(--subtle); font-size: 11px; line-height: 1.8; }
.footnote a { color: var(--brand-dark); }
.help-content h3 { font-size: 14px; color: var(--brand-dark); font-weight: 600; margin: 25px 0 10px; }
.help-content p { font-size: 13px; color: var(--muted); line-height: 1.9; margin: 8px 0; }
.help-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--brand-dark); margin-top: 24px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 13px 22px; border-radius: 9px; background: #182230; color: #fff; box-shadow: 0 8px 28px rgba(16, 24, 40, .16); font-size: 13px; line-height: 1.8; pointer-events: none; }
.toast.error { background: #8f3e32; }
.spinner { display: inline-block; width: 11px; height: 11px; border: 1.5px solid #c4d4f5; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Real 404: no wildcard application rewrite. */
.not-found-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.not-found-card { max-width: 740px; border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: clamp(28px, 5vw, 56px); }
.not-found-card h1 { font-size: clamp(28px, 5vw, 42px); }
.not-found-card > p:not(.eyebrow) { color: var(--muted); margin-bottom: 28px; }
.not-found-card > .text-button { margin-left: 18px; }

@media (max-width: 1100px) {
  .site-header-inner { padding: 0 32px; }
  main { padding: 0 32px 28px; }
  .import-grid { grid-template-columns: minmax(0, 1fr) 305px; }
  .guide-panel { padding: 26px 22px; }
  .workflow > i { width: 34px; }
  .export-icon { display: none; }
  .export-info h2 { font-size: 15px; }
  .export-info p { font-size: 11px; }
  .export-actions .button { padding: 10px 12px; font-size: 11px; }
  .stats > div { padding: 20px 22px; }
}
@media (max-width: 850px) {
  .site-header-inner { gap: 11px; }
  .product-name, .site-divider { display: none; }
  .import-grid { grid-template-columns: minmax(0, 1fr) 275px; gap: 16px; }
  .import-panel { padding: 24px 21px 17px; }
  .guide-panel { padding: 25px 20px; }
  .mini-guide li { gap: 9px; }
  .guide-panel h2 { font-size: 22px; }
  .mini-guide p { font-size: 11px; }
  .workflow-end { display: none; }
  .workflow { justify-content: space-between; gap: 12px; }
  .workflow > i { width: 25px; }
  .stats small { display: none; }
  .stats > div > span { font-size: 11px; }
  .result-heading { padding: 23px 21px 19px; }
  .count-label { display: none; }
  .heading-actions { gap: 6px; }
  .result-toolbar { padding: 0 21px 19px; flex-wrap: wrap; }
  .search-box { width: 100%; max-width: none; }
  .filters button { font-size: 12px; padding: 7px 12px; }
  .export-strip { flex-wrap: wrap; gap: 20px; }
  .export-info h2 { font-size: 16px; }
  .export-info p { font-size: 12px; }
  .export-actions { margin-left: 0; width: 100%; }
  .export-actions .button { flex: 1; font-size: 13px; }
}
@media (max-width: 680px) {
  .site-header-inner { padding: 0 22px; flex-wrap: wrap; gap: 0; padding-top: 14px; }
  .site-brand { font-size: 15px; }
  .product-name { display: inline; margin-left: auto; font-size: 13px; }
  .site-nav { margin: 10px 0 0; width: 100%; gap: 5px; padding-bottom: 10px; }
  .nav-link { font-size: 13px; min-height: 40px; padding: 7px 12px; }
  html { scroll-padding-top: 135px; }
  main { padding: 0 22px 26px; }
  .hero { padding: 32px 0 24px; }
  .hero-description { font-size: 14px; line-height: 1.9; }
  h1 { margin: 13px 0 16px; font-size: 33px; line-height: 1.4; }
  .hero-bottom { margin-top: 16px; gap: 10px; }
  .hero-tags li { font-size: 11px; }
  .hero-bottom .quiet-button { margin-left: 0; }
  .import-grid { grid-template-columns: 1fr; }
  .guide-panel { padding: 22px; }
  .guide-panel h2 { font-size: 20px; }
  .mini-guide { margin-top: 20px; gap: 17px; }
  .guide-bottom { padding-top: 15px; }
  .workflow { gap: 7px; padding: 17px 0; margin-bottom: 14px; }
  .step { gap: 6px; font-size: 11px; }
  .step b { width: 24px; height: 24px; font-size: 10px; }
  .workflow > i { width: 16px; }
  .stats { margin: 20px 0; }
  .stats > div { padding: 19px 13px; }
  .stats strong { font-size: 28px; }
  .stats > div > span { font-size: 10px; gap: 5px; }
  .heading-actions .quiet-button span { display: none; }
  .result-heading h2 { font-size: 16px; }
  .heading-actions .button { font-size: 12px; padding: 10px 12px; }
  .settings-panel { grid-template-columns: 1fr; gap: 22px; padding: 20px 22px; }
  .settings-panel input { max-width: none; }
  .results-note { padding: 14px 21px; font-size: 10px; }
  .filters { width: 100%; justify-content: space-between; gap: 0; }
  .filters button { padding: 7px 10px; }
  .page-footer > div { margin-left: 0; }
  .page-footer small { text-align: left; margin-top: 0; }
  .dialog { padding: 24px 21px; }
  .dialog-heading h2 { font-size: 22px; }
  .script-actions { gap: 10px; }
  .script-actions .button { font-size: 12px; padding: 11px; }
}
@media (max-width: 420px) {
  .site-header-inner { padding-left: 17px; padding-right: 17px; }
  main { padding-left: 17px; padding-right: 17px; }
  h1 { font-size: 29px; }
  .hero-tags { gap: 5px; }
  .hero-tags li { padding: 5px 8px; font-size: 10px; }
  .step { font-size: 10px; gap: 5px; }
  .workflow > i { width: 9px; }
  .import-panel { padding: 22px 18px 16px; }
  .dropzone { min-height: 210px; }
  .import-foot { font-size: 11px; gap: 7px; }
  .import-foot .text-button { font-size: 11px; }
  .stats > div { padding: 17px 10px; }
  .stats > div > span { font-size: 9px; }
  .stats strong { font-size: 26px; }
  .stats .dot { width: 5px; height: 5px; }
  .result-heading { padding: 20px 16px 17px; gap: 6px; }
  .section-heading > div:first-child { gap: 7px; }
  .result-heading h2 { font-size: 15px; }
  .heading-actions { gap: 3px; }
  .heading-actions .quiet-button { padding: 8px 5px; }
  .heading-actions .button { font-size: 11px; padding: 10px 9px; }
  .result-toolbar { padding: 0 16px 17px; }
  .filters button { font-size: 11px; padding: 7px 9px; }
  .export-strip { padding: 22px 18px; }
  .export-actions { gap: 8px; }
  .export-actions .button { font-size: 11px; padding: 10px 9px; }
  .dialog { padding: 22px 17px; max-width: calc(100vw - 20px); }
  .dialog-heading { gap: 8px; }
  .dialog-heading h2 { font-size: 21px; }
  .candidate-card { padding: 15px; }
  .candidate-bottom { align-items: flex-start; gap: 10px; }
  .candidate-bottom a { max-width: 61%; font-size: 10px; }
  .candidate-card h3 { font-size: 13px; }
  .script-actions .button { font-size: 11px; padding: 11px 7px; }
  .table-footer { padding: 10px 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .button:active:not(:disabled) { transform: none; }
}
