/* SkillSimm Simulation Hub — shared styles */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1f2430;
  --text-muted: #5b6270;
  --accent: #4655d4;
  --accent-soft: #eceefc;
  --border: #e3e1dc;
  --code-bg: #f1f0ec;
  --badge-community-bg: #fdf3e0;
  --badge-community-text: #8a5a11;
  --badge-verified-bg: #e4f4e8;
  --badge-verified-text: #1d6b37;
  --shadow: 0 1px 3px rgba(30, 34, 48, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181e;
    --surface: #1e212a;
    --text: #e8e9ec;
    --text-muted: #a0a5b1;
    --accent: #8b96f0;
    --accent-soft: #272c45;
    --border: #32363f;
    --code-bg: #262933;
    --badge-community-bg: #3a3020;
    --badge-community-text: #e4b566;
    --badge-verified-bg: #1f3527;
    --badge-verified-text: #7fce97;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

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

/* ---------- layout ---------- */

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent); }

nav.site a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.1rem;
  font-size: 0.95rem;
}

nav.site a:hover, nav.site a[aria-current="page"] {
  color: var(--accent);
}

main { padding: 2.5rem 0 4rem; }

footer.site {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1.5rem 0 2.5rem;
}

footer.site a { color: var(--text-muted); }

/* ---------- typography ---------- */

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

p.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 44rem;
}

a { color: var(--accent); }

ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }

/* ---------- components ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.btn.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn:hover { filter: brightness(1.08); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

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

.card h2, .card h3 { margin-top: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
}

.badge.community { background: var(--badge-community-bg); color: var(--badge-community-text); }
.badge.verified  { background: var(--badge-verified-bg);  color: var(--badge-verified-text); }

.meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.4rem 0;
}

.meta strong { color: var(--text); font-weight: 600; }

/* pipeline strip on the landing page */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}

.pipeline li::after {
  content: "";
}

.pipeline .arrow {
  background: none;
  color: var(--text-muted);
  padding: 0;
  font-weight: 400;
}

/* code + pre */
code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code { background: none; padding: 0; font-size: 0.85rem; }

/* copy-block: pre with a copy button */
.copy-block { position: relative; }

.copy-block button.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.copy-block button.copy:hover { color: var(--accent); border-color: var(--accent); }

/* tables */
.table-scroll { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { color: var(--text-muted); font-weight: 600; }

/* example / callout boxes */
.example {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.example .label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.35rem;
}

.callout {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

/* numbered step sections on create.html */
.stepnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-right: 0.55rem;
}

img { max-width: 100%; }
