
:root {
  color-scheme: light;
  --ink: #172b2f;
  --ink-soft: #496267;
  --paper: #f5f6f0;
  --paper-bright: #fcfcf8;
  --surface: rgba(255, 255, 252, 0.88);
  --line: #cfd9d4;
  --line-strong: #aabcb4;
  --sea: #0e746d;
  --sea-dark: #07544f;
  --sea-pale: #dcece7;
  --sky-pale: #dfeaec;
  --sand: #eee3ce;
  --amber: #93631c;
  --rose: #9b4348;
  --rose-pale: #f5e2e1;
  --muted: #e8ece7;
  --shadow: 0 18px 50px rgba(25, 55, 56, 0.08);
  --radius-small: 0.6rem;
  --radius: 1rem;
  --radius-large: 1.55rem;
  --page: 72rem;
  --page-wide: 92rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 2%, rgba(178, 216, 207, 0.34), transparent 30rem),
    radial-gradient(circle at 4% 36%, rgba(224, 205, 169, 0.2), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--sea-dark);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--sea);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(14, 116, 109, 0.35);
  outline-offset: 3px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: white;
  background: var(--ink);
  border-radius: var(--radius-small);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 2rem), var(--page-wide));
  min-height: 5.6rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(127, 153, 146, 0.42);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark__mark {
  width: 2.2rem;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(to bottom, transparent 47%, var(--sea) 48%, var(--sea) 53%, transparent 54%),
    radial-gradient(circle at 52% 64%, var(--sea-pale) 0 32%, transparent 33%);
  box-shadow: inset 0 0 0 0.32rem rgba(255, 255, 255, 0.5);
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.16rem;
  font-weight: 600;
}

.wordmark small {
  margin-top: -0.17rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.identity {
  min-width: 0;
  justify-self: end;
  text-align: right;
  line-height: 1.3;
}

.identity__name,
.identity__email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity__name {
  font-size: 0.82rem;
  font-weight: 700;
}

.identity__email {
  max-width: 18rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.account-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.account-nav a,
.account-nav button {
  padding: 0.45rem 0.65rem;
  color: var(--ink-soft);
  border-radius: 0.45rem;
  text-decoration: none;
}

.account-nav a:hover,
.account-nav button:hover,
.account-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.account-nav .account-nav__signout {
  margin-left: 0.45rem;
  color: var(--rose);
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.account-nav form { margin: 0; }
.account-nav button { border-top: 0; border-right: 0; border-bottom: 0; background: transparent; font: inherit; cursor: pointer; }

.account-nav .account-nav__signout:hover {
  color: #773237;
  background: transparent;
  text-decoration: underline;
}

.page {
  width: min(calc(100% - 2rem), var(--page));
  margin-inline: auto;
  padding: clamp(3.8rem, 7vw, 7rem) 0 5rem;
}

.page--wide {
  width: min(calc(100% - 2rem), var(--page-wide));
}

.intro,
.admin-intro {
  max-width: 52rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--sea-dark);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-weight: 540;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  letter-spacing: -0.052em;
}

.admin-intro h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
}

h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.28rem;
}

.lede {
  max-width: 46rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.27rem);
  line-height: 1.65;
}

.directory-section,
.admin-section {
  border-top: 1px solid var(--line-strong);
  padding-top: 2rem;
}

.admin-section + .admin-section {
  margin-top: 5rem;
}

.section-heading {
  margin-bottom: 1.8rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.count {
  flex: none;
  padding: 0.35rem 0.65rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.directory {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  counter-reset: destinations;
}

.directory-item {
  min-width: 0;
  counter-increment: destinations;
}

.directory-item article {
  height: 100%;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow);
}

.directory-item article::before {
  content: counter(destinations, decimal-leading-zero);
  align-self: end;
  margin-bottom: -1rem;
  color: #8ca19a;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
}

.directory-item__topline {
  min-height: 1.65rem;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: max-content;
  padding: 0.16rem 0.48rem;
  color: var(--ink-soft);
  background: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 770;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.status::before {
  width: 0.42rem;
  aspect-ratio: 1;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.status--online {
  color: var(--sea-dark);
  background: var(--sea-pale);
}

.status--planned {
  color: #5e6675;
  background: var(--sky-pale);
}

.status--maintenance {
  color: var(--amber);
  background: #f4e9d2;
}

.status--offline,
.status--retired {
  color: var(--rose);
  background: var(--rose-pale);
}

.status--retired,
.status--disabled {
  color: #5f6868;
  background: #e2e5e2;
}

.directory-item h2 {
  margin-top: 1.4rem;
  margin-bottom: 0.55rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.directory-item__description {
  margin: 0;
  color: var(--ink-soft);
}

.directory-item__note {
  margin: 0.85rem 0 0;
  padding-left: 0.75rem;
  color: var(--ink);
  border-left: 2px solid var(--sand);
  font-size: 0.88rem;
}

.directory-item__meta {
  margin-top: 1.4rem;
  padding-top: 0.8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.68rem;
}

.verification--missing {
  color: var(--rose);
}

.canonical-url {
  margin: 0.7rem 0 0;
  padding: 0.65rem 0.72rem;
  color: var(--ink-soft);
  background: rgba(226, 232, 227, 0.6);
  border-radius: var(--radius-small);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.7rem;
}

.canonical-url span {
  display: block;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.destination-link {
  width: max-content;
  max-width: 100%;
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sea-dark);
  font-size: 0.88rem;
  font-weight: 750;
}

.destination-link span {
  transition: transform 150ms ease;
}

.destination-link:hover span {
  transform: translate(0.14rem, -0.14rem);
}

.destination-link--unavailable {
  color: var(--ink-soft);
  font-weight: 570;
}

.empty-state {
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  background: rgba(255, 255, 255, 0.44);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-large);
}

.empty-state__symbol {
  display: block;
  color: var(--sea);
  font-size: 2.4rem;
}

.empty-state h2 {
  margin: 0.6rem 0;
}

.empty-state p {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

.empty-state--compact {
  padding: 1.4rem;
  text-align: left;
}

.empty-state--compact p {
  max-width: none;
  margin: 0;
}

.state-card {
  max-width: 45rem;
  margin: clamp(1rem, 5vw, 4rem) auto;
  padding: clamp(1.8rem, 6vw, 4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.state-card__icon {
  width: 3rem;
  aspect-ratio: 1;
  margin-bottom: 1.7rem;
  display: grid;
  place-items: center;
  color: var(--sea-dark);
  background: var(--sea-pale);
  border-radius: 50%;
  font-family: ui-monospace, monospace;
  font-weight: 800;
}

.state-card h1 {
  max-width: 14ch;
  font-size: clamp(2.15rem, 6vw, 4rem);
}

.state-card > p:not(.eyebrow, .state-card__aside, .request-id) {
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.state-facts {
  margin: 2rem 0;
  border-block: 1px solid var(--line);
}

.state-facts div {
  padding: 0.75rem 0;
  display: grid;
  grid-template-columns: minmax(7rem, 0.45fr) 1fr;
  gap: 1rem;
}

.state-facts div + div {
  border-top: 1px solid var(--line);
}

.state-facts dt {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.state-facts dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
}

.state-card__aside,
.request-id {
  margin: 1.6rem 0 0;
  padding: 0.8rem 0.9rem;
  color: var(--ink-soft);
  background: var(--muted);
  border-radius: var(--radius-small);
  font-size: 0.78rem;
}

.request-id code {
  color: var(--ink);
}

.summary-grid {
  margin: 0 0 4.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-grid div {
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.65);
}

.summary-grid strong {
  font-family: ui-serif, Georgia, serif;
  font-size: 2rem;
  font-weight: 550;
  line-height: 1;
}

.summary-grid span {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.notice {
  margin: -2rem 0 2rem;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: start;
  gap: 0.7rem;
  color: var(--sea-dark);
  background: var(--sea-pale);
  border: 1px solid #b7d7cc;
  border-radius: var(--radius-small);
}

.notice p {
  margin: 0;
}

.directory--admin {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-site {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-site .directory-item {
  flex: 1;
}

.edit-site {
  margin-top: 0.55rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.edit-site summary {
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 730;
  list-style: none;
  cursor: pointer;
}

.edit-site summary::-webkit-details-marker {
  display: none;
}

.edit-site[open] summary {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.edit-site[open] summary span:last-child {
  transform: rotate(45deg);
}

.panel,
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  margin-top: 1.5rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.form-panel--nested {
  padding: 1rem;
  background: rgba(248, 249, 245, 0.86);
  border: 0;
  border-radius: 0 0 var(--radius-small) var(--radius-small);
}

.panel-heading {
  margin-bottom: 1.4rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.panel-heading h3,
.panel-heading p {
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid label:not(.checkbox-field) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 720;
}

.form-grid label small {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
}

.form-grid__wide {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.68rem 0.72rem;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
}

textarea {
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #829b91;
}

.checkbox-field {
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: start;
  gap: 0.65rem;
  background: var(--muted);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.16rem;
  accent-color: var(--sea);
}

.checkbox-field span,
.checkbox-field strong,
.checkbox-field small {
  display: block;
}

.checkbox-field strong {
  font-size: 0.8rem;
}

.form-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-end;
}

.button {
  width: max-content;
  max-width: 100%;
  padding: 0.68rem 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--sea-dark);
  border: 1px solid var(--sea-dark);
  border-radius: var(--radius-small);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.button:hover {
  color: white;
  background: var(--sea);
  border-color: var(--sea);
}

.button--small {
  padding: 0.4rem 0.58rem;
  font-size: 0.7rem;
}

.button--quiet {
  color: var(--sea-dark);
  background: transparent;
  border-color: var(--line-strong);
}

.button--quiet:hover {
  color: var(--sea-dark);
  background: var(--sea-pale);
  border-color: #8cb5aa;
}

.button--danger {
  color: var(--rose);
  background: transparent;
  border-color: #d8abad;
}

.button--danger:hover {
  color: #762f34;
  background: var(--rose-pale);
  border-color: #c98e92;
}

.section-note {
  max-width: 55rem;
  margin: -0.7rem 0 1.4rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.table-scroll {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(25, 55, 56, 0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

th,
td {
  padding: 0.8rem 0.9rem;
  vertical-align: middle;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

thead th {
  color: var(--ink-soft);
  background: rgba(231, 235, 230, 0.7);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(245, 247, 242, 0.75);
}

.member-name,
.member-email {
  display: block;
}

.member-name {
  color: var(--ink);
  font-weight: 720;
}

.member-email,
.table-note {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 500;
}

.inline-form,
.grant-form {
  margin: 0;
}

.grant-form {
  min-width: 8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.grant-state {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--ink-soft);
  font-size: 0.67rem;
  white-space: nowrap;
}

.grant-state::before {
  width: 0.42rem;
  aspect-ratio: 1;
  background: #87928e;
  border-radius: 50%;
  content: "";
}

.grant-state--on {
  color: var(--sea-dark);
}

.grant-state--on::before {
  background: var(--sea);
}

.site-footer {
  width: min(calc(100% - 2rem), var(--page-wide));
  min-height: 6rem;
  margin-inline: auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}

.site-footer p {
  max-width: 34rem;
  margin: 0;
}

.site-footer > span {
  font-family: ui-monospace, monospace;
}

.auth-page {
  min-height: calc(100vh - 15rem);
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) 1.25rem;
}

.auth-card {
  width: min(100%, 29rem);
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 { margin: .55rem 0 .65rem; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.02; }
.auth-lede, .auth-footnote { color: var(--ink-soft); line-height: 1.6; }
.auth-footnote { margin: 1.3rem 0 0; font-size: .82rem; text-align: center; }
.auth-mark { width: 3.4rem; height: 3.4rem; display: grid; place-items: center; margin-bottom: 1.6rem; border: 1px solid #7bbcb5; border-radius: 50%; background: var(--sea-pale); }
.auth-mark span { width: 1.45rem; height: 1.45rem; border: 2px solid var(--sea); border-radius: 50%; box-shadow: 0 0 0 .35rem rgba(14, 116, 109, .1); }
.auth-form { display: grid; gap: 1rem; margin-top: 1.8rem; }
.auth-form label { display: grid; gap: .45rem; color: var(--ink); font-size: .82rem; font-weight: 700; }
.auth-form input { width: 100%; min-height: 3.2rem; padding: .75rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-small); color: var(--ink); background: var(--paper-bright); font: inherit; }
.auth-form input:focus { outline: 3px solid rgba(14, 116, 109, .16); border-color: var(--sea); }
.auth-form button { min-height: 3.25rem; border: 0; border-radius: var(--radius-small); color: white; background: var(--sea); font: inherit; font-weight: 750; cursor: pointer; }
.auth-form button:hover { background: var(--sea-dark); }
.form-error { margin: 1.25rem 0 0; padding: .8rem .9rem; border: 1px solid #d7aeb0; border-radius: var(--radius-small); color: #7c3035; background: var(--rose-pale); }
.enrollment-panel { margin: 1.4rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-bright); }
.enrollment-panel h2 { margin: 0 0 .6rem; font-size: 1rem; }
.enrollment-panel p { color: var(--ink-soft); font-size: .84rem; line-height: 1.55; }
.enrollment-panel code { display: block; overflow-wrap: anywhere; margin: .85rem 0; padding: .8rem; border-radius: .45rem; color: var(--sea-dark); background: var(--sea-pale); font-size: .95rem; letter-spacing: .12em; text-align: center; }

@media (max-width: 70rem) {
  .site-header {
    grid-template-columns: auto 1fr;
    padding: 1rem 0;
  }

  .identity {
    grid-column: 2;
    grid-row: 1;
  }

  .account-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .account-nav .account-nav__signout {
    margin-left: auto;
  }

  .directory--admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 47rem) {
  .page {
    padding-top: 3.5rem;
  }

  .identity {
    max-width: 52vw;
  }

  .account-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-nav .account-nav__signout {
    margin: 0.2rem 0 0;
    padding-left: 0.65rem;
    border-left: 0;
  }

  .directory,
  .directory--admin,
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .summary-grid {
    gap: 1px;
  }

  .form-grid__wide {
    grid-column: auto;
  }

  .state-facts div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 30rem) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .identity {
    max-width: 100%;
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    text-align: left;
  }

  .identity__email {
    max-width: calc(100vw - 2rem);
  }

  h1 {
    font-size: 2.5rem;
  }

  .directory-item article {
    padding: 1.2rem;
  }

  .site-footer > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: white;
  }

  .account-nav,
  .form-panel,
  .edit-site,
  .site-footer {
    display: none;
  }

  .directory-item article,
  .table-scroll {
    box-shadow: none;
  }
}

/* Babel-aligned system gateway theme */
:root {
  color-scheme: dark;
  --ink: #e9edf5;
  --ink-soft: #8f9aab;
  --paper: #07090d;
  --paper-bright: #11151d;
  --surface: rgba(17, 21, 29, 0.86);
  --line: rgba(178, 196, 220, 0.14);
  --line-strong: rgba(178, 196, 220, 0.28);
  --sea: #54e1f2;
  --sea-dark: #7ceaf6;
  --sea-pale: rgba(84, 225, 242, 0.1);
  --sky-pale: rgba(167, 139, 250, 0.1);
  --sand: rgba(233, 173, 93, 0.1);
  --amber: #e9ad5d;
  --rose: #f27b9b;
  --rose-pale: rgba(242, 123, 155, 0.1);
  --muted: rgba(255, 255, 255, 0.045);
  --shadow: 0 32px 100px rgba(0, 0, 0, 0.48);
  --radius-small: 0.55rem;
  --radius: 0.9rem;
  --radius-large: 1.2rem;
}

html { background: #07090d; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(84, 225, 242, 0.1), transparent 34rem),
    radial-gradient(circle at 4% 48%, rgba(167, 139, 250, 0.07), transparent 30rem),
    #07090d;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(132, 154, 180, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 154, 180, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

a { color: var(--sea); }
a:hover { color: #a7f3fa; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
}

.site-header {
  border-bottom-color: var(--line);
  background: rgba(7, 9, 13, 0.78);
  backdrop-filter: blur(18px);
}

.wordmark { color: #f0f5fa; }
.wordmark:hover { color: white; }
.wordmark__mark {
  border: 1px solid rgba(84, 225, 242, 0.42);
  border-radius: 0.65rem;
  background:
    radial-gradient(circle, rgba(84, 225, 242, 0.85) 0 8%, transparent 9% 28%, rgba(84, 225, 242, 0.5) 29% 32%, transparent 33%),
    linear-gradient(145deg, rgba(84, 225, 242, 0.15), rgba(167, 139, 250, 0.08));
  box-shadow: 0 0 28px rgba(84, 225, 242, 0.12), inset 0 0 18px rgba(84, 225, 242, 0.07);
}
.wordmark__mark::before, .wordmark__mark::after { background: var(--sea); box-shadow: 0 0 10px rgba(84, 225, 242, 0.7); }
.wordmark small, .identity__email {
  color: #667384;
  font-family: Consolas, "SFMono-Regular", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity__name { color: #dce4ed; }
.account-nav a, .account-nav button { color: #8f9aab; }
.account-nav a:hover, .account-nav button:hover, .account-nav a[aria-current="page"] { color: #eefaff; background: rgba(84, 225, 242, 0.08); }
.account-nav .account-nav__signout { color: var(--rose); border-left-color: var(--line); }

h1, h2, h3 { color: #f0f4f8; letter-spacing: -0.035em; }
h1 { font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; font-weight: 660; }
p { color: var(--ink-soft); }
.eyebrow, .count, .status, .verification, .canonical-url span, .auth-footnote {
  font-family: Consolas, "SFMono-Regular", monospace;
  letter-spacing: 0.12em;
}
.eyebrow { color: var(--sea); font-size: 0.7rem; }

.auth-page {
  width: min(100% - 2rem, 80rem);
  min-height: calc(100vh - 12rem);
  display: grid;
  place-items: center;
  padding-block: clamp(2rem, 7vh, 6rem);
}

.auth-page::before, .auth-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(54rem, 82vw);
  aspect-ratio: 1;
  border: 1px solid rgba(84, 225, 242, 0.09);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.auth-page::after {
  width: min(38rem, 62vw);
  border-color: rgba(167, 139, 250, 0.1);
}

.auth-card {
  width: min(100%, 32rem);
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 5vw, 2.7rem);
  border: 1px solid var(--line-strong);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(20, 26, 35, 0.96), rgba(10, 13, 19, 0.93));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), var(--shadow), 0 0 80px rgba(84, 225, 242, 0.05);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(transparent, var(--sea), var(--violet, #a78bfa), transparent);
  box-shadow: 0 0 18px rgba(84, 225, 242, 0.5);
}
.auth-card h1 { max-width: 25rem; margin: 0.55rem 0 0.85rem; font-size: clamp(2.3rem, 6vw, 3.5rem); line-height: 1.02; }
.auth-lede { max-width: 27rem; margin-bottom: 1.6rem; font-size: 0.98rem; }
.auth-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(84, 225, 242, 0.35);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, rgba(84, 225, 242, 0.13), rgba(167, 139, 250, 0.07));
  box-shadow: 0 0 28px rgba(84, 225, 242, 0.1);
}
.auth-mark span { width: 1.1rem; height: 1.1rem; border: 1px solid var(--sea); border-radius: 50%; box-shadow: 0 0 14px rgba(84, 225, 242, 0.5), inset 0 0 8px rgba(84, 225, 242, 0.35); }
.auth-statusline { display: flex; justify-content: space-between; gap: 1rem; margin: -3.55rem 0 2.1rem 4rem; color: #6d7989; font: 0.57rem Consolas, monospace; letter-spacing: 0.1em; }
.auth-statusline span:first-child { color: #72dfa9; }
.auth-statusline span:first-child::before { content: ""; display: inline-block; width: 0.38rem; height: 0.38rem; margin-right: 0.42rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }

.auth-form { gap: 1rem; }
.auth-form label { color: #aab5c4; font-size: 0.78rem; font-weight: 600; }
.auth-form input, input, textarea, select {
  color: #edf2f8;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.028);
}
.auth-form input { min-height: 3.15rem; border-radius: 0.62rem; font-size: 1rem; }
.auth-form input:hover { border-color: rgba(178, 196, 220, 0.28); }
.auth-form input:focus { border-color: rgba(84, 225, 242, 0.58); box-shadow: 0 0 0 3px rgba(84, 225, 242, 0.07), 0 0 25px rgba(84, 225, 242, 0.05); }
.auth-form button, .destination-link, .primary-button {
  color: #071014;
  border: 1px solid rgba(84, 225, 242, 0.75);
  background: linear-gradient(135deg, #54e1f2, #78d5f5);
  box-shadow: 0 0 28px rgba(84, 225, 242, 0.12);
}
.auth-form button { min-height: 3.1rem; display: flex; align-items: center; justify-content: center; gap: 0.65rem; border-radius: 0.62rem; font-weight: 750; }
.auth-form button:hover, .destination-link:hover, .primary-button:hover { color: #071014; background: #8aebf5; transform: translateY(-1px); }
.auth-footnote { color: #606c7b; font-size: 0.59rem; text-align: center; }
.form-error { color: #ff93ac; border-color: rgba(242, 123, 155, 0.24); background: rgba(242, 123, 155, 0.08); }
.enrollment-panel { border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.055); }
.enrollment-panel code { color: var(--sea); border-color: rgba(84, 225, 242, 0.24); background: rgba(84, 225, 242, 0.05); font-size: 1rem; }

.intro, .directory-section, .state-card, .form-panel, .table-scroll, .directory-item article {
  border-color: var(--line);
  background: rgba(15, 19, 27, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 24px 70px rgba(0, 0, 0, 0.18);
}
.directory-item article { background: linear-gradient(150deg, rgba(84, 225, 242, 0.045), rgba(16, 20, 28, 0.9) 38%); }
.directory-item article:hover { border-color: rgba(84, 225, 242, 0.32); transform: translateY(-2px); }
.directory-item__description, .directory-item__meta, .verification { color: var(--ink-soft); }
.status--online { color: #72dfa9; background: rgba(114, 223, 169, 0.08); }
.status--planned, .status--maintenance { color: var(--amber); background: rgba(233, 173, 93, 0.08); }
.count { color: var(--sea); border-color: rgba(84, 225, 242, 0.2); background: rgba(84, 225, 242, 0.06); }
.table-scroll th { color: #8390a0; background: rgba(7, 9, 13, 0.9); }
.table-scroll td, .table-scroll th { border-color: var(--line); }
.site-footer { color: #657181; border-top-color: var(--line); font-family: Consolas, monospace; font-size: 0.68rem; letter-spacing: 0.05em; }

@media (max-width: 42rem) {
  .auth-page { width: min(100% - 1rem, 80rem); padding-block: 1rem 2.5rem; }
  .auth-card { border-radius: 0.95rem; }
  .auth-statusline { align-items: flex-end; flex-direction: column; gap: 0.25rem; }
  .site-header { background: rgba(7, 9, 13, 0.92); }
}
