/* GeneralBrain site (T-20261014-25): one adaptive sheet for both layers (business pages and the
   README pages of the technical layer, T-20261014-28), light and dark, no web fonts. */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #18202c;
  --muted: #4e5a6b;
  --line: #d8dee8;
  --accent: #2a5bd7;
  --accent-ink: #ffffff;
  --accent-soft: #e6edfc;
  --safe: #17784f;
  --safe-soft: #e3f4ec;
  --radius: 14px;
  --wide: 1080px;
  --text: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141b;
    --surface: #171d27;
    --ink: #e8ecf3;
    --muted: #a6b0c0;
    --line: #2b3444;
    --accent: #7ea2ff;
    --accent-ink: #0d1320;
    --accent-soft: #1d2a45;
    --safe: #5cc99a;
    --safe-soft: #16302a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.4rem 0.8rem; z-index: 10; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand picture { display: block; line-height: 0; }
.brand .mark { display: block; height: 1.6rem; width: auto; }
.choose .brand .mark { height: 2.4rem; }
.brand-rest { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 0.2rem 1.1rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 0.3rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; color: var(--ink); }

/* hero */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.02em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: var(--text); margin: 0; }
.badge { display: inline-flex; gap: 0.6rem; align-items: center; margin-top: 1.5rem; padding: 0.45rem 0.9rem;
  border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 0.95rem; }
.badge::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }

/* sections */
section { padding: 2rem 0; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.25; margin: 0 0 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; margin: 0; }
p, ul, ol { max-width: var(--text); }
.prose p { margin: 0 0 1rem; }
.flow { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.flow li { counter-increment: step; position: relative; padding: 0 0 0.9rem 2.6rem; }
.flow li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.8rem; height: 1.8rem;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center; }
.scheme { margin: 1.5rem 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; }
.scheme img { display: block; width: 100%; height: auto; }
.scheme figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* apps */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: 1.25rem; }
.app { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem;
  scroll-margin-top: 4.5rem; }
.app header { margin-bottom: 0.8rem; }
.app .name { font-size: 1.3rem; font-weight: 700; margin: 0; }
.app .tag { color: var(--muted); margin: 0.1rem 0 0; }
.app dl { margin: 0; }
.app dt { font-weight: 650; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  margin-top: 0.9rem; }
.app dd { margin: 0.2rem 0 0; }
.app.safe { border-color: var(--safe); box-shadow: inset 4px 0 0 var(--safe); }
.app .more { display: inline-block; margin-top: 0.9rem; font-weight: 600; }

/* lists with bold lead-ins */
.points { padding-left: 1.2rem; }
.points li { margin-bottom: 0.6rem; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem;
  max-width: var(--text); }
.note.safe { background: var(--safe-soft); border-color: transparent; }
.notify h2 { margin-bottom: 0.5rem; }
.button { display: inline-block; margin-top: 0.6rem; padding: 0.65rem 1.2rem; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.pending { margin: 0.6rem 0 0; color: var(--muted); font-style: italic; }

.docs-link { margin-top: 1.5rem; font-weight: 600; }

/* technical layer: README pages */
.doc { padding-top: 2rem; padding-bottom: 1rem; }
.doc .badge { margin: 0 0 1.5rem; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.02em; }
.doc h2 { margin-top: 2.4rem; }
.doc h3 { margin: 1.6rem 0 0.6rem; }
.doc p, .doc li { max-width: var(--text); }
.doc code { font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft);
  padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
.doc pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem;
  overflow-x: auto; max-width: 100%; }
.doc pre code { background: none; padding: 0; overflow-wrap: normal; }
.doc table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; margin: 0 0 1rem;
  font-size: 0.95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 0.45rem 0.7rem; text-align: left; vertical-align: top; }
.doc th { background: var(--surface); }
.doc blockquote { margin: 0 0 1rem; padding: 0.2rem 1rem; border-left: 4px solid var(--accent-soft); color: var(--muted); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; }
.foot a { color: var(--muted); }

/* language choice (root page) */
.choose { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 1rem; }
.choose .langs { display: flex; gap: 1rem; justify-content: center; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 2.2rem 0 1.5rem; }
  .lead { font-size: 1.08rem; }
  .top { position: static; }
  .scheme { padding: 0.75rem; }
  .scheme img { max-width: 26rem; margin: 0 auto; }
  .top .wrap { gap: 0.3rem 1rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .nav { margin-left: 0; width: 100%; gap: 0.2rem 0.9rem; }
  .app { padding: 1.2rem; }
}
