/* Admin settings' frame (GitHub issue 203, part 1d; docs/adr/0076; the owner's AH1, AH2, AH3, AH6 and AH10): the two
   tabs and the side menu, the overview, and every page's title, tabs, width and fields. Sizes are the tokens'
   (tokens.css); the pages' own insides keep their own sheets. */

/* Nothing under 12 px (tokens.css lifts the smallest step here): a <small> no rule sizes, which the browser makes a
   sixth smaller than the text around it, is never under the captions' size. No more weight than an element, so any
   rule that sizes a <small> wins. */
:where(#settingsView, body.settings-frame-open .modal-backdrop, body.settings-frame-open .app-confirm-backdrop) small { font-size:max(var(--text-xs), .8333em); }

/* The old cards only keep each page's button (settings-frame.js presses it): the overview takes their place. */
#settingsLayout > .settings-group { display:none !important; }
#settingsLayout.settings-framed-layout { display:block; max-width:var(--settings-page-width); }
#settingsLayout.settings-framed-layout > .settings-checklist { margin:0 0 var(--space-300); }
#settingsLayout.settings-framed-layout > .settings-setup-notice { margin:0 0 var(--space-300); }

/* ------------------------------------------------------------------------------------------- The side menu */
.settings-side-menu[hidden] { display:none !important; }
.settings-side-inner { display:flex; flex-direction:column; gap:var(--space-200); min-width:0; }
.settings-side-head { display:flex; flex-direction:column; gap:var(--space-200); min-width:0; }
/* The two tabs' names are never cut short (the owner, 2026-10-24: "Organizat…" and "IT Service D…"): side by side
   when both fit, otherwise each on a row of its own, the whole width; a name longer than its row (a department's can
   be 40 characters) goes on over two or three lines, broken between words, inside its tab. */
.settings-top-tabs { display:flex; flex-wrap:wrap; gap:var(--space-50); padding:var(--space-50); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface-2); }
.settings-top-tabs[hidden] { display:none; }
.settings-top-tab { flex:1 1 auto; min-width:0; min-height:var(--control-height-sm); padding:var(--space-50) var(--space-100); border:0; border-radius:var(--radius-md); background:none; color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); line-height:var(--leading-tight); white-space:normal; overflow-wrap:anywhere; text-wrap:balance; }
.settings-top-tab:hover { color:var(--ink); }
.settings-top-tab.active { background:var(--surface); color:var(--spruce-dark); box-shadow:0 1px 2px rgba(39, 51, 47, .12); }
.settings-top-tab:focus-visible, .settings-menu-page:focus-visible, .settings-overview-page:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; }
.settings-search-slot:empty { display:none; }
.settings-menu-groups { display:flex; flex-direction:column; gap:var(--space-200); }
/* A group's header stands apart from the pages under it (the owner, 2026-10-30: "make the headers in the settings
   more distinct from the non-header text"): the text's full color, heavier than any page, in capitals spaced wider;
   a thin line and more room above every group but the first; and its pages set in under it. */
.settings-menu-group + .settings-menu-group { padding-top:var(--space-200); border-top:1px solid var(--line-strong); }
.settings-menu-group-title { margin:0 0 var(--space-75); padding:0 var(--space-100); color:var(--ink); font-size:var(--text-xs); font-weight:var(--weight-bold); letter-spacing:.08em; text-transform:uppercase; }
.settings-menu-group ul { display:grid; gap:var(--space-25); margin:0; padding:0 0 0 var(--space-100); list-style:none; }
.settings-menu-page { display:block; width:100%; padding:var(--space-75) var(--space-100); border:0; border-radius:var(--radius-md); background:none; color:var(--ink-2); font-size:var(--text-sm); line-height:var(--leading-tight); text-align:left; }
.settings-menu-page:hover { background:var(--hover-bg); color:var(--ink); }
.settings-menu-page.active { background:var(--spruce-pale); color:var(--spruce-dark); font-weight:var(--weight-semibold); }

/* The window scrolls the page, so the menu, or its search, can stay in view (the content's own box clips sideways and
   doesn't scroll), at every width. */
body.settings-frame-open .main-content { overflow-x:clip; overflow-y:visible; }
/* At desktop width the side menu is always there, on the left, and stays in view while the page scrolls, under the top
   bar and the outage banner. It reaches down into the page's space at the bottom, so at the very end of a page it
   stays where it was rather than sliding up under them. Its head (the two tabs and the search) stays at its top while
   its own list scrolls under it (the owner, 2026-10-24). */
@media (min-width:1100px) {
  #settingsView.settings-has-frame { position:relative; padding-left:calc(var(--settings-menu-width) + var(--space-400)); }
  #settingsView.settings-has-frame > .settings-side-menu { position:absolute; top:0; bottom:calc(-1 * var(--space-1000)); left:0; width:var(--settings-menu-width); }
  #settingsView.settings-has-frame .settings-side-inner { position:sticky; top:calc(var(--topbar-height) + var(--outage-banner-h, 0px) + var(--space-200)); max-height:calc(100vh - var(--topbar-height) - var(--outage-banner-h, 0px) - var(--space-200) - var(--space-400)); padding:0 var(--space-50) var(--space-200) 0; overflow-y:auto; scrollbar-width:thin; }
  #settingsView.settings-has-frame .settings-side-head { position:sticky; top:0; z-index:1; margin-bottom:calc(-1 * var(--space-100)); padding-bottom:var(--space-100); background:var(--paper); }
}
/* The search button: square, the height of a field, in the page's colors (light and dark follow them). */
.settings-search-toggle { display:inline-grid; flex:none; place-items:center; width:var(--control-height); height:var(--control-height); padding:0; border:var(--control-border-width) solid var(--line); border-radius:var(--radius-md); background:var(--surface); color:var(--ink-2); }
.settings-search-toggle:hover { background:var(--hover-bg); color:var(--ink); }
.settings-search-toggle[aria-expanded="true"] { border-color:var(--spruce); background:var(--spruce-pale); color:var(--spruce-dark); }
.settings-search-toggle:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; }
/* Narrower, one column: the overview is the menu (the two tabs and the search above it), and a page has its
   breadcrumb back to it. A page's header has a search button there instead of the side menu: it shows the side
   menu's search box alone, above the page's title (settings-frame.js settingsFrameSearchOpen). */
/* What the side menu shows there (the two tabs and the search on the overview, the search alone on a page) stays at
   the top of the screen, under the top bar and the outage banner, as the page scrolls under it (the owner, 2026-10-24).
   Its own band of the page's color hides what passes under it; the open sidebar stays above it. */
@media (max-width:1099px) {
  #settingsView.settings-on-page > .settings-side-menu { display:none !important; }
  .settings-menu-groups { display:none; }
  #settingsView.settings-has-frame > .settings-side-menu { position:sticky; top:calc(var(--topbar-height) + var(--outage-banner-h, 0px)); z-index:1; padding:var(--space-100) 0; background:var(--paper); }
  #settingsView.settings-on-overview > .settings-side-menu { margin:calc(-1 * var(--space-100)) 0 var(--space-100); }
  #settingsView.settings-on-page.settings-search-open > .settings-side-menu { display:block !important; margin:calc(-1 * var(--space-100)) 0 var(--space-100); }
  #settingsView.settings-on-page.settings-search-open .settings-top-tabs { display:none; }
}
@media (min-width:1100px) {
  .settings-search-toggle { display:none; }
}

/* ------------------------------------------------------------------------------------------- The overview */
.settings-overview-checklist { margin:0 0 var(--space-200); }
.settings-overview-groups { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap:var(--space-200); align-items:start; }
.settings-overview-group { min-width:0; padding:var(--space-200); }
.settings-overview-group h2 { margin:0 0 var(--space-100); color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); }
.settings-overview-group ul { display:grid; gap:var(--space-25); margin:0; padding:0; list-style:none; }
.settings-overview-page { display:block; width:100%; padding:var(--space-100); border:0; border-radius:var(--radius-md); background:none; color:var(--ink); text-align:left; }
.settings-overview-page:hover { background:var(--hover-bg); }
.settings-overview-name { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-100); }
.settings-overview-name b { color:var(--spruce-dark); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.settings-overview-page small { display:block; margin-top:var(--space-25); color:var(--muted); font-size:var(--text-sm); line-height:var(--leading-normal); }
.settings-chip-slot:empty { display:none; }
.settings-status-chip { line-height:var(--leading-tight); white-space:nowrap; }
.sso-status.settings-status-chip.failed { background:var(--terra-pale); color:var(--bad); }

/* ------------------------------------------------------------------------------------------- A page */
.settings-page-header[hidden] { display:none !important; }
.settings-page-header { max-width:var(--settings-page-width); margin:0 0 var(--space-200); }
.settings-page-title-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-150) var(--space-300); }
.settings-page-title-block { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100) var(--space-150); min-width:0; }
.settings-page-title-block h1 { margin:0; }
.settings-page-title-block h1:focus:not(:focus-visible) { outline:none; }
.settings-view-only[hidden] { display:none; }
.settings-page-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); margin-left:auto; }
.settings-page-actions:empty { display:none; }
.settings-page-tabs { margin:var(--space-200) 0 0; overflow-x:auto; }
.settings-page-tabs[hidden] { display:none; }
.settings-page-tabs .ticket-view-tab { flex:none; white-space:nowrap; }

/* A row of page tabs too long for the screen says so: its cut edge fades, the tabs snap into place as it scrolls, and
   the side it can scroll to is marked by settings-frame.js (data-more: left, right or both). */
.settings-page-tabs { scroll-snap-type:x proximity; scroll-padding-inline:var(--space-200); }
.settings-page-tabs .ticket-view-tab { scroll-snap-align:start; }
.settings-page-tabs[data-more="right"] { -webkit-mask-image:linear-gradient(to right, #000 calc(100% - var(--space-600)), transparent); mask-image:linear-gradient(to right, #000 calc(100% - var(--space-600)), transparent); }
.settings-page-tabs[data-more="left"] { -webkit-mask-image:linear-gradient(to left, #000 calc(100% - var(--space-600)), transparent); mask-image:linear-gradient(to left, #000 calc(100% - var(--space-600)), transparent); }
.settings-page-tabs[data-more="both"] { -webkit-mask-image:linear-gradient(to right, transparent, #000 var(--space-600), #000 calc(100% - var(--space-600)), transparent); mask-image:linear-gradient(to right, transparent, #000 var(--space-600), #000 calc(100% - var(--space-600)), transparent); }
/* On a wide screen a row too long wraps onto a second line instead, so no tab is cut off or hidden past the edge
   (Admin settings › Approvals has seven: GitHub issue 505). A phone scrolls them as above. */
@media (min-width: 761px) {
  .settings-page-tabs { flex-wrap:wrap; overflow-x:visible; -webkit-mask-image:none; mask-image:none; }
}

/* The page's header on a phone (GitHub issue 203, 1e; the frame's own part, ui-parts.js draws the bar): the breadcrumb
   on a line of its own (more than one when the names are long: it wraps, components.css, and is never cut short),
   the time zone it names under it rather than beside it (it pushed the page's name onto a second line), and the title on the same line as Search and Save, a long one wrapping inside its own space rather
   than pushing them onto a line of their own. While there are unsaved changes (Unsaved changes, Discard, Save) they
   have a line of their own. */
@media (max-width:700px) {
  body.settings-frame-open .page-frame-bar { flex-wrap:wrap; row-gap:var(--space-25); }
  body.settings-frame-open .page-frame-bar .page-breadcrumb { flex:1 1 100%; }
  body.settings-frame-open .page-frame-bar .page-time-zone { margin-left:0; padding-left:0; }
  .settings-page-title-row { flex-wrap:nowrap; align-items:flex-start; }
  .settings-page-title-row:has(.settings-save-discard:not([hidden])) { flex-wrap:wrap; }
  .settings-page-title-block { flex:1 1 auto; min-width:0; }
  .settings-page-title-block h1 { overflow-wrap:anywhere; }
  .settings-page-actions { flex:none; flex-wrap:nowrap; }
  /* The line of their own is the whole width, and stays theirs while they float at the top of the screen as the page
     scrolls (settings-save.js marks the place they left): kept on the title's line, the room they held left the title
     one letter's width, and the page's name was written a letter a line (GitHub issue 204, 2g). */
  .settings-page-title-row:has(.settings-page-actions.is-holding-place) { flex-wrap:wrap; }
  .settings-page-title-row:has(.settings-save-discard:not([hidden])) .settings-page-actions, .settings-page-actions.is-holding-place { flex:1 1 100%; flex-wrap:wrap; justify-content:flex-end; }
}

/* Every page one width. The page's own title gives way to the frame's (its line of help stays), and the breadcrumb
   takes the place of its back link. */
#settingsView .settings-frame-panel { max-width:var(--settings-page-width); }
#settingsView.settings-on-page:not(.settings-on-sub-page) .settings-frame-panel > .back-to-tickets { display:none; }
#settingsView.settings-on-page:not(.settings-on-sub-page) .settings-frame-panel > :is(.catalog-heading, .page-heading) :is(h1, h2, .eyebrow) { display:none; }
#settingsView.settings-on-page:not(.settings-on-sub-page) .settings-frame-panel > :is(.catalog-heading, .page-heading) { margin-top:0; }
/* Labels above their fields (not a search box with its icon beside it). */
#settingsView .settings-frame-panel label:not(:has(> input[type="search"], > [aria-hidden="true"])):has(> :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="color"], [type="search"]), select, textarea)) { display:flex; flex-direction:column; align-items:stretch; gap:var(--space-50); }
/* On a wide screen (the owner, 2026-10-30: "is there a maximum pixel width in the admin settings? When I zoom out, it
   doesn't look great."): the column takes the room beside the side menu (tokens.css), and the line above the page
   (the breadcrumb and "Times in …", which is the content area's, not the page's) ends where the column does, as Save
   does. */
@media (min-width:1100px) {
  body.settings-frame-open #pageFrameBar { max-width:calc(var(--settings-menu-width) + var(--space-400) + var(--settings-page-width)); }
}
/* A page's cards use the whole column. The pages' own sheets gave many of them, and the grids they sit in, caps of
   760 px to 1,320 px from before the frame, so one page's cards were narrower than its column, and than each other. */
#settingsView .settings-frame-panel :is(.panel, .login-policy-card, .kb-settings-card, .account-name-card, .sp-settings-card, .person-fields-editor, .sla-policy-register, .notification-rules-panel, .active-rules-register, .email-design-card, .account-settings-grid, .organization-settings-grid, .sla-settings-grid, .custom-states-grid, .email-settings-grid, .sso-settings-grid, .change-settings-grid, .ai-settings-grid, .email-delivery-card) { max-width:none; }
/* However wide the column, a line of text keeps a readable length and a field typed into a sensible width. Of no more
   weight than the pages' own rules (:where), so a narrower cap a page gives stays; a card drawn as a hint is no line.
   Only a field with its own label: one in a list's row, or a search with its filters beside it, keeps its row.
   A page's empty-state line ("No checklist templates yet.") keeps its card's width: most are centered, and held to
   the measure their box stopped 75 characters from the left, so the words sat left of the middle. */
:where(#settingsView .settings-frame-panel) :is(p, small, .wf-hint):not(.panel, [class*="-empty"], [id$="Empty"]) { max-width:var(--settings-text-width); }
:where(#settingsView .settings-frame-panel) label > :is(input:not([type]), input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], select, textarea, .custom-select-wrapper) { max-width:var(--settings-field-width); }

/* A number field (the owner, 2026-10-30: the "days" field ran the whole card's width with its number at the far right,
   under LastPass's button): as wide as its numbers (settings-frame.js sets --field-digits from its limits and value),
   right-aligned with the same 12 px on both sides (so a short number sits at its right edge, not in the middle), and a
   size bigger than the text around it, yet as tall as the controls beside it (the bigger text made it 44 px next to a
   38 px select). Not stretched across a label laid out as a column. settings-frame.js tells the password managers it
   is no sign-in field, so none puts its button on it. */
#settingsView .settings-frame-panel input[type="number"] { box-sizing:border-box; flex:none; align-self:flex-start; width:calc(var(--field-digits, 4) * 1ch + 2 * var(--space-150) + 2 * var(--control-border-width)); min-width:calc(3ch + 2 * var(--space-150)); max-width:100%; height:var(--control-height); min-height:0; padding-block:0; padding-left:var(--space-150); padding-right:var(--space-150); font-size:var(--text-lg); line-height:1; font-variant-numeric:tabular-nums; text-align:right; }
/* Every other one-line field and dropdown: one height, the controls' own (38 px, 44 px on touch screens), so fields
   side by side line up and no page's padding makes one taller than its neighbors. A dropdown whose words don't fit
   may still grow onto a second line. */
#settingsView .settings-frame-panel :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"], [type="button"], [type="submit"], [type="number"], [type="image"], [type="reset"]):not(:is(.people-search, .login-history-search, .group-member-search, .merge-search, .knowledge-search, .ticket-search, .settings-search-field, .custom-select-menu) *), select) { box-sizing:border-box; height:var(--control-height); min-height:var(--control-height); flex-shrink:0; padding-block:0; line-height:normal; }
/* A search box drawn as a box of its own around a borderless field (Users, Login history): the box is the one height. */
#settingsView .settings-frame-panel :is(.people-search, .login-history-search, .group-member-search) { box-sizing:border-box; min-height:var(--control-height); padding-block:0; }
#settingsView .settings-frame-panel :is(.people-search, .login-history-search, .group-member-search) input { height:auto; min-height:0; padding-block:var(--space-25); }
#settingsView .settings-frame-panel .custom-select-trigger { box-sizing:border-box; min-height:var(--control-height); padding-block:var(--space-50); line-height:var(--leading-tight); }
#settingsView .settings-frame-panel input[type="color"] { box-sizing:border-box; height:var(--control-height); }
/* Users › Digest & quiet hours: "On", then "At [time]" on one line, as the table draws it (not a label stacked over
   its field, which left the box under "At" and the "On" check box floating above it). */
#settingsView .settings-frame-panel .notice-role-table .notice-delivery-fields label:not(.rp-check) { flex-direction:row; align-items:center; gap:var(--space-75); }
/* A section heading further down a page (Login policy's "Employees kept signed in", "Password rules" …): room above
   it, so it reads as the start of the next section, not a caption under the card before it. */
#settingsView.settings-on-page .settings-frame-panel > :is(.catalog-heading, .page-heading) ~ .catalog-heading { margin-top:var(--space-400); }
/* Cards one under another straight in a page (Users › Staff and Directory sync, SLA, Words, Second Administrator…)
   keep the page's 16 px between them, and a note under a card isn't drawn against its edge. Cards in a grid keep the
   grid's own gap. */
#settingsView .settings-frame-panel > :is(.panel, .nopt-cards, form) + :is(.panel, form) { margin-top:var(--space-200); }
#settingsView .settings-frame-panel .panel + p.wf-hint { margin-top:var(--space-150); }
#settingsView .settings-frame-panel .change-settings-grid > .change-settings-card:not(.change-blackout-card) { margin-bottom:var(--space-200); }
/* A card's own title, the first thing in it: one size on every page (Manage my team and Phone notifications drew
   theirs larger, with a wide gap under it). */
#settingsView .settings-frame-panel .panel > h2:first-child { margin:0 0 var(--space-50); font-size:var(--text-lg); line-height:var(--leading-tight); }
/* A field with its Add button beside it: the button as tall as the field. */
#settingsView .settings-frame-panel :is(.change-setting-composer, .resolution-code-add, .service-domain-composer) { align-items:center; }
#settingsView .settings-frame-panel :is(.change-setting-composer, .resolution-code-add, .service-domain-composer) > button { box-sizing:border-box; min-height:var(--control-height); padding-block:0; }
#settingsView .settings-frame-panel .service-domain-composer { flex-wrap:wrap; }
#settingsView .settings-frame-panel .service-domain-composer > input { flex:1 1 11rem; }
/* A row with a number and its unit (Ticket reopening, Merging, Sign-in rules): its words above, the field and its unit
   on the line under them, side by side. */
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> input[type="number"]) { display:grid; grid-template-columns:auto minmax(0, 1fr); grid-template-areas:'text text' 'value range'; align-items:center; gap:var(--space-75) var(--space-150); }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> input[type="number"]) > span { grid-area:text; }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> input[type="number"]) > input { grid-area:value; }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> input[type="number"]) > em { grid-area:range; color:var(--ink-2); font-size:var(--text-sm); font-style:normal; white-space:nowrap; }
/* The same with a dropdown (Ticket reopening's "Reopen rate counts reopens within [7] days"): its words above, the
   dropdown and its unit under them, as the number fields beside it are, not floated to the far right. */
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> .custom-select-wrapper, > select) { display:grid; grid-template-columns:auto minmax(0, 1fr); grid-template-areas:'text text' 'value range'; align-items:center; gap:var(--space-75) var(--space-150); }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> .custom-select-wrapper, > select) > span { grid-area:text; }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> .custom-select-wrapper, > select) > :is(.custom-select-wrapper, select) { grid-area:value; width:auto; min-width:6rem; }
#settingsView .settings-frame-panel .login-policy-card > label.login-policy-row:has(> .custom-select-wrapper, > select) > em { grid-area:range; color:var(--ink-2); font-size:var(--text-sm); font-style:normal; white-space:nowrap; }

/* Profile fields is a tab of Users: the button on the page that opened it gives way to the tab. */
#settingsView.settings-on-page #openPersonFieldsButton { display:none; }
/* A part a page hides is hidden, whatever display its own sheet gives it (a page opened read-only hides its buttons
   that change something: settings.js makeSettingsPanelReadOnly). */
#settingsView .settings-frame-panel [hidden] { display:none !important; }

/* One pattern for a row's own actions (GitHub issue 203, 1e: Edit and Delete were text links on Automations, small
   buttons on SLA policies, outline buttons on Custom fields, with Delete red on some pages and not on others): an
   outline button of the small height, and Delete in the danger color, on every settings page. */
#settingsView .settings-row-action, body.settings-frame-open .modal .settings-row-action { min-height:var(--control-height-sm); padding:0 var(--space-150); border-radius:var(--radius-md); font-size:var(--text-sm); }
#settingsView .settings-row-action.is-danger { color:var(--bad); }
#settingsView .settings-row-action.is-danger:hover:not(:disabled) { border-color:var(--bad); color:var(--bad); }

/* One look for "this page waits for something set up elsewhere" (settings-org.js settingsNoticeHtml; GitHub issue 203,
   1e): the warning colors, its words, and the way there on the same line, wrapping under them when there is no room. */
.settings-notice { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-200); margin:var(--space-150) 0; padding:var(--space-150) var(--space-200); border:var(--control-border-width) solid var(--saffron); border-radius:var(--radius-lg); background:var(--saffron-pale); color:var(--warn-ink); font-size:var(--text-sm); line-height:var(--leading-normal); }
.settings-notice > p { flex:1 1 18rem; min-width:0; margin:0; }
.settings-notice > ul { flex:1 1 100%; min-width:0; margin:0; padding-left:var(--space-300); }
.settings-notice > p b { color:inherit; }
.settings-notice > :is(button, a) { flex:none; }
.settings-notice.is-info { border-color:var(--line); background:var(--surface-2); color:var(--ink-2); }
/* Muted grey is too faint on the amber notice in dark mode: text inside a notice takes the notice's own color. */
#settingsView .settings-notice :is(p, .wf-hint, .ai-muted) { color:inherit; }
#settingsView .admin-mode-missing .wf-hint { color:var(--ink-2); }

/* A file to choose, on any settings page that shows the browser's own box (Import data): drawn as the app's own, a
   dashed box to drop it on with an outline button to choose it (GitHub issue 203, 1e: "Choose File / No file chosen"
   looked like no other control). */
#settingsView input[type="file"]:not([hidden]) { box-sizing:border-box; height:auto; width:100%; padding:var(--space-150); border:var(--control-border-width) dashed var(--control-border); border-radius:var(--radius-lg); background:var(--surface-2); color:var(--ink-2); font:inherit; font-size:var(--text-sm); cursor:pointer; }
#settingsView input[type="file"]:not([hidden]):hover { border-color:var(--control-hover); }
#settingsView input[type="file"]:not([hidden]):focus-visible { outline:0; border-color:var(--spruce); box-shadow:0 0 0 var(--focus-ring-width) var(--control-focus); }
#settingsView input[type="file"]::file-selector-button { min-height:var(--control-height-sm); margin:0 var(--space-150) 0 0; padding:0 var(--space-150); border:var(--control-border-width) solid var(--control-border); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font:inherit; font-weight:var(--weight-semibold); cursor:pointer; }
#settingsView input[type="file"]::file-selector-button:hover { border-color:var(--control-hover); background:var(--surface-2); }

/* The setup checklist is the organization's: on the Organization tab; the workspace's tab has a line that says where it
   is (settings-checklist.js; GitHub issue 203, 1e). Its "Hide this list" is a quiet action, not the card's loudest. */
#settingsView[data-settings-top="workspace"] #setupChecklistCard { display:none; }
#settingsView:not([data-settings-top="workspace"]) #setupChecklistLine { display:none; }
.settings-checklist-line { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-150); margin:0 0 var(--space-200); padding:var(--space-100) var(--space-200); border:var(--control-border-width) solid var(--line); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink-2); font-size:var(--text-sm); }
.settings-checklist-line p { margin:0; }
.settings-checklist-head .settings-checklist-hide { flex:none; min-height:var(--control-height-sm); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-medium); }

/* On a step's page, opened from a checklist: which step it is, and the way back and on (settings-checklist.js). */
.settings-checklist-flow { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-200); max-width:var(--settings-page-width); margin:0 0 var(--space-200); padding:var(--space-150) var(--space-200); border:var(--control-border-width) solid var(--spruce); border-radius:var(--radius-lg); background:var(--spruce-pale); color:var(--ink); }
.settings-checklist-flow p { display:flex; flex-direction:column; gap:var(--space-25); min-width:0; margin:0; font-size:var(--text-sm); }
.settings-checklist-flow-where { color:var(--ink-2); font-size:var(--text-xs); font-weight:var(--weight-semibold); letter-spacing:.04em; text-transform:uppercase; }
.settings-checklist-flow-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); }

/* The overview's groups flow down two columns where there is room, each card under the one before, so cards of
   different heights leave no holes (GitHub issue 203, 1e). The menu's order is kept, read down each column. */
@media (min-width:1260px), (min-width:960px) and (max-width:1099px) {
  .settings-overview-groups { display:block; column-count:2; column-gap:var(--space-200); }
  .settings-overview-groups > .settings-overview-group { display:block; margin:0 0 var(--space-200); break-inside:avoid; }
}
#settingsOverviewViewOnly { margin-left:var(--space-100); font-size:var(--text-xs); vertical-align:middle; }

/* A page's own state beside its title (settings-frame.js settingsFramePageChip), not at the far end of its help. */
.settings-page-chip:empty { display:none; }
.settings-page-chip { display:inline-flex; align-items:center; }
#settingsView.settings-on-page:not(.settings-on-sub-page) .settings-frame-panel > .catalog-heading > :is(.ai-pill, .sso-status, span:has(> .ai-pill), span:has(> .sso-status)) { display:none; }

/* ---------------------------------------------------------------------------------- What Administrators are asked */
/* Above the overview, on every tab, until it is done (the company's size: docs/adr/0154). */
.settings-admin-notices { display:grid; gap:var(--space-100); margin:0 0 var(--space-200); }
.settings-admin-notice { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-200); padding:var(--space-150) var(--space-200); border:var(--control-border-width) solid var(--line); border-left:4px solid var(--warn-ink); border-radius:var(--radius-lg); background:var(--surface); }
.settings-admin-notice > div { flex:1 1 18rem; min-width:0; }
.settings-admin-notice h2 { margin:0 0 var(--space-50); font-size:var(--text-md, 1rem); }
.settings-admin-notice p { margin:0; color:var(--ink-2); font-size:var(--text-sm); }
/* On a phone, a page's or card's title and help take the full width and its button (New macro, New target set,
   Open the portal…) goes under them, instead of squeezing the words into a narrow column beside it. */
@media (max-width:640px) {
  #settingsView .settings-frame-panel :is(.catalog-heading, .panel-heading) { flex-wrap:wrap; }
  #settingsView .settings-frame-panel :is(.catalog-heading, .panel-heading) > div:first-child { flex:1 1 100%; min-width:0; }
}
/* A long word in a page's help (a placeholder such as {ticket.field.desk_or_delivery_location}) breaks onto the next
   line instead of pushing the page wider than a phone's screen. */
#settingsView .settings-frame-panel :is(.catalog-heading, .page-heading) > div { min-width:0; }
#settingsView .settings-learn-more, #settingsView .settings-learn-more-body { min-width:0; max-width:100%; overflow-wrap:anywhere; }
/* API & webhooks › API reference on a phone: each endpoint's method and path on one line, what it does under them,
   instead of a desktop-wide table whose descriptions were off the screen. */
@media (max-width:640px) {
  #settingsView .api-reference .tableWrap { overflow-x:visible; }
  #settingsView .api-reference .tableWrap > table, #settingsView .api-reference .tableWrap > table > tbody { display:block; width:100%; }
  #settingsView .api-reference .tableWrap > table > tbody > tr { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:var(--space-50) var(--space-100); padding:var(--space-100) 0; border-bottom:1px solid var(--line); }
  #settingsView .api-reference .tableWrap > table > tbody > tr > td { display:block; padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
  #settingsView .api-reference .tableWrap > table > tbody > tr > td:nth-child(n+3) { grid-column:1 / -1; }
}
/* A count with nothing in it yet (SLA's "Targets for specific requests" before any set exists) isn't drawn as an
   empty pill. */
#settingsView .related-count:empty { display:none; }
/* A label written as one sentence around its field ("At least [90] %", "Warn when [80] % of the target is used",
   "At least a number of them [2]"): on one line as its page draws it, not stacked by the rule above that puts a
   label over its field (which left the unit alone on the next line). */
#settingsView .settings-frame-panel label:is(.sl-inline, .sl-target, .awf-inline, .sch-inline):not(#settings-inline-label) { flex-direction:row; flex-wrap:wrap; align-items:center; }
/* What's typed in a field reads in regular weight, never the bold of the label it sits in (Survey settings, Impact
   and urgency levels, Import's "Name of the old system" drew their values bold). */
#settingsView .settings-frame-panel :is(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"]), select, textarea) { font-weight:var(--weight-regular); }
/* A label's line of help reads like help everywhere else: regular weight, not the label's bold. */
#settingsView .settings-frame-panel label > :is(small, .wf-hint, .field-note) { font-weight:var(--weight-regular); }
/* The groups of choices that still had the browser's square grooved box (Manage my team, Phone notifications, Ticket
   page, a role's portal preview): the rounded box Single sign-on's groups use. */
#settingsView .settings-frame-panel fieldset:is(.team-who, .ts-help-sections, .role-preview-portal-groups) { display:grid; gap:var(--space-100); min-width:0; margin:var(--space-150) 0 0; padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); }
#settingsView .settings-frame-panel fieldset:is(.team-who, .ts-help-sections, .role-preview-portal-groups) > legend { padding:0 var(--space-75); color:var(--ink-2); font-size:var(--text-sm); font-weight:700; }
#settingsView .settings-frame-panel fieldset:is(.team-who, .ts-help-sections, .role-preview-portal-groups) > :is(button, a) { justify-self:start; }
/* What follows an open "Learn more" box (a paragraph, a link, a card) starts a little below it, not on its edge. */
#settingsView .settings-frame-panel .settings-learn-more[open] + :is(p, a, div, .panel, ol, ul) { margin-top:var(--space-150); }
/* On a phone, where a list row's buttons wrap under its field (Fishbone headings, Scheduler's types and positions,
   resolution codes), a line between rows shows which buttons belong to which field. */
@media (max-width:640px) {
  #settingsView .settings-frame-panel .resolution-code-list:not(.ci-status-list) > .resolution-code-row + .resolution-code-row { padding-top:var(--space-100); border-top:1px solid var(--line); }
}
/* On a phone, a button with a long name ("Open Single sign-on › Accounts & leavers") wraps inside its card instead of
   running past the card's edge. */
@media (max-width:640px) {
  #settingsView .settings-frame-panel :is(.outline-button, .save-button, .create-button) { max-width:100%; white-space:normal; text-align:center; }
}
/* A text box of several lines is as tall as what's in it (never cutting a line in half), between about three lines
   and about fifteen. Browsers without field-sizing keep the box's own rows. */
@supports (field-sizing: content) {
  #settingsView .settings-frame-panel textarea { field-sizing:content; min-height:5rem; max-height:24rem; }
}
/* A label laid out as a grid (its words, its field, its line of help) keeps them together at the top when the row
   beside it is taller, instead of spreading the extra room between them (Directory sync's "How often" sat 12 px
   lower than "Domains" beside it). */
#settingsView .settings-frame-panel label { align-content:start; }
