/* Campus Livre: no external fonts, no CDNs, no trackers. */

/* Light theme only. */
:root {
  color-scheme: light;
  --paper: #f5f2e8;
  --paper-2: #ebe7d8;
  --ink: #10201a;
  --ink-soft: #3d4d45;
  --line: #d3cfbd;
  --green: #00693e;
  --green-deep: #00402a;
  --yellow: #f3c53a;
  --blue: #12306b;
  --card: #fbf9f2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --max: 1120px;
  --radius: 14px;
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Language switching: every translatable element carries lang="en" or lang="pt-BR". */
html[data-lang="en"] [lang="pt-BR"],
html[data-lang="pt-BR"] [lang="en"] { display: none !important; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-soft); max-width: 46em; }
.eyebrow {
  font: 600 .78rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--yellow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 1.2rem var(--serif); color: var(--ink); text-decoration: none; }
.brand { white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
nav { display: flex; gap: 22px; margin-left: auto; align-items: center; font-size: .95rem; }
nav a { color: var(--ink-soft); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font: 600 .78rem var(--sans);
}
.lang-toggle button {
  all: unset; cursor: pointer; padding: 6px 11px; color: var(--ink-soft);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang-toggle button:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
@media (max-width: 720px) {
  nav a.hide-sm { display: none; }
  nav { gap: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.4rem; border-radius: 999px;
  font: 600 1rem var(--sans); text-decoration: none;
  border: 2px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero::after {
  /* a quiet nod to the flag: a rhombus in the corner */
  content: ""; position: absolute; right: -140px; top: 40px; width: 520px; height: 520px;
  background: var(--green); opacity: .08; transform: rotate(45deg) scale(.7, 1); border-radius: 12px; z-index: -1;
}
.hero h1 em { font-style: italic; color: var(--green); }
.hero .lead { margin-top: 1.5rem; }

/* ---------- Sections ---------- */
section { padding: clamp(48px, 7vw, 96px) 0; }
section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 2.6rem; }

.grid { display: grid; gap: 22px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .num { font: 600 .85rem var(--mono); color: var(--green); display: block; margin-bottom: 1rem; }

/* Manifesto quote */
.manifesto { font: 500 clamp(1.5rem, 3vw, 2.2rem)/1.35 var(--serif); max-width: 30em; }
.manifesto strong { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--yellow) 65%, transparent) 62%); font-weight: 600; }

/* Product feature card on home */
.product {
  display: grid; grid-template-columns: minmax(300px, .72fr) 1.5fr; gap: 0; align-items: stretch;
  background: var(--green-deep); color: #eef6ef; border-radius: 20px; overflow: hidden;
}
.product .body { padding: clamp(28px, 3.2vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.product h2, .product h3 { color: #fff; }
.product p { color: #c3d6c9; }
.product .eyebrow { color: var(--yellow); }
.product code { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; }
.product .shot { background: #0a1f16; padding: 22px; display: flex; align-items: center; }
.product .shot img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.product .btn { color: #fff; border-color: #fff; }
.product .btn.primary { background: var(--yellow); border-color: var(--yellow); color: #1a1500; }
.product .btn.primary:hover { background: #ffd95e; color: #1a1500; border-color: #ffd95e; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 600 clamp(2rem, 4vw, 2.9rem)/1 var(--serif); color: var(--green); letter-spacing: -.02em; }
.stat span { display: block; margin-top: .55rem; font-size: .92rem; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 640px) { .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

/* Screenshot frames */
.frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px -24px rgba(16,32,26,.35); }
.frame img { width: 100%; height: auto; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; }
@media (max-width: 460px) { .shots { grid-template-columns: 1fr; } }
figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .8rem; }
figure { margin: 0; }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.ticks li { padding-left: 2rem; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 1.05rem; height: .55rem;
  border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg) translateY(-30%);
}
.ticks.limits li::before { border: 0; width: .55rem; height: .55rem; border-radius: 50%; background: var(--yellow); transform: none; top: .6em; left: .2rem; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 560px; }
th, td { padding: .85rem 1.1rem; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { font: 600 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td.win { color: var(--green); font-weight: 700; }
.note { font-size: .88rem; color: var(--ink-soft); margin-top: 1rem; max-width: 52em; }

code, kbd { font-family: var(--mono); font-size: .88em; background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: .1em .4em; }
pre {
  background: #0f1d16; color: #e6efe8; padding: 20px 22px; border-radius: 12px; overflow-x: auto;
  font: .92rem/1.6 var(--mono); margin: 0;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* Principles on home */
.principles { counter-reset: p; display: grid; gap: 0; border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 70px 1fr 1.4fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.principle::before { counter-increment: p; content: counter(p, decimal-leading-zero); font: 600 .95rem var(--mono); color: var(--green); }
.principle h3 { margin: 0; }
.principle p { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) { .principle { grid-template-columns: 1fr; gap: 6px; } }

/* Flag stripe */
.stripe { height: 6px; background: linear-gradient(90deg, var(--green) 0 34%, var(--yellow) 34% 67%, var(--blue) 67%); }

/* Footer */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-soft); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer h4 { margin: 0 0 .8rem; font: 600 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.fine { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .84rem; max-width: 62em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Performance callout */
.callout {
  max-width: 46em; margin: 1.8rem 0 0; padding: 16px 20px;
  border-left: 5px solid var(--yellow); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem; color: var(--ink);
}

/* Comparison table */
table.compare th, table.compare td { text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; width: 34%; }
table.compare td:nth-child(2) { background: color-mix(in srgb, var(--green) 7%, transparent); font-weight: 600; }

.product .note a { color: var(--yellow); }

/* Product logo inline with text */
.with-ico { display: inline-flex; align-items: center; gap: .5em; }
h3.with-ico { display: flex; gap: .35em; }
.ico { flex: none; }
.btn .ico { margin-right: -.1rem; }

/* GitHub mark inside buttons */
.ico-gh { width: 18px; height: 18px; flex: none; }

/* "Made in Brazil" badge in the header */
.made-br {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 4px 12px 4px 8px; border: 1px solid var(--line); border-radius: 999px;
  font: 600 .74rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.flag-br { width: 20px; height: 14px; flex: none; }
@media (max-width: 720px) {
  .made-br { padding: 5px; }
  .made-br span { display: none !important; }
}

/* Product tagline */
.tagline { font: italic 600 clamp(1.3rem, 2.6vw, 1.9rem)/1.25 var(--serif); color: var(--green); margin: -.2rem 0 1.2rem; }
.product .tagline { margin: .1rem 0 1rem; }

/* Compact header on phones: everything fits on one line down to 320px */
@media (max-width: 520px) {
  .site-header .wrap { gap: 8px; padding: 0 14px; }
  .brand { gap: 7px; font-size: 1.02rem; }
  .brand img { width: 24px; height: 24px; }
  nav { gap: 8px; font-size: .86rem; min-width: 0; }
  .with-ico { gap: .3em; }
  .lang-toggle button { padding: 6px 8px; }
  .made-br { padding: 4px; }
  .flag-br { width: 18px; height: 13px; }
}
@media (max-width: 400px) {
  .brand { font-size: .95rem; }
  nav a.with-ico { font-size: 0; gap: 0; }   /* icon only for the product link */
  nav a.with-ico .ico { width: 22px; height: 22px; }
}

/* SmartScreen help */
.smartscreen { margin-top: 3rem; padding: 28px 30px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: var(--radius); }
.smartscreen h3 { margin-bottom: .6rem; }
.smartscreen h4 { font: 700 1rem var(--sans); margin: 1.2rem 0 .4rem; }
.smartscreen .grid { margin-top: .4rem; gap: 24px; }
.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin: .35rem 0; }
@media (max-width: 520px) { .smartscreen { padding: 20px 18px; } }

/* ---------- Wiki: documentation and function reference ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font-weight: 600; white-space: nowrap; }
section.wiki-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.wiki-hero h1 { margin: .4rem 0 .8rem; }
.wiki-hero .btn-row { margin-top: 1.4rem; }
section.wiki { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 96px); }
.wiki-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.wiki-nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: .92rem; }
.wiki-nav-title { font: 700 .74rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .6rem; }
.wiki-nav ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.wiki-nav a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; }
.wiki-nav a:hover { color: var(--ink); border-left-color: var(--green); }
.wiki-body { max-width: 50rem; }
section.wiki-sec { padding: 0; margin-bottom: 3rem; scroll-margin-top: 84px; }
.wiki-sec h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.wiki-sec h3 { margin: 1.8rem 0 .5rem; font-size: 1.15rem; }
.wiki-sec p { margin: .8rem 0; }
.wiki-sec p.note { margin: 1rem 0; padding: .7rem 1rem; background: var(--card); border-left: 4px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); max-width: none; }
.wiki-sec ul.ticks { margin: 1rem 0; }
.wiki-sec ol.steps { margin: .6rem 0 .6rem 1.2rem; }
.wiki-sec pre { margin: 1rem 0; }
.wiki-sec table.shortcuts td:first-child { white-space: nowrap; }
@media (max-width: 860px) {
  .wiki-grid { grid-template-columns: minmax(0, 1fr); }
  .wiki-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; }
  .wiki-nav ol { border: 0; columns: 2; column-gap: 20px; }
  .wiki-nav a { padding: 4px 0; margin: 0; border: 0; }
}
@media (max-width: 460px) { .wiki-nav ol { columns: 1; } }

.fn-search { display: flex; align-items: center; gap: 14px; margin-top: 1.4rem; max-width: 40rem; }
.fn-search input { flex: 1; min-width: 0; font: 500 1.05rem var(--mono); padding: 13px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.fn-search input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; border-color: var(--green); }
.fn-status { font: 600 .85rem var(--sans); color: var(--ink-soft); white-space: nowrap; }
.fn-jump { margin: 1.2rem 0 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px 18px; }
.fn-jump summary { cursor: pointer; font-weight: 700; }
.fn-jump-list { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.fn-jump-list a { text-decoration: none; font-size: .88rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--paper); }
.fn-jump-list a:hover { border-color: var(--green); color: var(--green); }
.fn-jump-list a span { color: var(--ink-soft); font-size: .8em; margin-left: 4px; }
.fn-prod { margin: 3rem 0 .5rem; font-size: clamp(1.7rem, 3vw, 2.3rem); padding-bottom: .4rem; border-bottom: 2px solid var(--ink); scroll-margin-top: 84px; }
section.fn-sec { padding: 0; margin: 1.8rem 0; scroll-margin-top: 84px; }
.fn-sec h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.fn-count { font: 600 .78rem var(--sans); color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.fn-sub { font: 700 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 1rem 0 .1rem; }
.fn-list { display: flex; flex-wrap: wrap; gap: 6px; margin: .4rem 0 0; line-height: 1.2; }
.fn-list a[hidden], .fn-group[hidden], .fn-sec[hidden], .fn-prod[hidden], .fn-jump[hidden] { display: none !important; }
.fn-list a { text-decoration: none; }
.fn-list a code { display: inline-block; }
.fn-list a:hover code { border-color: var(--green); color: var(--green); }
.fn-list a.next code { border-style: dashed; border-color: var(--green); background: transparent; }

.fn-list a, .fn-list code { max-width: 100%; overflow-wrap: anywhere; }

/* Wiki pages */
.wiki-main { min-width: 0; }
.wiki-main .wiki-body { max-width: 52rem; }
.wiki-bar { margin-bottom: 1rem; }
.wiki-search { position: relative; max-width: 34rem; }
.wiki-search input { width: 100%; font: 500 1rem var(--mono); padding: 11px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.wiki-search input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; border-color: var(--green); }
.wiki-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(16,32,26,.18); max-height: 70vh; overflow: auto; }
.wiki-res { display: block; padding: 9px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.wiki-res:last-child { border-bottom: 0; }
.wiki-res:hover, .wiki-res.on { background: var(--paper-2); }
.wiki-res span { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }
.wiki-res-none { padding: 12px 14px; color: var(--ink-soft); }
.crumbs { font-size: .85rem; color: var(--ink-soft); margin: 0 0 1.4rem; }
.crumbs a { color: var(--ink-soft); }
.wiki-body h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 .8rem; }
.wiki-body > h2 { font-size: 1.4rem; margin: 2.2rem 0 .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.wiki-body > h3 { margin: 1.6rem 0 .4rem; font-size: 1.1rem; }
.wiki-body > p { margin: .8rem 0; }
.wiki-body p.note { margin: 1rem 0; padding: .7rem 1rem; background: var(--card); border-left: 4px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); max-width: none; }
.wiki-body ul.ticks { margin: 1rem 0; }
.wiki-body ol.steps { margin: .6rem 0 .6rem 1.2rem; }
.wiki-body pre { margin: 1rem 0; }
.fn-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fn-title code { font-size: .9em; background: var(--paper-2); }
.fn-cat { font-size: .9rem; color: var(--ink-soft); margin: .4rem 0 1.2rem; }
.badge-next { display: inline-block; font: 700 .68rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--green); border: 1px dashed var(--green); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.syn pre { margin-bottom: .2rem; }
.syn p { margin: .2rem 0 1rem; color: var(--ink-soft); }
dl.args { margin: .6rem 0; display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 10px 20px; }
dl.args dt { font-weight: 600; }
dl.args dd { margin: 0; }
@media (max-width: 560px) { dl.args { grid-template-columns: 1fr; gap: 2px; } dl.args dd { margin-bottom: .6rem; } }
.out-label { font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: .8rem 0 -.4rem; }
pre.out { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); }
.fn-see { display: flex; flex-wrap: wrap; gap: 8px; }
.fn-chip { text-decoration: none; }
.fn-chip code { display: inline-block; }
.fn-chip:hover code { border-color: var(--green); color: var(--green); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 600; }
table.fn-table td:first-child { white-space: nowrap; }
table.fn-table td { vertical-align: top; }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px; margin-top: 2rem; }
.home-cols h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.topic-list a { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-decoration: none; color: var(--ink); }
.topic-list a:hover { border-color: var(--green); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; margin-top: 1rem; }
.cat-card { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; color: var(--ink); }
.cat-card:hover { border-color: var(--green); }
.cat-card b { display: block; font-size: .95rem; }
.cat-card span { font-size: .8rem; color: var(--ink-soft); }

/* Syntax highlighting (code blocks sit on a dark background) */
.tok-keyword { color: #f3c53a; font-weight: 600; }
.tok-string { color: #8fd8a8; }
.tok-comment { color: #8fa89b; font-style: italic; }
.tok-section { color: #8fa89b; font-style: italic; font-weight: 700; }
.tok-number { color: #9fc4ff; }
.tok-constant { color: #9fc4ff; }
.tok-func { color: #ffd98a; }
pre.out { background: var(--paper-2); }

/* nav is a flex row in the header; the wiki's breadcrumb and category list are not */
nav.crumbs { display: block; margin-left: 0; gap: 0; font-size: .85rem; }
nav.fn-jump-list { margin-left: 0; font-size: 1rem; }
.wiki-main code, .wiki-main kbd { overflow-wrap: anywhere; }
.wiki-main pre code { overflow-wrap: normal; }
.pager a { max-width: 48%; overflow-wrap: anywhere; }
.fn-title { min-width: 0; }

/* Language toggle as links (single-language pages) */
.lang-toggle a { padding: 6px 11px; color: var(--ink-soft); text-decoration: none; }
.lang-toggle a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.lang-toggle a:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
