/* Tool access inside the Security rings slide-over. */
.sr-view-choice { padding: 12px 30px; border-bottom: 1px solid var(--line, #ddd); }
#srBody[hidden], #srToolsBody[hidden] { display: none; }
#srToolsBody { padding: 28px 30px 36px; }
#srToolsBody h2 { margin: 0; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.035em; }
.sr-tool-intro { margin: 8px 0 24px; color: var(--muted, #535966); }
.sr-tool-rings { display: grid; gap: 20px; }
.sr-tool-ring {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line, #ddd);
  border-radius: 16px;
}
.sr-tool-ring h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 22px; }
.sr-tool-ring h4 { margin: 18px 0 10px; font-size: 14px; }
.sr-tool-base {
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.sr-tool-groups {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 10px;
}
.sr-tool-group {
  padding: 12px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.sr-tool-group > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.sr-tool-group > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-tool-group ul { margin: 7px 0 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.6; }
.sr-tool-agents { margin-top: 18px; border-top: 1px solid var(--line, #ddd); }
.sr-tool-agents > details + details { border-top: 1px solid var(--line, #ddd); }
.sr-tool-agents > details > summary { cursor: pointer; padding: 10px 4px; font-weight: 600; }
.sr-tool-agents > details > p { margin: 0 4px 10px; }
.sr-tool-agents > details > div { margin: 0 0 10px; }
@media (max-width: 560px) {
  .sr-view-choice { padding: 10px 16px; }
  #srToolsBody { padding: 20px 16px 28px; }
  .sr-tool-ring { padding: 14px; }
}

.sr-tool-fieldset { border: 0; margin: 0 0 14px; min-inline-size: 0; padding: 0; }
.sr-tool-fieldset .rowbtn { margin: 10px 8px 0 0; }
.sr-tool-switch { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; overflow-wrap: anywhere; }
/* THE SWITCH DRAWS ITSELF ON THE LIVE PAGE (the compliance desk 2026-12-02 14:08:01Z, the live walk's shots): studio-controls.css draws every
   checkbox as an 18px box with a tilted tick (':root input[type="checkbox"]...', specificity 0,5,3), which beat these rules and left a green
   pill with a check and no knob. Scoped under the pane's id they win (1,2,2), and they set everything the tick drawing touches. */
#srPane .sr-tool-switch input[type="checkbox"] { appearance: none; box-sizing: border-box; width: 34px; min-width: 34px; height: 20px; padding: 0; background: #68717d; border: 1px solid currentColor; border-radius: 1rem; cursor: pointer; flex: 0 0 34px; margin: 0; position: relative; vertical-align: middle; }
#srPane .sr-tool-switch input[type="checkbox"]::after { content: ''; background: white; border: 0; border-radius: 50%; rotate: none; width: 12px; height: 12px; position: absolute; top: 3px; left: 3px; }
#srPane .sr-tool-switch input[type="checkbox"]:checked { background: #19644a; border-color: currentColor; }
#srPane .sr-tool-switch input[type="checkbox"]:checked::after { left: 17px; }
#srPane .sr-tool-switch input[type="checkbox"]:disabled { cursor: default; opacity: .55; }
.sr-tool-switch small { font-size: .78em; }
.sr-tool-group > summary .sr-tool-switch { font-weight: 700; }
#srToolsBody > [role="status"]:empty { margin: 0; }

.sr-tool-fieldset .sr-tool-groups { gap: 8px; }
.sr-tool-fieldset .sr-tool-group { padding: 7px 10px; }
.sr-tool-fieldset .sr-tool-group > summary { padding: 0; line-height: 1.25; }
.sr-tool-group > summary > .sr-tool-switch { display: inline-flex; flex-wrap: nowrap; max-width: calc(100% - 18px); min-height: 24px; vertical-align: middle; }
.sr-tool-group > summary > .sr-tool-count { display: block; color: var(--muted, #535966); font-weight: 400; margin: 1px 0 0 18px; }
.sr-tool-group > [role="group"] { border-top: 1px solid var(--line, #ddd); margin-top: 8px; padding-top: 4px; }
.sr-tool-feedback:empty { margin: 0; }

/* THE FAMILY CARD (Josh on live, 2026-12-02 18:1xZ: "i don't like how the tools expand straight down not using available space well,
   also alignment bad on the cards when the name takes 3 lines, seem we waste some space on the right too that could fit on two lines"):
   ONE alignment for every card: the chevron, the switch and the FIRST line of the name on one line, the count under the name; the name
   takes the card's whole remaining width (two lines at most at the cards' minimum width); every card in a row the same height; an
   OPENED family keeps its card and lays its tools out below the row (one at a phone's width). The chevron is the card's own:
   studio-controls.js decorates only a summary that still shows the native marker. */
.sr-tool-fieldset .sr-tool-groups { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); align-items: stretch; }
.sr-tool-fieldset .sr-tool-groups { position: relative; grid-auto-flow: dense; }
.sr-tool-fieldset .sr-tool-group[open] { border-color: var(--accent, #19644a); }
.sr-tool-fieldset .sr-tool-panel-space { grid-column: 1 / -1; }
.sr-tool-fieldset .sr-tool-group:not([open]) + .sr-tool-panel-space { display: none; }
.sr-tool-fieldset .sr-tool-group::details-content { overflow: visible; transition: none; }
.sr-tool-fieldset .sr-tool-group > [role="group"] {
  position: absolute;
  inset-inline: 0;
  top: var(--sr-tool-panel-top, 0px);
  visibility: var(--sr-tool-panel-visibility, hidden);
  box-sizing: border-box;
  margin: 0;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  padding: 8px 10px;
}
.sr-tool-fieldset .sr-tool-group:not([open]) > [role="group"] { display: none; }
@media (forced-colors: active) {
  #srPane .sr-tool-switch input[type="checkbox"] {
    forced-color-adjust: none;
    background: Canvas;
    border-color: CanvasText;
  }
  #srPane .sr-tool-switch input[type="checkbox"]::after {
    content: '' !important;
    background: CanvasText;
  }
  #srPane .sr-tool-switch input[type="checkbox"]:checked {
    background: Highlight;
    border-color: Highlight;
  }
  #srPane .sr-tool-switch input[type="checkbox"]:checked::after { background: HighlightText; }
  .sr-tool-fieldset .sr-tool-group[open] { border-color: Highlight; }
}
.sr-tool-fieldset .sr-tool-group > summary { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 8px; align-items: start; list-style: none; padding: 0; line-height: 20px; }
.sr-tool-fieldset .sr-tool-group > summary::-webkit-details-marker { display: none; }
.sr-tool-fieldset .sr-tool-group > summary::before { content: ''; grid-column: 1; grid-row: 1; align-self: start; margin-top: 7px; width: 10px; height: 7px; background: var(--accent, #19644a); clip-path: polygon(0 0, 50% 65%, 100% 0, 100% 30%, 50% 100%, 0 30%); rotate: -90deg; transition: rotate 180ms; }
.sr-tool-fieldset .sr-tool-group[open] > summary::before { rotate: 0deg; }
.sr-tool-fieldset .sr-tool-group > summary > .sr-tool-switch { grid-column: 2; grid-row: 1; justify-self: start; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; align-items: start; max-width: 100%; min-height: 20px; }
.sr-tool-fieldset .sr-tool-group > summary > .sr-tool-switch > span { overflow-wrap: anywhere; }
.sr-tool-fieldset .sr-tool-group > summary > .sr-tool-switch > small { grid-column: 2; line-height: 1.3; }
.sr-tool-fieldset .sr-tool-group > summary > .sr-tool-count { grid-column: 2; grid-row: 2; margin: 2px 0 0 42px; line-height: 1.3; }
.sr-tool-fieldset .sr-tool-group > [role="group"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); column-gap: 16px; }
@media (prefers-reduced-motion: reduce) { .sr-tool-fieldset .sr-tool-group > summary::before { transition: none; } }
@media (forced-colors: active) { .sr-tool-fieldset .sr-tool-group > summary::before { background: ButtonText; forced-color-adjust: none; } }
.sr-tool-fieldset .sr-tool-group > [role="group"] > .sr-tool-switch { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; align-items: start; line-height: 20px; min-height: 20px; padding: 6px 0; }
.sr-tool-fieldset .sr-tool-group > [role="group"] > .sr-tool-switch > small { grid-column: 2; line-height: 1.3; }
