/* Site chrome shared by every page: base, header, footer, buttons, badges. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative; isolation: isolate;
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Background: two soft accent glows at the top of the page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -12%, var(--glow), transparent 70%),
    radial-gradient(760px 460px at 92% -6%, var(--glow-2), transparent 70%);
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code, pre { font-family: var(--font-mono); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.brand .mark { width: 30px; height: auto; }
.brand img { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; transition: color 0.15s, background 0.15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-2); }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; margin-left: 6px;
  background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 16px; height: 16px; }

/* Buttons and badges */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 9px;
  font-size: 14px; font-weight: 500; border: 1px solid var(--border-strong); color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--bg-2); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: 0.88; background: var(--text); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12px; line-height: 1; padding: 5px 9px;
  border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--muted); background: var(--bg-2);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.badge.live .dot { background: var(--ok); }
.badge.build .dot { background: var(--accent); }
.eyebrow { margin: 0 0 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.cover::before { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole-tile link */

/* App icon beside a name */
.app-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-logo { display: block; flex: none; color: var(--text); }

/* Simple content pages */
.page { padding: 48px 0; }
.page h1 { margin: 0 0 12px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; }
.lead { margin: 0; font-size: 16px; color: var(--muted); max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile); padding: 28px; }
.card .badge { margin-bottom: 16px; }
.note-list { list-style: none; margin: 32px 0 0; padding: 0; max-width: 720px; }
.note-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.note-list li:last-child { border-bottom: 1px solid var(--border); }
.note-list div { display: grid; gap: 2px; }
.note-list b { font-weight: 500; }
.note-list div span { font-size: 14px; color: var(--muted); }
.card-logo { display: block; margin-bottom: 20px; }
.brand img { display: block; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .nav a:not(.keep) { display: none; }
}
