/* ========================================================================
   Light theme base (shared)
   ======================================================================== */
:root{
  --bg: #f8fafc;               /* page background */
  --text: #0f172a;             /* primary text */
  --muted: #64748b;            /* secondary text */
  --card: #ffffff;             /* card bg */
  --border: #e5e7eb;           /* light border */
  --accent: #7c3aed;           /* purple */
  --accent-hover: #6d28d9;
  --shadow: 0 6px 20px rgba(2, 6, 23, .06);
  --pill-bg: #f1f5f9;          /* light pill */
  --ok: #10b981;               /* emerald */
  --warn: #f59e0b;             /* amber */
  --bad: #ef4444;              /* red */
}




* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 32px 16px;
}

/* Center main content on wide screens */
.wrap, body > .card, body > .container {
  max-width: 1100px;
  margin-inline: auto;
  margin-bottom: 10px
}

/* Typography */
h1 { font-size: 2.25rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.25rem; line-height: 1.35; margin: 0 0 10px; }
p  { color: var(--muted); line-height: 1.65; margin: 0.25rem 0 1rem; }

.muted { color: var(--muted); }

/* Cards & panels */
.card, .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel { padding: 16px; }

/* Head row inside cards (score.html) */
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Buttons */
.btn, button.primary, button.ghost, .btn.secondary {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn, button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.25);
}
.btn:hover, button.primary:hover { background: var(--accent-hover); }

.btn:disabled, button:disabled {
  opacity: .65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Ghost / secondary */
button.ghost, .btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
button.ghost:hover, .btn.secondary:hover {
  border-color: #cbd5e1;
}

/* Pills (for score numbers) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
}
.pill strong { margin-left: 4px; }

/* Small status dot (color set via JS in score) */
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #cbd5e1; /* default */
  display: inline-block;
}
.dot.ok { background: var(--ok); }

/* Code blocks */
pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
pre {
  background: #f5f7ff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
  margin: 0;
}

/* ========================================================================
   Forms (score.html, billing.html)
   ======================================================================== */
form { margin: 0; }

.row { margin-bottom: 12px; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input:not([type]),
textarea {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

textarea { min-height: 88px; resize: vertical; }

input:focus, textarea:focus {
  border-color: #c4b5fd; /* indigo-300 */
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* Button row under form */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ========================================================================
   Score layout (score.html)
   ======================================================================== */
.body { margin-top: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 14px;
  margin-top: 16px;
}

/* decision text */
#decision { margin-top: 6px; }

/* JSON output area */
#jsonOut {
  max-height: 420px;
  overflow: auto;
  line-height: 1.5;
}

/* ========================================================================
   Tables (batch.html)
   ======================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

thead th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: #334155; /* slate-700 */
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody td {
  font-size: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(odd) td { background: #fcfcff; }

tbody tr:hover td {
  background: #f5f7ff;
}

/* results container scroll */
#results { overflow: auto; max-height: 560px; }

/* ========================================================================
   Billing page (billing.html)
   ======================================================================== */
#key {
  font-size: 15px;
  user-select: all;
  display: inline-block;
}

.ok {
  color: var(--ok);
  margin-left: 10px;
  display: none; /* shown after copy */
}

.tips {
  margin-top: 10px;
  color: var(--muted);
}

/* Button row on billing page */
.card .row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================================================================
   Utilities & responsive
   ======================================================================== */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .card, .panel { padding: 16px; }
  h1 { font-size: 1.75rem; }
}



/* Code blocks: light background */
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
pre {
  background: #f5f7ff;               /* soft indigo-tint */
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
}

/* Language tabs */
#quickstart .tab{background:#fff;border:1px solid var(--border);color:var(--text);padding:6px 10px;border-radius:8px;cursor:pointer;font-weight:600;box-shadow: var(--shadow)}
#quickstart .tab.active{background:var(--accent);border-color:var(--accent);color:#fff}

/* Privacy note block */
#privacy-note{
  margin-top:14px;
  background:#f1f5ff;
  border:1px solid #dbeafe;
  padding:12px;
  border-radius:10px
}


/* ---------- Score form layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; }

#scoreForm { display: grid; gap: 14px; }

/* 2-column rows: label | input */
#scoreForm .row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

/* Labels aligned and tidy */
#scoreForm label {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

/* Inputs/textarea uniform */
#scoreForm input,
#scoreForm textarea {
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#scoreForm input::placeholder,
#scoreForm textarea::placeholder { color: var(--muted); opacity: .9; }

#scoreForm input:focus,
#scoreForm textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

#scoreForm textarea { min-height: 96px; resize: vertical; }

/* Buttons row */
#scoreForm .actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Buttons consistent with theme */
#scoreForm .primary { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
#scoreForm .primary:hover { background: var(--accent-hover); }
#scoreForm .ghost { background: #fff; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
#scoreForm .ghost:hover { border-color: var(--accent); color: var(--accent); }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Pills for the score chips */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
}
.pill .dot {
  width: 10px; height: 10px; border-radius: 999px; background: #ccc; display: inline-block;
}

/* JSON block */
#jsonOut {
  background: #f5f7ff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 10px;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

/* Mobile: stack labels above inputs */
@media (max-width: 640px) {
  #scoreForm .row { grid-template-columns: 1fr; }
  #scoreForm label { margin-bottom: 6px; }
  .grid { grid-template-columns: 1fr; }
}


/* ---------- Generic card grid (used by index: USPs, tiles, etc.) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

/* Make feature cards equal height and tidy */
.grid > .feature {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.grid > .feature h3 { margin: 0 0 10px; }
.grid > .feature .muted { margin-bottom: 10px; }
.grid > .feature .checks { margin-top: auto; }

/* ---------- Plans layout (spacing so it doesn’t look clumped) ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.plan { display: flex; flex-direction: column; }
.plan h3 { margin: 0 0 8px; }

.kvs {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.kvs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.kvs li:last-child { border-bottom: 0; }

.plan .btn { margin-top: 12px; align-self: flex-start; }

/* Give consistent vertical rhythm inside cards */
.card > * + * { margin-top: 12px; }

/* ---------- SCORE PAGE ONLY: results grid next to the form ---------- */
/* Scope to the grid that follows the form so it doesn’t affect homepage */
#scoreForm + .grid {
  grid-template-columns: 1fr 1fr;   /* 2 columns on wide screens */
  gap: 16px;
}
#scoreForm + .grid .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}
/* Stack on small screens */
@media (max-width: 640px) {
  #scoreForm + .grid { grid-template-columns: 1fr; }
}


/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* tiny status dot or icon inside chips */
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* clickable variant */
.chip.is-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.chip.is-clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2,6,23,.08); }
.chip.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* color variants (optional) */
.chip--accent  { background: #f3e8ff; border-color: #e9d5ff; color: #5b21b6; }
.chip--success { background: #ecfdf5; border-color: #d1fae5; color: #065f46; }
.chip--warn    { background: #fff7ed; border-color: #ffedd5; color: #9a3412; }

/* layout helper for groups of chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Back-compat: make .pill look like .chip */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12px;
        border-radius: 999px; background: var(--pill-bg); border: 1px solid var(--border); color: var(--text); }



/* FEATURES — reusable cardlets */
.grid.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;              /* equal heights */
}

.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  height: 100%;
}

.feature:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  box-shadow: 0 8px 24px rgba(2, 6, 23, .08);
}

/* Optional clickable feature */
.feature.is-link { cursor: pointer; text-decoration: none; color: inherit; }

/* Icon badge */
.feature .icon {
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, #fff);
}

/* Content */
.feature .content { flex: 1 1 auto; min-width: 0; }
.feature .title   { margin: 0; font-size: 1.05rem; font-weight: 700; }
.feature .muted   { color: var(--muted); margin-top: 4px; line-height: 1.55; }

/* Tiny stat variant */
.feature .stat {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

/* Footer row (chips, links) */
.feature .foot {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}

/* Chip (reuses your palette) */
.feature .chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Media-first support (image or illustration left) */
.feature.media {
  align-items: center;
}
.feature.media img, .feature.media svg {
  flex: 0 0 56px; height: 56px; width: 56px; border-radius: 12px;
}

/* Compact variant for dense areas */
.feature.compact { padding: 12px 14px; gap: 10px; }
.feature.compact .title { font-size: 1rem; }

/* Responsive nits */
@media (max-width: 560px) {
  .feature { padding: 14px; }
  .feature .icon { width: 36px; height: 36px; border-radius: 9px; }
  .feature .stat { font-size: 1.25rem; }
}


/* --- A: Clean pills --- */
.checks{list-style:none;margin:10px 0 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.checks li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--border);
  border-radius:12px;background:var(--card);box-shadow:var(--shadow)}
.check{flex:0 0 20px;height:20px;line-height:20px;text-align:center;border-radius:50%; font-weight:900;font-size:12px}

.checks li span:last-child{color:var(--text);line-height:1.5}

