/* Platelift static site. No build step. Light/dark follows the system. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #14171c;
  --muted: #5a626e;
  --border: #e2e5ea;
  --accent: #0e8f72;
  --accent-soft: #e3f6f0;
  --warn-bg: #fff6e0;
  --warn-border: #f0d48a;
  --radius: 14px;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050608;
    --surface: #0f1217;
    --text: #eef1f5;
    --muted: #9aa3af;
    --border: #232832;
    --accent: #5fe3c0;
    --accent-soft: #0f2a24;
    --warn-bg: #2a2310;
    --warn-border: #5c4a17;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }

header.site,
footer.site,
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }

nav.site { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--text); }

main { padding-top: 24px; padding-bottom: 48px; }

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0.4em 0 0.2em; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2em 0 0.5em; padding-top: 0.5em; border-top: 1px solid var(--border); }
h3 { font-size: 1.05rem; margin: 1.5em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

.updated { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5em; }
.lead { font-size: 1.1rem; color: var(--muted); }

.note {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 1.2em 0;
}
.note.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.note > :last-child { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 6px;
  margin: 1.5em 0;
}
.toc ol { padding-left: 1.3em; columns: 2 14rem; column-gap: 2rem; }
.toc li { break-inside: avoid; }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 650; }
tr:last-child td { border-bottom: 0; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  margin: 0 0 10px;
}
details[open] { padding-bottom: 6px; }
summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style-position: outside; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 12px; margin: 1.5em 0; }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}
.card strong { display: block; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 0.93rem; }
.card:hover { border-color: var(--accent); }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

kbd, code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 5px;
}

footer.site {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site p { margin-bottom: 0.4em; }

.center { text-align: center; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.65rem; }
}
