/* Project Goldfinch. One stylesheet, no outside files. */
:root {
  color-scheme: dark;
  --ground: #1b1c1e;
  --panel: #232528;
  --line: #3b3e43;
  --text: #ece9e2;
  --muted: #aaa79f;
  --gold: #f4c20d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--gold); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3 { line-height: 1.25; font-weight: 600; }

/* The gate: the name, the email, the PIN and the button, centered. */
body.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.gate main {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.gate h1 {
  margin: 0 0 28px;
  font-size: clamp(18px, 5.6vw, 23px);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gate label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.gate input[type="text"],
.gate input[type="email"] {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 19px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.gate input[type="text"]:focus-visible,
.gate input[type="email"]:focus-visible { border-color: var(--gold); }

.gate input[type="email"] {
  letter-spacing: 0;
  text-transform: none;
  font-size: 17px;
  margin-bottom: 16px;
}

button {
  font: inherit;
  cursor: pointer;
}

.gate button {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: #1b1c1e;
  font-weight: 600;
}

.gate button:focus-visible { outline-color: var(--text); }

.msg {
  min-height: 1.6em;
  margin: 16px 0 0;
  color: var(--gold);
}

/* Inside the gate. */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 72px;
}

.wrap.wide { max-width: 980px; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.top .name {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.top form { margin: 0; }

button.quiet {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
}

details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  margin-bottom: 10px;
}

summary {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
}

summary::marker { color: var(--gold); }

details[open] > summary { border-bottom: 1px solid var(--line); }

.num {
  color: var(--gold);
  margin-right: 4px;
}

.body { padding: 4px 16px 12px; }

.body img {
  max-width: 100%;
  height: auto;
}

.body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.placeholder, .note { color: var(--muted); }

.updates {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}

.updates li { padding: 6px 0; }

.updates .date {
  color: var(--gold);
  margin-right: 8px;
  white-space: nowrap;
}

/* The visits page. */
.scroll {
  overflow-x: auto;
  margin-bottom: 28px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
