:root {
  --bg-main: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-inset: #f2f4f6;

  --ink-main: #0f172a;
  --ink-muted: #475569;

  --rule-light: #d6dbe1;
  --rule-medium: #c3c9d1;

  --max-width: 880px;
}

/* Base */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--ink-main);
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Structural wrappers */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.main {
  padding: 36px 0 56px;
}

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-light);
}

.site-header--home .header-bar::before {
  content: "";
  display: block;
}

.header-bar {
  min-height: 76px;          /* adjust if you want taller/shorter */
  display: flex;
  justify-content: space-between;
  align-items: center;       /* key: consistent vertical alignment */
  gap: 16px;
  padding: 14px 0;
}


.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-light);
}




.brand { text-decoration: none; }

.brand__name {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__tagline {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-top: 2px;
}

/* Navigation */
.nav__list {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}

.nav__link {
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.nav__link:hover {
  background: var(--bg-inset);
}

.nav__link--active {
  background: var(--bg-inset);
  border: 1px solid var(--rule-medium);
}

/* Page framing */
.page {
  background: var(--bg-surface);
  border: 1px solid var(--rule-light);
  padding: 32px 36px 40px;
}

.page__head {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 16px;
}

.page__title {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 6px;
}

.page__kicker {
  margin: 0;
  color: var(--ink-muted);
  max-width: 70ch;
}

/* Prose */
.prose p,
.prose li { max-width: 75ch; }

.prose h2 {
  margin-top: 32px;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 20px;
  font-size: 1.1rem;
}

.muted { color: var(--ink-muted); }

/* Inset panels (ornament + structure) */
.inset,
.output,
.callout {
  background: var(--bg-inset);
  border: 1px solid var(--rule-medium);
  padding: 16px 18px;
  margin: 20px 0;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--rule-medium);
  padding: 16px 18px;
  margin: 18px 0;
}

.card > :first-child {
  margin-top: 0;
}

.card__title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.card__body {
  margin: 0;
  color: var(--ink-muted);
  max-width: 75ch;
}

.output strong { font-weight: 600; }

/* Home */
.home-hero {
  background: var(--bg-surface);
  border: 1px solid var(--rule-light);
  padding: 34px 36px;
  margin-bottom: 28px;

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px 24px;
  align-items: end;
}

.home-wordmark {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.08;
  letter-spacing: 0.2px;
}

.home-kicker {
  margin: 0;
  color: var(--ink-muted);
  max-width: 40ch;
  justify-self: end;
  text-align: right;
}

/* Responsive: stack cleanly */
@media (max-width: 760px) {
  .home-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-kicker {
    justify-self: start;
    text-align: left;
    max-width: 65ch;
  }
}


.button {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--ink-main);
  padding: 10px 14px;
  border-radius: 0;
  font-weight: 600;
  background: transparent;
}

.button:hover {
  background: var(--bg-inset);
}

.button--ghost {
  border-color: var(--rule-medium);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--rule-light);
  margin-top: 48px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0;
}

.footer__line {
  margin: 0;
  color: var(--ink-muted);
}
