:root {
  color-scheme: light;
  --paper: #f3f0e8;
  --ink: #1e2723;
  --muted: #6c756e;
  --line: #d7d5cd;
  --panel: #ffffff;
  --accent: #d65a3a;
  --accent-dark: #a33b26;
  --mint: #d9e4d6;
  --blue: #7b9aaa;
  --yellow: #c5a34c;
  --font-sans: "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
code, .eyebrow, .brand-index { font-family: var(--font-mono); }
.app-shell { min-height: 100dvh; }
.topbar { min-height: 86px; padding: 18px 28px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--paper); }
.brand-block { display: flex; align-items: baseline; gap: 16px; min-width: 270px; }
.brand-index { font-size: 11px; color: var(--accent); letter-spacing: .08em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 21px; letter-spacing: .01em; }
h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
h3 { font-size: 18px; }
.connection-strip { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.connection-strip label { display: grid; gap: 5px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
input[type="url"], input[type="password"], input[type="search"] { min-height: 37px; border: 1px solid #b9bcb5; border-radius: 2px; padding: 8px 10px; color: var(--ink); background: var(--panel); outline: none; }
input[type="url"] { width: 250px; }
input[type="password"] { width: 165px; }
input[type="search"] { flex: 1; min-width: 220px; font-size: 15px; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(214, 90, 58, .14); }
.connection-state { min-height: 37px; display: inline-flex; align-items: center; font-size: 12px; color: var(--muted); padding: 0 5px; white-space: nowrap; }
.connection-state.is-connected { color: #356248; }
.workspace { display: grid; grid-template-columns: 274px minmax(0, 1fr); min-height: calc(100dvh - 86px); }
.source-rail { padding: 28px 20px; border-right: 1px solid var(--ink); background: #ebe9df; }
.rail-heading { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.eyebrow { display: block; font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.rail-heading h2 { margin-top: 10px; font-size: 23px; }
.source-filter { padding: 20px 0 28px; display: grid; gap: 12px; border-bottom: 1px solid var(--line); }
.source-option { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.25; color: var(--muted); cursor: pointer; }
.source-option strong { color: var(--ink); font-weight: 600; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 1px 0 0; }
.rail-section { padding-top: 25px; }
.path-list { margin-top: 15px; display: grid; gap: 15px; }
.path-item { display: grid; grid-template-columns: 10px 1fr; gap: 6px 8px; align-items: center; font-size: 12px; }
.path-item code { grid-column: 2; color: var(--muted); font-size: 10px; line-height: 1.35; word-break: break-all; }
.path-mark { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.path-green { background: #4e8061; }.path-red { background: var(--accent); }.path-yellow { background: var(--yellow); }.path-blue { background: var(--blue); }
.rail-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.rail-note p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.main-panel { min-width: 0; padding: 0 34px 48px; }
.tabbar { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 2px solid transparent; padding: 19px 2px 15px; background: transparent; color: var(--muted); font-size: 13px; }
.tab.is-active { color: var(--ink); border-color: var(--accent); }
.view { display: none; padding-top: 36px; }
.view.is-visible { display: block; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.view-heading h2 { margin-top: 9px; }
.view-heading p { margin-top: 10px; max-width: 650px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.format-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); background: var(--panel); min-width: 245px; }
.format-switch input { position: absolute; opacity: 0; pointer-events: none; }
.format-switch label { min-height: 47px; padding: 8px 10px; display: grid; align-content: center; gap: 3px; font-size: 12px; cursor: pointer; }
.format-switch label small { color: var(--muted); font-size: 10px; }
.format-switch input:checked + label { color: var(--panel); background: var(--ink); }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 22px; align-items: start; }
.section-block, .action-panel { background: var(--panel); border: 1px solid var(--line); }
.section-head { min-height: 49px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); font-size: 12px; padding: 5px; }
.inline-state { padding: 12px 15px; color: var(--muted); font-size: 12px; }
.source-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 10px; text-align: left; border-top: 1px solid #e8e7e1; vertical-align: top; }
th { color: var(--muted); font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }
td:first-child, th:first-child { width: 36px; padding-left: 15px; }
td:nth-child(2) { min-width: 190px; font-weight: 600; line-height: 1.4; }
td:nth-child(3) { color: var(--muted); min-width: 140px; }
td:nth-child(4), td:nth-child(5) { white-space: nowrap; color: var(--muted); }
.status-tag { display: inline-flex; padding: 3px 7px; border: 1px solid currentColor; font-size: 10px; border-radius: 999px; }
.action-panel { padding: 18px; position: sticky; top: 18px; }
.action-panel h3 { margin-top: 12px; }
.metric-line { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.metric-line strong { color: var(--ink); font-size: 14px; }
.button { min-height: 38px; padding: 0 15px; border: 1px solid var(--ink); border-radius: 2px; font-size: 12px; font-weight: 600; transition: transform .16s ease, background .16s ease, color .16s ease; }
.button:active { transform: translateY(1px); }
.button-dark { color: var(--panel); background: var(--ink); }.button-dark:hover { background: #35433b; }
.button-accent { width: 100%; margin-top: 18px; color: var(--panel); background: var(--accent); border-color: var(--accent); }.button-accent:hover { background: var(--accent-dark); }
.button-outline { background: transparent; color: var(--ink); }.button-outline:hover { background: var(--ink); color: var(--panel); }
.form-hint { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.search-line { display: flex; gap: 10px; max-width: 750px; }
.candidate-list { display: grid; gap: 8px; max-width: 850px; }
.candidate-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; min-height: 67px; padding: 11px 13px; border: 1px solid var(--line); background: var(--panel); }
.candidate-index { font-family: var(--font-mono); color: var(--accent); font-size: 12px; }
.candidate-title { font-size: 13px; font-weight: 600; }.candidate-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.candidate-format { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.transfer-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 850px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); }
.transfer-footer .button { width: auto; }.consent-line { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.folder-badge { padding: 9px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); }.folder-badge code { font-size: 11px; }
.review-list { display: grid; gap: 9px; max-width: 920px; }
.review-item { display: grid; grid-template-columns: 170px 1fr 120px; gap: 16px; align-items: center; min-height: 72px; padding: 13px 15px; border: 1px solid var(--line); background: var(--panel); }
.review-item strong { font-size: 13px; }.review-item p { color: var(--muted); font-size: 12px; line-height: 1.5; }.review-item code { color: var(--muted); font-size: 10px; word-break: break-all; }
.global-message { position: fixed; right: 28px; bottom: 22px; max-width: 380px; padding: 12px 15px; border-left: 3px solid var(--accent); background: var(--ink); color: var(--panel); font-size: 12px; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.global-message.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 1020px) { .topbar { align-items: flex-start; flex-direction: column; }.connection-strip { justify-content: flex-start; }.workspace { grid-template-columns: 220px minmax(0, 1fr); }.main-panel { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 760px) { .topbar { padding: 16px; }.brand-block { min-width: 0; }.connection-strip { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }.connection-strip label:first-child { grid-column: 1 / -1; }.connection-strip input[type="url"], .connection-strip input[type="password"] { width: 100%; }.connection-strip .button, .connection-state { align-self: end; }.workspace { display: block; }.source-rail { border-right: 0; border-bottom: 1px solid var(--ink); padding: 18px 16px; }.source-filter { grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 18px; }.source-option { font-size: 11px; }.rail-section, .rail-note { display: none; }.main-panel { padding: 0 16px 40px; }.tabbar { gap: 16px; overflow-x: auto; }.view { padding-top: 25px; }.view-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }.view-heading h2 { font-size: 25px; }.format-switch { width: 100%; }.split-layout { grid-template-columns: 1fr; }.action-panel { position: static; }.search-line { flex-direction: column; }.search-line .button { width: 100%; }.transfer-footer { align-items: flex-start; flex-direction: column; }.transfer-footer .button { width: 100%; }.review-item { grid-template-columns: 1fr; gap: 6px; }.folder-badge { width: 100%; } }
