:root {
  color-scheme: light;
  --brand: #191d64;
  --brand-hover: #282d82;
  --ink: #18212f;
  --muted: #657184;
  --line: #dce2ea;
  --surface: #fff;
  --background: #f2f5f9;
  --focus: #ef9f20;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--background); }
button, input { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 8px 12px; color: #fff; background: var(--brand); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 4vw, 56px); background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { display: block; width: auto; height: 42px; object-fit: contain; }
.identity { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: .92rem; }
.shell { width: min(1120px, calc(100% - 32px)); min-height: calc(100vh - 142px); margin: 0 auto; padding: clamp(32px, 7vw, 72px) 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 36px rgb(25 29 100 / 8%); }
.access-card, .status-card { width: min(520px, 100%); margin: 0 auto; padding: clamp(24px, 6vw, 44px); }
.status-card { text-align: center; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.12; }
h2 { margin: 8px 0 18px; font-size: 1.2rem; }
.intro { margin: 14px 0 28px; color: var(--muted); line-height: 1.6; }
form { display: grid; gap: 12px; }
label { font-size: .9rem; font-weight: 700; }
input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #aeb8c6; border-radius: 8px; color: var(--ink); background: #fff; }
input:disabled, button:disabled { cursor: not-allowed; opacity: .6; }
.primary-button, .secondary-button { min-height: 46px; padding: 10px 18px; border-radius: 8px; font-weight: 750; cursor: pointer; }
.primary-button { border: 1px solid var(--brand); color: #fff; background: var(--brand); }
.primary-button:hover:not(:disabled) { background: var(--brand-hover); }
.secondary-button { border: 1px solid var(--brand); color: var(--brand); background: #fff; }
.text-button { padding: 6px; border: 0; color: var(--brand); background: transparent; font-weight: 700; cursor: pointer; text-decoration: underline; }
.form-message { min-height: 24px; margin: 18px 0 0; color: var(--muted); line-height: 1.45; }
.form-message.error { color: #a41f2d; }
.spinner { width: 36px; height: 36px; margin: 0 auto 24px; border: 4px solid #dce2ea; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading .intro { margin-bottom: 0; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 20px; }
.session-card { position: relative; padding: 24px; }
.status-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: #075c39; background: #dff7eb; font-size: .75rem; font-weight: 800; text-transform: capitalize; }
dl { display: grid; grid-template-columns: minmax(90px, .65fr) 1fr; gap: 8px 14px; margin: 0 0 20px; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: 0; font-size: .9rem; font-weight: 650; overflow-wrap: anywhere; }
.last-message { min-height: 42px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.5; }
.session-card .primary-button { width: 100%; }
.empty-state { grid-column: 1 / -1; padding: 36px; text-align: center; }
.empty-state p { color: var(--muted); }
footer { min-height: 70px; display: grid; place-items: center; padding: 20px; color: var(--muted); font-size: .82rem; }

@media (max-width: 620px) {
  .site-header { min-height: 64px; padding: 12px 16px; }
  .logo { height: 34px; }
  .identity { gap: 4px; }
  #identity-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell { width: min(100% - 24px, 1120px); padding: 24px 0 40px; }
  .access-card, .status-card { padding: 24px 20px; border-radius: 12px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading .secondary-button { width: 100%; }
  .session-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
