*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: .925rem/1.55 var(--font-sans);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-strong); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.03em; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; }
.skip-link { position: absolute; z-index: 10; background: var(--surface); padding: .7rem 1rem; transform: translateY(-120%); }
.skip-link:focus { transform: none; }
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.2rem;
  min-height: 4.75rem;
  padding: .65rem clamp(1rem, 3vw, 3rem);
  background: #12303c;
  color: #fff;
}
.brand { color: inherit; display: flex; align-items: center; gap: .65rem; font-weight: 700; text-decoration: none; font-size: 1.06rem; }
.brand-mark, .session-mark {
  display: inline-grid;
  width: 2.25rem;
  aspect-ratio: 1;
  border: 1px solid #90c7af;
  border-radius: .45rem;
  place-items: center;
  color: #d8f9e7;
  background: #1b554e;
  font-size: 1.36rem;
  font-weight: 750;
}
.topnav, .subnav, .profile { display: flex; align-items: center; gap: .45rem; }
.topnav a {
  color: #d0e3ea;
  text-decoration: none;
  white-space: nowrap;
  padding: .54rem .85rem;
  border-radius: .375rem;
}
.topnav a:hover, .topnav .is-active { background: #275364; color: #fff; }
.profile { margin-inline-start: auto; gap: .75rem; }
.persona { display: grid; line-height: 1.25; text-align: end; }
.persona small { color: #cadee3; font-size: .75rem; margin-top: .14rem; }
.environment {
  white-space: nowrap;
  color: #ffe7b6;
  background: #463e29;
  font-size: .75rem;
  padding: .18rem .5rem;
  border-radius: .3rem;
}
.subnav {
  overflow-x: auto;
  padding: 0 clamp(1rem, 3vw, 3rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.subnav:empty { display: none; }
.subnav a {
  display: inline-block;
  padding: .7rem .78rem .58rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  color: var(--muted);
}
.subnav a:hover, .subnav a[aria-current] { color: var(--accent-strong); border-bottom-color: var(--accent); }
.workspace { max-width: 106rem; margin: 0 auto; padding: clamp(1rem, 3vw, 2.4rem) clamp(1rem, 3vw, 3rem); }
.workspace:focus { outline: none; }
.panel, .state-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}
.panel + .panel { margin-top: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  color: var(--ink);
  background: var(--surface);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.button:hover { border-color: var(--accent); }
.button:disabled { opacity: .6; cursor: default; }
.button.primary, .button--primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover, .button--primary:hover { background: var(--accent-strong); }
.sign-out { min-height: 2.1rem; color: #fff; background: transparent; border-color: #6c8b97; }
.muted, .startup { color: var(--muted); }
.startup { padding: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.25rem; }
label { color: inherit; }
.form-grid label, .session-panel label { display: grid; gap: .35rem; }
input:not([type=checkbox],[type=radio]), select, textarea {
  min-width: 0;
  min-height: 2.4rem;
  padding: .38rem .55rem;
  border: 1px solid #a9bdb7;
  border-radius: .35rem;
  color: var(--ink);
  background: var(--surface);
}
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: start; }
th, td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: var(--paper); color: #38545c; font-weight: 650; }
tbody tr:hover { background: #f4f9f7; }
.notifications { position: fixed; right: 1rem; bottom: 1rem; z-index: 12; max-width: min(27rem, calc(100% - 2rem)); }
.notice { padding: .7rem 1rem; border: 1px solid #90bbae; border-radius: .5rem; background: var(--accent-soft); box-shadow: var(--shadow); }
.notice.error, .session-error { color: var(--danger); background: var(--danger-soft); }
.session-panel {
  width: min(27rem, calc(100% - 2rem));
  margin: clamp(2rem, 15vh, 10rem) auto 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 5vw, 2.2rem);
}
.session-panel h1 { margin: 1rem 0 .55rem; }
.session-panel > p { color: var(--muted); margin: .55rem 0 1.25rem; }
.session-panel form { display: grid; gap: .85rem; }
.session-panel form button { margin-top: .25rem; }
.session-error { padding: .5rem; border-radius: .35rem; margin: 0; }
@media (max-width: 60rem) {
  .topbar { gap: .5rem 1rem; }
  .topnav { order: 3; flex-basis: 100%; overflow: auto; }
}
@media (max-width: 36rem) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .persona { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
