/* UI only: local tokens never reach the sibling document preview.
   This screen-only sheet is not part of the CSS copied by exportHtmlDocument. */
@media screen {
  .sidebar {
    --panel: #101f32;
    --ink: #edf4fc;
    --muted: #b4c4d7;
    --line: #293d53;
    --accent: #7dbdff;
    --accent-text: #081322;
    --soft: #14263c;
    --radius: 12px;
    --shadow: 0 16px 44px rgb(0 7 18 / 24%);
    color-scheme: dark;
    color: var(--ink);
    font-family: var(--font-ui);
    background: linear-gradient(145deg, #14263cf5, #101f32f5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    scrollbar-color: #476b91 #0c1b2d;
    scrollbar-width: thin;
    padding: 18px;
  }
  .sidebar::-webkit-scrollbar,
  .sidebar ::-webkit-scrollbar { width: 8px; height: 8px; }
  .sidebar::-webkit-scrollbar-track,
  .sidebar ::-webkit-scrollbar-track { background: #0c1b2d; }
  .sidebar::-webkit-scrollbar-thumb,
  .sidebar ::-webkit-scrollbar-thumb { background: #476b91; border: 2px solid #0c1b2d; border-radius: 8px; }
  .sidebar::-webkit-scrollbar-thumb:hover,
  .sidebar ::-webkit-scrollbar-thumb:hover { background: #7dbdff; }
  .sidebar .brand { gap: 12px; padding-bottom: 16px; margin-bottom: 14px; }
  .sidebar .brand img { width: 164px; }
  .sidebar .brand h1 { margin-top: 12px; font-size: 21px; line-height: 1.25; letter-spacing: -.035em; color: var(--ink); }
  .sidebar .brand p { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; }
  .sidebar .toolbar { gap: 7px; }
  .sidebar button,
  .sidebar .segmented label {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #14263c;
    color: var(--ink);
    transition: background .15s ease, border-color .15s ease;
  }
  .sidebar .toolbar button { min-height: 38px; font-size: 11px; font-weight: 600; }
  .sidebar button:hover:not(:disabled),
  .sidebar .segmented label:hover { background: #1b3048; border-color: #476b91; }
  .sidebar button.primary,
  .sidebar .proforma-cta button,
  .sidebar .bnr-widget-calc,
  .sidebar .bnr-chip.active {
    background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700;
  }
  .sidebar button.primary:hover:not(:disabled),
  .sidebar .proforma-cta button:hover:not(:disabled),
  .sidebar .bnr-widget-calc:hover:not(:disabled),
  .sidebar .bnr-chip.active:hover { background: #a3d0ff; border-color: #a3d0ff; }
  .sidebar button:disabled { opacity: .5; cursor: not-allowed; }
  .sidebar button:focus-visible,
  .sidebar summary:focus-visible,
  .sidebar a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .sidebar input,
  .sidebar select,
  .sidebar textarea {
    background: #0b192a;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 13px;
    padding: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
    accent-color: var(--accent);
  }
  .sidebar input:not([type="checkbox"]):not([type="radio"]),
  .sidebar select { min-height: 39px; }
  .sidebar input::placeholder,
  .sidebar textarea::placeholder { color: #91a5bc; opacity: 1; }
  .sidebar input:focus,
  .sidebar select:focus,
  .sidebar textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(125 189 255 / 12%); }
  .sidebar input[readonly],
  .sidebar textarea[readonly] { background: #14263c; color: var(--muted); }
  .sidebar label span { color: var(--muted); line-height: 1.4; }
  .sidebar .field { min-width: 0; }
  .sidebar .grid { gap: 12px 10px; }
  .sidebar .subform-title { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
  .sidebar .doc-switch,
  .sidebar .sam-bank-picker,
  .sidebar .check-panel,
  .sidebar .folder-panel {
    background: #0c1b2d80;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }
  .sidebar .sam-bank-picker strong,
  .sidebar .check-panel h2 { color: #b5dcff; font-size: 11px; letter-spacing: .06em; }
  .sidebar .sam-bank-preview { color: var(--muted); font-variant-numeric: tabular-nums; }
  .sidebar .check-panel { gap: 7px; }
  .sidebar .check-item { font-size: 11px; line-height: 1.5; color: #f08f99; }
  .sidebar .check-item::before { color: #f08f99; }
  .sidebar .check-item.ok,
  .sidebar .check-item.ok::before { color: #79d3a5; }
  .sidebar details:not(.folder-panel) { border-top: 1px solid var(--line); padding: 12px 0; }
  .sidebar details:not(.folder-panel) > summary { position: relative; padding-right: 20px; }
  .sidebar details:not(.folder-panel) > summary::after { content: "⌄"; position: absolute; right: 0; top: 6px; color: #7dbdff; font-size: 15px; transition: transform .15s ease; }
  .sidebar details[open]:not(.folder-panel) > summary::after { transform: rotate(180deg); }
  .sidebar .step-summary { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .sidebar .step-no { border-radius: 8px; border-color: #355573; background: #142c44; color: #b5dcff; font-size: 11px; font-variant-numeric: tabular-nums; }
  .sidebar .step-status { background: rgb(240 143 153 / 9%); color: #f08f99; border-radius: 6px; font-size: 10px; font-weight: 600; padding: 5px 6px; }
  .sidebar details[open] > summary .step-no { border-color: #7dbdff; background: #244364; color: #edf4fc; }
  .sidebar details.step-complete .step-no { color: #79d3a5; border-color: #3d6c59; background: rgb(121 211 165 / 10%); }
  .sidebar details.step-complete .step-status { color: #79d3a5; background: rgb(121 211 165 / 10%); }
  .sidebar .segmented input:checked + label { background: #244364; border-color: #476b91; color: var(--ink); }
  .sidebar .form-table th,
  .sidebar .form-table td { border-color: var(--line); padding: 5px; }
  .sidebar .form-table th { color: var(--muted); background: #14263c; }
  .sidebar .form-table input,
  .sidebar .form-table select { font-size: 12px; padding: 5px; }
  .sidebar .bnr-widget { padding: 12px; gap: 10px; border-radius: 10px; background: #0c1b2d80; }
  .sidebar .bnr-widget-rate,
  .sidebar .bnr-widget-result { color: #b5dcff; font-variant-numeric: tabular-nums; }
  .sidebar .bnr-widget-result-row { background: #14263c; border-color: #355573; }
  .sidebar .bnr-chip { border-radius: 7px; font-size: 11px; padding: 6px 9px; }
  .sidebar .bnr-chip-custom { width: 78px; min-height: 31px; padding: 6px 9px; }
  .sidebar .bnr-widget-refresh { min-height: 30px; }
  .sidebar .folder-label strong { color: var(--ink); }
  .sidebar .folder-label,
  .sidebar .folder-note { color: var(--muted); }
  .sidebar a { color: #7dbdff; }
  .sidebar .sidebar-footer-panel { margin-top: 14px; }
}
@media screen and (max-width: 600px) {
  .sidebar { padding: 14px; }
  .sidebar .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar .toolbar button { white-space: normal; }
  .sidebar .step-summary { grid-template-columns: 26px minmax(0, 1fr) auto; font-size: 11px; }
  .sidebar .step-status { font-size: 9px; }
}
@media screen and (prefers-reduced-motion: reduce) {
  .sidebar button,
  .sidebar input,
  .sidebar select,
  .sidebar textarea,
  .sidebar details:not(.folder-panel) > summary::after { transition: none; }
}
