/* LazerMCP Global Styles */
:root {
  /* Light Theme */
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #111111;
  --mute: #5a5a5a;
  --line: #e4e4e4;

  /* Semantic Colors */
  --cut: #e10600;
  --pass: #0b7a4b;
  --warn: #8a5d00;

  --surface: #f3eee6;
  --surface-alt: #f4efe6;
  --surface-ok: #eef7f2;

  /* Fonts */
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --paper: #1c1c1c;
    --ink: #ffffff;
    --mute: #a0a0a0;
    --line: #333333;

    --cut: #ff4d4d;
    --pass: #32a852;
    --warn: #f5b041;

    --surface: #222222;
    --surface-alt: #2a2a2a;
    --surface-ok: #153320;
  }
}

/* Dark mode explicit override (if toggled via class) */
body.dark-mode {
  --bg: #111111;
  --paper: #1c1c1c;
  --ink: #ffffff;
  --mute: #a0a0a0;
  --line: #333333;
  --cut: #ff4d4d;
  --pass: #32a852;
  --warn: #f5b041;

  --surface: #222222;
  --surface-alt: #2a2a2a;
  --surface-ok: #153320;
  color-scheme: dark;
}

/* This must override the OS-level media query. Without it, an OS set to dark
   could keep dark tokens after the user explicitly chose the light theme. */
body.light-mode {
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #111111;
  --mute: #5a5a5a;
  --line: #e4e4e4;
  --cut: #e10600;
  --pass: #0b7a4b;
  --warn: #8a5d00;
  --surface: #f3eee6;
  --surface-alt: #f4efe6;
  --surface-ok: #eef7f2;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  background: var(--bg);
}

a {
  color: inherit;
}

button {
  color: inherit;
  font-family: inherit;
}

input, select, textarea {
  font: 14px var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  width: 100%;
  padding: 10px 12px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--cut);
  outline-offset: 3px;
}

/* Typography */
h1, h2, h3 {
  letter-spacing: -0.03em;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 8px;
}

.kicker {
  font: 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cut);
}

.lede {
  color: var(--mute);
  max-width: 56ch;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink);
  position: relative;
}

.mark::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 8px;
  height: 1.5px;
  background: var(--cut);
}

nav .links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--mute);
}

nav .links a {
  text-decoration: none;
}

/* Components */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn.cut {
  background: var(--cut);
  border-color: var(--cut);
  color: #fff;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font: 500 14px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.btn-google svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-google[aria-disabled="true"] {
  opacity: 0.62;
  cursor: progress;
  pointer-events: none;
}

.theme-toggle {
  color: var(--ink) !important;
  border-radius: 4px;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Utilities */
.hide {
  display: none !important;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font: 13px var(--mono);
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
