/* cf-webmcp demo site
   Centralised stylesheet. Minimal, system-font, light/dark. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #18181b;
  --muted: #6b7280;
  --accent: #16a34a;
  --border: #e5e7eb;
  --code-bg: #ebebed;
  --code-fg: #15803d;
  --max: 44rem;
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #ededed;
    --muted: #9ca3af;
    --accent: #4ade80;
    --border: #27272a;
    --code-bg: #1c1c1f;
    --code-fg: #86efac;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-family: var(--sans);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  font-size: 17px;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

header.site,
footer.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

header.site {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
}

header.site .brand {
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

header.site .brand-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
}

header.site nav {
  display: flex;
  gap: 1.25rem;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95em;
}

header.site nav a:hover,
header.site nav a[aria-current="page"] {
  color: var(--fg);
}

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.78em;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

footer.site .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

footer.site a {
  color: var(--muted);
}

footer.site a:hover {
  color: var(--fg);
}

footer.site .row > * + *::before {
  content: "\00B7";
  margin: 0 0.6em;
  color: var(--border);
  display: inline-block;
  text-decoration: none;
  pointer-events: none;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 1.5rem 0 0.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.25rem;
}

p {
  margin: 0.75rem 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: var(--mono);
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 500;
}

pre {
  font-family: var(--mono);
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9em;
  margin: 1rem 0;
}

pre code {
  background: none;
  color: var(--fg);
  font-weight: normal;
  padding: 0;
  font-size: 1em;
}

ul {
  padding-left: 1.25rem;
}

ul li {
  margin: 0.25rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.hero {
  margin: 1rem 0 2rem;
}

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.5rem;
}

.cta:hover {
  text-decoration: none;
  filter: brightness(0.92);
}

.cta.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.muted {
  color: var(--muted);
  font-size: 0.92em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.card p {
  font-size: 0.92em;
  margin: 0.25rem 0;
  color: var(--muted);
}

.state {
  display: none;
}

.state.active {
  display: block;
}

.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--border);
}

.callout > h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.callout > *:first-child {
  margin-top: 0;
}

.callout > *:last-child {
  margin-bottom: 0;
}

.callout-success {
  background: rgba(22, 163, 74, 0.08);
  border-left-color: var(--accent);
}

.callout-success h2::before {
  content: "\2713";
  margin-right: 0.5rem;
  color: var(--accent);
  font-weight: 700;
}

.callout-warning {
  background: rgba(220, 38, 38, 0.07);
  border-left-color: #dc2626;
}

.callout-warning h2::before {
  content: "\26A0";
  margin-right: 0.5rem;
  color: #dc2626;
  font-weight: 700;
}

.callout-info {
  background: rgba(37, 99, 235, 0.07);
  border-left-color: #2563eb;
}

.callout-info h2::before {
  content: "\2139";
  margin-right: 0.5rem;
  color: #2563eb;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .callout-success {
    background: rgba(74, 222, 128, 0.10);
  }
  .callout-warning {
    background: rgba(248, 113, 113, 0.10);
    border-left-color: #f87171;
  }
  .callout-warning h2::before {
    color: #f87171;
  }
  .callout-info {
    background: rgba(96, 165, 250, 0.10);
    border-left-color: #60a5fa;
  }
  .callout-info h2::before {
    color: #60a5fa;
  }
}
