/* Shared colour tokens for every Clipper page. Text tokens are all >= 4.5:1
   on both --bg and --surface; --on-accent is the text colour for anything
   sitting on --accent (white on the orange is only 2.8:1). */
:root {
  color-scheme: dark;
  accent-color: #ff6b35;

  --bg: #0f1419;
  --bg-deep: #0a0e12;
  --surface: #1a2028;
  --border: #2a3038;

  --text: #e8e8e8;
  --text-2: #ccc;
  --text-3: #aaa;
  --muted: #8b95a0;

  --accent: #ff6b35;
  --accent-hover: #ff7d4d;
  --on-accent: #0f1419;

  --danger: #ff6e6e;
  --info: #66b3ff;
  --success: #5ce086;
}

* { box-sizing: border-box; }
/* Author display rules (e.g. #auth-gate { display: flex }) would otherwise
   override the [hidden] attribute; keep "hidden = invisible" so pages can
   toggle screens from JS. */
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 40px auto;
  padding: 0 20px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* === Password gate (index + maker) === */
#loading-indicator { color: var(--muted); text-align: center; padding: 80px 20px; font-size: 14px; }
#auth-gate {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
#auth-gate .gate-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}
#auth-gate h2 { margin: 0 0 8px; font-size: 22px; }
#auth-gate .gate-sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
#auth-gate input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  margin-bottom: 12px;
}
#auth-gate input[type="password"]:focus { border-color: var(--accent); }
#auth-gate button { width: 100%; }
#auth-error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* Touch screens: 16px fields so iOS Safari doesn't zoom the page on focus. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}
