/* Assign Onward — Article Style
   Shared stylesheet for promotional articles.
   Zero external dependencies. System font stack. Responsive. */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --ao-green: #2b8a3e;
  --ao-green-light: #e6f4ea;
  --ao-green-dark: #1b5e27;
  --text: #1a1a1a;
  --text-secondary: #555;
  --bg: #fff;
  --bg-code: #f5f5f5;
  --border: #e0e0e0;
  --max-width: 680px;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header / Hero ---- */

.article-header {
  background: var(--ao-green);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.article-header .ao-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.article-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 auto 0.6rem;
  max-width: var(--max-width);
}

.article-header .subtitle {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: var(--max-width);
  margin: 0 auto;
  font-style: italic;
}

/* ---- Article body ---- */

.article-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.8rem;
  color: var(--ao-green-dark);
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
  color: var(--text);
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body a {
  color: var(--ao-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--ao-green-dark);
}

/* ---- Pull quotes ---- */

.pullquote {
  border-left: 4px solid var(--ao-green);
  margin: 2rem 0;
  padding: 0.8rem 1.2rem;
  background: var(--ao-green-light);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ao-green-dark);
  line-height: 1.5;
}

.pullquote p {
  margin: 0;
}

/* ---- Code blocks ---- */

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

code {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas,
               "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
}

p code, li code {
  background: var(--bg-code);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ---- Tables ---- */

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

th {
  text-align: left;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-bottom: 2px solid var(--ao-green);
  color: var(--ao-green-dark);
}

td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

/* ---- Lists ---- */

ul, ol {
  padding-left: 1.4rem;
  margin: 0.8rem 0 1.15rem;
}

li {
  margin-bottom: 0.35rem;
}

/* ---- Expandable sections ---- */

details {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--bg-code);
  user-select: none;
}

summary:hover {
  background: var(--ao-green-light);
}

details[open] summary {
  border-bottom: 1px solid var(--border);
}

details .detail-content {
  padding: 1rem;
}

/* ---- Horizontal rule ---- */

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

/* ---- Bold key phrases (used inline for visual hooks) ---- */

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

/* ---- CTA footer ---- */

.article-cta {
  background: var(--ao-green-light);
  border: 2px solid var(--ao-green);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2.5rem 0 1rem;
  text-align: center;
}

.article-cta h3 {
  margin: 0 0 0.5rem;
  color: var(--ao-green-dark);
}

.article-cta p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.article-cta a {
  font-weight: 600;
}

/* ---- Footer ---- */

.article-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-footer a {
  color: var(--text-secondary);
}

.article-footer .license {
  font-style: italic;
}

.article-footer .nav-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-footer .nav-links a {
  color: var(--ao-green);
  margin-right: 1.5rem;
  text-decoration: none;
  font-weight: 500;
}

.article-footer .nav-links a:hover {
  text-decoration: underline;
}

/* ---- ASCII diagrams (pre without code styling) ---- */

.diagram {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.4;
  background: transparent;
  border: none;
  overflow-x: auto;
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  html {
    font-size: 16px;
  }

  .article-header {
    padding: 2rem 1rem 1.8rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-body {
    padding: 1.8rem 1rem 3rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 400px) {
  .article-header h1 {
    font-size: 1.3rem;
  }

  pre {
    font-size: 0.75rem;
    padding: 0.75rem;
  }
}
