/* Direction A, "Lantern" (mockups canvas, picked 2026-10-24). Fonts are self-hosted (OFL, see fonts/). */
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/cormorant-garamond-700.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400 500; font-style: normal; font-display: swap; src: url(/fonts/eb-garamond.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/eb-garamond-italic.woff2) format("woff2"); }

:root {
  --bg: #12100c;
  --card: #1d1912;
  --field: #0f0d09;
  --line: #3a3224;
  --text: #e8e0cf;
  --dim: #b3a78f;
  --faint: #a89c84;
  --gold: #d6b25e;
  --gold-hi: #ecd08a;
  --ink: #1a1408;
  --bad: #e8907f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* display rules below would otherwise beat the attribute */
html, body { margin: 0; background: var(--bg); }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--text);
  font: 17px/1.5 "EB Garamond", Georgia, serif;
}
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.card.wide { max-width: 580px; gap: 24px; }

.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.brand img { width: 84px; height: 84px; }
.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-row img { width: 64px; height: 64px; flex: none; }
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; color: var(--gold); margin: 0; }
h1 { font-size: 36px; letter-spacing: 0.02em; line-height: 1.1; }
.wide h1 { font-size: 30px; }
h2 { font-size: 20px; }
.tag { margin: 0; color: var(--dim); font-style: italic; font-size: 17px; line-height: 1.4; }

form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--dim); }
input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
input::placeholder { color: #7d7262; }
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

button, .button {
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 22px;
}
button:hover, .button:hover { background: var(--gold-hi); color: var(--ink); }
button:disabled { opacity: 0.6; cursor: wait; }
.quiet { height: 44px; background: transparent; border: 1px solid var(--line); color: var(--text); font-size: 16px; padding: 0 18px; }
.quiet:hover { background: #2a2419; color: var(--text); }

#enroll img { display: block; margin: 4px auto; background: #fff; padding: 8px; border-radius: 6px; }
code { color: var(--gold); word-break: break-all; font-size: 15px; }
.small { color: var(--faint); font-size: 14px; margin: 0; }
.center { text-align: center; }
#msg { min-height: 1.5em; margin: 0; text-align: center; }
#msg.bad { color: var(--bad); }

.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.files li { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); }
.files .what { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.files .name { font-size: 19px; font-weight: 500; }
.needs ul { margin: 6px 0 0; padding-left: 20px; color: var(--dim); font-size: 16px; line-height: 1.6; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- signed-in pages: top navigation (Account tab only for Admins and GMs) */
body.app { justify-content: flex-start; gap: 28px; padding-top: 0; }
.topnav {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.topnav .mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; font-size: 21px; letter-spacing: 0.02em; }
.topnav .mark img { width: 32px; height: 32px; }
.topnav nav { display: flex; gap: 6px; }
.topnav nav a { color: var(--dim); text-decoration: none; padding: 8px 14px; border-radius: 6px; font-size: 17px; }
.topnav nav a:hover { color: var(--text); background: #2a2419; }
.topnav nav a[aria-current="page"] { color: var(--gold); background: var(--card); border: 1px solid var(--line); }
@media (max-width: 480px) { .topnav .mark span { display: none; } }

/* ---- first sign-in steps */
.steps { list-style: none; display: flex; gap: 6px; margin: 0 0 16px; padding: 0; counter-reset: step; }
.steps li { flex: 1; text-align: center; font-size: 14px; color: var(--faint); padding: 8px 4px 6px; border-bottom: 2px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.done { color: var(--dim); border-color: #6b5a33; }
.steps li.now { color: var(--gold); border-color: var(--gold); }
#step-totp img { display: block; margin: 4px auto; background: #fff; padding: 8px; border-radius: 6px; }

/* ---- Account page */
.card.full { max-width: 1040px; gap: 26px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.whoami { text-align: right; }
.note { margin: 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: #17140e; color: var(--dim); font-size: 15px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #19160f; }
#create { display: grid; grid-template-columns: 1.3fr 1.3fr 0.7fr auto; gap: 14px; align-items: end; }
@media (max-width: 860px) { #create { grid-template-columns: 1fr; } }
select { height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--text); font: inherit; font-size: 16px; }
select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.with-button { display: flex; gap: 8px; }
.with-button input { flex: 1; min-width: 0; font-family: Consolas, "Courier New", monospace; font-size: 15px; }
.issued { border-color: var(--gold); }
.issued dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; align-items: center; }
.issued dt { color: var(--dim); font-size: 15px; }
.issued dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.issued code { font-family: Consolas, "Courier New", monospace; font-size: 18px; color: var(--gold-hi); }
.small-btn { height: 34px; font-size: 15px; padding: 0 12px; }

.table-wrap { overflow-x: auto; }
table.accounts { width: 100%; border-collapse: collapse; font-size: 16px; }
.accounts th { text-align: left; font-weight: 500; color: var(--faint); font-size: 14px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.accounts td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.accounts td.email { word-break: break-all; }
.accounts .none { color: var(--faint); font-style: italic; }
.role { display: inline-block; font-size: 14px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.role.admin { color: var(--gold-hi); border-color: var(--gold); }
.role.gm { color: #b9d39a; border-color: #5d6e48; }
.status { font-size: 15px; }
.status.active { color: #b9d39a; }
.status.pending { color: var(--gold); }
.status.locked, .status.disabled { color: var(--bad); }
.status small { display: block; color: var(--faint); font-size: 13px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acts button, .acts select { height: 34px; font-size: 14px; padding: 0 10px; }
.acts .danger { border-color: #6e3a30; color: var(--bad); }
.acts .danger:hover { background: #2a1813; }
.acts .locked-note { color: var(--faint); font-size: 14px; font-style: italic; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 760px) {
  .accounts thead { display: none; }
  .accounts tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .accounts td { display: flex; gap: 12px; justify-content: space-between; border: 0; padding: 4px 0; }
  .accounts td::before { content: attr(data-label); color: var(--faint); font-size: 14px; flex: none; }
  .acts { justify-content: flex-start; }
}

.audit { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); font-size: 15px; }
.audit li { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.audit time { color: var(--faint); min-width: 140px; }
.audit .who { color: var(--dim); }

dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 26px; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8, 6, 3, 0.7); }
dialog form { gap: 14px; }
.dlg-buttons { display: flex; justify-content: flex-end; gap: 10px; }
#create label, #create input, #create select, .with-button { min-width: 0; width: 100%; }
.with-button button { flex: none; }
.accounts td.when { white-space: nowrap; }
@media (max-width: 480px) {
  .card { padding: 26px 18px; }
  .panel { padding: 16px 14px; }
  .accounts td.when { white-space: normal; }
}
