:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #647269;
  --line: #dce5df;
  --surface: #ffffff;
  --wash: #f2f6f3;
  --accent: #147a4b;
  --accent-dark: #0c5d37;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(100%, 440px); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 18px 55px rgba(31, 55, 42, .09); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--accent); font-weight: 800; letter-spacing: -.04em; }
.eyebrow { margin: 22px 0 7px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 7vw, 40px); letter-spacing: -.035em; }
h2 { margin-bottom: 9px; font-size: 22px; }
.intro, .form-stack p, .notice-card p, article p { color: var(--muted); line-height: 1.65; }
.form-stack { display: grid; gap: 18px; margin-top: 28px; }
.form-stack label:not(.check-row) { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
input, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bfcac3; border-radius: 12px; color: var(--ink); background: white; outline: none; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20, 122, 75, .12); }
button, .secondary-action { min-height: 48px; display: inline-grid; place-items: center; padding: 12px 18px; border: 0; border-radius: 12px; color: white; background: var(--accent); font-weight: 800; text-decoration: none; }
button:hover, .secondary-action:hover { background: var(--accent-dark); }
button:disabled { cursor: not-allowed; opacity: .55; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-row input { width: 20px; min-height: 20px; accent-color: var(--accent); }
.secret-label { margin: 20px 0 8px; font-size: 13px; }
.secret-value { display: block; padding: 13px; border: 1px dashed #aab9af; border-radius: 10px; overflow-wrap: anywhere; background: var(--wash); font-size: 14px; }
.status-message { min-height: 24px; margin: 18px 0 0; color: var(--danger); font-size: 14px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px max(20px, calc((100vw - 1120px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.app-header .eyebrow { margin: 0 0 5px; }
.app-header h1 { margin: 0; font-size: clamp(24px, 5vw, 36px); }
.quiet-button { min-height: 40px; padding: 8px 14px; color: var(--accent); background: #eaf4ee; }
.app-main { width: min(1120px, calc(100% - 32px)); margin: 34px auto; }
.search-panel, .workspace-card, .results-section { padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading .eyebrow { margin-top: 0; }
.section-heading p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.section-heading.compact { align-items: center; }
.section-heading.compact h2 { margin-bottom: 0; }
.privacy-pill { padding: 7px 10px; border-radius: 999px; color: var(--accent); background: #eaf4ee; font-size: 12px; font-weight: 800; white-space: nowrap; }
.search-form { margin-top: 24px; }
.search-form textarea { min-height: 170px; border-radius: 16px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.inline-status { min-height: 22px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.inline-status.error { color: var(--danger); }
.results-section { margin-top: 18px; }
.result-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.result-summary div { padding: 16px; border-radius: 14px; background: var(--wash); }
.result-summary span { display: block; color: var(--accent); font-size: 26px; font-weight: 900; }
.result-summary small { color: var(--muted); }
.truth-note { margin: 18px 0; padding: 12px 14px; border-left: 3px solid #d9a418; color: #725612; background: #fff8df; }
.results-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.results-table { width: 100%; min-width: 1060px; border-collapse: collapse; table-layout: fixed; background: var(--surface); }
.results-table th { padding: 9px 11px; color: var(--muted); background: var(--wash); font-size: 12px; text-align: left; }
.results-table th:nth-child(1) { width: 18%; }
.results-table th:nth-child(2) { width: 15%; }
.results-table th:nth-child(3) { width: 40%; }
.results-table th:nth-child(4) { width: 27%; }
.result-row > td { padding: 11px; border-top: 1px solid var(--line); vertical-align: top; }
.result-row:first-child > td { border-top: 0; }
.part-number { display: block; overflow-wrap: anywhere; font-size: 15px; font-weight: 900; }
.meta-line { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.buyer-cell strong { color: var(--accent); font-size: 13px; line-height: 1.45; }
.detail-stack { display: grid; gap: 6px; }
.inventory-detail, .wts-detail { padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.inventory-detail:last-child, .wts-detail:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 4px; }
.source-tag { padding: 2px 6px; border-radius: 999px; color: var(--accent); background: #eaf4ee; font-size: 10px; font-weight: 800; }
.source-tag.channel { color: #725612; background: #fff8df; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 3px 10px; color: #39483f; font-size: 12px; line-height: 1.45; }
.detail-facts span { overflow-wrap: anywhere; }
.detail-facts .important { color: var(--ink); font-weight: 900; }
.duplicate-count { color: var(--muted); font-size: 10px; }
.empty-copy.compact { margin: 0; font-size: 12px; }
.sync-state { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.sync-state.stale { color: #8a6410; }
.wts-detail { padding: 9px 10px; border: 1px solid #f0dfaa; border-radius: 10px; background: #fffdf4; }
.wts-detail.is-latest { border-color: #d9a418; box-shadow: inset 3px 0 #d9a418; }
.wts-detail .detail-head { margin-bottom: 3px; }
.wts-status { padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.wts-status.available { color: #0c673b; background: #e4f5ea; }
.wts-status.bid-required { color: #8a4b08; background: #fff0d4; }
.wts-status.stop-working, .wts-status.sold, .wts-status.expired { color: #626b65; background: #e9eeeb; }
.latest-badge { padding: 2px 6px; border-radius: 999px; color: #725612; background: #fff0b8; font-size: 9px; font-weight: 900; }
.wts-time { margin-left: auto; color: #4d5d53; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wts-folder { margin: 0 0 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wts-facts { gap: 4px; }
.wts-facts span { padding: 2px 5px; border-radius: 5px; background: #f6f1df; font-size: 10px; }
.wts-subject { display: -webkit-box; margin-top: 6px; overflow: hidden; color: #35443b; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wts-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.wts-detail .quiet-button { min-height: 27px; padding: 3px 8px; font-size: 10px; }
.wts-more { border-top: 1px dashed var(--line); }
.wts-more summary { cursor: pointer; padding: 7px 2px 2px; color: var(--accent); font-size: 10px; font-weight: 800; }
.wts-more-stack { display: grid; gap: 6px; margin-top: 6px; }
.date-label { color: var(--muted); font-size: 11px; }
.empty-copy { margin: 12px 0 0; color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.workspace-card > p { color: var(--muted); line-height: 1.55; }
.export-list { display: grid; gap: 9px; }
.export-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; background: var(--wash); }
.export-row strong, .export-row small { display: block; }
.export-row small { margin-top: 3px; color: var(--muted); }
.download-link { padding: 8px 10px; border-radius: 9px; color: var(--accent); background: #e3f2e9; font-size: 13px; font-weight: 800; text-decoration: none; }
.upload-form { display: grid; grid-template-columns: 1fr 180px; gap: 13px; margin-top: 18px; }
.upload-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; }
.button-row { grid-column: 1 / -1; display: flex; gap: 10px; }
.button-row button { flex: 1; }
.secondary-button { color: var(--accent); background: #eaf4ee; }
.maintenance-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.maintenance-panel summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 800; }
.maintenance-panel > p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.assignment-form { display: grid; gap: 10px; margin-top: 13px; }
.assignment-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.assignment-form input { min-height: 42px; padding: 8px 10px; font-size: 12px; }
.assignment-form button { min-height: 42px; font-size: 13px; }
.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; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .auth-card { padding: 26px 20px; border-radius: 19px; }
  .app-header { align-items: flex-start; padding: 20px 16px; }
  .app-main { margin-top: 18px; }
  .section-heading, .form-actions { display: grid; }
  .privacy-pill { width: max-content; }
  .form-actions button { width: 100%; }
  .workspace-grid, .upload-form { grid-template-columns: 1fr; }
  .result-summary { grid-template-columns: repeat(2, 1fr); }
  .results-section { padding: 16px 12px; }
  .results-table-wrap { overflow: visible; border: 0; }
  .results-table { display: block; min-width: 0; background: transparent; }
  .results-table thead { display: none; }
  .results-table tbody { display: grid; gap: 12px; }
  .result-row { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .result-row > td { display: block; padding: 11px 12px; border-top: 1px solid var(--line); }
  .result-row > td:first-child { border-top: 0; }
  .result-row > td::before { display: block; margin-bottom: 5px; color: var(--muted); content: attr(data-label); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
  .wts-time { margin-left: 0; }
}