/* Access screen styles (PULSO 0.7.1 §14).
 *
 * Standalone rather than an addition to assets/styles.css: that stylesheet
 * is 40 KB of mockup chrome (sidebar grid, tables, timelines) and stays
 * BEHIND the gate — serving it to anonymous callers would widen the public
 * surface for no benefit. The design tokens below are copied from
 * styles.css's :root so both screens look like one product; they are the
 * only duplication, and they are inert values.
 *
 * Accessibility (§14): visible focus ring on every interactive element,
 * >= 4.5:1 text contrast, no colour-only signalling (each message carries
 * text), 44px minimum touch targets, and a layout that reflows to a narrow
 * viewport without horizontal scrolling.
 */

:root {
  --bg: #eef2f4;
  --bg-grid: radial-gradient(circle at 18% 0%, rgba(118, 185, 0, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.04) 25%, transparent 25%) 0 0 / 18px 18px;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #111827;
  --muted: #5d6b7c;
  --line: #d8e0e6;
  --line-strong: #b8c4cf;
  --graphite: #111827;
  --green: #76b900;
  --green-dark: #4d7c0f;
  --blue: #2563eb;
  --danger: #b42318;
  --ok: #13795b;
  --shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grid);
  line-height: 1.5;
}

.access-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.access-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px 20px;
}

.access-header { margin-bottom: 24px; }
.access-logo { display: block; margin-bottom: 12px; }

.access-eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.access-card h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--graphite);
}

.access-subtitle {
  margin: 0 0 8px;
  font-size: 1.125rem;
  color: var(--graphite);
}

.access-lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.access-lede strong { color: var(--ink); }

.access-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.access-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.access-input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

/* Wide letter-spacing makes a 6-digit code easy to read back and to check
 * for a typo before submitting. */
.access-input-code {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.access-hint {
  margin: 8px 0 20px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.access-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: var(--graphite);
  border: 1px solid var(--graphite);
  border-radius: 8px;
  cursor: pointer;
}

.access-button:hover { background: #1f2937; }

.access-button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.access-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

.access-link-button {
  padding: 6px 0;
  min-height: 32px;
  font: inherit;
  font-size: 0.875rem;
  color: var(--blue);
  background: none;
  border: none;
  /* Underlined, not colour-only, so the affordance survives a
   * monochrome or high-contrast rendering. */
  text-decoration: underline;
  cursor: pointer;
}

.access-link-button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.access-link-button[disabled] {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
}

/* The live region. Empty by default and given no height so it does not
 * reserve blank space; each state adds its own left border AND text. */
.access-message:empty { display: none; }

.access-message {
  margin: 20px 0 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  border-left: 4px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: 4px;
}

.access-message[data-tone="info"] { border-left-color: var(--blue); }
.access-message[data-tone="ok"] { border-left-color: var(--ok); color: var(--ok); }
.access-message[data-tone="error"] { border-left-color: var(--danger); color: var(--danger); }

.access-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.access-footer p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 420px) {
  .access-card { padding: 24px 20px 16px; }
  .access-card h1 { font-size: 1.3125rem; }
}

/* Respect a reduced-motion preference: there is no animation here today,
 * but the countdown updates once per second and a future transition must
 * not be added without this guard. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
