@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  button, input, textarea { font: inherit; color: inherit; }
}

@layer base {
  :root {
    --bg: #0e0f12;
    --fg: #e8eaed;
    --muted: #9aa0a6;
    --accent: #4cd97b;
    --accent-fg: #04150a;
    --surface: #1a1c20;
    --surface-2: #23262b;
    --border: #2c2f35;
    --radius: 8px;
    --max-w: 760px;
  }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.55;
  }

  main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px 16px 64px;
  }

  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

  code, pre { font-family: ui-monospace, 'SF Mono', Consolas, monospace; }

  pre.code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
  }
  pre.code .muted { color: var(--muted); }
}

@layer components {
  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .brand { font-size: 18px; margin: 0; }
  .nav-link { color: var(--muted); margin-left: 12px; }

  .hero h2 { font-size: 32px; margin: 32px 0 8px; }
  .hero .lead { font-size: 18px; color: var(--muted); }

  .signup, .endpoints, .verify { margin-top: 48px; }

  cc-signup-form { display: block; margin-top: 16px; }
  cc-signup-form form {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    max-width: 360px;
  }
  cc-signup-form input {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
  }
  cc-signup-form button {
    padding: 10px 16px;
    background: var(--accent);
    color: var(--accent-fg);
    border: 0;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
  }
  cc-signup-form button[disabled] { opacity: 0.6; cursor: progress; }
  cc-signup-form .msg { font-size: 14px; color: var(--muted); min-height: 1.2em; }
  cc-signup-form .msg.error { color: #ff9090; }
  cc-signup-form .msg.ok { color: var(--accent); }

  .endpoints ul { padding-left: 20px; }
  .endpoints code {
    background: var(--surface-2);
    border-radius: 4px;
    padding: 0 4px;
    font-size: 13px;
  }

  cc-verify-card .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
  }
  cc-verify-card .ok { color: var(--accent); }
  cc-verify-card .err { color: #ff9090; }

  footer {
    text-align: center;
    margin-top: 64px;
    padding: 16px;
    color: var(--muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
  }
}
