/* ==========================================================================
   Spectrum Studio Peptide Edition — look and decluttering
   --------------------------------------------------------------------------
   Loaded last. 1) In the light theme (the edition's default) EVERY part is
   white: sidebar, chart, toolbar, chromatogram strip — the full app keeps
   those dark even in its light theme. The dark theme is unchanged and one
   click away (☾ Dark on the dock). 2) Fewer words on screen for a first-time
   user. 3) The Quick-start tour (edition.js).
   ========================================================================== */

/* ---------------------------------------------------------------- white */
html[data-theme="light"] {
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #e2e6ea;
  --ink: #15232c;
  --muted: #66727a;
}
html[data-theme="light"] body { background: #fff; }
html[data-theme="light"] .workspace { background: #fff; }

/* Sidebar */
html[data-theme="light"] .sidebar { color: var(--ink); background: #fff; border-right: 1px solid var(--line); }
html[data-theme="light"] .sidebar::after { display: none; }
html[data-theme="light"] .brand h1 { color: #13212b; }
html[data-theme="light"] .brand-mark { background: #eefaf9; border-color: #9ddfd9; }
html[data-theme="light"] .brand-mark i { background: #149a93; }
html[data-theme="light"] .sidebar .eyebrow { color: #149a93; }
html[data-theme="light"] .source-card { border-color: var(--line); background: #f7f9fa; }
html[data-theme="light"] .source-card strong { color: #3d4b53; }
html[data-theme="light"] .side-heading { color: #6b7880; }
html[data-theme="light"] .sidebar .text-button { color: #167f7a; }
html[data-theme="light"] .sidebar .text-button:hover { color: #0f5f5b; }
html[data-theme="light"] .spectrum-list { scrollbar-color: #cdd5da transparent; }
html[data-theme="light"] .spectrum-item { color: #44535b; }
html[data-theme="light"] .spectrum-item:hover { background: #f3f6f7; }
html[data-theme="light"] .spectrum-item.active { color: #0f2a2f; border-color: #a7e3de; background: linear-gradient(90deg, #e3f7f5, #f6fcfb); }
html[data-theme="light"] .sample-copy span { color: #7b878e; }
html[data-theme="light"] .sample-check { border-color: #9aa8af; }
html[data-theme="light"] .sample-check:checked { border-color: #149a93; background: #149a93; box-shadow: inset 0 0 0 3px #fff; }
html[data-theme="light"] .active-chevron { color: #149a93; }
html[data-theme="light"] .spectrum-remove { color: #7b878e; }
html[data-theme="light"] .restore-builtins { border-color: #cdd5da; color: #5d6b72; }
html[data-theme="light"] .sidebar-footer { border-top-color: var(--line); }
html[data-theme="light"] .sidebar .secondary-button { border-color: #cfd6da; color: #34444c; background: #fff; }
html[data-theme="light"] .sidebar .secondary-button:hover { color: #0f2a2f; background: #f1f5f6; }

/* Top of the workspace */
html[data-theme="light"] .metric-strip { background: #fff; box-shadow: none; }
html[data-theme="light"] .icon-button { background: #fff; }

/* Spectrum card: toolbar, chart, footer */
html[data-theme="light"] .chart-card { border-color: var(--line); background: #fff; box-shadow: 0 6px 24px rgba(13, 26, 36, .06); }
html[data-theme="light"] .chart-toolbar { color: #33434b; background: #fafbfc; border-bottom-color: var(--line); }
html[data-theme="light"] .tool-group { border-color: var(--line); background: #f0f3f5; }
html[data-theme="light"] .tool { color: #5b6a72; }
html[data-theme="light"] .tool:hover { color: #13212b; }
html[data-theme="light"] .tool.active { color: #0d5f5b; background: #d6f3f0; }
html[data-theme="light"] .toolbar-divider { background: var(--line); }
html[data-theme="light"] .control-label, html[data-theme="light"] .scale-control { color: #66747b; }
html[data-theme="light"] .scale-control output { color: #33434b; }
html[data-theme="light"] .chart-toolbar select { border-color: #cfd6da; color: #22323a; background: #fff; }
html[data-theme="light"] .chart-toolbar .secondary-button { border-color: #cfd6da; color: #34444c; background: #fff; }
html[data-theme="light"] .chart-toolbar .secondary-button:hover { color: #0f2a2f; background: #eef4f5; }
html[data-theme="light"] .chart-toolbar .secondary-button.active { border-color: #e39a2d; color: #8a5300; background: #fff4e2; }
html[data-theme="light"] .chart-wrap { background: #fff; }
html[data-theme="light"] .mode-hint { border-color: var(--line); color: #5b6a72; background: rgba(255, 255, 255, .92); }
html[data-theme="light"] .chart-tooltip { border-color: #a7e3de; color: #33434b; background: rgba(255, 255, 255, .97); box-shadow: 0 8px 30px rgba(13, 26, 36, .14); }
html[data-theme="light"] .chart-tooltip strong { color: #13212b; }
html[data-theme="light"] .chart-tooltip span { color: #66747b; }
html[data-theme="light"] .chart-footer { border-top-color: var(--line); background: #fafbfc; }
html[data-theme="light"] .legend-item { color: #66747b; }
html[data-theme="light"] .legend-item.active { color: #13212b; }
html[data-theme="light"] .view-readout { color: #66747b; }
html[data-theme="light"] .measure-bar { border-top-color: var(--line); color: #33434b; background: #f7fafb; }
html[data-theme="light"] .measure-chip { color: #5b6a72; }
html[data-theme="light"] .measure-chip b { color: #13212b; }
html[data-theme="light"] .measure-chip small, html[data-theme="light"] .measure-hint { color: #7b878e; }
html[data-theme="light"] .measure-headline { border-color: #a7e3de; color: #0d5f5b; background: #e8f8f6; }
html[data-theme="light"] .measure-headline span { color: #2b8a84; }
html[data-theme="light"] .measure-headline b { color: #0d5f5b; }
html[data-theme="light"] .measure-warn { color: #a25e00; }
html[data-theme="light"] .measure-clear { border-color: #cfd6da; color: #5b6a72; }
html[data-theme="light"] .measure-clear:hover { color: #13212b; background: #eef2f4; }

/* Chromatogram strip above the chart */
html[data-theme="light"] .lc-strip { color: #33434b; background: #fff; border-bottom-color: var(--line); }
html[data-theme="light"] .lc-strip-title b, html[data-theme="light"] .lc-strip-actions .text-button { color: #0f7f79; }
html[data-theme="light"] .lc-strip .muted { color: #6b7880; }
html[data-theme="light"] .lc-strip-why { background: #eaf8f6; }

/* Windows, dock and launcher are already light; make them pure white too. */
html[data-theme="light"] .ss-win, html[data-theme="light"] .ss-win-body { background: #fff; }
html[data-theme="light"] .ss-dock { color: #33434b; background: #fff; border-top-color: var(--line); box-shadow: 0 -6px 20px rgba(13, 26, 36, .06); }
html[data-theme="light"] .ss-tile { color: #44535b; background: #f4f7f8; }
html[data-theme="light"] .ss-tile:hover { color: #0f2a2f; background: #e3f5f3; }
html[data-theme="light"] .ss-tile.is-open { color: #0d5f5b; border-color: #a7e3de; background: #e3f7f5; }
html[data-theme="light"] .ss-tile.is-open::after { background: #149a93; }
html[data-theme="light"] .ss-dock-launch { color: #fff; border-color: #149a93; background: #149a93; }
html[data-theme="light"] .ss-dock-launch:hover { background: #10827c; }
html[data-theme="light"] .ss-dock-right button { color: #44535b; border-color: #d3dade; background: #fff; }
html[data-theme="light"] .ss-dock-right button:hover, html[data-theme="light"] .ss-dock-right button.is-on { color: #0d5f5b; border-color: #a7e3de; background: #e3f7f5; }

/* ---------------------------------------------------------------- less text */
/* Each window already has its name in its title bar; the second heading inside
   it only repeated it. Buttons in the header (if any) stay. */
.ss-win-body .panel-header .panel-title { display: none; }
.ss-win-body .panel-header:not(:has(button)) { display: none; }
/* Breadcrumb, keyboard cheat-line and two numbers few users need. */
.breadcrumb { display: none; }
.sidebar-footer p { display: none; }
.metric-strip { grid-template-columns: repeat(2, minmax(120px, .8fr)) minmax(190px, 1.3fr); }
.metric-strip .metric:nth-child(2), .metric-strip .metric:nth-child(4) { display: none; }
/* Footnotes and colour legends: hidden until "ⓘ Notes" on the dock is on.
   The how-to hints in empty windows stay. */
html[data-explain="off"] .pep-note,
html[data-explain="off"] .pep-legend,
html[data-explain="off"] .lc-strip-title .muted { display: none; }
/* The chart background follows the theme in this edition. */
#chartBg { display: none; }
.control-label:has(#chartBg) { display: none; }

/* ---------------------------------------------------------------- quick-start tour */
.qs-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px; background: rgba(15, 30, 38, .45); backdrop-filter: blur(2px); }
.qs-card { position: relative; width: min(860px, 100%); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid #dfe5e8; border-radius: 18px; color: #13212b; background: #fff; box-shadow: 0 30px 80px rgba(13, 26, 36, .28); }
html[data-theme="dark"] .qs-card { border-color: #2a3e48; color: #e4edef; background: #13232d; }
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 0; }
.qs-step-no { color: #149a93; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.qs-close { width: 32px; height: 32px; border: 1px solid #dfe5e8; border-radius: 9px; color: #5b6a72; background: transparent; font-size: 18px; line-height: 1; }
html[data-theme="dark"] .qs-close { border-color: #2a3e48; color: #a9b8be; }
.qs-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: center; padding: 14px 24px 8px; }
.qs-pic { border: 1px solid #e6ebee; border-radius: 14px; background: #f8fafb; overflow: hidden; }
html[data-theme="dark"] .qs-pic { border-color: #2a3e48; background: #fff; }
.qs-pic svg { display: block; width: 100%; height: auto; }
.qs-text h2 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; letter-spacing: -.3px; }
.qs-text ol { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.65; }
.qs-text li { margin-bottom: 4px; }
.qs-text p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: inherit; }
.qs-key { display: inline-block; padding: 1px 7px; border: 1px solid #c9d3d8; border-radius: 6px; background: #f3f6f7; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
html[data-theme="dark"] .qs-key { border-color: #3a515c; background: #1b313c; }
.qs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 20px; }
.qs-dots { display: flex; gap: 7px; }
.qs-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #d3dbdf; }
.qs-dots button.on { width: 24px; border-radius: 6px; background: #149a93; }
.qs-nav { display: flex; gap: 8px; }
.qs-try { margin-right: auto; }
#qsOpen { white-space: nowrap; }
@media (max-width: 760px) { .qs-body { grid-template-columns: 1fr; } }
