/*
 * Tungsten's style for the sign-in pages.
 * Type: Proxima Nova, the house face for screens; Montserrat stands in where
 * Proxima Nova isn't installed (Tungsten brand notes).
 * White dominates, black for words and the button. No rounded corners
 * anywhere (the 2019 style guide).
 * The logo is the exact asset file, never redrawn: the primary form on the
 * sign-in pages, since that space is tall, and the side form on the wider
 * admin page.
 */
:root {
  --ink: #000000;
  --paper: #ffffff;
  --quiet: #595959;
  --line: #000000;
  --face: "proxima-nova", "Proxima Nova", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; border-radius: 0; }

html { background: var(--paper); color: var(--ink); font-family: var(--face); }

body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; }

main { width: 100%; max-width: 26rem; padding: 3rem 1.5rem; }

.logo { display: block; height: 7.5rem; width: auto; margin: 0 0 3rem; }

h1 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; margin: 0 0 1rem; outline: none; }

p { font-size: 1rem; line-height: 1.5; margin: 0 0 1rem; }

.quiet, .quiet a { color: var(--quiet); }

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

form { margin-top: 1.5rem; }

label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }

input {
  display: block; width: 100%; font: inherit; font-size: 1rem;
  padding: 0.75rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  margin-bottom: 1rem;
}

button {
  display: block; width: 100%; font: inherit; font-size: 1rem; font-weight: 600;
  padding: 0.875rem 1.5rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; margin-top: 1.5rem;
}
form button { margin-top: 0; }
button:disabled { opacity: 0.5; cursor: progress; }
/* Gray until a name is typed (two letters, for any name). */
button.idle:disabled { opacity: 0.3; cursor: default; }
/* A quiet line of text that acts, like "Not Jahan?" or "Use my email instead". */
button.text {
  display: inline; width: auto; padding: 0; margin: 0; border: 0; background: none;
  color: var(--quiet); font-weight: 400; text-decoration: underline; cursor: pointer;
}
.note { margin: 1.5rem 0 0; }
.note + form { margin-top: 1rem; }
/* The staff email box: the company part is filled in, so Ana types only "ana". */
.suffixed { display: flex; align-items: stretch; border: 1px solid var(--line); margin-bottom: 1rem; }
.suffixed input { border: 0; margin: 0; min-width: 0; flex: 1; }
.suffixed .suffix { display: flex; align-items: center; padding: 0 0.75rem 0 0; color: var(--quiet); white-space: nowrap; }
.suffixed:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.suffixed input:focus-visible { outline: 0; }

/* The admin page: wider, with a table, details and history. */
body.wide { align-items: flex-start; }
.wide main { max-width: 48rem; }
.logo.side { height: 2.5rem; margin-bottom: 2.5rem; }
.wide h1 { margin-top: 0.5rem; }
h2 { font-size: 1.125rem; font-weight: 600; margin: 2.5rem 0 1rem; }
.back { margin-bottom: 0.5rem; }
.notice { border-left: 3px solid var(--ink); padding: 0.5rem 0 0.5rem 1rem; }
.notice.problem { font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
th, td { text-align: left; padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.875rem; }
td { overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0 0 2rem; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.field { margin-bottom: 1rem; }
.field input { margin-bottom: 0.25rem; }
.hint { font-size: 0.875rem; margin: 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; align-items: center; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; }
.check label { margin: 0; }
.check .hint { grid-column: 2; }
.wide form button, .buttons button { width: auto; }
.buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 0; }
.buttons button { margin: 0; }
button.danger { background: var(--paper); color: var(--ink); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.more { margin-top: 1.5rem; }
@media (max-width: 40rem) {
  .wide main { padding: 2rem 1rem; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 0.125rem 0; }
  .wide form button, .buttons button { width: 100%; }
}

input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
