/* gitea4s microsite — hand-written, self-contained, no external assets. */

:root {
  color-scheme: light dark;

  --bg: #fbfbfd;
  --bg-raised: #ffffff;
  --bg-sunken: #f2f3f7;
  --text: #1c1f26;
  --text-muted: #5b6472;
  --border: #dfe3ea;
  --accent: #2f6f4f;
  --accent-soft: #e8f2ec;
  --code-bg: #f5f6f9;
  --code-text: #24292f;
  --shadow: 0 1px 2px rgba(16, 22, 32, .06), 0 8px 24px rgba(16, 22, 32, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-raised: #161a20;
    --bg-sunken: #12161b;
    --text: #e6e9ee;
    --text-muted: #9aa4b2;
    --border: #262c35;
    --accent: #6fc79a;
    --accent-soft: #16241d;
    --code-bg: #12161b;
    --code-text: #d6dbe3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }

nav.site { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
nav.site a { color: var(--text-muted); font-size: .93rem; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--accent); text-decoration: none; }
nav.site a[aria-current="page"] { font-weight: 600; }

/* ---------- hero ---------- */

.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.02em; }
.hero p.lead { font-size: 1.14rem; color: var(--text-muted); margin: 0 0 24px; max-width: 62ch; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.badge {
  font-size: .8rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0f1216; } }

/* ---------- content ---------- */

main { padding: 40px 0 72px; }

h2 {
  font-size: 1.5rem;
  margin: 44px 0 12px;
  letter-spacing: -.01em;
  padding-top: 6px;
}
h2:first-of-type { margin-top: 8px; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }

p { margin: 0 0 14px; max-width: 74ch; }
ul, ol { max-width: 74ch; padding-left: 22px; }
li { margin-bottom: 6px; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .875em;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* Wide content scrolls inside its own box; the page never scrolls sideways. */
.table-scroll { overflow-x: auto; margin-bottom: 18px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { font-size: .92rem; color: var(--text-muted); margin: 0; }

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

footer.site {
  border-top: 1px solid var(--border);
  padding: 26px 0 44px;
  color: var(--text-muted);
  font-size: .9rem;
  background: var(--bg-sunken);
}
footer.site p { margin: 0 0 6px; }

@media (max-width: 640px) {
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.85rem; }
  header.site .wrap { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  nav.site { margin-left: 0; width: 100%; gap: 14px; }
}
