/* Elle — hand-written CSS, no build step.
   Colours are defined once here and reused everywhere. Change a value in
   :root and it changes across the whole app. */

:root {
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --ink: #14161a;
  --muted: #5c6470;
  --line: #e4e7ec;
  --accent: #4338ca;
  --danger: #b42318;
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #16181d;
    --canvas: #0e1013;
    --ink: #eceef2;
    --muted: #9aa3b0;
    --line: #262a31;
    --accent: #a5b4fc;
    --danger: #fda29b;
  }
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin: 0.5rem 0; }

p { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.centre-text { text-align: center; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------- layout */

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.centre {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ---------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.625rem 1rem;
}

.identity { flex: 1; min-width: 0; }
.identity .name { font-size: 0.875rem; font-weight: 500; }

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
}

.small-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ---------------------------------------------------------- banner + tiles */

.banner { margin-bottom: 1.25rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

.tile.pending { border-style: dashed; }

.figure {
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin: 0.5rem 0;
}

.footnote { margin-top: 2rem; }

/* ---------------------------------------------------------- sign-in */

.signin { width: 100%; max-width: 22rem; }

.brand { text-align: center; margin-bottom: 2rem; }
.brand .mark { margin: 0 auto 1rem; }
.brand h1 { margin: 0; font-size: 1.5rem; }

.alert {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------- buttons */

.btn-primary,
.btn-quiet {
  display: block;
  width: 100%;
  min-height: 44px; /* comfortable tap target on a phone */
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.btn-quiet {
  width: auto;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-primary:hover,
.btn-quiet:hover { border-color: var(--accent); }

.btn-primary:focus-visible,
.btn-quiet:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.signin .btn-primary + .muted { margin-top: 1.5rem; }
