@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/press-start-2p-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbf9fd;
  --surface: #ffffff;
  --sunken: #f3eff8;
  --text: #1d1b26;
  --muted: #5b5668;
  --line: #e4dfeb;
  --link: #0b6f78;
  --link-hover: #c2185b;
  --pink: #ff6b9d;
  --pink-ink: #c2185b;
  --teal: #5fcbcd;
  --lavender: #b89ad9;
  --green: #00b84a;
  --ink: #1a1a1a;
  --code-bg: #f1edf6;
  --tldr-bg: #fff3f7;
  --shadow: 0 1px 2px rgba(29, 27, 38, 0.06), 0 8px 24px rgba(29, 27, 38, 0.06);
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141218;
    --surface: #1c1922;
    --sunken: #221e2a;
    --text: #ece8f3;
    --muted: #a9a3b6;
    --line: #322c3c;
    --link: #6fd9db;
    --link-hover: #ff8fb3;
    --pink-ink: #ff8fb3;
    --code-bg: #2a2433;
    --tldr-bg: #2a1a24;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.site-head { background: var(--ink); color: #fff; }
.site-head-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--pixel);
  font-size: 0.85rem;
  color: var(--pink);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(255, 107, 157, 0.55);
}
.brand:hover { color: #ff8fb3; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: #e9e4f0; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav .nav-cta {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--ink);
  background: var(--teal);
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--pink);
}
.site-nav .nav-cta:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pink); }
.site-head-stripe {
  height: 4px;
  background: linear-gradient(90deg, #ff8fb3, #d9a8e0 30%, #9a93dd 60%, #5fcbcd);
}

main { display: block; }

.eyebrow {
  font-family: var(--pixel);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--pink-ink);
  margin: 0 0 1rem;
}

.blog-hero, .post-list, .post { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

.blog-hero { padding-top: 3.5rem; padding-bottom: 2rem; max-width: 760px; text-align: center; }
.blog-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.01em; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0; }

.post-list { display: grid; gap: 2rem; padding-bottom: 4rem; }
.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1200 / 630; }
.post-card-body { padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.post-card-body h2 { font-size: 1.45rem; line-height: 1.25; margin: 0.5rem 0 0.75rem; }
.post-card-body h2 a { color: var(--text); text-decoration: none; }
.post-card-body h2 a:hover { color: var(--pink-ink); }
.post-card-body p { margin: 0 0 1rem; color: var(--muted); }
.read-more { font-weight: 700; text-decoration: none; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.92rem; color: var(--muted); margin: 0; }
.badge {
  font-family: var(--pixel);
  font-size: 0.55rem;
  background: var(--ink);
  color: #7dff8a;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
}

.post { max-width: 760px; padding-top: 1.5rem; padding-bottom: 4rem; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 2rem; font-size: 0.88rem; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 0.4rem; color: var(--line); }
.crumbs a { color: var(--muted); }

.post-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 1.1rem; }
.post-head .lede { margin-bottom: 1.25rem; }

.post-hero { margin: 2rem -1.25rem 2.5rem; }
.post-hero img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); }

.post-body h2 { font-size: 1.6rem; line-height: 1.25; margin: 2.75rem 0 0.9rem; letter-spacing: -0.01em; }
.post-body h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.75rem 0 0.4rem; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.15rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.45rem; }
.post-body li::marker { color: var(--pink-ink); }
.post-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.post-body pre {
  margin: 0 0 1.15rem;
  padding: 1rem 1.15rem;
  background: #0d0f0d;
  color: #b8f5c4;
  border: 1px solid #1f3a27;
  border-left: 4px solid var(--green);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; white-space: pre; }

.tldr {
  background: var(--tldr-bg);
  border: 1px solid var(--line);
  border-left: 5px solid var(--pink);
  border-radius: 12px;
  padding: 1.4rem 1.5rem 0.6rem;
  margin-bottom: 2rem;
}
.tldr h2 { margin: 0 0 0.75rem; font-size: 1.15rem; }

.toc {
  background: var(--sunken);
  border-radius: 12px;
  padding: 1.25rem 1.5rem 0.5rem;
  margin-bottom: 1rem;
}
.toc h2 { font-family: var(--pixel); font-size: 0.65rem; letter-spacing: 0.08em; margin: 0 0 0.9rem; color: var(--muted); }
.toc ol { columns: 2; column-gap: 2rem; margin-bottom: 0.75rem; }
.toc li { break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
caption { text-align: left; padding: 0.9rem 1rem 0.4rem; font-size: 0.88rem; color: var(--muted); }
th, td { text-align: left; padding: 0.7rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--sunken); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 0.95rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: #7dff8a;
  background: var(--ink);
  border-radius: 4px;
}

.cta {
  margin: 2.75rem 0;
  padding: 2rem 1.75rem;
  border-radius: 18px;
  color: #1a1a1a;
  background: linear-gradient(135deg, #ff8fb3 0%, #d9a8e0 40%, #9a93dd 70%, #5fcbcd 100%);
  box-shadow: var(--shadow);
  text-align: center;
}
.cta-eyebrow { font-family: var(--pixel); font-size: 0.6rem; letter-spacing: 0.1em; margin: 0 0 0.75rem; }
.post-body .cta-title { margin: 0 0 0.6rem; font-size: 1.55rem; color: #1a1a1a; }
.cta p { max-width: 34rem; margin: 0 auto 1.4rem; }
.cta-button {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.72rem;
  line-height: 1.6;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  padding: 0.95rem 1.2rem;
  border-radius: 6px;
  box-shadow: 4px 4px 0 #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta-button:hover { color: #7dff8a; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #fff; }

.cta-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.9rem 1.4rem; }
.cta-link { color: #1a1a1a; font-weight: 700; text-decoration: underline; }
.cta-link:hover { color: #4a0a1d; }

.contact {
  margin: 2.75rem 0 0;
  padding: 1.75rem 1.6rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #ff8fb3, #d9a8e0 30%, #9a93dd 60%, #5fcbcd);
}
.post-body .contact h2 { margin-top: 0.25rem; }
.contact-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 0.3rem; }
.field input, .field textarea {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(95, 203, 205, 0.35); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { border: 0; cursor: pointer; justify-self: start; box-shadow: 4px 4px 0 var(--pink); }
.form-submit:hover { box-shadow: 6px 6px 0 var(--pink); }
.form-note { margin: 0; font-size: 0.88rem; color: var(--muted); }
.form-status { margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: 10px; font-weight: 600; }
.form-status.is-ok { background: rgba(0, 184, 74, 0.12); border: 1px solid rgba(0, 184, 74, 0.45); }
.form-status.is-bad { background: rgba(194, 24, 91, 0.1); border: 1px solid rgba(194, 24, 91, 0.45); }

.faq h3 { color: var(--text); }
.faq p { color: var(--muted); }

.author {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.6rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 12px;
}
.post-body .author h2 { font-family: var(--pixel); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.9rem; }

.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.94rem; }
.post-body .sources h2 { font-size: 1.1rem; margin-top: 0; }
.note { color: var(--muted); font-style: italic; }

.site-foot { background: var(--ink); color: #cfc8da; }
.site-foot-inner { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.25rem; text-align: center; }
.site-foot p { margin: 0 0 0.75rem; }
.foot-brand { font-family: var(--pixel); font-size: 0.75rem; color: var(--pink); }
.site-foot nav { display: flex; justify-content: center; gap: 1.5rem; margin: 1rem 0; }
.site-foot a { color: var(--teal); text-decoration: none; }
.site-foot a:hover { color: #ff8fb3; }
.foot-small { font-size: 0.85rem; color: #8f88a0; }

@media (max-width: 760px) {
  body { font-size: 1.02rem; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-body { padding: 1.25rem 1.25rem 1.5rem; }
  .toc ol { columns: 1; }
  .post-hero { margin-left: -1.25rem; margin-right: -1.25rem; }
  .post-hero img { border-radius: 0; }
  .brand { font-size: 0.7rem; }
  .site-nav { gap: 0.8rem; }
  .cta { padding: 1.6rem 1.2rem; }
  .field-row { grid-template-columns: 1fr; }
  .contact { padding: 1.4rem 1.1rem 1.2rem; }
  .form-submit { justify-self: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta-button, .site-nav .nav-cta { transition: none; }
}

@media print {
  .site-head, .site-foot, .cta, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
