:root {
  --ink: #122532;
  --muted: #61717d;
  --line: #dfe6e8;
  --canvas: #f4f6f5;
  --paper: #ffffff;
  --navy: #112f43;
  --navy-soft: #1c445c;
  --gold: #c58a46;
  --green: #19735a;
  --red: #a33b3b;
  --shadow: 0 18px 50px rgba(19, 39, 52, 0.08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: var(--tenant-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--tenant-accent) 65%, white); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { color: var(--ink); }
h1 { margin-bottom: 8px; font-family: "Newsreader", Georgia, serif; font-size: clamp(2.15rem, 4vw, 3.35rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { margin-bottom: 8px; font-family: "Newsreader", Georgia, serif; font-size: 1.65rem; line-height: 1.1; }
p { color: var(--muted); line-height: 1.65; }
small { display: block; color: var(--muted); font-size: .76rem; }

.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; transform: translateY(-160%); background: white; border-radius: 8px; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--tenant-primary); font-size: .69rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #d9b381; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em; }

/* Public and sign-in */
.public-shell { background: #e9efef; }
.public-content { min-height: 100vh; }
.login-layout { display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr); min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(42px, 6vw, 88px); color: white; background: linear-gradient(145deg, #0f2d40 0%, #173f55 58%, #265b67 100%); }
.login-story::before { position: absolute; content: ""; width: 520px; height: 520px; right: -210px; bottom: -230px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.login-story::after { position: absolute; content: "Q"; right: 6%; bottom: -7%; color: rgba(255,255,255,.035); font-family: "Newsreader", serif; font-size: 29rem; line-height: 1; }
.login-story > * { position: relative; z-index: 1; }
.login-story h1 { max-width: 700px; color: white; font-size: clamp(3.2rem, 6vw, 6rem); }
.login-story p { max-width: 570px; margin-top: 24px; color: #d8e4e8; font-size: 1.07rem; }
.master-brand { display: flex; align-items: center; gap: 12px; }
.master-brand strong { display: block; color: inherit; font-family: "Newsreader", Georgia, serif; font-size: 1.42rem; line-height: 1; }
.master-brand small { margin-top: 3px; color: inherit; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.master-brand.large strong { font-size: 1.7rem; }
.qualence-mark { display: grid; width: 41px; height: 41px; place-items: center; border: 1px solid var(--tenant-accent); border-radius: 12px 12px 4px 12px; color: var(--tenant-accent); font-family: "Newsreader", Georgia, serif; font-size: 1.45rem; }
.domain-link { color: #d8e4e8; font-size: .78rem; letter-spacing: .05em; }
.login-panel { display: flex; width: min(520px, calc(100% - 64px)); margin: auto; flex-direction: column; gap: 28px; padding: 46px; background: var(--paper); border: 1px solid rgba(20,54,70,.07); border-radius: 24px; box-shadow: var(--shadow); }
.login-panel h2 { margin-bottom: 6px; font-size: 2.2rem; }
.login-panel > div > p { margin: 0; }
.login-tenant { display: flex; align-items: center; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.login-tenant h2 { margin: 0; }
.login-tenant p { margin: 2px 0 0; }
.tenant-monogram { display: grid; min-width: 44px; height: 44px; padding: 0 6px; place-items: center; color: white; background: var(--tenant-primary); border-radius: 12px 12px 4px 12px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.tenant-monogram.large { min-width: 64px; height: 64px; font-size: .9rem; }
.tenant-logo { display: grid; width: 50px; height: 44px; padding: 5px; flex: 0 0 auto; place-items: center; background: white; border: 1px solid rgba(18,37,50,.1); border-radius: 10px; }
.tenant-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.tenant-logo.large { width: 76px; height: 68px; }
.stacked-form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: #2d414e; font-size: .82rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: 13px 14px; color: var(--ink); background: #fbfcfc; border: 1px solid #ccd7db; border-radius: 10px; transition: border .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #9caeb6; }
input:focus, select:focus, textarea:focus { border-color: var(--tenant-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tenant-primary) 11%, transparent); outline: none; }
textarea { resize: vertical; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; min-height: 43px; padding: 11px 17px; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; font-size: .83rem; cursor: pointer; }
.primary-button { color: white; background: var(--tenant-primary); border: 1px solid var(--tenant-primary); box-shadow: 0 7px 18px color-mix(in srgb, var(--tenant-primary) 18%, transparent); }
.primary-button:hover { color: white; filter: brightness(1.1); text-decoration: none; }
.secondary-button { color: var(--ink); background: white; border: 1px solid #cad5d8; }
.secondary-button:hover { background: #f7f9f9; text-decoration: none; }
.danger-button { color: white; background: var(--red); border: 1px solid var(--red); }
.danger-button:hover { filter: brightness(1.08); }
.full { width: 100%; }
.demo-access { padding: 15px 18px; background: #f4f7f6; border-radius: 12px; color: var(--muted); font-size: .78rem; }
.demo-access summary { color: var(--ink); font-weight: 700; cursor: pointer; }
.demo-access p { margin: 12px 0 0; font-size: .78rem; line-height: 1.45; }
.privacy-note { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: .72rem; }
.choice-card { width: min(660px, calc(100% - 40px)); margin: 7vh auto; padding: 48px; background: white; border-radius: 24px; box-shadow: var(--shadow); text-align: center; }
.master-brand.centered { justify-content: center; margin-bottom: 45px; }
.organisation-choices { display: grid; gap: 12px; margin-top: 28px; }
.organisation-choice { display: grid; width: 100%; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); text-align: left; cursor: pointer; }
.organisation-choice:hover { border-color: var(--tenant-accent); background: #fcfaf7; }

/* Authenticated app shell */
.app-shell { display: grid; grid-template-columns: 255px minmax(0, 1fr); grid-template-rows: 75px minmax(calc(100vh - 75px), auto); }
.sidebar { position: fixed; z-index: 10; display: flex; width: 255px; height: 100vh; padding: 27px 18px 22px; flex-direction: column; color: white; background: var(--navy); }
.sidebar .master-brand { padding: 0 10px 25px; }
.sidebar .qualence-mark { width: 38px; height: 38px; }
.tenant-card { display: flex; gap: 11px; align-items: center; margin: 2px 0 22px; padding: 13px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 13px; }
.tenant-card strong { display: block; overflow: hidden; max-width: 145px; color: white; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.tenant-card small { margin-top: 3px; color: #aebfc8; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; gap: 12px; align-items: center; padding: 11px 13px; color: #c7d5db; border-radius: 9px; font-size: .83rem; font-weight: 500; }
.sidebar nav a > span { width: 17px; color: #99b0bb; text-align: center; font-size: 1rem; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { color: white; background: var(--navy-soft); font-weight: 700; }
.sidebar nav a.active > span { color: var(--tenant-accent); }
.sidebar-footer { display: grid; gap: 10px; margin-top: auto; padding: 12px; }
.sidebar-footer a { color: #94abb6; font-size: .67rem; }
.environment-pill { width: max-content; padding: 5px 8px; color: #dcb985; background: rgba(197,138,70,.13); border: 1px solid rgba(197,138,70,.25); border-radius: 999px; font-size: .61rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.topbar { position: sticky; z-index: 8; top: 0; grid-column: 2; display: flex; padding: 0 36px; align-items: center; justify-content: space-between; background: rgba(255,255,255,.91); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar > div:first-child > strong { font-size: .86rem; }
.topbar .eyebrow { margin-bottom: 2px; font-size: .58rem; }
.user-menu { display: flex; align-items: center; gap: 9px; }
.user-menu strong { display: block; font-size: .77rem; }
.user-menu form { margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.link-button { padding: 5px; color: var(--muted); background: none; border: 0; font-size: .73rem; cursor: pointer; }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; color: white; background: var(--tenant-primary); border-radius: 50%; font-weight: 700; }
.avatar.small { width: 34px; height: 34px; font-size: .78rem; }
.avatar.hero { width: 72px; height: 72px; margin-bottom: 25px; font-family: "Newsreader", serif; font-size: 2rem; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.content { grid-column: 2; padding: 42px clamp(28px, 4vw, 62px) 70px; }
.content > * { width: min(1300px, 100%); margin-right: auto; margin-left: auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 29px; }
.page-heading.compact { align-items: start; }
.page-heading p { margin: 0; }
.back-link { display: block; margin-bottom: 24px; color: var(--muted); font-size: .77rem; font-weight: 600; }

/* Common surfaces */
.panel { padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 18px rgba(21,44,56,.025); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; }
.panel-heading > a { font-size: .76rem; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card { display: grid; min-height: 150px; grid-template-columns: auto 1fr; gap: 16px; padding: 23px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.metric-icon { display: grid; width: 39px; height: 39px; place-items: center; color: var(--tenant-primary); background: color-mix(in srgb, var(--tenant-primary) 8%, white); border-radius: 11px; }
.metric-card div strong { display: block; font-family: "Newsreader", serif; font-size: 2.25rem; line-height: 1; }
.metric-card div span { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.metric-card > a, .card-foot { grid-column: 2; align-self: end; color: var(--tenant-primary); font-size: .72rem; font-weight: 700; }
.metric-card.integrity { color: white; background: var(--tenant-primary); border-color: var(--tenant-primary); }
.metric-card.integrity .metric-icon { color: white; background: rgba(255,255,255,.14); }
.metric-card.integrity div strong, .metric-card.integrity div span, .metric-card.integrity .card-foot { color: white; }
.metric-card.integrity div span, .metric-card.integrity .card-foot { opacity: .75; }
.panel-grid { display: grid; grid-template-columns: 1.6fr .8fr; gap: 18px; }
.assurance-panel { color: white; background: linear-gradient(145deg, var(--navy), #24566a); border: 0; }
.assurance-panel h2 { color: white; }
.assurance-panel p { color: #c7d8df; }
.light-link { color: #e1bd88; font-size: .77rem; font-weight: 700; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-top: 1px solid #edf1f2; }
.activity-row:first-child { border-top: 0; }
.activity-dot { width: 8px; height: 8px; background: var(--tenant-accent); border-radius: 50%; }
.activity-row strong, .activity-row span { display: block; font-size: .74rem; }
.activity-row div span { margin-top: 3px; color: var(--muted); }
.activity-row time { color: var(--muted); font-size: .68rem; }
.alert { margin-bottom: 22px; padding: 13px 16px; border: 1px solid; border-radius: 11px; font-size: .8rem; }
.alert.success { color: #126248; background: #eaf7f2; border-color: #b9e0d2; }
.alert.error { color: #8a2e2e; background: #fff1f1; border-color: #efc3c3; }
.alert.warning { color: #75531d; background: #fff7e8; border-color: #ead2a7; }
.empty-state { padding: 25px; color: var(--muted); font-size: .8rem; text-align: center; }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: .61rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.status-pill.active { color: #14604b; background: #e5f4ef; }
.status-pill.pending { color: #75531d; background: #f8ecd8; }
.count-pill { display: inline-flex; padding: 7px 10px; color: var(--muted); background: #f1f5f4; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.muted-text { color: var(--muted); font-size: .72rem; }
.heading-actions { display: flex; gap: 12px; align-items: center; }

/* Tables and registers */
.table-panel { padding: 0; overflow: hidden; }
.search-bar, .filter-bar { display: flex; gap: 10px; align-items: end; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.search-bar > input { min-width: 330px; }
.search-bar a, .filter-bar > a { padding: 12px; font-size: .74rem; }
.archive-toggle { min-width: 105px; color: var(--tenant-primary); font-weight: 700; text-align: center; white-space: nowrap; }
.compact-checkbox { display: flex; width: max-content; grid-template-columns: auto 1fr; gap: 7px; align-items: center; padding: 0 8px; white-space: nowrap; }
.compact-checkbox input { width: auto; }
.filter-bar { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto; }
.filter-bar label { font-size: .69rem; }
.filter-bar select { padding: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 20px; color: #70808a; background: #f7f9f9; font-size: .62rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { padding: 16px 20px; border-top: 1px solid #edf1f2; color: #41525d; font-size: .76rem; }
td small { margin-top: 3px; }
tbody tr:hover { background: #fbfcfc; }
.record-link { display: flex; gap: 11px; align-items: center; color: var(--ink); }
.record-link strong, .subtle-strong { display: block; font-size: .78rem; }
.record-link:hover { text-decoration: none; }
.arrow-link { color: var(--tenant-primary); font-size: 1.1rem; }

/* Student record and form */
.detail-grid { display: grid; grid-template-columns: 1.5fr .7fr; gap: 18px; margin-bottom: 18px; }
.details-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.details-list div { padding: 15px 5px; border-top: 1px solid #edf1f2; }
.details-list dt { color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.details-list dd { margin: 6px 0 0; color: var(--ink); font-size: .82rem; }
.identity-card { display: flex; flex-direction: column; justify-content: center; background: #eef3f3; }
.identity-card > strong { font-size: 1.35rem; }
.identity-card p { margin: 13px 0 0; font-size: .77rem; }
.history-panel { padding: 29px; }
.timeline { margin-left: 9px; }
.timeline-event { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding-bottom: 27px; }
.timeline-event:not(:last-child)::before { position: absolute; content: ""; top: 12px; bottom: 0; left: 5px; width: 1px; background: #d8e2e4; }
.timeline-marker { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; background: white; border: 3px solid var(--tenant-accent); border-radius: 50%; }
.event-heading { display: flex; gap: 20px; align-items: start; justify-content: space-between; }
.event-heading strong, .event-heading span { display: block; }
.event-heading strong { font-size: .78rem; }
.event-heading span, .event-heading time { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.event-reason { margin: 10px 0; font-size: .77rem; }
.change-list { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.change-list > div { display: grid; grid-template-columns: minmax(120px, .8fr) 1fr auto 1fr; gap: 11px; padding: 10px 13px; border-top: 1px solid var(--line); font-size: .72rem; }
.change-list > div:first-child { border-top: 0; }
.change-list > div > span:first-child { font-weight: 700; }
.change-list del { color: #8b5b5b; }
.change-list ins { color: #17684f; text-decoration: none; }
.record-form { display: grid; gap: 16px; }
.form-section { display: grid; grid-template-columns: minmax(210px, .55fr) 1fr; gap: clamp(30px, 6vw, 85px); padding: 31px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.form-section h2 { margin: 8px 0; }
.form-section > div:first-child p { max-width: 300px; margin: 0; font-size: .77rem; }
.section-number { display: grid; width: 31px; height: 31px; place-items: center; color: var(--tenant-primary); background: color-mix(in srgb, var(--tenant-primary) 8%, white); border-radius: 8px; font-size: .65rem; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.full-field, .form-divider { grid-column: 1 / -1; }
.form-divider { display: flex; align-items: center; gap: 10px; color: #8b999f; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.form-divider::before, .form-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.form-grid label small { margin-top: -2px; }
.optional { color: var(--muted); font-size: .65rem; font-weight: 400; }
.audit-reason { background: #f9faf9; }
.form-actions { display: flex; gap: 11px; justify-content: end; padding-top: 8px; }
.workspace-panel { display: grid; grid-template-columns: minmax(240px, .65fr) 1fr; gap: 45px; align-items: center; }
.workspace-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.workspace-links a { display: grid; gap: 7px; padding: 18px; color: var(--ink); background: #f7f9f9; border: 1px solid var(--line); border-radius: 12px; }
.workspace-links a:hover { border-color: var(--tenant-accent); text-decoration: none; }
.workspace-links strong { font-size: .82rem; }
.workspace-links span { color: var(--muted); font-size: .7rem; }
.profile-panel { display: grid; grid-template-columns: minmax(220px, .65fr) 1fr; gap: 45px; align-items: center; }
.profile-panel .avatar.hero { margin-bottom: 14px; }
.profile-panel form { display: grid; gap: 18px; }
.profile-panel form button { width: max-content; }
.duplicate-warning, .invitation-result { display: grid; grid-template-columns: auto 1fr; gap: 15px; margin-bottom: 18px; padding: 18px; color: #73521f; background: #fff7e8; border: 1px solid #ead2a7; border-radius: 14px; }
.duplicate-warning > span, .invitation-result > span { display: grid; width: 30px; height: 30px; place-items: center; color: white; background: #b47726; border-radius: 50%; font-weight: 800; }
.duplicate-warning p, .invitation-result p { margin: 3px 0 10px; color: inherit; font-size: .76rem; }
.duplicate-warning a { display: flex; gap: 20px; justify-content: space-between; padding: 9px 0; border-top: 1px solid rgba(115,82,31,.18); font-size: .75rem; }
.duplicate-warning a small { text-align: right; }
.sensitive-section { background: #f4f1eb; border-color: #dfd3c2; }
.record-tabs { display: flex; gap: 6px; margin-top: -13px; margin-bottom: 18px; overflow-x: auto; }
.record-tabs a { padding: 8px 11px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 999px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.information-panel, .notes-panel, .status-control { margin-bottom: 18px; }
.three-columns { grid-template-columns: repeat(3, 1fr); }
.sensitive-card { display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; margin-bottom: 18px; color: white; background: linear-gradient(140deg, #172f3d, #294f5e); border: 0; }
.sensitive-card h2 { color: white; }
.sensitive-card p { max-width: 650px; margin: 0; color: #c6d5da; font-size: .78rem; }
.usi-value { display: grid; gap: 9px; justify-items: end; }
.usi-value > strong { font-size: 1.25rem; letter-spacing: .08em; }
.reveal-control { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.14); }
.reveal-control summary { color: #e6c897; cursor: pointer; font-size: .76rem; font-weight: 700; }
.reveal-control form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 13px; }
.reveal-control label { color: white; }
.note-form { display: grid; grid-template-columns: 1fr 180px auto; gap: 12px; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.notes-list article { padding: 17px 3px; border-bottom: 1px solid var(--line); }
.notes-list article:last-child { border-bottom: 0; }
.notes-list article p { margin: 10px 0 5px; color: var(--ink); white-space: pre-wrap; }
.status-control { display: grid; grid-template-columns: 1fr minmax(310px, .65fr); gap: 35px; align-items: end; }
.status-control form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.restricted-reveal { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: clamp(30px, 7vw, 70px); color: white; background: linear-gradient(140deg, #172f3d, #294f5e); border-radius: var(--radius); box-shadow: var(--shadow); }
.restricted-reveal > span { display: grid; width: 52px; height: 52px; place-items: center; color: #172f3d; background: #e6c897; border-radius: 50%; font-size: 1.25rem; font-weight: 900; }
.restricted-reveal strong { display: block; margin: 10px 0; color: white; font-size: clamp(1.7rem, 5vw, 3rem); letter-spacing: .14em; }
.restricted-reveal p { margin: 0; color: #c6d5da; }
.reveal-context { display: flex; gap: 25px; align-items: center; justify-content: space-between; margin-top: 18px; }
.reveal-context p { margin: 0; color: var(--ink); }

/* RTO setup and staff access */
.locations-panel { margin-top: 18px; }
.location-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.location-list article:first-child { border-top: 0; }
.location-list strong { display: block; font-size: .8rem; }
.inline-creator, .invite-panel { margin-top: 18px; }
.inline-creator summary { color: var(--tenant-primary); cursor: pointer; font-size: .78rem; font-weight: 700; }
.inline-creator form { margin-top: 18px; }
.invite-panel { padding: 0; margin-bottom: 18px; background: transparent; border: 0; box-shadow: none; }
.invite-panel > summary { width: max-content; list-style: none; }
.invite-panel > summary::-webkit-details-marker, .row-actions > summary::-webkit-details-marker { display: none; }
.invite-panel > form { margin-top: 12px; padding: 25px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.invitation-result { color: #135943; background: #eaf7f2; border-color: #b9e0d2; }
.invitation-result > span { background: #19735a; }
.invitation-result code { display: block; overflow-wrap: anywhere; padding: 10px; color: #143b30; background: rgba(255,255,255,.75); border-radius: 8px; }
.row-actions { position: relative; }
.row-actions > summary { color: var(--tenant-primary); cursor: pointer; font-weight: 700; }
.row-actions > div { position: absolute; z-index: 5; right: 0; width: 330px; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.row-actions form { display: grid; gap: 10px; padding: 12px 0; }
.row-actions form + form { border-top: 1px solid var(--line); }

/* Organisation branding */
.branding-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; }
.branding-form { display: grid; gap: 21px; }
.branding-form input[type="file"] { padding: 10px; background: #f8faf9; }
.colour-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.colour-control { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: center; }
.colour-control input[type="color"] { height: 46px; padding: 4px; cursor: pointer; }
.colour-control code { color: var(--muted); font-size: .74rem; }
.checkbox-label { display: flex; grid-template-columns: auto 1fr; gap: 9px; align-items: start; padding: 12px; background: #f7f9f9; border-radius: 10px; }
.checkbox-label input { width: auto; margin-top: 2px; }
.brand-preview { display: flex; min-height: 440px; padding: 34px; flex-direction: column; justify-content: center; color: white; background: linear-gradient(145deg, var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 72%, #557d80)); border-radius: var(--radius); box-shadow: var(--shadow); }
.tenant-logo.preview, .tenant-monogram.preview { width: 88px; height: 78px; margin: 18px 0 25px; font-size: 1.1rem; }

/* Commercial onboarding and training records */
.filter-panel { margin-bottom: 18px; }
.student-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.student-filters .wide { grid-column: span 2; }
.student-filters .checkbox-label { min-height: 47px; align-items: center; }
.filter-actions, .card-actions { display: flex; gap: 10px; align-items: center; }
.grouped-register { margin-bottom: 18px; }
.group-heading, .section-heading { display: flex; gap: 20px; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.group-heading h2, .section-heading h2 { margin: 0; }
.section-heading p { margin: 5px 0 0; }
.count-badge { display: inline-flex; min-width: 38px; min-height: 30px; padding: 6px 10px; align-items: center; justify-content: center; color: var(--tenant-primary); background: #eef3f4; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.workspace-section { margin-bottom: 18px; scroll-margin-top: 90px; }
.record-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.record-card { position: relative; min-height: 145px; padding: 18px; background: #f8faf9; border: 1px solid var(--line); border-radius: 13px; }
.record-card > .status-pill { position: absolute; top: 14px; right: 14px; }
.record-card > strong { display: block; max-width: 72%; margin: 6px 0 10px; }
.record-card p { margin-bottom: 10px; font-size: .8rem; line-height: 1.45; }
.muted { color: var(--muted); }
.operator-workspace { margin-bottom: 22px; scroll-margin-top: 25px; }
.commercial-pipeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commercial-card { padding: 20px; background: #f8faf9; border: 1px solid var(--line); border-radius: 14px; }
.commercial-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.commercial-card h3 { margin: 16px 0 4px; }
.commercial-card dl, .offer-details dl { display: grid; gap: 8px; }
.commercial-card dl { grid-template-columns: repeat(3, 1fr); }
.commercial-card dl div, .offer-details dl div { padding: 10px; background: white; border: 1px solid var(--line); border-radius: 9px; }
dt { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
dd { margin: 4px 0 0; color: var(--ink); font-size: .8rem; font-weight: 700; }
.module-picker { grid-column: span 2; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.module-picker legend { padding: 0 6px; color: #2d414e; font-size: .82rem; font-weight: 700; }
.module-picker label { display: flex; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.module-picker input { width: auto; }
.operator-history { padding-top: 28px; scroll-margin-top: 25px; }
.commercial-public { min-height: 100vh; padding: 30px max(25px, calc((100vw - 1120px) / 2)); background: #eef2f1; }
.commercial-public-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 45px; }
.commercial-public main { display: grid; gap: 18px; }
.offer-hero { padding: clamp(35px, 7vw, 75px); color: white; background: linear-gradient(145deg, #102f43, #285967); border-radius: 24px; box-shadow: var(--shadow); }
.offer-hero h1 { max-width: 760px; color: white; }
.offer-hero p { max-width: 720px; color: #d5e1e4; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.offer-price { display: block; margin: 12px 0 6px; font-family: "Newsreader", Georgia, serif; font-size: 2.3rem; }
.offer-grid p { margin: 0; font-size: .78rem; }
.offer-details, .response-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.offer-details ul { padding-left: 20px; color: var(--muted); line-height: 1.8; }
.invoice-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
.invoice-summary div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.invoice-summary dt { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.invoice-summary dd { margin: 4px 0 0; color: var(--ink); font-weight: 750; }
.payment-next-step { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.payment-next-step small { margin-top: 14px; color: var(--muted); }
.payment-public main { max-width: 1180px; }
.payment-hero { display: flex; flex-direction: column; align-items: flex-start; }
.payment-hero .light { border-color: rgba(255,255,255,.55); color: white; background: rgba(255,255,255,.1); }
.payment-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.payment-method { min-height: 260px; }
.payment-method.featured { border-color: color-mix(in srgb, var(--tenant-accent) 55%, var(--line)); background: linear-gradient(145deg, white, #fbf6ee); }
.payment-method dl { display: grid; gap: 7px; margin-top: 20px; }
.payment-method dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.payment-method dt { color: var(--muted); font-size: .76rem; }
.payment-method dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.payment-assurance { display: grid; grid-template-columns: 1.4fr 1fr; gap: 35px; align-items: center; }
.payment-assurance > div:last-child { padding-left: 30px; border-left: 1px solid var(--line); }
.response-panel form { display: grid; gap: 16px; }

@media (max-width: 1050px) {
  .student-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .record-card-grid, .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .student-filters, .record-card-grid, .commercial-pipeline, .offer-grid, .offer-details, .response-panel, .payment-method-grid, .payment-assurance { grid-template-columns: 1fr; }
  .payment-assurance > div:last-child { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .student-filters .wide, .module-picker { grid-column: auto; }
  .commercial-card dl { grid-template-columns: 1fr; }
}
.brand-preview h2 { color: white; font-size: 2rem; }
.brand-preview p { color: rgba(255,255,255,.74); }
.preview-button { display: inline-flex; width: max-content; margin-top: 32px; padding: 11px 17px; color: var(--tenant-primary); background: white; border-radius: 10px; font-size: .76rem; font-weight: 700; }
.settings-note { margin-top: 15px; font-size: .72rem; }

/* Audit */
.integrity-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; margin-bottom: 17px; padding: 14px 18px; border: 1px solid; border-radius: 13px; }
.integrity-banner.valid { color: #145c47; background: #eaf6f2; border-color: #bee0d4; }
.integrity-banner.invalid { color: #8d3030; background: #fff0f0; border-color: #e9bcbc; }
.integrity-banner > span { display: grid; width: 30px; height: 30px; place-items: center; background: rgba(255,255,255,.7); border-radius: 50%; font-weight: 700; }
.integrity-banner strong, .integrity-banner small { display: block; color: inherit; }
.integrity-banner a { font-size: .72rem; font-weight: 700; }
.audit-list { display: grid; }
.audit-event { border-bottom: 1px solid var(--line); }
.audit-event:last-child { border-bottom: 0; }
.audit-event summary { display: grid; grid-template-columns: 50px 1.2fr 1fr 130px auto; gap: 14px; align-items: center; padding: 17px 21px; cursor: pointer; list-style: none; }
.audit-event summary::-webkit-details-marker { display: none; }
.audit-event[open] summary { background: #f8faf9; }
.audit-event summary strong, .audit-event summary small { display: block; }
.audit-event summary strong { font-size: .73rem; }
.audit-event summary time { color: var(--ink); font-size: .7rem; }
.sequence { color: var(--tenant-primary); font-family: ui-monospace, monospace; font-size: .68rem; }
.audit-details { padding: 4px 22px 23px 85px; background: #f8faf9; }
.audit-details p { font-size: .76rem; }
.audit-details table { background: white; border: 1px solid var(--line); border-radius: 10px; }
.audit-details th, .audit-details td { padding: 10px 12px; }
.hash-line { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: center; margin-top: 14px; color: var(--muted); font-size: .64rem; }
.hash-line code { overflow: hidden; color: #60727b; text-overflow: ellipsis; white-space: nowrap; }
.integrity-result { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 38px; border: 1px solid; border-radius: var(--radius); }
.integrity-result.valid { background: #edf7f3; border-color: #bfe0d5; }
.integrity-result.invalid { background: #fff0f0; border-color: #e8bcbc; }
.integrity-symbol { display: grid; width: 70px; height: 70px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 1.8rem; }
.invalid .integrity-symbol { background: var(--red); }
.integrity-result dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 25px 0 0; }
.integrity-result dl div { padding-top: 12px; border-top: 1px solid rgba(20,78,61,.18); }
.integrity-result dt { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.integrity-result dd { margin: 6px 0 0; font-size: .78rem; }
.explanation-card { margin-top: 18px; }

/* Private Qualence operator console */
.operator-shell { min-height: 100vh; background: var(--canvas); }
.operator-header { display: flex; height: 78px; padding: 0 clamp(22px, 5vw, 72px); align-items: center; justify-content: space-between; color: white; background: var(--navy); }
.operator-header > div:last-child { display: flex; gap: 10px; align-items: center; }
.operator-header > div:last-child strong { display: block; color: white; font-size: .77rem; }
.operator-header > div:last-child small { color: #aebfc8; }
.operator-header form { margin-left: 10px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); }
.operator-header .link-button { color: #c8d7dd; }
.operator-content { width: min(1400px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.operator-search form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto auto; gap: 13px; align-items: end; }
.operator-search .checkbox-label { min-height: 46px; align-items: center; }
.operator-result-heading { display: flex; gap: 25px; align-items: end; justify-content: space-between; margin: 30px 0 17px; }
.operator-result-heading h2 { font-size: 2rem; }
.operator-result-heading p { margin: 0; }
.operator-result-heading > div:last-child { display: flex; gap: 12px; align-items: center; }
.operator-events .audit-event summary { grid-template-columns: 50px 1.2fr 1fr minmax(210px, auto) auto; }
.event-metadata { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; margin-top: 15px; }
.event-metadata span { overflow: hidden; padding: 10px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: .68rem; }
.event-metadata strong { display: block; margin-bottom: 4px; color: var(--ink); }
.event-metadata code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Account security and staff compliance */
.security-challenge { display: grid; width: min(520px, calc(100% - 36px)); min-height: 100vh; margin: 0 auto; padding: 54px 0; align-content: center; gap: 28px; }
.security-challenge .master-brand { justify-content: center; color: var(--ink); }
.security-card { padding: 38px; text-align: center; }
.security-card form { margin: 27px 0 19px; text-align: left; }
.security-card > a { font-size: .76rem; font-weight: 700; }
.security-icon { display: grid; width: 48px; height: 48px; margin-bottom: 20px; place-items: center; color: white; background: var(--tenant-primary); border-radius: 14px 14px 5px 14px; font-size: 1.3rem; font-weight: 800; }
.security-card .security-icon { margin-right: auto; margin-left: auto; }
.account-security-shell { width: min(1080px, 100%); margin: 0 auto; }
.account-security-shell.operator-account { padding: 48px 24px; }
.security-setting-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 18px; }
.security-overview { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.security-overview form { margin-top: 22px; }
.security-overview dl, .employment-summary dl, .compliance-record dl { display: grid; gap: 10px; margin: 20px 0 0; }
.security-overview dl div, .employment-summary dl div, .compliance-record dl div { display: flex; gap: 18px; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.security-overview dt, .employment-summary dt, .compliance-record dt { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.security-overview dd, .employment-summary dd, .compliance-record dd { margin: 0; font-size: .76rem; text-align: right; }
.security-guidance ol { margin: 22px 0; padding-left: 21px; color: var(--ink); font-size: .79rem; line-height: 2; }
.security-guidance p { font-size: .75rem; }
.danger-zone { margin-top: 18px; }
.danger-zone summary, .inline-creator summary { color: var(--red); font-size: .78rem; font-weight: 700; cursor: pointer; }
.danger-zone form, .inline-creator form { margin-top: 22px; }
.mfa-setup-grid { display: grid; grid-template-columns: minmax(250px, .8fr) 1.2fr; gap: 46px; align-items: center; padding: 38px; }
.qr-panel { display: grid; justify-items: center; gap: 13px; padding: 25px; background: #f6f8f7; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.qr-panel img { width: min(260px, 100%); height: auto; }
.setup-secret { display: block; overflow-wrap: anywhere; margin: 15px 0 29px; padding: 13px; background: #f4f6f5; border-radius: 9px; color: var(--ink); font-size: .78rem; }
.recovery-card { width: min(720px, calc(100% - 36px)); margin: 7vh auto; padding: 40px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 24px 0; padding: 20px; background: #f5f7f6; border: 1px solid var(--line); border-radius: 13px; }
.recovery-codes code { padding: 7px; color: var(--ink); font-size: .85rem; text-align: center; }
.profile-identity-grid { display: grid; grid-template-columns: .8fr 1fr .9fr; gap: 18px; margin-bottom: 18px; }
.profile-portrait { display: grid; align-content: start; gap: 22px; }
.profile-portrait form { display: grid; gap: 12px; padding-top: 17px; border-top: 1px solid var(--line); }
.profile-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.profile-contact form { margin-top: 22px; }
.employment-summary p { margin: 20px 0; font-size: .72rem; }
.document-links { display: grid; gap: 9px; }
.document-links a, .document-links span { padding: 10px 12px; background: #f5f7f6; border-radius: 8px; font-size: .72rem; }
.compliance-section { margin-top: 18px; }
.section-heading { display: flex; gap: 20px; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.section-heading p { max-width: 680px; margin: 0; font-size: .76rem; }
.count-badge { display: grid; min-width: 34px; height: 34px; place-items: center; color: var(--tenant-primary); background: color-mix(in srgb, var(--tenant-primary) 8%, white); border-radius: 50%; font-size: .72rem; font-weight: 800; }
.compliance-record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.compliance-record { padding: 19px; background: #fafbfb; border: 1px solid var(--line); border-radius: 13px; }
.compliance-record > div:first-child { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.compliance-record h3 { margin: 17px 0 5px; font-size: .9rem; }
.compliance-record p, .compliance-record > a { font-size: .72rem; }
.inline-creator { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.inline-creator summary { width: max-content; color: var(--tenant-primary); }
.wide { grid-column: span 2; }
.staff-profile-summary { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 18px; }
.staff-profile-summary .identity-card { align-items: start; }
.review-form { display: grid; gap: 8px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.review-form.inline { display: flex; align-items: center; margin: 0; padding: 0; border: 0; }
.review-form.inline select { min-width: 160px; }
.compact-button { min-height: 36px; padding: 7px 11px; }
.operator-account { color: var(--ink); }
.operator-auth-filters { display: grid; grid-template-columns: 1.1fr 1fr 1fr .8fr .8fr auto; gap: 11px; align-items: end; }
.auth-attempts td { white-space: nowrap; }
.auth-attempts td:last-child { min-width: 210px; white-space: normal; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { width: 82px; padding: 25px 12px; }
  .sidebar .master-brand > span:last-child, .tenant-card > span:last-child, .sidebar nav a:not(.active)::after, .sidebar nav a { font-size: 0; }
  .sidebar .master-brand { padding: 0 9px 23px; }
  .sidebar .qualence-mark { width: 40px; }
  .tenant-card { justify-content: center; padding: 8px; }
  .tenant-monogram { min-width: 40px; }
  .sidebar nav a { justify-content: center; padding: 12px; }
  .sidebar nav a > span { font-size: 1rem; }
  .sidebar-footer { display: none; }
  .topbar, .content { grid-column: 2; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 42vh; padding: 40px; }
  .login-story h1 { margin-top: 80px; font-size: 3.7rem; }
  .login-story .domain-link { display: none; }
  .login-panel { margin: 45px auto; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card:last-child { grid-column: 1 / -1; }
  .panel-grid, .detail-grid { grid-template-columns: 1fr; }
  .three-columns { grid-template-columns: repeat(2, 1fr); }
  .status-control { grid-template-columns: 1fr; }
  .branding-grid { grid-template-columns: 1fr; }
  .workspace-panel { grid-template-columns: 1fr; }
  .profile-panel { grid-template-columns: 1fr; }
  .operator-search form { grid-template-columns: repeat(2, 1fr); }
  .form-section { grid-template-columns: 1fr; gap: 24px; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .profile-identity-grid, .staff-profile-summary, .compliance-record-grid { grid-template-columns: repeat(2, 1fr); }
  .security-setting-grid, .mfa-setup-grid { grid-template-columns: 1fr; }
  .operator-auth-filters { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { position: fixed; top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: 67px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.12); }
  .sidebar .master-brand, .tenant-card, .sidebar-footer { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(6, minmax(72px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { display: grid; gap: 1px; padding: 5px; font-size: .6rem !important; text-align: center; }
  .sidebar nav a > span { width: auto; }
  .topbar { position: sticky; height: 66px; padding: 0 18px; justify-content: flex-end; }
  .topbar > div:first-child, .user-menu > span:not(.avatar) { display: none; }
  .content { padding: 28px 17px 45px; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading > .primary-button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card:last-child { grid-column: auto; }
  .login-story { min-height: 38vh; padding: 28px; }
  .login-story h1 { margin-top: 50px; font-size: 2.9rem; }
  .login-story p { font-size: .9rem; }
  .login-panel { width: calc(100% - 28px); margin: 20px auto; padding: 29px 23px; }
  .choice-card { padding: 30px 22px; }
  .details-list, .form-grid, .three-columns { grid-template-columns: 1fr; }
  .colour-grid { grid-template-columns: 1fr; }
  .form-section { padding: 24px 20px; }
  .full-field, .form-divider { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > * { width: 100%; }
  .search-bar { display: grid; grid-template-columns: 1fr auto; }
  .search-bar > input { min-width: 0; }
  .search-bar .compact-checkbox { grid-column: 1 / -1; }
  .filter-bar { grid-template-columns: 1fr; }
  .audit-event summary { grid-template-columns: 42px 1fr auto; }
  .audit-event summary > span:nth-child(3), .audit-event summary time { display: none; }
  .audit-details { padding-left: 20px; }
  .change-list > div { grid-template-columns: 1fr; }
  .change-list > div > span[aria-hidden] { display: none; }
  .event-heading { display: block; }
  .sensitive-card { grid-template-columns: 1fr; }
  .usi-value { justify-items: start; }
  .reveal-control form, .note-form, .status-control form { grid-template-columns: 1fr; }
  .reveal-context { align-items: stretch; flex-direction: column; }
  .row-actions > div { position: fixed; right: 14px; bottom: 76px; left: 14px; width: auto; }
  .integrity-banner { grid-template-columns: auto 1fr; }
  .integrity-banner a { grid-column: 2; }
  .integrity-result { grid-template-columns: 1fr; padding: 27px; }
  .integrity-result dl { grid-template-columns: 1fr; }
  .workspace-links { grid-template-columns: 1fr; }
  .operator-header { padding: 0 15px; }
  .operator-header .master-brand small, .operator-header > div:last-child > span:not(.avatar) { display: none; }
  .operator-content { width: calc(100% - 28px); padding-top: 30px; }
  .operator-search form { grid-template-columns: 1fr; }
  .operator-result-heading { align-items: stretch; flex-direction: column; }
  .operator-result-heading > div:last-child { justify-content: space-between; }
  .operator-events .audit-event summary { grid-template-columns: 42px 1fr auto; }
  .operator-events .audit-event summary > span:nth-child(3), .operator-events .audit-event summary time { display: none; }
  .event-metadata { grid-template-columns: 1fr; }
  .profile-identity-grid, .staff-profile-summary, .compliance-record-grid, .recovery-codes, .operator-auth-filters { grid-template-columns: 1fr; }
  .security-overview { grid-template-columns: 1fr; }
  .security-card, .recovery-card, .mfa-setup-grid { padding: 26px 21px; }
  .review-form.inline { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
