/* MiniCms base theme. Restyle by overriding these properties in a site stylesheet. */
:root {
  --bg: #fdfdfc;
  --surface: #f2f1ee;
  --text: #1d1d1f;
  --muted: #5f5f66;
  --accent: #2357c6;
  --accent-text: #ffffff;
  --border: #dddcd7;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 42rem;
  --radius: 0.5rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1d1d21;
    --text: #e8e8ea;
    --muted: #a3a3ad;
    --accent: #7ea6ff;
    --accent-text: #0b1530;
    --border: #2e2e35;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main { flex: 1; padding-block: 2rem 3rem; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 1.75em 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem); margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p, ul, ol, dl, blockquote, pre, table, figure { margin: 0 0 1.1em; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

img, video, svg, canvas, iframe { max-width: 100%; height: auto; }
img { border-radius: var(--radius); }
figure { margin-inline: 0; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
pre {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.45;
}

table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }

.button, button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.9rem;
}
.site-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { padding-block: 1.25rem; }
.site-footer p { margin: 0; }

.card-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.card h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.card p { margin: 0.25rem 0 0; }
.meta { color: var(--muted); font-size: 0.9rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header nav, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
