:root {
  color-scheme: light dark;
  --bg: #f3f1ef;
  --surface: #ffffff;
  --surface-subtle: #ebe6e1;
  --border: #dfd8d1;
  --ink: #2e2119;
  --soft: #63554b;
  --link: #6b4226;
  --accent: #0e7490;
  --on-accent: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1411;
    --surface: #251d19;
    --surface-subtle: #312722;
    --border: #3d322c;
    --ink: #f3eeea;
    --soft: #c9bdb4;
    --link: #d9ae8c;
    --accent: #38bdf8;
    --on-accent: #102029;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--link);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--soft);
  text-decoration: none;
  font-weight: 500;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1.25rem;
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

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

.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--soft);
  max-width: 38rem;
}

.soft {
  color: var(--soft);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  border: 1px solid var(--border);
  flex: none;
  display: block;
}

.app-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.app-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
}

.button:hover {
  border-color: var(--link);
  color: var(--link);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  opacity: 0.92;
  color: var(--on-accent);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.pill-list li {
  margin: 0;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  color: var(--soft);
  background: var(--surface-subtle);
  border-radius: 999px;
}

.breadcrumb {
  margin: -1rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--soft);
}

.breadcrumb a {
  color: var(--soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.prose {
  max-width: 39rem;
}

.meta {
  font-size: 0.92rem;
  color: var(--soft);
  margin-bottom: 1.5rem;
}

footer.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--soft);
}

footer.site-footer a {
  color: var(--soft);
}

footer.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 520px) {
  .wrap {
    padding: 1.25rem 1rem 3rem;
  }

  .card {
    padding: 1.2rem;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
  }
}
