/* CollabScience — shared styles */

:root {
  --ink: #1a2b2e;
  --ink-soft: #4a5d61;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-pale: #f0fdfa;
  --amber: #b45309;
  --amber-pale: #fffbeb;
  --red: #b91c1c;
  --red-pale: #fef2f2;
  --paper: #ffffff;
  --bg: #fafaf9;
  --border: #e7e5e4;
  --radius: 10px;
  --max-w: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  background: var(--paper);
  border-top: 4px solid var(--teal);
  border-bottom: 1px solid var(--border);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.logo { font-weight: 700; font-size: 1.15rem; color: var(--teal-dark); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--ink); }
header.site nav { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 22px; row-gap: 2px; }
nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--teal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--teal-dark); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: var(--teal-pale); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Pilot badge ---------- */
.pilot-badge {
  display: inline-block;
  background: var(--teal-pale); color: var(--teal-dark);
  border: 1px solid rgba(15,118,110,0.28);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 5px 16px; border-radius: 999px; margin-bottom: 20px;
}

/* ---------- Trust rail ---------- */
.trust-rail {
  background: var(--ink); padding: 15px 0;
}
.trust-rail .container {
  display: flex; justify-content: center; gap: 36px; flex-wrap: wrap;
}
.trust-item {
  color: rgba(255,255,255,0.78); font-size: 0.88rem;
  display: flex; align-items: center; gap: 7px;
}
.trust-item .ti-mark { color: #4ade80; font-weight: 700; font-size: 1rem; }

/* ---------- Landing ---------- */
.hero { padding: 72px 0 56px; text-align: center; background: var(--paper); border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.4rem; line-height: 1.2; letter-spacing: -0.02em; max-width: 720px; margin: 0 auto 18px; }
.hero h1 em { color: var(--teal); font-style: normal; }
.hero p.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

section { padding: 56px 0; }
section h2 { font-size: 1.6rem; margin-bottom: 24px; letter-spacing: -0.01em; }
section a:not(.btn) { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
section a:not(.btn):hover { color: var(--teal); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.step {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: box-shadow 0.15s;
}
.step:hover { box-shadow: 0 4px 16px rgba(15,118,110,0.10); }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }

.not-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.not-list li {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; font-size: 0.95rem; color: var(--ink-soft);
}
.not-list li::before { content: "✕ "; color: var(--red); font-weight: 700; }

.principles li { margin-left: 22px; margin-bottom: 8px; }

footer.site {
  border-top: 1px solid var(--border); padding: 28px 0; color: var(--ink-soft);
  font-size: 0.9rem; background: var(--paper); margin-top: 40px;
}
footer.site a { color: var(--teal-dark); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
.footer-links { display: inline-block; margin-top: 8px; }

/* ---------- Static pages (about, providers, certificate) ---------- */
.page-hero { background: var(--paper); border-bottom: 1px solid var(--border); padding: 48px 0 40px; }
.page-hero h1 { font-size: 2rem; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-hero h1 em { color: var(--teal); font-style: normal; }
.page-hero .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 680px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: box-shadow 0.15s;
}
.card:hover { box-shadow: 0 4px 16px rgba(15,118,110,0.10); }
.card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.card p { font-size: 0.93rem; color: var(--ink-soft); }
.card .card-cta { margin-top: 16px; }

.check-list { list-style: none; }
.check-list li { padding: 7px 0 7px 26px; position: relative; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.check-list li strong { color: var(--ink); }

.num-list { list-style: none; counter-reset: step; }
.num-list li { counter-increment: step; padding: 8px 0 8px 40px; position: relative; color: var(--ink-soft); }
.num-list li::before {
  content: counter(step); position: absolute; left: 0; top: 8px;
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; font-size: 0.85rem;
}
.num-list li strong { color: var(--ink); }

.faq h3 { font-size: 1.02rem; margin: 26px 0 6px; }
.faq p { color: var(--ink-soft); font-size: 0.97rem; }

.status-box {
  border-left: 3px solid var(--teal); background: var(--teal-pale);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem; color: var(--ink-soft);
}

/* ---------- Certificate specimen ---------- */
.cert-mock {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 32px; max-width: 600px; margin: 0 auto; position: relative;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.10);
}
.cert-specimen {
  position: absolute; top: 14px; right: 14px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); border: 1.5px solid var(--amber); border-radius: 4px; padding: 2px 8px;
  transform: rotate(6deg); opacity: 0.85;
}
.cert-head { text-align: center; border-bottom: 2px solid var(--teal); padding-bottom: 14px; margin-bottom: 18px; }
.cert-title { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; color: var(--teal-dark); }
.cert-id { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.cert-proj { font-weight: 600; font-size: 0.98rem; margin-bottom: 16px; }
.cert-row { padding: 12px 0; border-top: 1px solid var(--border); }
.cert-name { font-weight: 600; font-size: 0.95rem; }
.cert-orcid { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.8rem; color: var(--ink-soft); margin-left: 8px; }
.cert-row .chips { margin-top: 8px; }
.cert-meta { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 14px; font-size: 0.85rem; color: var(--ink-soft); }
.cert-meta div { padding: 2px 0; }
.cert-meta .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.8rem; }

/* ---------- Wizard ---------- */
.wizard-wrap { max-width: 680px; margin: 40px auto 80px; padding: 0 24px; }

.progress-track { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 28px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 3px; transition: width 0.3s; width: 4%; }

.branch-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--teal-dark); background: var(--teal-pale);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

.q-card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px;
}
.q-card h2 { font-size: 1.35rem; line-height: 1.35; margin-bottom: 8px; letter-spacing: -0.01em; }
.q-card .help { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 22px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: block; width: 100%; text-align: left;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; font-size: 1rem; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}
.opt:hover { border-color: var(--teal); background: var(--teal-pale); }
.opt .sub { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.opt.checked { border-color: var(--teal); background: var(--teal-pale); }
.opt.checked::before { content: "✓ "; color: var(--teal-dark); font-weight: 700; }

input[type="text"], input[type="number"], input[type="email"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; font-family: inherit; background: var(--bg); color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--teal); }
textarea { min-height: 96px; resize: vertical; }
label.field { display: block; font-weight: 600; font-size: 0.92rem; margin: 16px 0 6px; }
label.field:first-of-type { margin-top: 0; }

.q-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.back-link { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 0.95rem; font-family: inherit; padding: 8px 0; }
.back-link:hover { color: var(--teal); }

.note-box {
  border-left: 3px solid var(--amber); background: var(--amber-pale);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem; color: var(--ink-soft); margin-top: 18px;
}

/* ---------- Result ---------- */
.result-head { text-align: center; margin-bottom: 28px; }
.result-head .design-label { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.result-head .design-code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ink-soft); font-size: 0.9rem; }

.result-grid { display: grid; gap: 16px; }
.r-block { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.r-block h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--teal-pale); color: var(--teal-dark); font-size: 0.88rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
}
.chip.warn { background: var(--amber-pale); color: var(--amber); }
.ethics-yes { border-left: 3px solid var(--amber); }
.ethics-no { border-left: 3px solid var(--teal); }
.flag-list { list-style: none; }
.flag-list li { padding: 6px 0; font-size: 0.93rem; color: var(--ink-soft); }
.flag-list li::before { content: "⚑ "; color: var(--amber); }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; justify-content: center; }

.fineprint { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin-top: 28px; }

/* ---------- Methods Library ---------- */
.lib-jumps a.lib-jump {
  font-size: 0.82rem; color: var(--teal-dark); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.lib-jumps a.lib-jump:hover { background: var(--teal-pale); border-color: var(--teal); }

.lib-sections { display: flex; flex-direction: column; gap: 0; }

.lib-block {
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.lib-block:last-child { border-bottom: none; }

.lib-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lib-header h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 0; }
.lib-tag {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-pale); color: var(--teal-dark);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}

.lib-desc { color: var(--ink-soft); max-width: 720px; margin-bottom: 22px; line-height: 1.65; }

.lib-resources { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.lib-resources li { padding-left: 0; }
.lib-link {
  font-weight: 600; color: var(--teal-dark); text-decoration: underline;
  text-underline-offset: 2px; font-size: 0.97rem;
}
.lib-link:hover { color: var(--teal); }
.lib-note {
  display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 3px; max-width: 680px;
}

.lib-suggest-note {
  margin-top: 22px; padding: 12px 16px;
  border-left: 3px solid var(--amber); background: var(--amber-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem; color: var(--ink-soft);
}
.lib-suggest-note a { color: var(--amber); }

.lib-suggest {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; margin: 20px 0 10px;
}
.lib-suggest h2 { font-size: 1.2rem; margin-bottom: 10px; }
.lib-suggest p { color: var(--ink-soft); max-width: 660px; font-size: 0.97rem; }

/* Wizard result learn link */
.result-learn-link {
  display: inline-block; margin-top: 8px;
  font-size: 0.88rem; color: var(--teal-dark);
  text-decoration: underline; text-underline-offset: 2px;
}
.result-learn-link:hover { color: var(--teal); }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.7rem; }
  .page-hero h1 { font-size: 1.55rem; }
  .q-card { padding: 22px; }
  body { font-size: 16px; }
  .cert-mock { padding: 20px; }
  .cert-specimen { position: static; display: inline-block; transform: rotate(-2deg); margin-bottom: 10px; }
}
