:root {
  color-scheme: light;
  font: 15px/1.48 'Segoe UI', Arial, sans-serif;
  color: #26372e;
  background: #f5f6ef;
  --muted: #57675d;
  --line: #dce2d8;
  --accent: #235b46;
  --primary: #20513e;
  --forest: #18372c;
  --lime: #d4eba9;
}
.hosted-print-report { display: none; }
@media print {
  :root:has(body.hosted-print) { background: white; }
  body.hosted-print { background: white; }
  body.hosted-print > .layout { display: none; }
  body.hosted-print > .hosted-print-report { display: block; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hosted-print-report .paper { font-size: 11pt; }
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid #348363; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #f2f5e9; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; padding: 31px 19px 22px; }
.brand { display: flex; align-items: center; padding: 1px 1px 23px; gap: 11px; white-space: nowrap; }
.brand strong { display: block; font: 700 25px/1.05 Georgia, serif; letter-spacing: -.04em; }
.brand span { display: block; color: #bdd1bd; font-size: 8px; font-weight: 750; letter-spacing: .085em; margin-top: 5px; }
.pipeline { border-top: 1px solid #365548; padding: 24px 8px 0; }
.pipeline h2 { font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: #c2d4c2; }
.pipeline ol { list-style: none; margin: 19px 0 0; padding: 0; }
.pipeline li { display: flex; gap: 13px; min-height: 62px; position: relative; }
.pipeline li:not(:last-child)::after { content: ''; height: 42px; width: 1px; background: #527568; position: absolute; left: 7px; top: 20px; }
.pipeline li strong { font-size: 14px; display: block; font-weight: 650; }
.pipeline li small { color: #bdcfc1; font-size: 11px; }
.step-dot { margin-top: 4px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #87a293; flex: 0 0 auto; }
.pipeline [data-state="active"] .step-dot { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 4px #56775a; }
.pipeline [data-state="done"] .step-dot { background: var(--lime); border-color: var(--lime); box-shadow: inset 0 0 0 3px var(--forest); }
.pass-history { color: #e1eadb; padding: 10px; border: 1px solid #527568; border-radius: 8px; margin-bottom: 12px; font-size: 12px; }
.pass-history div + div { margin-top: 5px; }
.connect-button { display: flex; align-items: center; gap: 11px; text-align: left; white-space: nowrap; padding: 11px 12px; border-radius: 9px; border: 1px solid #527568; color: #f0f5eb; background: #224438; margin-top: auto; }
.connect-button:hover { background: #2b5142; }
.connect-button span { display: grid; gap: 2px; }
.connect-button strong { font-weight: 650; font-size: 13px; }
.connect-button small { font-size: 11px; color: #c4d7c6; }
.connect-button b { color: #c4d7c6; font-size: 20px; margin-left: auto; }
.main { width: 100%; max-width: 1700px; margin: 0 auto; padding: 35px clamp(18px, 3vw, 48px) 35px; }
.workspace-heading { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 29px; }
.workspace-heading h1 { font: 700 clamp(32px, 3.4vw, 50px)/1.08 Georgia, serif; letter-spacing: -.055em; color: #173b2c; }
.workspace-heading p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.workspace { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(340px, 1.15fr); gap: 22px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fffefa; box-shadow: 0 2px 6px #24372b07; }
.input-panel { padding: clamp(17px, 2vw, 27px); }
.panel-heading { padding-bottom: 20px; }
.panel h2, .dialog-heading h2 { color: #214335; font-size: 18px; font-weight: 710; letter-spacing: -.02em; }
.panel-heading p, .preview-heading p, .dialog-heading p { color: var(--muted); font-size: 13px; margin-top: 3px; }
label, summary { display: block; font-size: 13px; font-weight: 650; color: #294537; }
textarea, input, select { border: 1px solid #ced9cf; color: #23372c; background: #fcfcf7; border-radius: 8px; padding: 9px 11px; }
textarea, input { width: 100%; margin-top: 6px; }
textarea { display: block; min-height: 80px; resize: vertical; margin-bottom: 17px; font-size: 14px; }
textarea::placeholder, input::placeholder { color: #61736a; }
textarea:focus, input:focus, select:focus { border-color: #43866a; }
.optional { margin-left: 5px; color: #637267; font-size: 11px; font-weight: 500; }
details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 12px 0; display: list-item; }
.metadata-fields { padding-bottom: 14px; display: grid; gap: 9px; }
.metadata-fields input { font-size: 13px; }
.run-settings { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 18px; }
.run-settings p { font-size: 12px; color: var(--muted); }
select { padding: 6px 9px; min-width: 57px; }
.form-actions { display: flex; gap: 9px; }
.button { min-height: 39px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; border-radius: 8px; border: 1px solid transparent; font-weight: 650; font-size: 13px; }
.button-primary { color: #f6f9ee; background: var(--primary); }
.button-primary:hover:enabled { background: #153b2d; }
#start-run { flex: 1; }
.button-outline { background: #fffefa; border-color: #ccd8ce; color: #244f3e; }
.button-outline:hover:enabled { background: #edf3e7; }
.status { margin-top: 11px; color: #315845; font-size: 12px; }
.status:empty { margin: 0; }
.status[data-tone="warn"] { color: #794b27; }
.preview-heading { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preview-toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 17px; border-block: 1px solid var(--line); background: #f0f4ea; }
.preview-nav { display: flex; gap: 5px; }
.preview-tab { padding: 4px 8px; font-size: 12px; font-weight: 650; border-radius: 5px; border: 0; background: transparent; color: #345847; }
.preview-tab:hover:enabled { background: #dfead9; }
.scan-pill { font-size: 11px; font-weight: 700; color: #3b5e4d; background: #e3ecdf; padding: 3px 8px; border-radius: 6px; }
.scan-pill[data-state="verified"] { color: #164c37; background: #d8edcb; }
.scan-pill[data-state="unverified"], .scan-pill[data-state="incomplete"] { color: #76451e; background: #f4e8d5; }
.review-box { padding: 12px 18px; background: #fcf4e7; border-top: 1px solid #eadcc8; font-size: 13px; }
.review-box ul { padding-left: 19px; margin: 5px 0 0; }
.preview-scroll { max-height: min(690px, 74vh); min-height: 380px; overflow: auto; background: #e8ede4; scrollbar-gutter: stable; }
.preview-content { margin: 17px; min-height: 310px; }
.preview-content .paper { background: #fff; border: 1px solid #d9e2d7; box-shadow: 0 2px 12px #26372e0d; border-radius: 4px; padding: clamp(16px, 3vw, 32px); }
.empty-preview { text-align: center; padding: 85px 14px; font-size: 14px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 23px; color: #26372e; width: min(460px, calc(100vw - 24px)); box-shadow: 0 15px 55px #18372c4d; }
dialog::backdrop { background: #182c23a8; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 9px; }
.close-button { background: transparent; color: #345847; border: 0; padding: 0 4px; font-size: 24px; line-height: 1; }
#connections-form label { margin-top: 10px; }
.dialog-actions { margin-top: 17px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.connection-help { color: var(--muted); font-size: 12px; margin: 14px 0; }
@media (max-width: 1060px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { gap: 14px; }
  .main { padding-inline: 18px; }
}
@media (max-width: 910px) {
  .layout { display: block; }
  .sidebar { flex-direction: row; align-items: center; justify-content: space-between; position: static; height: auto; min-height: unset; padding: 13px 18px; gap: 16px; }
  .brand { padding: 0; }
  .pipeline { border: 0; padding: 0; }
  .pipeline h2 { display: none; }
  .pipeline ol { display: flex; gap: 18px; margin: 0; }
  .pipeline li { min-height: auto; gap: 6px; }
  .pipeline li small, .pipeline li:not(:last-child)::after, .pass-history { display: none; }
  .connect-button { margin: 0; }
}
@media (max-width: 700px) {
  .main { padding: 24px 12px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .pipeline { display: none; }
  .sidebar { padding: 11px 12px; }
  .connect-button { gap: 6px; padding: 7px 8px; }
  .connect-button b { display: none; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading h1 { font-size: 32px; }
  .preview-content { margin: 8px; }
  .preview-scroll { max-height: 72vh; min-height: 270px; }
}
