:root {
  color-scheme: light;
  --bg: #fbfcf8;
  --surface: #ffffff;
  --ink: #16211f;
  --muted: #5f6f6a;
  --line: #dfe7df;
  --accent: #0f766e;
  --secondary: #e11d48;
  --focus: #f59e0b;
  --max: 1120px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent), transparent 45%);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.skip-link {
  background: var(--focus);
  color: #111;
  left: 1rem;
  padding: 0.6rem 0.8rem;
  position: absolute;
  top: -10rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner,
.hero,
.content-grid,
.footer-inner {
  margin: 0 auto;
  max-width: var(--max);
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  gap: 0.55rem;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: 8px;
  display: inline-block;
  height: 1.1rem;
  width: 1.1rem;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.nav a,
.accessibility button {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a:hover,
.accessibility button:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.accessibility {
  align-items: center;
  display: flex;
  gap: 0.25rem;
}

.accessibility button {
  background: transparent;
  cursor: pointer;
  min-width: 2.2rem;
}

.hero {
  padding-bottom: clamp(2.4rem, 5vw, 4rem);
  padding-top: clamp(2.8rem, 7vw, 6rem);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  margin: 0;
  max-width: 12ch;
}

.hero p {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.65;
  margin: 1.1rem 0 0;
  max-width: 720px;
}

.content-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) 280px;
  padding-bottom: 4rem;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
}

.post-card-media {
  background: color-mix(in srgb, var(--accent), transparent 88%);
  min-height: 150px;
}

.post-card-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.post-card-body {
  padding: 1rem 1rem 1rem 0;
}

.meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.post-card h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  margin: 0 0 0.55rem;
}

.post-card p,
.sidebar p,
.article-body {
  color: var(--muted);
  line-height: 1.7;
}

.post-card p {
  margin: 0;
}

.sidebar {
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
  position: sticky;
  top: 96px;
}

.sidebar h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.ad-slot {
  align-items: center;
  background: repeating-linear-gradient(135deg, #f5f7f2, #f5f7f2 12px, #eef4ee 12px, #eef4ee 24px);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.76rem;
  justify-content: center;
  min-height: 120px;
  padding: 1rem;
  text-align: center;
}

.article {
  margin: 0 auto;
  max-width: 820px;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

.article h1 {
  max-width: 14ch;
}

.article-body {
  color: var(--ink);
  font-size: 1.04rem;
  margin-top: 2rem;
}

.article-body h2,
.article-body h3 {
  color: var(--ink);
  margin-top: 2.1rem;
}

.article-body p,
.article-body li {
  color: color-mix(in srgb, var(--ink), var(--muted) 25%);
}

.article-body pre {
  background: #111827;
  border-radius: 8px;
  color: #f8fafc;
  overflow-x: auto;
  padding: 1rem;
}

.article-cover {
  border-radius: 8px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.disclosure {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  font-size: 0.88rem;
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  padding-bottom: 2rem;
  padding-top: 2rem;
}

html[data-contrast="high"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #1f2937;
  --line: #111111;
}

html[data-font="large"] {
  font-size: 20px;
}

@media (max-width: 820px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 0.8rem;
    padding-top: 0.8rem;
  }

  .nav {
    justify-content: flex-start;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 1rem;
    position: static;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card-body {
    padding: 1rem;
  }
}
