/* Segmented control and tabs (static form; arrow-key movement is js/prism/seg.js
   and tabs.js). Segmented: a radiogroup of buttons, the selected one tinted 15%
   with accent border and text, brand blue outside department pages.
   Tabs: a tablist (in-page panels) or a nav of links (section tab row);
   the active tab has a 2px brand underline. On a phone tabs scroll sideways. */

.pr-seg {
  --seg-acc: var(--pr-brand-text);
  --seg-acc-text: var(--pr-brand-text);
  display: inline-flex; gap: 2px; padding: 2px;
  border-radius: var(--pr-radius-sm);
  background: var(--pr-surface-nested);
  border: var(--pr-border-hairline) solid var(--pr-border-default);
}
/* On a department page the accent tints the segmented control (never a button). */
.pr-seg--dept { --seg-acc: var(--acc); --seg-acc-text: var(--acc-text); }
.pr-seg__b {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--pr-density-dense-control); padding: 0 var(--pr-space-md);
  border-radius: var(--pr-radius-xs);
  border: var(--pr-border-hairline) solid transparent;
  font-size: 0.85rem; font-weight: 500; line-height: 1;
  color: var(--pr-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--pr-dur-fast) var(--pr-ease-standard);
}
.pr-seg__b:hover, .pr-seg__b.is-hover { color: var(--pr-text-primary); background: var(--pr-surface-hover); }
.pr-seg__b[aria-checked="true"], .pr-seg__b.is-on {
  background: color-mix(in srgb, var(--seg-acc) 15%, transparent);
  border-color: var(--seg-acc);
  color: var(--seg-acc-text);
}
.pr-seg__b:focus-visible, .pr-seg__b.is-focus { outline: var(--pr-border-focus) solid var(--pr-focus-ring); outline-offset: var(--pr-border-focus); }
.pr-seg__b[disabled], .pr-seg__b[aria-disabled="true"] { color: var(--pr-text-disabled); cursor: not-allowed; background: none; }
.pr-seg__note { font-size: 0.75rem; line-height: 1.4; color: var(--pr-text-caption); }

.pr-tabs {
  display: flex; gap: var(--pr-space-xs);
  border-bottom: var(--pr-border-hairline) solid var(--pr-border-default);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
.pr-tabs__i {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--pr-density-standard-control); padding: 0 var(--pr-space-md);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 0.85rem; font-weight: 500;
  color: var(--pr-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.pr-tabs__i:hover, .pr-tabs__i.is-hover { color: var(--pr-text-primary); }
.pr-tabs__i[aria-selected="true"], .pr-tabs__i[aria-current="page"], .pr-tabs__i.is-active {
  color: var(--pr-text-primary);
  border-bottom-color: var(--pr-brand-text);
}
.pr-tabs__i:focus-visible, .pr-tabs__i.is-focus { outline: var(--pr-border-focus) solid var(--pr-focus-ring); outline-offset: calc(var(--pr-border-focus) * -1); }
.pr-tabs__panel:focus-visible { outline: var(--pr-border-focus) solid var(--pr-focus-ring); outline-offset: var(--pr-border-focus); }

@media (max-width: 768px) {
  .pr-seg { display: flex; flex: 1 1 100%; }
  .pr-seg__b { flex: 1; height: var(--pr-touch-target); }
  .pr-tabs__i { height: var(--pr-touch-target); }
}
