:root {
  --ink: #414042;
  --paper: #f1f2f2;
  --blue: #2f89c9;
  --action: #226fa6;
  --action-hover: #1b5c8a;
  --line: #dfe2e5;
  --muted: #5e6063;
  --white: #fff;
  --red: #b42318;
  --blue-light: #edf5fb;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
header, main, footer { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 22px; text-decoration: none; flex-shrink: 0; }
.brand-logo { display: flex; align-items: center; gap: 8px; }
.brand img { display: block; object-fit: contain; }
.brand-mark { width: 32px; height: 37px; }
.brand-word { width: 109px; height: 37px; }
.brand-product {
  padding-left: 22px;
  border-left: 1px solid #c9cdd0;
  font: 600 11px/28px "Montserrat", sans-serif;
  letter-spacing: .16em;
  color: var(--muted);
}
nav { display: flex; gap: 28px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; padding-block: 12px; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--action); border-bottom-color: var(--blue); }
nav button.secondary { min-height: 42px; padding: 8px 15px; font-size: 12px; }
.guest-link { font-size: 12px; }
button, input, select { font: inherit; }
button, .button {
  cursor: pointer;
  border: 1px solid var(--action);
  border-radius: 4px;
  padding: 12px 20px;
  min-height: 48px;
  background: var(--action);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.5;
  transition: background-color .15s, border-color .15s, color .15s;
}
button:hover, .button:hover { background: var(--action-hover); border-color: var(--action-hover); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary, .button.secondary { background: var(--white); color: var(--ink); border-color: #c3c9ce; }
button.secondary:hover, .button.secondary:hover { background: var(--blue-light); border-color: var(--action); color: var(--action); }
button.danger { color: var(--red); border-color: #e5b9b5; background: var(--white); }
button.danger:hover { background: #fef3f2; border-color: var(--red); }
a { color: var(--action); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
main { padding: 48px 0 64px; min-height: calc(100vh - 183px); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Montserrat", sans-serif; font-weight: 600; }
h1 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.25; letter-spacing: -.04em; margin-bottom: 18px; }
h2 { font-size: 24px; line-height: 1.35; letter-spacing: -.035em; margin-bottom: 20px; }
h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.025em; margin-bottom: 12px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 10px/1.5 "Montserrat", sans-serif;
  letter-spacing: .14em;
  color: var(--action);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--blue); flex-shrink: 0; }
.muted { color: var(--muted); }
.intro { max-width: 720px; margin-bottom: 36px; }
.intro > p:last-child { margin-bottom: 0; }
.auth-layout { display: grid; grid-template-columns: 1.06fr 1fr; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); }
.auth-copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.auth-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 358px;
  background: url('/assets/brand/mark-white.png') center/contain no-repeat;
  opacity: .035;
  right: -78px;
  bottom: 16px;
  pointer-events: none;
}
.auth-copy .eyebrow { color: #d4d6d8; margin-bottom: 38px; }
.auth-copy h1 { font-size: clamp(34px, 3.5vw, 46px); line-height: 1.3; letter-spacing: -.045em; margin-bottom: 24px; }
.auth-copy h1 span { color: #9dcef0; }
.auth-copy p:not(.eyebrow) { color: #d4d6d8; max-width: 365px; font-size: 14px; line-height: 1.85; }
.auth-copy .auth-note { font-size: 12px; margin: 22px 0 0; padding-top: 22px; border-top: 1px solid #ffffff26; color: #c8cace; }
.auth-ecosystem { padding-top: 40px; }
.auth-ecosystem > span { display: block; font: 500 9px/1.5 "Montserrat", sans-serif; letter-spacing: .16em; color: #c8cace; margin-bottom: 12px; }
.auth-ecosystem ul { display: flex; flex-wrap: wrap; list-style: none; gap: 8px 18px; padding: 0; margin: 0; font: 500 11px/1.6 "Montserrat", sans-serif; }
.auth-ecosystem li { display: flex; align-items: center; gap: 8px; }
.auth-ecosystem li::before { content: ""; height: 4px; width: 4px; background: var(--blue); }
.panel { background: var(--white); border: 1px solid var(--line); padding: 30px; border-radius: 4px; min-width: 0; }
.auth-panel { border: 0; border-radius: 0; padding: 42px 48px 36px; }
.auth-panel h2 { font-size: 28px; margin-bottom: 8px; }
.auth-description { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper); border-radius: 4px; margin-bottom: 24px; }
.tabs button.secondary { flex: 1; min-height: 42px; font-size: 12px; padding: 8px 6px; border-color: transparent; background: transparent; color: var(--muted); }
.tabs button.secondary:hover { color: var(--action); }
.tabs button[aria-pressed="true"] { background: var(--white); color: var(--action); border-color: #d5dfe7; box-shadow: 0 1px 2px #41404208; }
label { font-weight: 500; font-size: 12px; display: block; margin: 18px 0 8px; }
form > label:first-child { margin-top: 0; }
input, select { background: var(--white); color: var(--ink); padding: 12px 14px; width: 100%; min-height: 48px; border: 1px solid #7c8993; border-radius: 4px; font-size: 14px; }
input::placeholder { color: #72777c; font-size: 13px; opacity: 1; }
input:hover, select:hover { border-color: #7c8993; }
input:focus, select:focus { border-color: var(--action); }
input:read-only { background: var(--paper); color: var(--muted); }
input[name="otp"] { font-size: 22px; letter-spacing: .4em; font-weight: 500; }
.full { width: 100%; margin-top: 24px; }
.small { font-size: 12px; color: var(--muted); line-height: 1.75; overflow-wrap: anywhere; }
.text-button { background: none; border: 0; color: var(--action); text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; font-size: 12px; min-height: 44px; }
.text-button:hover { background: none; color: var(--action-hover); }
.auth-panel > .text-button { display: flex; margin: 5px auto 14px; }
.auth-panel > .small { border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 0; font-size: 11px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.app { display: flex; flex-direction: column; align-items: flex-start; min-height: 280px; padding: 30px; border-top: 3px solid var(--blue); }
.app-number { color: var(--action); font: 500 12px/1.5 "Montserrat", sans-serif; margin-bottom: 22px; }
.app h2 { font-size: 23px; margin-bottom: 12px; }
.app p { font-size: 13px; color: var(--muted); }
.app .button { margin-top: auto; font-size: 12px; }
.tag { display: inline-block; font-size: 10px; font-weight: 500; background: var(--blue-light); color: var(--action); border-radius: 3px; padding: 5px 9px; margin-bottom: 18px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.stack > * + * { margin-top: 14px; }
.section-rule { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.admin-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
.user-list { list-style: none; margin: 18px 0 0; padding: 0; max-height: 600px; overflow: auto; }
.user-list button { width: 100%; text-align: left; justify-content: flex-start; display: block; color: var(--ink); background: var(--white); border: 0; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; border-radius: 0; padding: 14px 12px; overflow-wrap: anywhere; }
.user-list button:hover { background: #f7f9fa; }
.user-list button[aria-pressed="true"] { background: var(--blue-light); border-left-color: var(--blue); color: var(--action); }
.user-list button:focus-visible { outline-offset: -3px; }
.user-list small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 4px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grant-list { padding: 0; list-style: none; }
.grant-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.audit { font-size: 12px; overflow-wrap: anywhere; }
.audit li { margin: 12px 0; }
.error { color: var(--red); }
#message { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 32px)); background: var(--ink); color: var(--white); padding: 16px 24px; border-left: 4px solid var(--blue); border-radius: 4px; box-shadow: 0 4px 18px #0002; z-index: 5; font-size: 13px; }
footer { display: flex; align-items: baseline; gap: 24px; border-top: 1px solid var(--line); padding: 24px 0 28px; color: var(--muted); font-size: 10px; }
footer > span { font: 600 10px/1.5 "Montserrat", sans-serif; letter-spacing: .1em; }
footer p { margin: 0; flex: 1; }
footer a { font-size: 10px; color: var(--muted); text-decoration: none; padding: 8px 0; }
footer a:hover { color: var(--action); text-decoration: underline; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--ink); color: var(--white); padding: 12px; z-index: 10; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
@media (min-width: 1440px) { main { padding-top: 64px; } .auth-copy { padding: 56px; } .auth-panel { padding: 48px 56px 40px; } }
@media (max-width: 1000px) {
  header, main, footer { width: calc(100% - 48px); }
  .auth-copy { padding: 36px; }
  .auth-copy h1 { font-size: 35px; }
  .auth-panel { padding: 36px; }
  .auth-copy .eyebrow { font-size: 9px; }
  .admin-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .admin-grid .panel { padding: 24px; }
  nav { gap: 18px; }
}
@media (max-width: 760px) {
  header, main, footer { width: calc(100% - 40px); }
  header { min-height: 80px; flex-wrap: wrap; padding: 20px 0; gap: 16px; }
  nav { flex-wrap: wrap; gap: 16px; }
  nav a { font-size: 12px; }
  main { padding: 28px 0 40px; min-height: calc(100vh - 170px); }
  input, select { font-size: 16px; }
  input[name="otp"] { font-size: 22px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-copy { padding: 26px 30px 28px; }
  .auth-copy::after { width: 160px; height: 185px; right: -10px; bottom: -10px; opacity: .045; }
  .auth-copy .eyebrow { margin-bottom: 16px; }
  .auth-copy h1 { font-size: 29px; line-height: 1.3; margin-bottom: 12px; }
  .auth-copy h1 br { display: none; }
  .auth-copy h1 span { display: inline; }
  .auth-copy p:not(.eyebrow) { font-size: 12px; max-width: 410px; margin-bottom: 0; line-height: 1.75; }
  .auth-ecosystem { display: none; }
  .auth-panel { padding: 30px; }
  .auth-panel h2 { font-size: 25px; }
  .auth-description { margin-bottom: 22px; }
  .auth-panel > .small { padding-top: 16px; }
  .account-grid, .admin-grid { grid-template-columns: 1fr; }
  .user-list { max-height: 260px; }
  .panel { padding: 24px; }
  .intro { margin-bottom: 28px; }
  h1 { font-size: 30px; }
  footer { flex-wrap: wrap; gap: 8px 16px; padding-block: 20px; }
  footer p { flex: initial; }
  footer a { margin-left: auto; }
}
@media (max-width: 500px) {
  header, main, footer { width: calc(100% - 32px); }
  .brand { gap: 14px; }
  .brand-product { padding-left: 14px; font-size: 9px; }
  .brand-mark { width: 27px; height: 31px; }
  .brand-word { width: 91px; height: 31px; }
  .guest-link { display: none; }
  nav:has(.guest-link) { display: none; }
  nav:not(:has(.guest-link)):not(:empty) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  nav a { text-align: center; font-size: 11px; }
  nav button.secondary { font-size: 10px; padding: 8px 6px; min-height: 44px; }
  header:has(nav:empty) { gap: 0; }
  .auth-copy { padding: 24px; }
  .auth-copy h1 { font-size: 25px; }
  .auth-panel { padding: 26px 24px; }
  .auth-panel h2 { font-size: 24px; }
  .auth-description { font-size: 12px; }
  .grid { grid-template-columns: 1fr; }
  .app { min-height: 260px; }
  .inline-fields { grid-template-columns: 1fr; gap: 0; }
  .panel:not(.auth-panel) { padding: 22px; }
  footer { display: block; }
  footer p { margin: 8px 0 0; }
  footer a { display: inline-block; margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

.consent-panel { max-width: 720px; margin-inline: auto; }
