.palate-flow {
  --palate-bg: #0e1117;
  --palate-panel: #171b23;
  --palate-border: #303744;
  --palate-text: #f0f3f6;
  --palate-muted: #a5afbd;
  --palate-accent: #1688e8;
  color: var(--palate-text);
  font: 15px/1.5 system-ui, sans-serif;
  margin: 0 auto;
  max-width: 1440px;
  padding: 24px clamp(16px, 5.56vw, 80px) 56px;
}
.palate-flow * { box-sizing: border-box; }
.palate-page h1 { font-size: clamp(2rem, 3vw, 2.625rem); line-height: 1.2; margin: 0 0 16px; }
.palate-page h2 { font-size: 1.75rem; margin: 0; text-transform: capitalize; }
.palate-page p { margin: 10px 0; }
.palate-muted { color: var(--palate-muted); }
.palate-notice { background: #182333; border: 0; border-radius: 8px; color: #e6edf3; padding: 12px 14px; }
.palate-error { color: #ffb4a9; }
.palate-records { display: grid; gap: 16px; margin: 24px 0; }
.palate-card { background: transparent; border: 1px solid #3d4043; border-radius: 8px; padding: 16px; }
.palate-preview { background: transparent; border: 0; border-radius: 0; padding: 0; }
.palate-card-layout { display: grid; gap: 22px; grid-template-columns: minmax(150px, 1.4fr) minmax(0, 4.6fr); }
.palate-card-controls { align-content: start; display: grid; gap: 14px; }
.palate-card-controls label { display: grid; gap: 6px; }
.palate-card-controls .palate-check { align-items: center; display: flex; gap: 9px; }
.palate-card-controls input[type=checkbox] { accent-color: var(--palate-accent); height: 18px; width: 18px; }
.palate-card-controls select { background: #202631; border: 1px solid #596273; border-radius: 6px; color: inherit; min-height: 38px; padding: 6px 9px; }
.palate-card-detail { margin: 0; padding: 0; }
.palate-plots { align-items: start; display: grid; gap: 14px; margin-top: 12px; }
.palate-plot { margin: 0; max-width: 100%; width: min(360px, 100%); }
.palate-plot figcaption { color: var(--palate-muted); font-size: .9rem; margin-bottom: 5px; }
.palate-plot svg { background: transparent; border-radius: 7px; display: block; height: auto; max-width: 100%; overflow: visible; width: 100%; }
.palate-plot-frame { fill: none; stroke: #434b59; stroke-width: 1; }
.palate-gridline { stroke: #303744; stroke-width: .65; }
.palate-tick { fill: #a5afbd; font: 12px system-ui, sans-serif; }
.palate-axis-label { fill: #f0f3f6; font: 12px system-ui, sans-serif; }
.palate-chart-empty { align-self: center; color: var(--palate-muted); max-width: 360px; padding: 24px; }
.palate-actions { align-items: center; border-top: 1px solid var(--palate-border); display: grid; gap: 12px; grid-template-columns: 3fr 4fr 3fr; margin-top: 24px; padding-top: 18px; }
.palate-actions > button { width: 100%; }
.palate-actions > button:first-child { background: transparent; border-color: transparent; }
.palate-actions > button:first-child:hover:not(:disabled) { background: #232a35; }
.palate-actions:not(.palate-three-actions) > button:last-child:not(:first-child) { grid-column: 3; }
.palate-three-actions { grid-template-columns: 3fr 2fr 2fr 3fr; }
.palate-three-actions > button:nth-child(2) { grid-column: 3; }
.palate-three-actions > button:last-child:not(:first-child) { grid-column: 4; }
.palate-flow button { background: #232a35; border: 1px solid #4b5565; border-radius: 7px; color: var(--palate-text); cursor: pointer; font: inherit; min-height: 40px; padding: 8px 13px; }
.palate-flow button:hover:not(:disabled) { filter: brightness(1.18); }
.palate-flow button:focus-visible, .palate-flow select:focus-visible, .palate-flow input:focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; }
.palate-flow button:disabled { cursor: not-allowed; opacity: .55; }
.palate-flow button.palate-primary { background: #58a6ff; border-color: #58a6ff; color: #ffffff; font-weight: 650; }
.palate-flow button.palate-danger { background: #b91c1c; border-color: #ef4444; color: #ffffff; }
.palate-flow button.palate-danger:hover:not(:disabled) { background: #991b1b; border-color: #f87171; color: #ffffff; }
.palate-flow button.palate-small { font-size: .87rem; min-height: 34px; padding: 5px 10px; }
.palate-progress { background: #303744; border-radius: 20px; height: 8px; margin: 22px 0 8px; overflow: hidden; }
.palate-subject-count { margin: 0 !important; }
.palate-subject-count + .palate-progress { margin-top: 8px; }
.palate-progress span { background: #21a0e8; border-radius: inherit; display: block; height: 100%; transition: width .2s ease; }
.palate-metrics { display: grid; gap: 14px; margin: 18px 0; }
.palate-metrics span { background: transparent; border: 0; border-radius: 0; display: grid; font-size: 14px; gap: 3px; line-height: 1.4; padding: 0; }
.palate-metrics strong { display: block; font-size: 2.25rem; font-weight: 400; line-height: 1.2; }
.palate-result { border-radius: 8px; margin: 10px 0; padding: 12px 14px; }
.palate-result-skipped { background: #182333; color: #f0f3f6; }
.palate-result-success { background: transparent; color: #e4f5eb; padding: 0; }
.palate-result-status { background: #103c28; border-radius: 20px; margin: 10px 0; padding: 9px 14px; }
.palate-result-failure { background: #4a2024; color: #ffe2e4; }
.palate-saved-caption { margin: 12px 0 4px !important; }
.palate-result pre { background: #10141a; border-radius: 6px; overflow-x: auto; padding: 12px; white-space: pre-wrap; }
@media (max-width: 760px) {
  .palate-flow { padding-inline: 16px; }
  .palate-page h1 { font-size: 2rem; }
  .palate-card-layout { grid-template-columns: 1fr; }
  .palate-three-actions { grid-template-columns: 1fr; }
  .palate-actions { grid-template-columns: 1fr; }
  .palate-actions > button:first-child, .palate-actions > button:last-child:not(:first-child),
  .palate-actions:not(.palate-three-actions) > button:last-child:not(:first-child),
  .palate-three-actions > button:nth-child(2), .palate-three-actions > button:last-child:not(:first-child) { grid-column: 1; justify-self: stretch; }
  .palate-actions button { width: 100%; }
}
