:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --accent: #2563eb;
  --border: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #f0f0f0;
    --muted: #a0a0a0;
    --accent: #60a5fa;
    --border: #2a2a2a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

main {
  max-width: 640px;
  margin: 0 auto;
}

header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 0.25rem 0;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.tagline {
  color: var(--muted);
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--accent);
}

.experiments {
  list-style: none;
  padding: 0;
}

.experiments li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.experiments li:last-child {
  border-bottom: none;
}

.experiment-note {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

button {
  font: inherit;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.1);
}

/* ---- terminal-style password gate (index.html) ----
   Always dark, regardless of OS theme. Self-contained styles
   so changing the rest of styles.css won't affect the gate. */

body.terminal {
  background: #0a0a0a;
  color: #e4e4e4;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.terminal-gate {
  width: 100%;
  max-width: 480px;
}

.terminal-gate .gate-logo {
  display: block;
  width: 84px;
  height: auto;
  margin: 0 auto 1.75rem;
  border-radius: 8px;
}

.terminal-gate p {
  margin: 0 0 0.75rem 0;
}

.terminal-gate .prompt {
  color: #4ade80;
  margin-right: 0.4rem;
}

.terminal-gate .prompt-line {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.terminal-gate .access-line {
  font-size: 1.15rem;
  color: #e4e4e4;
  margin-bottom: 2rem;
}

.terminal-gate .caret {
  display: inline-block;
  color: #4ade80;
  animation: terminal-blink 1.1s steps(2, start) infinite;
  margin-left: 1px;
}

@keyframes terminal-blink {
  to { visibility: hidden; }
}

.terminal-gate form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.terminal-gate .password-label {
  color: #9ca3af;
  margin: 0;
}

.terminal-gate input[type="password"] {
  font: inherit;
  background: transparent;
  color: #4ade80;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
  caret-color: #4ade80;
}

.terminal-gate input[type="password"]:focus {
  outline: none;
  border-color: #4ade80;
}

.terminal-gate input[type="password"].shake {
  animation: terminal-shake 0.35s ease-in-out;
  border-color: #f87171;
}

@keyframes terminal-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.terminal-gate .terminal-error {
  color: #f87171;
  min-height: 1.25rem;
  margin: 0.5rem 0 0 0;
}

.terminal-gate .hint {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.terminal-gate .hint kbd {
  font: inherit;
  color: #e4e4e4;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}

/* ---- command center dashboard (cc/index.html) ---- */

.dashboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  margin: 0;
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
}

.lock-button {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.lock-button:hover {
  color: var(--text);
  border-color: var(--muted);
  filter: none;
}

.link-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.link-grid a {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.link-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
