/* clectiv.com /resources — stylesheet for the static Resources pages.
   Written by scripts/build-answers.mjs --target=website (copied verbatim into
   dev-clectiv/public/resources/). These pages are plain HTML on purpose: AI crawlers
   execute little or no JavaScript, so everything must render with no script at all.
   Tokens mirror dev-clectiv/src/index.css (white surface, Montserrat, CLECTIV cyan and
   magenta, black footer) so the section reads as part of clectiv.com. */

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

:root {
  --cyan: hsl(172 98% 45%);
  --cyan-ink: #00796b;        /* cyan darkened for AA text contrast on white */
  --magenta: hsl(310 100% 48%);
  --magenta-ink: #b3008f;
  --bg: #ffffff;
  --text: hsl(0 0% 5%);
  --text-2: #374151;
  --dim: hsl(220 9% 46%);
  --muted: hsl(220 14% 96%);
  --line: hsl(220 13% 91%);
  --amber: #b7791f;
  --r-sm: 8px;
  --r: 12px;
  --shadow-card: 0 4px 24px -4px hsl(0 0% 0% / .08);
  --shadow-card-hover: 0 12px 40px -8px hsl(0 0% 0% / .15);
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --measure: 72ch;
  --wide: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.skip { position: absolute; left: -9999px; top: 0; background: var(--text); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.site-head-in {
  max-width: var(--wide); margin: 0 auto; padding: 0 24px;
  height: 80px; display: flex; align-items: center; gap: 16px;
}
.site-head .logo { border: 0; display: flex; align-items: center; }
.site-head .logo img { height: 56px; width: auto; display: block; }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-head nav a { color: hsl(0 0% 5% / .8); border: 0; font-weight: 500; font-size: 16px; }
.site-head nav a:hover { color: var(--cyan-ink); }
.site-head nav a[aria-current="page"] { color: var(--text); }
.site-head nav a.cta {
  background: var(--cyan); color: #000; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; white-space: nowrap;
}
.site-head nav a.cta:hover { filter: brightness(1.05); color: #000; }

.crumbs {
  max-width: var(--wide); margin: 0 auto; padding: 22px 24px 0;
  font-size: 13px; color: var(--dim);
}
.crumbs a { color: var(--dim); border: 0; }
.crumbs a:hover { color: var(--cyan-ink); }
.crumbs span { margin: 0 8px; }

/* -------------------------------------------------------------------- page */
.page { max-width: var(--wide); margin: 0 auto; padding: 26px 24px 90px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--magenta-ink); margin-bottom: 14px;
}
h1 {
  font-size: clamp(30px, 4vw, 46px); line-height: 1.15; letter-spacing: -.02em;
  font-weight: 700; max-width: 24ch; margin-bottom: 18px;
}
.standfirst { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: var(--measure); margin-bottom: 22px; }
.standfirst strong { color: var(--text); }
.dateline {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  font-size: 13px; color: var(--dim);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; margin-bottom: 40px;
}
.dateline b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------- prose */
article { max-width: var(--measure); }
article.wide { max-width: none; }
section { margin-bottom: 48px; scroll-margin-top: 100px; }
h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; margin-bottom: 16px; padding-top: 6px; }
h3 { font-size: 18px; font-weight: 700; margin: 30px 0 10px; }
p { margin-bottom: 17px; color: var(--text-2); max-width: var(--measure); }
p strong, li strong { color: var(--text); font-weight: 600; }
a { color: var(--cyan-ink); text-decoration: none; border-bottom: 1px solid hsl(172 98% 45% / .55); }
a:hover { border-bottom-color: var(--cyan-ink); }
ul, ol { margin: 0 0 18px 22px; max-width: var(--measure); }
li { margin-bottom: 9px; color: var(--text-2); padding-left: 2px; }
li::marker { color: var(--dim); }
code { font: 13px ui-monospace, 'SF Mono', monospace; background: var(--muted); border-radius: 4px; padding: 1px 5px; }

.anchor { color: var(--dim); border: 0; margin-left: 9px; font-size: .6em; opacity: 0; transition: opacity .12s; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }

.note {
  border-left: 3px solid var(--cyan);
  background: hsl(172 98% 45% / .07);
  padding: 14px 18px; margin: 0 0 22px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: var(--measure);
}
.note p { margin: 0; font-size: 15px; }
.note.warn { border-left-color: #e0a100; background: hsl(40 100% 50% / .08); }

/* ------------------------------------------------------------------- table */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 26px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; }
caption { caption-side: top; text-align: left; padding: 13px 16px 11px; color: var(--dim); font-size: 13px; border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); background: var(--muted); white-space: nowrap; }
tbody th { font-weight: 600; color: var(--text); }
td { color: var(--text-2); min-width: 9em; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- glossary */
dl.terms { max-width: var(--measure); }
dl.terms > div { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
dl.terms > div:last-child { border-bottom: 0; }
dt { font-size: 17px; font-weight: 700; margin-bottom: 7px; }
dt .anchor { opacity: 0; }
dl.terms > div:hover dt .anchor { opacity: 1; }
dd { color: var(--text-2); }
dd + dd { margin-top: 9px; }
dd.aka { font-size: 13.5px; color: var(--dim); }
.term-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; padding: 0; list-style: none; max-width: none; }
.term-index li { margin: 0; padding: 0; }
.term-index a { display: inline-block; font-size: 12.5px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 100px; color: var(--text-2); }
.term-index a:hover { color: var(--cyan-ink); border-color: var(--cyan); }

/* --------------------------------------------------------------------- faq */
/* "Common questions" section: <details>/<summary> so the answer text sits in the DOM
   (fully readable by a crawler that runs no JS) while a human reader can scan just the
   questions. */
#common-questions details { padding: 16px 0; border-bottom: 1px solid var(--line); }
#common-questions details:last-child { border-bottom: 0; }
#common-questions summary {
  cursor: pointer; list-style: none; font-size: 16.5px; font-weight: 600; color: var(--text);
}
#common-questions summary::-webkit-details-marker { display: none; }
#common-questions summary::before { content: '+'; display: inline-block; width: 1em; color: var(--cyan-ink); font-weight: 700; }
#common-questions details[open] summary::before { content: '\2013'; }
#common-questions summary .anchor { opacity: 0; }
#common-questions details:hover summary .anchor { opacity: 1; }
#common-questions details > div { margin: 10px 0 0 1em; color: var(--text-2); max-width: var(--measure); }
#common-questions details > div p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 6px 0 34px; list-style: none; max-width: none; }
.cards li { margin: 0; padding: 0; }
.card {
  display: block; height: 100%; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  color: inherit; box-shadow: var(--shadow-card);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); border-color: hsl(172 98% 45% / .6); }
.card-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--magenta-ink); margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.card p { margin: 0; font-size: 14px; color: var(--dim); }

/* ------------------------------------------------------------------ footer */
.sources-block { max-width: var(--wide); margin: 0 auto; padding: 0 24px 40px; font-size: 13.5px; color: var(--dim); }
.sources-block p { color: var(--dim); max-width: var(--measure); }
.sources { margin-left: 20px; }
.sources li { color: var(--dim); font-size: 13px; margin-bottom: 6px; }

.site-foot { background: hsl(0 0% 5%); color: rgba(255, 255, 255, .6); }
.site-foot-in { max-width: var(--wide); margin: 0 auto; padding: 56px 24px 40px; }
.site-foot .logo { border: 0; display: inline-block; margin-bottom: 18px; }
.site-foot .logo img { height: 56px; width: auto; display: block; }
.site-foot p { color: rgba(255, 255, 255, .6); max-width: 46ch; }
.site-foot a { color: rgba(255, 255, 255, .6); border: 0; }
.site-foot a:hover { color: var(--cyan); }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin: 22px 0 0; padding: 0; max-width: none; }
.foot-links li { margin: 0; padding: 0; }
.foot-bottom { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: rgba(255, 255, 255, .4); }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 720px) {
  .site-head-in { height: 68px; padding: 0 16px; }
  .site-head .logo img { height: 38px; }
  .site-head nav { gap: 16px; }
  .site-head nav a { font-size: 14px; }
  .site-head nav a.hide-sm { display: none; }
  .site-head nav a.cta { padding: 8px 12px; font-size: 13px; }
  .crumbs { padding: 16px 16px 0; font-size: 12.5px; }
  .page { padding: 20px 16px 64px; }
  .standfirst { font-size: 17px; }
  h2 { font-size: 22px; }
  section { margin-bottom: 40px; }
  th, td { padding: 9px 12px; }
  .sources-block { padding: 0 16px 32px; }
  .site-foot-in { padding: 44px 16px 32px; }
}

/* Early-access button (["cta", slug] block). */
article .cta-row { margin: 28px 0 8px; }
article a.btn {
  display: inline-block; background: var(--cyan); color: #000; font-weight: 600;
  font-size: 16px; padding: 12px 22px; border-radius: 8px; border: 0; text-decoration: none;
}
article a.btn:hover { filter: brightness(1.05); color: #000; }
article a.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
/* Market lists: dense, scannable columns. */
article ul.markets { columns: 2 220px; column-gap: 32px; padding-left: 1.1em; }
article ul.markets li { break-inside: avoid; margin: 0 0 6px; }
