/* Matches Space v175 (e0ed35d): quiet headers, 20px panels and 12–13px controls.
   Scoped presentation only; content, access and hidden-state behaviour are unchanged. */
.flux-lab {
  --fl-ink: #161616;
  --fl-paper: #f9f8f3;
  --fl-blue: #054ff0;
  --fl-lime: #dcfc73;
  --fl-lilac: #e1d2f3;
  --fl-text: var(--fl-ink);
  --fl-surface: #ffffff;
  --fl-field-surface: #ffffff;
  --fl-muted: #696966;
  --fl-line: #e5e3dc;
  --fl-control-line: #696966;
  --fl-link: var(--fl-blue);
  --fl-focus: var(--fl-blue);
  max-width: 1180px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 0 40px;
  color: var(--fl-text);
  font-family: HelveticaM, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.flux-lab *, .flux-lab *::before, .flux-lab *::after { box-sizing: border-box; }
.flux-lab[hidden], .flux-lab [hidden] { display: none !important; }
:root .flux-lab :is(h1, h2, h3, h4) {
  font-family: SpaceCore, 'De Fonte Plus', HelveticaM, Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.flux-lab .fl-hero { margin: 0 0 26px; padding: 0 0 26px; border-bottom: 1px solid var(--fl-line); background: transparent; }
.flux-lab .fl-hero h1 { font-size: clamp(2rem, 3.6vw, 3.6rem); margin: 9px 0 14px; }
.flux-lab .fl-hero p { max-width: 78ch; margin: 0; line-height: 1.6; color: var(--fl-muted); }
.flux-lab .fl-hero .fl-eyebrow { color: var(--fl-link); font-size: .69rem; letter-spacing: .15em; font-weight: 700; }
.flux-lab .fl-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  padding: 16px 20px;
  border: 1px solid var(--fl-line);
  border-radius: 20px;
  background: var(--fl-surface);
  font-size: .9rem;
}
.flux-lab .fl-status:empty, .flux-lab .fl-status:has(> span:only-child:empty) { display: none; }
.flux-lab :is(.fl-toolbar, .fl-filters, .fl-actions, .fl-editor-heading) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.flux-lab .fl-toolbar { align-items: flex-end; justify-content: space-between; margin: 24px 0; }
.flux-lab .fl-filters { align-items: flex-end; flex: 1 1 460px; }
.flux-lab .fl-field { display: grid; gap: 8px; min-width: 0; font-size: .875rem; font-weight: 700; }
.flux-lab .fl-filters .fl-field { flex: 1 1 155px; }
.flux-lab .fl-filters > input { flex: 2 1 220px; }
.flux-lab :is(input:not([type=checkbox]), select, textarea) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--fl-control-line);
  border-radius: 12px;
  background: var(--fl-field-surface);
  color: var(--fl-text);
  font: 400 1rem/1.45 HelveticaM, Helvetica, Arial, sans-serif;
  box-shadow: none;
}
.flux-lab input[type=search] { border-radius: 13px; }
.flux-lab textarea { resize: vertical; line-height: 1.65; }
.flux-lab input::placeholder, .flux-lab textarea::placeholder { color: var(--fl-text); opacity: .7; }
.flux-lab button {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid var(--fl-control-line);
  border-radius: 13px;
  background: var(--fl-surface);
  color: var(--fl-text);
  font: 400 .9375rem/1.4 HelveticaM, Helvetica, Arial, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: none;
}
.flux-lab button.fl-primary { background: var(--fl-blue); color: var(--fl-paper); border-color: var(--fl-blue); }
.flux-lab button:disabled { opacity: .55; cursor: not-allowed; }
.flux-lab button:not(:disabled):hover { text-decoration: underline; text-underline-offset: 4px; }
.flux-lab :is(button, input, select, textarea, a, summary):focus-visible { outline: 3px solid var(--fl-focus); outline-offset: 4px; }
.flux-lab .fl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.flux-lab :is(.fl-card, .fl-editor, .fl-history) {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--fl-line);
  border-radius: 20px;
  background: var(--fl-surface);
  box-shadow: none;
}
.flux-lab .fl-card h2 { font-size: 1.65rem; margin: 24px 0 12px; }
.flux-lab .fl-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.flux-lab :is(.fl-tag, .fl-state) { padding: 7px 12px; border-radius: 13px; background: var(--fl-lime); color: var(--fl-ink); font-size: .75rem; }
.flux-lab .fl-state { background: var(--fl-lilac); }
.flux-lab :is(.fl-summary, .fl-empty p, .fl-body) { font-size: .9375rem; line-height: 1.65; }
.flux-lab .fl-byline { font-size: .8125rem; line-height: 1.6; margin: 18px 0; }
.flux-lab .fl-reading { border-top: 1px solid var(--fl-line); padding-top: 12px; }
.flux-lab summary { min-height: 44px; padding: 10px 0; color: var(--fl-link); font-size: .9375rem; cursor: pointer; }
.flux-lab .fl-body { white-space: pre-wrap; margin: 16px 0; }
.flux-lab .fl-materials { display: grid; gap: 10px; padding-left: 22px; }
.flux-lab .fl-materials a { color: var(--fl-link); text-underline-offset: 4px; }
.flux-lab .fl-empty { grid-column: 1 / -1; padding: 48px 28px; border: 1px solid var(--fl-line); border-radius: 20px; background: var(--fl-surface); text-align: center; }
.flux-lab .fl-empty h2 { font-size: 1.65rem; }
.flux-lab .fl-empty p { max-width: 52ch; margin: 12px auto 0; }
.flux-lab .fl-editor { display: grid; gap: 18px; max-width: 900px; }
.flux-lab .fl-editor-heading { justify-content: space-between; }
.flux-lab .fl-editor h2 { margin: 0; font-size: 1.65rem; }
.flux-lab .fl-note { margin: 0; font-size: .875rem; line-height: 1.6; }
.flux-lab fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--fl-line); border-radius: 20px; }
.flux-lab legend { max-width: 100%; padding: 0 8px; font-size: .875rem; font-weight: 700; }
.flux-lab .fl-check { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: .9375rem; }
.flux-lab .fl-check input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--fl-blue); }
.flux-lab .fl-material-input { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) auto; gap: 10px; margin: 14px 0; }
.flux-lab .fl-materials-editor > button { margin-top: 12px; }
.flux-lab .fl-actions { margin-top: 20px; }
.flux-lab .fl-history { margin-top: 28px; }
.flux-lab .fl-history details { padding: 12px 0; border-bottom: 1px solid var(--fl-line); }
@media screen {
  :root[data-appearance=soft] .flux-lab { --fl-muted: #57545d; }
  :root[data-appearance=dark] .flux-lab, :root[data-theme=dark] .flux-lab {
    --fl-text: var(--fl-paper);
    --fl-surface: #242326;
    --fl-field-surface: #302e33;
    --fl-muted: #c2c0c6;
    --fl-line: #48464c;
    --fl-control-line: #c2c0c6;
    --fl-link: #a9c2ff;
    --fl-focus: #a9c2ff;
    color-scheme: dark;
  }
}
/* Keep module controls on brand surfaces even when the shared dark sheet loads later. */
@media screen {
  html:root[data-appearance=dark] .flux-lab :is(input:not([type=checkbox]), select, textarea),
  html:root[data-theme=dark] .flux-lab :is(input:not([type=checkbox]), select, textarea) {
    background: var(--fl-field-surface);
    color: var(--fl-text);
    border-color: var(--fl-control-line);
  }
  html:root[data-appearance=dark] .flux-lab a,
  html:root[data-theme=dark] .flux-lab a { color: var(--fl-link); }
  html:root[data-appearance=dark] .flux-lab :focus-visible,
  html:root[data-theme=dark] .flux-lab :focus-visible { outline-color: var(--fl-focus); }
}
@media (max-width: 720px) {
  .flux-lab .fl-grid { grid-template-columns: minmax(0, 1fr); }
  .flux-lab .fl-toolbar { align-items: stretch; }
  .flux-lab .fl-toolbar > button { flex: 1 1 140px; }
  .flux-lab .fl-filters { flex-basis: 100%; }
  .flux-lab .fl-material-input { grid-template-columns: minmax(0, 1fr); }
  .flux-lab .fl-material-input > button { justify-self: start; }
  .flux-lab :is(.fl-card, .fl-editor, .fl-history) { padding: 22px; border-radius: 20px; }
}
@media (max-width: 420px) {
  .flux-lab .fl-filters .fl-field, .flux-lab .fl-actions > button { flex: 1 1 100%; }
  .flux-lab fieldset { padding: 16px; }
}

.flux-lab :is(.fl-summary, .fl-byline, .fl-note, .fl-empty p) { color: var(--fl-muted); }
