/* leva2k.online — single stylesheet, no external resources */

:root {
  --paper: #f6f3ec;
  --ink: #1f1d1a;
  --muted: #6b665d;
  --rule: #ddd6c8;
  --accent: #9a4a2a;
  --card: #fbf9f4;
  --measure: 38rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614;
    --ink: #e9e4d9;
    --muted: #9c968a;
    --rule: #2e2b27;
    --accent: #d88a63;
    --card: #1d1c19;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  text-rendering: optimizeLegibility;
}

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

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

/* header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 1.4rem; padding-bottom: 1rem;
}
.brand {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem; letter-spacing: 0.02em; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* main */
main { padding: 2.75rem 0 3.5rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1.05rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.3rem; }

.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 2rem; }

.meta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em;
}

/* post list */
.posts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.posts li { margin: 0; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.posts a { font-size: 1.12rem; text-decoration: none; color: var(--ink); }
.posts a:hover { color: var(--accent); }
.posts p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.97rem; }

/* article */
article .meta { margin-bottom: 1.75rem; display: block; }
blockquote {
  margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--accent); color: var(--muted); font-style: italic;
}
.note {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: 0.9rem 1rem; font-size: 0.95rem; margin: 1.5rem 0;
}
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 1.25rem 0 1.5rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem 0.45rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em; background: var(--card); border: 1px solid var(--rule);
  border-radius: 4px; padding: 0.05em 0.3em;
}
.back { margin-top: 2.5rem; font-size: 0.95rem; }

/* footer */
.site-foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.85rem; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem;
  padding-top: 1.2rem; padding-bottom: 2rem;
}
.site-foot a { color: var(--muted); }

/* error pages */
.error-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--accent); font-size: 0.9rem; letter-spacing: 0.08em; margin-bottom: 0.5rem;
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.65rem; }
  main { padding-top: 2rem; }
}

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