/* Flow guide pages — standalone stylesheet, no dependency on the React bundle.
   Colours and fonts mirror frontend/tailwind.config.js (flow-* palette). */

:root {
  --charcoal: #2D3436;
  --dark: #1A1F20;
  --stone: #F7F5F2;
  --warm: #EDE9E3;
  --cream: #FAF9F7;
  --border: #E2DED8;
  --muted: #9B9590;
  --xero: #13B5EA;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 2rem; }
.logo-link { display: flex; align-items: center; }
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--charcoal); }
.header-right { display: flex; align-items: center; gap: 1rem; }
.signin-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.signin-link:hover { color: var(--charcoal); }
.cta-button {
  background: var(--charcoal);
  color: #fff;
  border-radius: 0.25rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.cta-button:hover { background: var(--dark); }

/* Main content */
.page-main { padding: 3rem 1.5rem 5rem; }

.article, .guides-index { max-width: 720px; margin: 0 auto; }

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.25;
}
h1 { font-size: 2.25rem; margin: 0 0 1.5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }

p, ul, ol { margin: 0 0 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--charcoal); }
a:hover { color: var(--xero); }

strong { font-weight: 600; }

hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--warm);
  border-radius: 3px;
  padding: 0.125rem 0.375rem;
}
pre {
  background: var(--dark);
  color: var(--stone);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
}
pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: var(--font-heading);
  font-weight: 600;
  background: var(--stone);
  white-space: nowrap;
}

/* Guides index */
.guides-index .index-intro { color: var(--muted); margin-bottom: 2.5rem; }
.guide-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.guide-card h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.guide-card p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.9rem; }
.guide-card .guide-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--stone);
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 20rem;
  margin-top: 0.75rem;
}
.footer-links { display: flex; gap: 4rem; }
.footer-links h4 {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--charcoal); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}
.footer-bottom p { font-size: 0.75rem; color: var(--muted); margin: 0; }

/* Responsive */
@media (max-width: 640px) {
  .header-nav { display: none; }
  h1 { font-size: 1.75rem; }
  .footer-links { gap: 2.5rem; }
  .page-main { padding: 2rem 1.25rem 4rem; }
}
