/* Phase 46 (docs/PHASE46_COURSES_RECOVERY_MULTITENANCY_PROMPT.md): Course Catalogue, offerings, Academic Recovery,
   early warning, Institutions, My Institution, the Automation Centre and Settings & Preferences. Navy & gold, both
   themes, phone first. */

.p46-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.p46-loading { margin: 0; padding: 28px 4px; color: var(--muted); font-weight: 600; }
.p46-muted { color: var(--muted); }
.p46-lead { margin: 0; color: var(--muted); line-height: 1.6; }
.p46-pad { padding: 2px 0; }

/* Ghost buttons on light surfaces (the portal default is drawn for dark bars); the hero keeps its own below. */
.p46-wrap .ghost-button, .p46-modal .ghost-button { color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.p46-wrap .ghost-button:hover, .p46-modal .ghost-button:hover { border-color: var(--gold); }

/* ------------------------------------------------------------ hero */
.p46-hero {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 22px 24px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tenant-accent, var(--gold)) 34%, transparent) 0%, transparent 46%), linear-gradient(135deg, var(--tenant-primary, var(--navy-900)), var(--navy-950));
  box-shadow: var(--shadow);
}
.p46-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .05); pointer-events: none; }
.p46-hero h2 { margin: 4px 0 6px; font-family: var(--heading-font); font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; color: #fff; }
.p46-hero p { margin: 0; max-width: 64ch; color: rgba(255, 255, 255, .78); line-height: 1.55; }
.p46-hero .eyebrow { color: var(--tenant-accent, var(--gold)); }
.p46-hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.p46-hero .ghost-button { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.p46-hero .ghost-button:hover { border-color: var(--gold); }

/* ------------------------------------------------------------ tiles, tabs, chips, badges */
.p46-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.p46-tile { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; background: var(--paper); }
.p46-tile span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.p46-tile strong { font-family: var(--heading-font); font-size: 26px; line-height: 1.15; color: var(--ink); }
.p46-tile small { color: var(--muted); font-size: 11.5px; }
.p46-tile.p46-navy { border-left-color: var(--navy-800); }
.p46-tile.p46-gold { border-left-color: var(--gold); }
.p46-tile.p46-green { border-left-color: var(--green); }
.p46-tile.p46-red { border-left-color: var(--red); }
.p46-tile.p46-purple { border-left-color: #6b4fbb; }

.p46-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.p46-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 700 13.5px/1 inherit; font-family: inherit; cursor: pointer; }
.p46-tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.p46-count { min-width: 22px; padding: 3px 7px; border-radius: 999px; background: var(--navy-100); color: var(--navy-900); font-size: 11px; text-align: center; }
:root[data-theme="dark"] .p46-count { color: var(--ink); }

.p46-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.p46-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); }
.p46-search:focus-within { border-color: var(--gold); }
.p46-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.p46-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p46-chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font: 700 12.5px/1 inherit; font-family: inherit; cursor: pointer; transition: all .15s ease; }
.p46-chip:hover { border-color: var(--gold); color: var(--ink); }
.p46-chip.on { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
:root[data-theme="dark"] .p46-chip.on { border-color: var(--gold); background: var(--gold); color: var(--navy-950); }

.p46-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.p46-badge.p46-navy { background: var(--navy-100); color: var(--navy-900); }
.p46-badge.p46-gold { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold-text); }
.p46-badge.p46-green { background: var(--green-soft); color: var(--green); }
.p46-badge.p46-red { background: var(--red-soft); color: var(--red); }
.p46-badge.p46-purple { background: color-mix(in srgb, #6b4fbb 16%, transparent); color: #6b4fbb; }
.p46-badge.p46-grey { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
:root[data-theme="dark"] .p46-badge.p46-navy { color: var(--ink); }
:root[data-theme="dark"] .p46-badge.p46-purple { color: #b9a6f2; }

.p46-link { padding: 4px 2px; border: 0; background: none; color: var(--navy-800); font: 700 12.5px/1.3 inherit; font-family: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent); text-underline-offset: 3px; }
:root[data-theme="dark"] .p46-link { color: var(--ink); }
.p46-link.danger { color: var(--red); }
.danger-button { padding: 10px 18px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; }

.p46-empty { display: grid; justify-items: center; gap: 6px; padding: 38px 16px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; color: var(--muted); }
.p46-empty span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-text); font-size: 22px; font-weight: 800; }
.p46-empty strong { color: var(--ink); font-size: 15px; }
.p46-empty p { margin: 0; max-width: 46ch; }

@keyframes p46-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.p46-wrap [data-i] { animation: p46-rise .34s ease both; animation-delay: calc(var(--i, 0) * 35ms); }

/* ------------------------------------------------------------ course cards */
.p46-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.p46-course { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.p46-course:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); box-shadow: var(--shadow); }
.p46-course.archived { opacity: .72; }
.p46-course header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p46-course h3 { margin: 0; font-family: var(--heading-font); font-size: 16px; line-height: 1.3; }
.p46-course p { margin: 0; font-size: 12.5px; }
.p46-desc { color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p46-code { display: inline-block; padding: 3px 8px; border-radius: 7px; background: var(--navy-900); color: var(--gold); font: 800 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.p46-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.p46-facts div { min-width: 0; }
.p46-facts dt { color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.p46-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.p46-prereq span { color: var(--muted); font-weight: 700; }
.p46-prereq b { display: inline-block; margin: 2px 3px 0 0; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; }
.p46-course footer { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 8px; }

/* ------------------------------------------------------------ rows (offerings, cases) */
.p46-protocol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); font-size: 13px; }
.p46-protocol > strong { margin-right: 4px; }
.p46-protocol small { flex-basis: 100%; color: var(--muted); }
.p46-step { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.p46-step b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-900); color: var(--gold); font-size: 11px; }
.p46-protocol i { color: var(--muted); font-style: normal; }
.p46-list { display: grid; gap: 10px; }
.p46-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.p46-row-main { display: grid; gap: 6px; min-width: 0; }
.p46-row-main p { margin: 0; font-size: 13px; }
.p46-row-title { font-weight: 800; font-size: 14.5px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.p46-arrow { color: var(--gold-text); }
.p46-note { padding: 7px 10px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--gold) 8%, transparent); }
.p46-next { font-weight: 700; color: var(--ink); }
.p46-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.p46-big { display: grid; justify-items: end; font-family: var(--heading-font); font-size: 22px; font-weight: 800; line-height: 1; }
.p46-big small { font-family: inherit; font-size: 11px; color: var(--muted); font-weight: 700; }
.p46-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.p46-row-actions .primary-button, .p46-row-actions .ghost-button { padding: 8px 12px; font-size: 12.5px; }
.p46-held { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--red-soft); font-size: 12.5px; }
.p46-held strong { color: var(--red); }

.p46-stepper { display: flex; flex-wrap: wrap; gap: 0; margin: 4px 0; padding: 0; list-style: none; counter-reset: step; }
.p46-stepper li { position: relative; flex: 1 1 0; min-width: 64px; padding: 20px 4px 0; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.p46-stepper li::before { content: ''; position: absolute; top: 5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); z-index: 1; }
.p46-stepper li::after { content: ''; position: absolute; top: 10px; left: calc(-50% + 6px); right: calc(50% + 6px); height: 2px; background: var(--line); }
.p46-stepper li:first-child::after { display: none; }
.p46-stepper li.done { color: var(--green); }
.p46-stepper li.done::before { border-color: var(--green); background: var(--green); }
.p46-stepper li.done::after, .p46-stepper li.now::after { background: var(--green); }
.p46-stepper li.now { color: var(--ink); }
.p46-stepper li.now::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.p46-stepper li.alert::before { border-color: var(--red); background: var(--red); }

.p46-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.p46-table th { padding: 10px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.p46-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p46-flag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--red) 9%, transparent); color: var(--ink); font-size: 11.5px; }
.p46-protocol-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.6; }
.p46-policy { display: grid; gap: 12px; padding: 4px 2px; }

/* ------------------------------------------------------------ institutions */
.p46-tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.p46-tenant { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-top: 5px solid var(--tenant-primary, var(--navy-900)); border-radius: 16px; background: var(--paper); }
.p46-tenant header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.p46-tenant h3 { margin: 0; font-family: var(--heading-font); font-size: 16px; }
.p46-tenant p { margin: 0; font-size: 12.5px; }
.p46-tenant-mark { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 8px; border-radius: 14px; background: var(--tenant-primary, var(--navy-900)); color: var(--tenant-accent, var(--gold)); font: 900 15px/1 var(--heading-font); letter-spacing: .04em; }
.p46-tenant footer { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.p46-module-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.p46-module-chips span { padding: 3px 9px; border-radius: 999px; background: var(--navy-100); color: var(--navy-900); font-size: 11px; font-weight: 700; }
:root[data-theme="dark"] .p46-module-chips span { color: var(--ink); }
.p46-module-chips.big span { padding: 6px 12px; font-size: 12.5px; }
.p46-module-chips span.off { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.p46-brand-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--tenant-primary, var(--navy-900)), var(--navy-950)); color: #fff; }
.p46-brand-preview div { display: grid; flex: 1; min-width: 160px; }
.p46-brand-preview small { color: rgba(255, 255, 255, .7); }
.p46-brand-preview code { padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .12); color: var(--tenant-accent, var(--gold)); }
.p46-credentials { display: grid; gap: 10px; margin: 12px 0 0; }
.p46-credentials dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.p46-credentials dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.p46-secret { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--navy-900); color: var(--gold); font-size: 16px; letter-spacing: .06em; user-select: all; }

/* ------------------------------------------------------------ automation */
.p46-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.p46-rule { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); transition: opacity .2s ease; }
.p46-rule.off { opacity: .62; }
.p46-rule header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.p46-rule h3 { margin: 0; font-size: 15px; }
.p46-rule p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.p46-rule footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.p46-rule footer small { flex: 1 1 160px; color: var(--muted); }
.p46-rule-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--navy-900); color: var(--gold); font-weight: 800; }

/* ------------------------------------------------------------ switches & segmented control */
.p46-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.p46-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p46-switch-ui { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: background .18s ease; }
.p46-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s ease; }
.p46-switch input:checked + .p46-switch-ui { background: var(--navy-900); }
.p46-switch input:checked + .p46-switch-ui::after { transform: translateX(18px); background: var(--gold); }
.p46-switch input:focus-visible + .p46-switch-ui { outline: 3px solid var(--gold); outline-offset: 2px; }
:root[data-theme="dark"] .p46-switch input:checked + .p46-switch-ui { background: var(--gold); }
:root[data-theme="dark"] .p46-switch input:checked + .p46-switch-ui::after { background: var(--navy-950); }
.p46-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.p46-switches .p46-switch { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; }

.p46-segment { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); }
.p46-segment button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 12.5px/1 inherit; font-family: inherit; cursor: pointer; }
.p46-segment button.on { background: var(--navy-900); color: #fff; box-shadow: 0 2px 6px rgba(3, 27, 44, .2); }
:root[data-theme="dark"] .p46-segment button.on { background: var(--gold); color: var(--navy-950); }

/* ------------------------------------------------------------ settings & preferences */
.p46-storage-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.p46-store { display: flex; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.p46-store > span { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; font-size: 20px; }
.p46-store.account > span { background: var(--navy-900); color: var(--gold); }
.p46-store.device > span { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold-text); }
.p46-store p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.p46-section { margin: 6px 0 -4px; color: var(--gold-text); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.p46-section small { margin-left: 8px; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.p46-settings { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.p46-setting { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.p46-setting:last-child { border-bottom: 0; }
.p46-setting.absent { opacity: .6; }
.p46-setting > div:first-child { display: grid; gap: 2px; min-width: 0; }
.p46-setting small { color: var(--muted); font-size: 12px; }
.p46-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.p46-where code { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.p46-where-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.p46-where-chip.account { background: var(--navy-100); color: var(--navy-900); }
.p46-where-chip.device { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-text); }
:root[data-theme="dark"] .p46-where-chip.account { color: var(--ink); }
.p46-control { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------ dialogs & forms */
.p46-modal { width: min(560px, calc(100vw - 24px)); }
.p46-modal.wide { width: min(780px, calc(100vw - 24px)); }
.p46-form { display: grid; gap: 14px; }
.p46-form-body { display: grid; gap: 12px; max-height: min(64vh, 640px); overflow-y: auto; padding-right: 4px; }
.p46-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ink); min-width: 0; }
.p46-form input:not([type=checkbox]):not([type=radio]):not([type=color]), .p46-form select, .p46-form textarea {
  width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); font: 500 14px/1.4 inherit; font-family: inherit;
}
.p46-form input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.p46-form textarea { resize: vertical; }
.p46-form input:focus, .p46-form select:focus, .p46-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.p46-form small { color: var(--muted); font-weight: 500; }
.p46-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.p46-grid2 .span2 { grid-column: 1 / -1; }
.p46-inline { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; }
.p46-checks, .p46-radio { display: grid; gap: 6px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; max-height: 220px; overflow-y: auto; }
.p46-checks legend, .p46-radio legend { padding: 0 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.p46-checks label, .p46-radio label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.p46-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.p46-form-error { margin: 0; color: var(--red); font-weight: 700; }

/* ------------------------------------------------------------ institution branding in the shell */
:root[data-tenant] .sidebar { background: linear-gradient(180deg, var(--tenant-primary, var(--navy-950)), var(--navy-950)); }
:root[data-tenant] .nav-item.active { box-shadow: inset 3px 0 0 var(--tenant-accent, var(--gold)); }

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  .p46-hero { padding: 18px; }
  .p46-row { grid-template-columns: minmax(0, 1fr); }
  .p46-row-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .p46-big { justify-items: start; }
  .p46-setting { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .p46-control { justify-content: flex-start; }
  .p46-grid2 { grid-template-columns: minmax(0, 1fr); }
  .p46-stepper li { min-width: 52px; font-size: 10px; }
  .p46-table { font-size: 12px; }
}
:root[data-motion="reduce"] .p46-wrap [data-i] { animation: none; }
