@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700;800&display=swap');

/* unliANALYTICS dark theme: green-charcoal backgrounds, leaf green primary, heart red accent. */
:root {
  color-scheme: dark;
  --bg: #0a0c0a;
  --bg-elevated: #11140f;
  --surface: #15180f;
  --surface-2: #1d221a;
  --ink: #f0f5f0;
  --muted: #a0b0a4;
  --faint: #6a7a6c;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #3da935; /* leaf green */
  --accent-hover: #4dbb44;
  --accent-light: #8ed04a;
  --accent-soft: rgba(61, 169, 53, 0.12);
  --accent-glow: rgba(61, 169, 53, 0.3);
  --love: #ff3340; /* heart red, used sparingly for attention */
  --love-soft: rgba(255, 51, 64, 0.12);
  --love-text: #ff6b74;
  --ok: #3da935;
  --ok-soft: rgba(46, 204, 113, 0.12);
  --ok-text: #5fd98a;
  --warn: #ff6b74;
  --warn-soft: rgba(255, 51, 64, 0.1);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* Soft green and red glows, echoing the unliANALYTICS hero */
  background-image:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(61, 169, 53, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(255, 51, 64, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-light); }
[hidden] { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; padding: 28px 16px 72px; }
.wrap.wide { max-width: 1160px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0; letter-spacing: -0.03em; }
h1 { font-size: clamp(2rem, 7vw, 3rem); }
h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

/* Green gradient text, like the website's headline highlight */
.hl {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Pill label, like the website's section tags */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}
.ornament { color: var(--accent); font-size: 1.4rem; line-height: 1; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* Forms */
.field { display: block; font-weight: 500; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--faint); }
input[type='text'], textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  padding: 12px 14px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type='text']:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 72px; }
.btn:focus-visible, .switch input:focus-visible + .track {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.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;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--faint); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 15px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 25px var(--accent-glow); transform: translateY(-1px); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn.danger { color: var(--love-text); border-color: var(--love-soft); }
.btn.danger:hover { background: var(--love-soft); border-color: var(--love); }
.btn.big { width: 100%; padding: 18px; font-size: 1.05rem; border-radius: 12px; }
.btn.big svg { width: 24px; height: 24px; }
.btn.small { padding: 7px 11px; font-size: 0.84rem; border-radius: 8px; }
.btn.small svg { width: 16px; height: 16px; }

/* Toggle switch */
.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  flex: none; position: relative; width: 46px; height: 28px; margin-top: 2px;
  background: #2b3228; border-radius: 999px; transition: background 0.2s, box-shadow 0.2s;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform 0.2s;
}
.switch input:checked + .track { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch strong { display: block; font-weight: 600; }

/* Notices and badges */
.notice { padding: 12px 14px; border-radius: 10px; font-size: 0.9rem; background: var(--surface-2); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted);
}
.badge.love { background: var(--love-soft); border-color: transparent; color: var(--love-text); }
.badge.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok-text); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong);
  padding: 12px 18px; border-radius: 10px;
  font-size: 0.92rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Brand: glowing icon tile + "unliSNAP" wordmark, matching the unliANALYTICS logo */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand b { color: var(--accent); font-weight: 800; letter-spacing: 0.02em; }
.brand svg {
  width: 40px; height: 40px; padding: 7px; flex: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(61, 169, 53, 0.5);
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(61, 169, 53, 0.12), 0 0 15px rgba(61, 169, 53, 0.25), 0 0 30px rgba(255, 51, 64, 0.1);
}
.brand svg path + path { stroke: var(--love); }

.made-by { text-align: center; font-size: 0.8rem; color: var(--faint); }
.made-by b { font-family: var(--mono); font-weight: 700; color: var(--muted); }
.made-by b span { color: var(--accent); }
