/* JEM-33 R11 shared components — presentation only.
 * Actual R10 selectors only. No source nodes, text, links, state or behavior added.
 * C01–C14 map to implementation-notes/R11-COMPONENTS.md.
 * The existing r7-refinement layer is reused because its important declarations
 * beat unlayered legacy presentation. Earlier r6-visibility remains authoritative.
 */
@layer r7-refinement {
  /* C01. Existing public CTAs and ordinary native form actions. */
  body.jem33-r4 main.r6-discovery :is(a.button,a.outline-button,a.waste-primary,a.ordrel-tool-open),
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) :is(.button,.outline-button),
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project .or-button {
    min-height:44px!important;
    max-width:100%;
    padding:12px 20px!important;
    border-radius:var(--radius-control)!important;
    font-family:var(--r11-font-heading)!important;
    font-size:16px!important;
    font-weight:750!important;
    line-height:1.4!important;
    white-space:normal!important;
    text-align:center!important;
  }
  /* Color changes are default-only. Native hover, active, disabled and selected
   * styling is intentionally retained; focus itself is handled by C13. */
  body.jem33-r4 main.r6-discovery :is(a.button,a.waste-primary,a.ordrel-tool-open):not(:hover,:active,[aria-disabled="true"],[aria-current]),
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) .button:not(:hover,:active,:disabled,[aria-disabled="true"],[aria-pressed="true"],[aria-selected="true"]),
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project .or-button:not(.secondary,:hover,:active,:disabled,[aria-disabled="true"]) {
    background:var(--r11-action)!important;
    color:var(--r11-action-text)!important;
    border-color:var(--r11-action)!important;
    text-decoration:none!important;
  }
  body.jem33-r4 main.r6-discovery a.outline-button:not(:hover,:active,[aria-disabled="true"]),
  body.jem33-r4 main.r6-discovery .oe-sustain>a.outline-button:not(:hover,:active,[aria-disabled="true"]) {
    background:transparent!important;
    color:var(--r11-surface-brand)!important;
    border:1px solid currentColor!important;
    text-decoration:none!important;
  }
  body.jem33-r4 main.r6-discovery :is(.brand-story-mission,.ordrel-mission,.oe-verify,.oe-sustain,.ox-finder) a.outline-button:not(:hover,:active,[aria-disabled="true"]),
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.board-editor,#staff-form,#value-form,#improvement-fields) .outline-button:not(:hover,:active,:disabled,[aria-disabled="true"],[aria-pressed="true"],[aria-selected="true"]),
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project .or-button.secondary:not(:hover,:active,:disabled,[aria-disabled="true"]) {
    background:transparent!important;
    color:var(--r11-on-deep)!important;
    border-color:var(--r11-control-border)!important;
  }
  /* The R11 5 Whys editor is the light-form exception within its dark shell. */
  body.jem33-r4 main.r10-tool-workspace[data-r10-workspace="/tools/5-whys"] .why-editor .outline-button:not(:hover,:active,:disabled,[aria-disabled="true"],[aria-pressed="true"],[aria-selected="true"]) {
    background:transparent!important;
    color:var(--r11-text)!important;
    border-color:var(--r11-control-border)!important;
  }
  /* Owner-locked Safety green/white exception, including its public offer. */
  body.jem33-r4 main.r6-discovery :is(.sseo-actions,.sseo-offer,.safety-discovery-card) a.button:not(:hover,:active,[aria-disabled="true"]) {
    background:var(--r11-safety)!important;
    color:#FFFFFF!important;
    border-color:var(--r11-safety)!important;
  }

  /* C02. Prose, section and row links; no chart or native diagram text. */
  body.jem33-r4 main.r6-discovery :is(.lean-article>p,.lean-article>ul,.lean-article>ol,.pricing-questions,.sseo-sources,.wseo-sources) a:not(.button,.outline-button):not(:hover,:active),
  body.jem33-r4 main.r6-discovery :is(.breadcrumbs,.ox-breadcrumb) a:not(:hover,:active) {
    color:var(--r11-surface-brand)!important;
    text-underline-offset:.2em!important;
  }
  body.jem33-r4 main.r6-discovery :is(.r6d-reading-section,.oe-meaning,.oe-loop-section,.oe-verify,.oe-sustain,.hc-section-head) a:not(.button,.outline-button):not(:hover,:active) {
    color:var(--r11-on-deep)!important;
    text-underline-offset:.2em!important;
  }
  body.jem33-r4 main.r6-discovery .oe-lean>.oe-links>li>a:not(:hover,:active) {
    color:var(--r11-on-deep)!important;
    text-underline-offset:.2em!important;
  }
  body.jem33-r4 main.r6-discovery .oe-lean>.oe-links>li:nth-child(n+2)>a:not(:hover,:active) {
    color:var(--r11-lime)!important;
  }
  body.jem33-r4 main.r6-discovery :is(.oe-lean,.r10-learn-section)>.oe-links>li>a {
    min-height:44px!important;
    white-space:normal!important;
    overflow-wrap:break-word;
  }

  /* C03. Section headings retain existing left/center alignment and surfaces. */
  body.jem33-r4 main.r6-discovery :is(.oe-section-head,.hc-section-head,.ox-section-head,.pricing-section-heading) :is(h2,h3) {
    font-family:var(--r11-font-heading)!important;
    margin-bottom:var(--heading-body)!important;
  }
  body.jem33-r4 main.r6-discovery :is(.oe-section-head,.hc-section-head,.ox-section-head,.pricing-section-heading) :is(h2,h3)+p {
    margin-top:0!important;
  }
  body.jem33-r4 main.r6-discovery .hc-section-head :is(h2,h3),
  body.jem33-r4 main.r6-discovery :is(.r10-meaning-copy,.oe-verify,.oe-sustain,.r10-domain-section,.r10-learn-section)>.oe-section-head :is(h2,h3) {
    color:var(--r11-on-deep)!important;
  }
  /* Measured Help ancestry defect; original paragraph and link stay intact. */
  body.jem33-r4 main.r6-discovery .hc-section-head>div>p {
    color:var(--r11-muted-deep)!important;
  }

  /* C04. Existing content-card shells; instrument/example descendants untouched. */
  body.jem33-r4 main.r6-discovery :is(.r9-aligned-card,.ox-feature-card,.pricing-card,.r6d-reading-section),
  body.jem33-r4 main.r6-discovery :is(.sseo-cards,.wseo-related)>:is(a,article) {
    border-radius:var(--radius-card)!important;
  }
  body.jem33-r4 main.r6-discovery .ordrel-tool-grid.r9-aligned-tools>.r9-aligned-card {
    padding:var(--panel-padding)!important;
    border-top-width:1px!important;
    border-color:var(--r11-line)!important;
  }

  /* C05. Existing prose callouts only; no instrument truth notes or status text. */
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) p.workspace-safety {
    background:var(--r11-surface-light)!important;
    color:var(--r11-text)!important;
    border:1px solid var(--r11-line)!important;
    border-left:4px solid var(--r11-surface-brand)!important;
    border-radius:var(--radius-card)!important;
    padding:16px 20px!important;
    font-family:var(--r11-font-body)!important;
    font-size:16px!important;
    line-height:1.6!important;
  }

  /* C06. Explicit non-membership badges; native status meanings are retained. */
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project-copy>.or-tag {
    background:var(--r11-lift)!important;
    color:var(--r11-muted-deep)!important;
    border-color:var(--r11-line-dark)!important;
    font-size:14px!important;
  }
  body.jem33-r4 main.r6-discovery .pricing-files-table .r10-price-badge {
    width:124px!important;
    min-width:0!important;
    min-height:36px!important;
    padding:8px 16px!important;
    border-radius:999px!important;
    font-size:22px!important;
    line-height:1.3!important;
  }
  /* Finder controls remain interactive, distinct from rounded status badges. */
  body.jem33-r4 main.r6-discovery .ox-finder.r9-finder .ox-finder-choices>a {
    border-radius:var(--radius-control)!important;
  }

  /* C07. Native tab controls: geometry only; aria/current/pressed states retained. */
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) .flow-tabs>li>button {
    min-height:44px!important;
    border-radius:999px!important;
    font-family:var(--r11-font-heading)!important;
    font-size:15px!important;
    line-height:1.4!important;
    white-space:normal!important;
  }

  /* C08. Bounded editable fields; no range/radio/checkbox, errors or disabled state. */
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]),select,textarea):not(:disabled,[aria-disabled="true"],[aria-invalid="true"]),
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-input-zone .or-field :is(input,select,textarea):not(:disabled,[aria-disabled="true"],[aria-invalid="true"]) {
    min-width:0!important;
    max-width:100%;
    min-height:44px!important;
    background:var(--r11-surface-light)!important;
    color:var(--r11-text)!important;
    border-color:var(--r11-control-border)!important;
    border-radius:var(--radius-control)!important;
    padding:12px 14px!important;
    font-family:var(--r11-font-body)!important;
    font-size:17px!important;
    line-height:1.5!important;
    color-scheme:light!important;
  }
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) textarea:not(:disabled,[aria-disabled="true"],[aria-invalid="true"]) {
    min-height:96px!important;
  }
  body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) :is(input,textarea):not(:disabled,[aria-invalid="true"])::placeholder,
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-input-zone .or-field :is(input,textarea):not(:disabled,[aria-invalid="true"])::placeholder {
    color:var(--r11-muted)!important;
    opacity:1!important;
  }

  /* C09. Static pricing/learning tables only; no tool data or result-table styling. */
  body.jem33-r4 main.r6-discovery :is(.pricing-compare,.lean-table-scroll)>table :is(th,td) {
    padding:16px!important;
    vertical-align:top;
  }
  body.jem33-r4 main.r6-discovery .pricing-files-table>table td:last-child {
    vertical-align:middle!important;
  }

  /* C10. Editorial/photo frames and captions; no SVG/gauge/diagram figures. */
  body.jem33-r4 main.r6-discovery :is(figure.r10-editorial,figure.r8-editorial,figure.r7-editorial-image,figure.hc-hero-art) {
    border-radius:var(--radius-card)!important;
  }
  body.jem33-r4 main.r6-discovery :is(figure.r10-editorial,figure.r8-editorial,figure.r7-editorial-image,figure.hc-hero-art)>figcaption {
    background:var(--r11-surface-deep)!important;
    color:var(--r11-on-deep)!important;
    padding:12px 16px!important;
    font-family:var(--r11-font-body)!important;
    font-size:16px!important;
    font-weight:600!important;
    line-height:1.5!important;
  }
  body.jem33-r4 main.r6-discovery figure.hc-hero-art>figcaption>span {
    color:var(--r11-on-deep)!important;
  }

  /* C11. Project bar geometry; native save/export notices and labels unchanged. */
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project {
    border:1px solid var(--r11-line-dark)!important;
    border-radius:var(--radius-card)!important;
    background:var(--r11-surface-deep)!important;
  }

  /* C12. Content breadcrumbs; no shared-header or account-navigation selector. */
  body.jem33-r4 main:is(#main,#r5-workspace)>nav.breadcrumbs,
  body.jem33-r4 main.r6-discovery .ox-breadcrumb {
    font-family:var(--r11-font-body)!important;
    font-size:14px!important;
    line-height:1.5!important;
    margin-bottom:24px!important;
  }
  body.jem33-r4 main:is(#main,#r5-workspace)>nav.breadcrumbs :is(a,li,span),
  body.jem33-r4 main.r6-discovery .ox-breadcrumb :is(a,span) {
    font-family:var(--r11-font-body)!important;
    font-size:14px!important;
    line-height:1.5!important;
  }

  /* C13. Dual focus ring, ordinary exposed content controls only.
   * All Fishbone controls, native results/instruments, SVG, profile and header
   * controls are excluded. No focus, click, hover or pressed behavior is added. */
  body.jem33-r4 main.r6-discovery:not([data-r10-workspace="/tools/fishbone"]) :is(a[href],button,input,select,textarea,summary):not(:where(svg *, .r9-instrument *, .ox-tool-preview *, .r9-example-surface *, .oc-demo *, .identity-outcome *, .r6-gauge-panel *, .r8-dashboard-visual *, details.account-profile *, [disabled], [aria-disabled="true"])):focus-visible,
  body.jem33-r4 main.r10-tool-workspace[data-r10-tool-family="free"]:not([data-r10-workspace="/tools/fishbone"]) :is(a[href],button,input,select,textarea,summary):not(:where(#ordrel-r3 *, svg *, .r5-result-zone *, .order-live-results *, .r6-gauge-panel *, .r9-instrument *, .identity-outcome *, details.account-profile *, [disabled], [aria-disabled="true"])):focus-visible,
  body.jem33-r4 main.r10-tool-workspace #ordrel-r3 :is(.or-project,.or-input-zone) :is(a[href],button,input,select,textarea,summary):not(:where(svg *, .or-gauge *, .or-chart *, [disabled], [aria-disabled="true"])):focus-visible {
    outline:3px solid var(--r11-focus-outer,#FFFFFF)!important;
    outline-offset:2px!important;
    box-shadow:0 0 0 2px var(--r11-focus-inner,#102338)!important;
  }

  /* C01a. Ordinary public CTA arrow inherits its action label color.
   * R10 retains R8-system.css line 32's forced white SVG foreground.
   * Keep native stroke=currentColor, paths, dimensions and every instrument intact. */
  body.jem33-r4:not([data-route^="/tools"]) main#main.r6-discovery:not(.r10-tool-workspace) a.button:not(:where(.r9-instrument *, .ox-tool-preview *, .r9-example-surface *, .oc-demo *, .identity-outcome *, .r6-gauge-panel *, .r8-dashboard-visual *)) > svg.lucide-arrow-right {
    color:inherit!important;
  }

  /* C02a. Source top-row tertiary actions on the named light public headers.
   * R6-discovery.css line 33 still supplies green in the retained R10 cascade. */
  body.jem33-r4[data-route="/learn"] main#main.r6-discovery .oe-inbound.r8-context-note > a:not(.button,.outline-button,:hover,:active),
  body.jem33-r4:is([data-route="/learn"],[data-route="/pricing"],[data-route="/shop"]) main#main.r6-discovery .r6d-page-heading .ordrel-hero-actions.r5d-actions > a:not(.button,.outline-button,:hover,:active),
  body.jem33-r4[data-route="/waste"] main#main.r6-discovery .wseo-hero .wseo-actions.r5d-actions > a:not(.button,.outline-button,:hover,:active),
  body.jem33-r4:is([data-route="/safety"],[data-route="/safety/machine-risk-assessment-software"],[data-route="/learn/safety"]) main#main.r6-discovery .sseo-hero .sseo-actions.r5d-actions > a:not(.button,.outline-button,:hover,:active) {
    color:var(--r11-surface-brand)!important;
  }
  /* C02b. Existing deep inbound notes only. Home's orange action and the
   * R11 light Learn/Safety notes retain their own explicit page/component treatment. */
  body.jem33-r4:not([data-route="/"],[data-route="/learn"],[data-route^="/tools"],[data-route="/safety"],[data-route="/safety/machine-risk-assessment-software"],[data-route="/learn/safety"]) main#main.r6-discovery .oe-inbound.r8-context-note > a:not(.button,.outline-button,:hover,:active) {
    color:var(--r11-on-deep)!important;
  }

  /* C02c. Observed solid deep note surfaces; only ordinary help/context links.
   * Auth fields/handlers, profile-help and member-access notes remain excluded. */
  body.jem33-r4:is([data-route="/account"],[data-route="/auth/confirm"]) main#r5-workspace > p.auth-help.r8-context-note > a:not(:hover,:active),
  body.jem33-r4[data-route="/tools"] main#main.r6-discovery > .ordrel-catalog > p.oe-inbound.r8-context-note > a:not(:hover,:active) {
    color:var(--r11-on-deep)!important;
  }
  /* C13a. Home ordinary controls plus the named worked-example destination.
   * The case link is navigation UI beside an example, not data-bearing SVG.
   * All header/profile controls and instrument drawing descendants stay out. */
  body.jem33-r4[data-route="/"] main#main :is(a[href],button,input,select,textarea,summary):not(:where(svg *, .r9-instrument *, .ox-tool-preview *, .r9-example-surface *, .oc-demo *, .identity-outcome *, .r6-gauge-panel *, .r8-dashboard-visual *, details.account-profile *, [disabled], [aria-disabled="true"])):focus-visible,
  body.jem33-r4[data-route="/"] main#main .oc-demo a.r9-case-tool:not([aria-disabled="true"]):focus-visible {
    outline:3px solid var(--r11-focus-outer,#FFFFFF)!important;
    outline-offset:2px!important;
    box-shadow:0 0 0 2px var(--r11-focus-inner,#102338)!important;
  }

}

/* New, non-important declarations below have no important predecessor. */
/* C02: underline geometry and safe word wrapping, without generated arrows. */
body.jem33-r4 main.r6-discovery :is(.lean-article>p,.lean-article>ul,.lean-article>ol,.pricing-questions,.sseo-sources,.wseo-sources,.r6d-reading-section,.oe-loop-section,.oe-verify,.oe-sustain,.hc-section-head) a:not(.button,.outline-button) {
  text-decoration-thickness:1px;
}
body.jem33-r4 main.r6-discovery :is(.oe-lean,.r10-learn-section)>.oe-links>li>a {
  min-inline-size:0;
  hyphens:manual;
}
/* C05 note variant is a plain existing paragraph, not a native alert state. */
body.jem33-r4 main.r6-discovery p.ox-method-note {
  background:var(--r11-surface-light);
  color:var(--r11-text);
  border:1px solid var(--r11-line);
  border-left:4px solid var(--r11-surface-brand);
  border-radius:var(--radius-card);
  padding:16px 20px;
}
/* C06: status/price badges stay non-interactive and are never stretched controls. */
body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-project-copy>.or-tag {
  min-block-size:28px;
  max-inline-size:100%;
  cursor:default;
  border-radius:999px;
}
body.jem33-r4 main.r6-discovery .pricing-files-table .r10-price-badge {
  max-inline-size:100%;
  cursor:default;
  box-shadow:none;
  font-variant-numeric:tabular-nums;
}
/* C08: fields can shrink within narrow native grid tracks. */
body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) :is(.why-editor,.board-editor,#staff-form,#value-form,#improvement-fields) .workspace-field,
body.jem33-r4 main.r10-tool-workspace #ordrel-r3 .or-input-zone .or-field {
  min-inline-size:0;
}
/* C09: preserve native table semantics and content. Horizontal containment is
 * used instead of inventing mobile card labels or changing factual cells. */
body.jem33-r4 main.r6-discovery :is(.pricing-compare,.lean-table-scroll) {
  min-inline-size:0;
  max-inline-size:100%;
  overscroll-behavior-inline:contain;
}
/* C11: native project groups retain DOM order and wrap at existing boundaries. */
body.jem33-r4 main.r10-tool-workspace #ordrel-r3 :is(.or-project-copy,.or-project .or-actions),
body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) .order-panel-actions.project-extra {
  min-inline-size:0;
}
body.jem33-r4 main.r10-tool-workspace:not([data-r10-workspace="/tools/fishbone"]) .order-panel-actions.project-extra {
  gap:16px;
}
/* C14: reserve existing placeholder space without generating loading/error UI. */
body.jem33-r4 main.r10-tool-workspace[data-r10-workspace="/tools/safety"] #message:empty {
  min-block-size:24px;
}
body.jem33-r4 main.r10-tool-workspace[data-r10-workspace="/tools/waste"] .empty-state {
  min-inline-size:0;
}
