/*
 * Stylesheet for in-app help fragments served at /<lang>/help/<slug>.html.
 *
 * Loaded inside an <iframe> in the app's HelpButton drawer, so it must
 * be self-contained — no inheritance from the main portal theme or the
 * embedding app.
 */
:root {
  --help-fg: #1f2937;
  --help-fg-muted: #4b5563;
  --help-bg: #ffffff;
  --help-accent: #2563eb;
  --help-border: #e5e7eb;
  --help-code-bg: #f3f4f6;
  --help-warning-bg: #fef3c7;
  --help-warning-border: #f59e0b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --help-fg: #e5e7eb;
    --help-fg-muted: #9ca3af;
    --help-bg: #0b1220;
    --help-accent: #60a5fa;
    --help-border: #1f2937;
    --help-code-bg: #111827;
    --help-warning-bg: #422c00;
    --help-warning-border: #d97706;
  }
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--help-bg);
  color: var(--help-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
body.help-fragment article {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

/* typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin: 1.5rem 0 0.5rem;
}
h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.25rem; border-bottom: 1px solid var(--help-border); padding-bottom: 0.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; color: var(--help-fg-muted); }

p { margin: 0.65em 0; }
a { color: var(--help-accent); text-decoration: underline; }
a:hover { text-decoration: none; }

ul, ol { padding-left: 1.4em; margin: 0.5em 0; }
li + li { margin-top: 0.25em; }

blockquote {
  margin: 1em 0;
  padding: 0.5em 0.85em;
  border-left: 3px solid var(--help-warning-border);
  background: var(--help-warning-bg);
  color: var(--help-fg);
  border-radius: 4px;
}
blockquote > p { margin: 0.25em 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--help-code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
pre {
  background: var(--help-code-bg);
  padding: 0.75em 1em;
  border-radius: 6px;
  overflow-x: auto;
}
pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.5em 0.7em;
  border-bottom: 1px solid var(--help-border);
}
th { font-weight: 600; }

hr {
  border: none;
  border-top: 1px solid var(--help-border);
  margin: 1.5em 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
