:root {
  color-scheme: light dark;
  --ink: #122033;
  --muted: #5b6b7f;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --line: #dce3ec;
  --accent: #007c91;
  --accent-strong: #005f70;
  --navy: #0d1b2a;
  --navy-soft: #172a3f;
  --code: #eaf1f6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 23px, rgba(0, 124, 145, .05) 24px, transparent 25px) 0 0 / 48px 48px,
    var(--paper);
}

a { color: var(--accent-strong); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .6rem .9rem;
  color: #fff;
  background: var(--navy);
}

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

.site-header {
  color: #f4f7fb;
  background: var(--navy);
  border-bottom: 3px solid #19a7b8;
}

.header-inner,
.page,
.footer-inner {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  font-weight: 720;
  letter-spacing: .01em;
  text-decoration: none;
}

.brand img { width: 2rem; height: 2rem; }

.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav a {
  padding: .45rem .7rem;
  border-radius: .35rem;
  color: #d9e3ed;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #fff; background: var(--navy-soft); }

.page { padding-block: clamp(3rem, 8vw, 6rem); }

.eyebrow {
  margin: 0 0 .8rem;
  color: var(--accent-strong);
  font-size: .82rem;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -.025em;
}

h1 { max-width: 17ch; margin-bottom: 1.25rem; font-size: clamp(2.45rem, 7vw, 5rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

.lede {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.rule {
  width: 4rem;
  height: .28rem;
  margin: 2rem 0;
  border: 0;
  background: var(--accent);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 4.5rem 0 1.3rem;
}

.section-head h2 { margin-bottom: 0; }

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.note-card {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-top: .32rem solid var(--accent);
  border-radius: .6rem;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(13, 27, 42, .06);
}

.note-card p { color: var(--muted); }
.note-card .read-more { margin-top: auto; font-weight: 700; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .88rem;
}

.prose { max-width: 44rem; }
.prose h1 { max-width: 20ch; font-size: clamp(2.2rem, 6vw, 4rem); }
.prose h2 { margin-top: 2.6rem; }
.prose p, .prose ul { color: #34465b; }
.prose li + li { margin-top: .5rem; }
.prose blockquote {
  margin: 2rem 0;
  padding: .3rem 0 .3rem 1.2rem;
  border-left: .28rem solid var(--accent);
  color: var(--muted);
  font-size: 1.08rem;
}

.callout {
  margin-top: 3rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--code);
}

.not-found { min-height: calc(100vh - 10rem); display: grid; align-content: center; }
.not-found .code { margin: 0; color: var(--accent); font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; line-height: .9; }

.site-footer {
  padding-block: 2rem;
  color: #c6d2de;
  background: var(--navy);
}

.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

@media (max-width: 42rem) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: .85rem; }
  .site-nav { margin-left: -.7rem; }
  .note-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef5;
    --muted: #adbac9;
    --paper: #0b1420;
    --surface: #111e2c;
    --line: #2c3d50;
    --accent: #35b8c8;
    --accent-strong: #61ceda;
    --code: #17283a;
  }
  .prose p, .prose ul { color: #c3cfdb; }
  .note-card { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
