/*
 * Same burnt-orange palette as the promo site, so the two read as one product.
 * No fonts are bundled: this is an internal tool behind a sign-in, and the
 * weight is not worth it.
 */
:root {
  color-scheme: dark;

  --bg-top: #2e1608;
  --bg-bottom: #140800;
  --gold: #cc4e00;
  --accent: #fa9d4a;

  --ink: #fdf1e6;
  --ink-soft: #d3b49c;

  --panel: rgba(255, 210, 170, .06);
  --panel-lift: rgba(255, 210, 170, .1);
  --line: rgba(255, 210, 170, .16);

  --ok: #6ddc8b;
  --warn: #ff6b5e;

  --ease: cubic-bezier(.22, .68, .28, 1);
}

* { box-sizing: border-box; }

/*
 * `hidden` is a presentation hint with the specificity of a UA default, so any
 * `display` rule below beats it. Several elements here are flex or grid and
 * were staying visible while hidden — including the signed-out header, which
 * showed a "Sign out" button on the sign-in screen.
 */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
  color: var(--ink);
  font: 400 15px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 6px; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* ---- chrome ---- */

.bar {
  position: sticky; top: 0; z-index: 10;
  background: #180a01;
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 860px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark { font-weight: 700; letter-spacing: .02em; }
.wordmark em { font-style: normal; color: var(--accent); font-weight: 500; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-soft); }

main { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 0 0 18px;
}
.panel.center { text-align: center; }

/* ---- forms ---- */

label { display: block; font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
input, select {
  display: block; width: 100%; margin-top: 5px;
  padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
  color: var(--ink); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  border: 2px solid transparent; background: var(--gold); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), opacity .2s var(--ease);
}
.btn:hover:not(:disabled) { background: #e05600; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.ghost:hover:not(:disabled) { background: rgba(250, 157, 74, .14); }
.btn.warn { background: transparent; color: var(--warn); border-color: var(--warn); }
.btn.warn:hover:not(:disabled) { background: rgba(255, 107, 94, .14); }
.btn.sm { padding: 5px 12px; font-size: 13px; }

.signin, .denied { max-width: 340px; margin: 0 auto; text-align: left; }
.signin p, .denied p { margin: 0 0 16px; }
.denied { text-align: center; }

.search { display: flex; gap: 12px; align-items: flex-end; }
.search .grow { flex: 1; margin: 0; }

.error { color: var(--warn); margin: 12px 0 0; font-size: 14px; }
.ok { color: var(--ok); margin: 12px 0 0; font-size: 14px; }
.loading { color: var(--ink-soft); }

/* ---- results ---- */

#results:not(:empty) { margin-top: 16px; }
.result {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.result:hover { background: var(--panel-lift); }
.result small { color: var(--ink-soft); display: block; }

/* ---- account ---- */

.account-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 18px;
}
.pill {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.pill.on { background: rgba(109, 220, 139, .16); color: var(--ok); }
.pill.off { background: rgba(255, 107, 94, .16); color: var(--warn); }

.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px;
  margin: 0 0 24px; font-size: 14px;
}
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }

.actions { display: grid; gap: 10px; margin: 14px 0 0; }
.action {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  padding: 14px; border: 1px solid var(--line); border-radius: 10px;
}
.action label { flex: 1; margin: 0; }
.action-label { flex: 1; font-size: 14px; color: var(--ink-soft); }
.action.danger { border-color: rgba(255, 107, 94, .35); }

.raw { margin-top: 22px; }
.raw summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }
.raw pre {
  overflow-x: auto; padding: 12px; border-radius: 8px;
  background: rgba(0, 0, 0, .35); font-size: 12px;
}

/* ---- activity ---- */

.activity { display: grid; gap: 8px; }
.entry {
  display: grid; grid-template-columns: 1fr max-content; gap: 4px 16px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px;
}
.entry time { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.entry .what { font-weight: 600; }
.entry .detail { grid-column: 1 / -1; color: var(--ink-soft); font-size: 13px; }

/* ---- dialog ---- */

dialog {
  border: 1px solid var(--line); border-radius: 14px;
  background: #24120a; color: var(--ink);
  padding: 22px; max-width: 400px; width: calc(100% - 40px);
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog menu { display: flex; gap: 10px; justify-content: flex-end; margin: 18px 0 0; padding: 0; }

@media (max-width: 620px) {
  .search { flex-direction: column; align-items: stretch; }
  .action { flex-direction: column; align-items: stretch; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

/* ---- creating an account ---- */

.create-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: 14px;
  margin: 14px 0 4px;
}
.create-grid label { margin: 0; }

.setup-link {
  margin: 16px 0 0; padding: 14px;
  border: 1px solid var(--accent); border-radius: 10px;
  background: rgba(250, 157, 74, .08);
}
.setup-link .ok { margin: 0 0 10px; }
.setup-link input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}

/* Signup rows are buttons; strip the control chrome so they read as list rows. */
.entry.as-button {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: transparent; color: inherit;
}
.entry.as-button:hover { background: var(--panel-lift); }

@media (max-width: 620px) {
  .create-grid { grid-template-columns: 1fr; }
}
