@font-face {
  font-family: "EBG";
  src: url("/fonts/EBGaramond-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EBG";
  src: url("/fonts/EBGaramond-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #0A1628;
  --title: #1E3A5F;
  --gold: #C9A227;
  --gray: #5F5F5F;
  --slate: #94A3B8;
  --ink: #111111;
  --stripe: #f4f2ec;
  --page: #ffffff;
  --bg: #e8e6de;
  --danger: #8b1e1e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "EBG", Garamond, serif;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  background: var(--bg);
}

.hbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 0.38in;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.75in;
}

.sheet {
  width: min(8.5in, 100%);
  margin: 18px auto 48px;
  background: var(--page);
  padding: 0.45in 0.75in 0.55in;
  box-shadow: 0 2px 10px rgba(10, 22, 40, 0.12);
}

.lock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 4px;
}
.lock img { height: 26px; width: auto; }

h1 {
  text-align: center;
  color: var(--title);
  font-size: 32px;
  line-height: 1.15;
  margin: 6px 0 4px;
  font-weight: 700;
}

.sub {
  text-align: center;
  color: var(--title);
  font-size: 20px;
  margin: 0 0 2px;
}

.date {
  text-align: center;
  color: var(--gray);
  font-size: 18px;
  margin: 0;
}

.rule {
  width: 2.6in;
  height: 2px;
  background: var(--gold);
  margin: 8px auto 16px;
}

h2 {
  color: var(--title);
  font-size: 20px;
  line-height: 1.2;
  margin: 18px 0 8px;
  font-weight: 700;
}
h2 small {
  font-weight: 400;
  color: var(--ink);
  font-size: 15px;
}

.id-block {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 10px;
  align-items: baseline;
  margin: 8px 0 6px;
}
.id-block .label {
  font-weight: 700;
  white-space: nowrap;
}
.id-row {
  display: contents;
}
.id-span {
  grid-column: 2;
}
.id-split {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 12px;
  align-items: baseline;
}
.id-split .label { margin-right: 8px; }

input[type="text"],
input[type="email"],
select {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--navy);
  border-radius: 0;
  padding: 2px 4px;
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus {
  outline: none;
  border-bottom-color: var(--gold);
  background: #fffdf5;
}
input.invalid,
select.invalid {
  border-bottom-color: var(--danger);
  background: #fdf2f2;
}

.user-preview {
  margin: 8px 0 16px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.35;
}
.user-preview b { color: var(--title); font-weight: 700; }
.user-preview .val { color: var(--ink); font-weight: 600; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.25;
}
th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 5px 8px;
  border-bottom: 2px solid var(--gold);
  font-weight: 700;
  vertical-align: bottom;
}
th small {
  display: block;
  font-weight: 400;
  color: #cfd6e0;
  font-size: 13px;
  line-height: 1.2;
}
td {
  padding: 4px 6px;
  border: 0.75pt solid var(--slate);
  vertical-align: middle;
}
tbody tr:nth-child(even) td { background: var(--stripe); }
tbody tr:nth-child(odd) td { background: #fff; }

table.devices th:nth-child(1),
table.devices td:nth-child(1) { width: 30%; }
table.devices th:nth-child(2),
table.devices td:nth-child(2) { width: 32%; }
table.devices th:nth-child(3),
table.devices td:nth-child(3) { width: 30%; }
table.bots th:nth-child(1),
table.bots td:nth-child(1),
table.bots th:nth-child(2),
table.bots td:nth-child(2) { width: 18%; }
table.bots th:nth-child(3),
table.bots td:nth-child(3) { width: 20%; }
table.bots th:nth-child(4),
table.bots td:nth-child(4) { width: 36%; }


td input[type="text"],
td select {
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 2px 4px;
}
td input[type="text"]:focus,
td select:focus {
  border-bottom-color: var(--gold);
}

.groups {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 2px 10px;
  align-items: center;
  justify-content: start;
}
.groups label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
}
.groups input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--navy);
  margin: 0;
}

.legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px 8px;
  font-size: 16px;
  line-height: 1.3;
  margin: 2px 0 10px;
}
.legend b { color: var(--ink); }

.row-actions {
  width: 2.1rem;
  text-align: center;
  padding: 0 2px;
}
button {
  font-family: inherit;
  cursor: pointer;
}
.btn-add,
.btn-download {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  border-bottom: 3px solid var(--gold);
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  margin: 8px 8px 0 0;
}
.btn-add:hover,
.btn-download:hover { background: var(--title); }
.btn-add:focus-visible,
.btn-download:focus-visible,
.btn-remove:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-remove {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--slate);
  font-size: 16px;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 2px;
}
.btn-remove:hover { color: var(--danger); border-color: var(--danger); }

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.err {
  color: var(--danger);
  font-size: 16px;
  margin: 0;
  min-height: 1.2em;
}

.fine {
  font-size: 15px;
  line-height: 1.35;
  margin-top: 18px;
  color: var(--ink);
}
.acr {
  font-size: 15px;
  line-height: 1.4;
  margin-top: 8px;
}
.acr .h {
  color: var(--title);
  font-weight: 700;
  font-size: 20px;
  margin-right: 8px;
}
.acr b { font-weight: 700; }

.foot {
  border-top: 0.75pt solid var(--slate);
  margin-top: 14px;
  padding-top: 6px;
  color: var(--gray);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 800px) {
  .hbar, .sheet { padding-left: 16px; padding-right: 16px; }
  .id-split { grid-template-columns: 1fr; row-gap: 10px; }
  .legend { grid-template-columns: repeat(2, 1fr); }
  .sheet { margin-top: 0; }
}

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

.dev-banner {
  background: #C9A227;
  color: #0A1628;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 3px solid #0A1628;
}

.sheet.wide {
  width: min(11in, 100%);
}

.btn-submit,
.btn-ok {
  background: #1b5e20;
  color: #fff;
  border: 1px solid #1b5e20;
  border-bottom: 3px solid #C9A227;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  margin: 8px 8px 0 0;
}
.btn-submit:hover,
.btn-ok:hover { background: #2e7d32; }
.btn-reject {
  background: #8b1e1e;
  color: #fff;
  border: 1px solid #8b1e1e;
  border-bottom: 3px solid #C9A227;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  margin: 8px 8px 0 0;
}
.btn-reject:hover { background: #6f1717; }
.btn-submit:focus-visible,
.btn-ok:focus-visible,
.btn-reject:focus-visible {
  outline: 2px solid #C9A227;
  outline-offset: 2px;
}

.ok-msg {
  color: #1b5e20;
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 0 8px;
  border-radius: 8pt;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  border-left: 4px solid;
  white-space: nowrap;
}
.pill.pending { background: #fff6cc; border-color: #c99a06; color: #6b5200; }
.pill.green-lit { background: #e3f6e1; border-color: #2e7d32; color: #1b5e20; }
.pill.rejected { background: #fdecea; border-color: #8b1e1e; color: #8b1e1e; }
.pill.active { background: #e3f6e1; border-color: #2e7d32; color: #1b5e20; }
.pill.used { background: #eef1f6; border-color: #1E3A5F; color: #1E3A5F; }
.pill.expired, .pill.revoked { background: #fdecea; border-color: #8b1e1e; color: #8b1e1e; }

table.admin td, table.admin th { font-size: 15px; }
table.admin tbody tr { cursor: pointer; }
table.admin tbody tr:hover td { background: #fbf6e3; }
table.admin tbody tr.selected td { background: #fbf6e3; outline: 1px solid #C9A227; }

.invite-form, .detail, .url-box {
  border: 1pt solid #94A3B8;
  padding: 12px 14px;
  margin: 12px 0 18px;
  background: #fff;
}
.url-box {
  background: #fbf6e3;
  border: 1pt dashed #C9A227;
  word-break: break-all;
  font-size: 15px;
}
.url-box label { font-weight: 700; color: #1E3A5F; display: block; margin-bottom: 4px; }

.invite-form .row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.invite-form .field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.pre {
  white-space: pre-wrap;
  font-family: "EBG", Garamond, serif;
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
}
.muted { color: #5F5F5F; font-size: 15px; }
.invite-only p { font-size: 18px; line-height: 1.4; }
.reason { color: #8b1e1e; font-weight: 700; }

@media (max-width: 900px) {
  .invite-form .row { grid-template-columns: 1fr; }
}

/* 2026-11-19: inline-editable application review (admin) */
table.admin th.twirl, table.admin td.twirl { width: 28px; text-align: center; color: #1E3A5F; font-size: 16px; }
table.admin tbody tr.expand-row { cursor: default; }
table.admin tbody tr.expand-row > td,
table.admin tbody tr.expand-row:hover > td { background: #fbf8ef; padding: 0; }
tr.expand-row .detail { margin: 0; border: none; border-left: 4px solid #C9A227; padding: 12px 16px 16px; cursor: auto; }
tr.expand-row .detail table td, tr.expand-row .detail table th { cursor: auto; }
.detail-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.detail-top h2 { margin: 0; }
.detail-h { color: #1E3A5F; font-size: 17px; margin: 16px 0 6px; border-bottom: 1px solid #C9A227; padding-bottom: 2px; }
.detail-h small { color: #5F5F5F; font-weight: 400; font-size: 13px; }
.detail table { margin: 0 0 6px; }
.detail table.kv { width: 100%; }
.detail table.kv th { background: #f4f2ec; color: #1E3A5F; text-align: left; width: 26%; font-size: 15px; vertical-align: top; }
.detail table.kv td { background: #fff; font-size: 15px; }
.detail table.kv.ro td { color: #111; }
.detail table.sub { width: 100%; margin: 2px 0; }
.detail table.sub th { font-size: 13px; padding: 2px 6px; }
.detail table.sub td { font-size: 14px; padding: 2px 6px; }
.detail .hint { color: #5F5F5F; font-size: 13px; margin-top: 2px; }
.detail input.changed, .detail select.changed { background: #fff6cc; border-bottom: 2px solid #C9A227; }
.detail tr.changed > td { background: #fff6cc !important; }
.detail tr.changed > td:first-child { box-shadow: inset 4px 0 0 #C9A227; }
.detail input:disabled, .detail select:disabled { color: #111; -webkit-text-fill-color: #111; opacity: 1; border-bottom-color: transparent; }
.detail select:disabled { appearance: none; }
.detail.readonly .groups input:disabled + * { opacity: 1; }
.detail table.history th { font-size: 13px; }
.detail table.history td { font-size: 14px; }
.detail table.history td.old { color: #8b1e1e; text-decoration: line-through; }
.detail table.history td.new { color: #1b5e20; font-weight: 600; }
.dirty { background: #fff6cc; border: 1px solid #C9A227; border-left: 4px solid #c99a06; color: #6b5200; font-weight: 700; font-size: 14px; padding: 1px 10px; border-radius: 8pt; }
.readonly-note { background: #eef1f6; border-left: 4px solid #1E3A5F; color: #1E3A5F; font-size: 15px; padding: 4px 10px; margin: 6px 0; }
.btn-save { background: #1E3A5F; color: #fff; border: 1px solid #1E3A5F; border-bottom: 3px solid #C9A227; font-weight: 700; font-size: 16px; padding: 6px 14px; margin: 8px 8px 0 0; }
.btn-save:hover { background: #0A1628; }
.btn-revert { background: #fff; color: #1E3A5F; border: 1px solid #1E3A5F; font-weight: 700; font-size: 16px; padding: 6px 14px; margin: 8px 8px 0 0; }
.btn-save:disabled, .btn-revert:disabled, .btn-ok:disabled, .btn-reject:disabled { opacity: 0.45; cursor: not-allowed; }
.reviewer-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.reviewer-row label { font-weight: 700; color: #1E3A5F; font-size: 15px; }
.reviewer-row input { width: 18em; }
#detail-error, #detail-ok { margin-top: 8px; }
[hidden] { display: none !important; }

/* public-intake additions (#550 revision, 2026-11-20) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#human-groups { margin: 0.25rem 0 1rem; }
.bots td.cos { text-align: center; width: 3rem; }
.pw-ok { color: #1b5e20; }
.pw-bad { color: #8b1a1a; }
