/* ===== Typeset core (shadcn/typeset) ===== */
/* Generated and hand-tuned for p1blue blog articles. */

/* ---- CSS variables (mirror app theme tokens for standalone blog pages) ---- */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.13 0.028 261.692);
  --muted: oklch(0.967 0.003 264.542);
  --muted-foreground: oklch(0.551 0.027 264.364);
  --border: oklch(0.928 0.006 264.531);
  --primary: oklch(0.59 0.14 242);
  --primary-foreground: oklch(0.98 0.01 237);
  --font-sans: "Inter Variable", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.dark {
  --background: oklch(0.13 0.028 261.692);
  --foreground: oklch(0.985 0.002 247.839);
  --muted: oklch(0.278 0.033 256.848);
  --muted-foreground: oklch(0.707 0.022 261.325);
  --border: oklch(1 0 0 / 10%);
}

/* ---- Typeset reset ---- */
.typeset {
  --typeset-font-body: var(--font-sans);
  --typeset-font-heading: var(--font-sans);
  --typeset-font-mono: var(--font-mono);
  --typeset-size: 1em;
  --typeset-leading: 1.75;
  --typeset-flow: 1.25em;

  color: var(--foreground);
  font-family: var(--typeset-font-body);
  font-size: var(--typeset-size);
  line-height: var(--typeset-leading);
}

.typeset :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--typeset-font-heading);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  margin-block-start: calc(var(--typeset-flow) * 1.5);
  margin-block-end: calc(var(--typeset-flow) * 0.5);
}
.typeset :where(h1) { font-size: 2em; }
.typeset :where(h2) { font-size: 1.5em; }
.typeset :where(h3) { font-size: 1.25em; }
.typeset :where(h4) { font-size: 1.1em; }

.typeset :where(p) { margin-block-start: 0; margin-block-end: var(--typeset-flow); }

.typeset :where(ul, ol) {
  padding-inline-start: 1.25em;
  margin-block: var(--typeset-flow);
  list-style-position: outside;
}
/* The site-wide reset (`ul, ol { list-style: none }`) kills the markers; the
   article body is the one place that needs them back. */
.typeset :where(ul) { list-style-type: disc; }
.typeset :where(ol) { list-style-type: decimal; }
.typeset :where(li) { margin-block: calc(var(--typeset-flow) * 0.25); }
.typeset :where(li)::marker { color: var(--muted-foreground); }

.typeset :where(strong) { font-weight: 600; }

.typeset :where(a) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.typeset :where(a:hover) { opacity: 0.8; }

.typeset :where(code) {
  font-family: var(--typeset-font-mono);
  font-size: 0.875em;
  background: var(--muted);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}
.typeset :where(pre) {
  font-family: var(--typeset-font-mono);
  font-size: 0.875em;
  background: var(--muted);
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin-block: var(--typeset-flow);
}
.typeset :where(pre code) { background: none; padding: 0; }

.typeset :where(blockquote) {
  border-inline-start: 3px solid var(--primary);
  padding-inline-start: 1em;
  margin-block: var(--typeset-flow);
  color: var(--muted-foreground);
  font-style: italic;
}

.typeset :where(hr) {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: calc(var(--typeset-flow) * 2);
}

.typeset :where(table) {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--typeset-flow);
  font-size: 0.9375em;
}
.typeset :where(th, td) {
  text-align: start;
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--border);
}
.typeset :where(th) { font-weight: 600; }
.typeset :where(tbody tr:last-child td) { border-bottom: none; }

.typeset :where(img) {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-block: var(--typeset-flow);
}

/* Standalone images are promoted to <figure> by the markdown renderer. */
.typeset :where(figure) {
  margin-block: var(--typeset-flow);
}
.typeset :where(figure img) {
  display: block;
  margin-block: 0;
  margin-inline: auto;
}
.typeset :where(figcaption) {
  margin-top: 0.5em;
  font-size: 0.875em;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* ---- Article typeset preset ---- */
.typeset-article {
  --typeset-size: 17px;
  --typeset-leading: 1.85;
  --typeset-flow: 1.5em;
}

/* ===== Blog page layout ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

a { text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== Tailwind utility equivalents for shared header/footer components ===== */
/* These classes are output by SiteHeader/SiteFooter via renderToStaticMarkup.
   Since blog pages don't go through Tailwind's PostCSS pipeline, we define
   the CSS equivalents here. Keep in sync with site-header.tsx and site-footer.tsx. */

/* ---- Position & Display ---- */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }
.relative { position: relative; }
.absolute { position: absolute; }
.flex { display: flex; }
.inline-block { display: inline-block; }
.hidden { display: none; }
@media (min-width: 640px) { .sm\:flex { display: flex; } }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* ---- Sizing ---- */
.max-w-7xl { max-width: 80rem; }
.w-auto { width: auto; }
.h-8 { height: 2rem; }
.h-6 { height: 1.5rem; }
.size-0 { width: 0; height: 0; }
@media (min-width: 1024px) { .group:hover .group-hover\:size-4 { width: 1rem; height: 1rem; } }

/* ---- Spacing ---- */
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-8 { margin-top: 2rem; }
.pt-6 { padding-top: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 1024px) { .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; } }

/* Workaround for Tailwind space-y-2 (all children except first) */
.space-y-2 > * + * { margin-top: 0.5rem; }

/* ---- Typography ---- */
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }

/* ---- Colors ---- */
.text-black { color: oklch(0 0 0); }
.text-white { color: oklch(1 0 0); }
.text-white\/70 { color: oklch(1 0 0 / 70%); }
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-muted-foreground\/70 { color: oklch(0.551 0.027 264.364 / 70%); }
.bg-black { background: oklch(0 0 0); }
.bg-white { background: oklch(1 0 0); }
.bg-primary { background: var(--primary); }

/* bg-muted/30: muted background at 30% opacity (Tailwind v4 opacity modifier) */
.bg-muted\/30 { background: oklch(0.967 0.003 264.542 / 30%); }
:root .dark .bg-muted\/30 { background: oklch(0.278 0.033 256.848 / 30%); }

/* ---- Borders ---- */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-white\/10 { border-color: oklch(1 0 0 / 10%); }
.border-white\/20 { border-color: oklch(1 0 0 / 20%); }
.border-border { border-color: var(--border); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-4xl { border-radius: 2rem; }

/* ---- Effects ---- */
.shadow-lg { box-shadow: 0 10px 15px -3px oklch(0 0 0 / 10%), 0 4px 6px -4px oklch(0 0 0 / 10%); }
.shadow-xl { box-shadow: 0 20px 25px -5px oklch(0 0 0 / 10%), 0 8px 10px -6px oklch(0 0 0 / 10%); }
.opacity-0 { opacity: 0; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* ---- Transitions ---- */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.ease-in-out { transition-timing-function: ease-in-out; }

/* ---- Hover states ---- */
.hover\:text-white:hover { color: oklch(1 0 0); }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:border:hover { border-color: var(--primary); }
.hover\:bg-white\/10:hover { background: oklch(1 0 0 / 10%); }
.hover\:bg-white\/90:hover { background: oklch(1 0 0 / 90%); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px oklch(0 0 0 / 10%), 0 8px 10px -6px oklch(0 0 0 / 10%); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* ---- Active states ---- */
.active\:translate-y-px:active { transform: translateY(1px); }

/* ---- Misc ---- */
.underline { text-decoration-line: underline; }
.underline-offset-4 { text-underline-offset: 4px; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.-translate-x-full { transform: translateX(-100%); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops, transparent)); }
.from-transparent { --tw-gradient-from: transparent; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-white\/20 { --tw-gradient-middle: oklch(1 0 0 / 20%); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-middle), var(--tw-gradient-to, transparent); }
.to-transparent { --tw-gradient-to: transparent; }

/* Group hover: margin-left when parent (group) is hovered */
.group .group-hover\:ml-2 { margin-left: 0; }
.group:hover .group-hover\:ml-2 { margin-left: 0.5rem; }

/* Shimmer animation for the CTA button */
.animate-\[shimmer_600ms_ease-in-out\] { animation: none; }
.group:hover .group-hover\:animate-\[shimmer_600ms_ease-in-out\] { animation: shimmer 600ms ease-in-out; }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- Blog header overrides (dark background needs light text) ---- */
nav.sticky a { text-decoration: none; }

/* ===== End Tailwind equivalents ===== */

.blog-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---- Article page ---- */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article-cluster {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.article-cluster:hover { opacity: 0.8; }
.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.article-tag {
  font-size: 0.75rem;
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 0.15em 0.6em;
  border-radius: 999px;
}

/* ---- Satellite nav (pillar articles) ---- */
.satellite-nav {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--muted);
  border-radius: 8px;
}
.satellite-nav h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.satellite-nav ul { list-style: none; padding: 0; }
.satellite-nav li { margin-bottom: 0.5rem; }
.satellite-nav a {
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.9375rem;
}
.satellite-nav a:hover { color: var(--primary); }

/* ---- CTA block ---- */
.cta-blog {
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
  background: var(--muted);
  border-radius: 8px;
}
.cta-blog h2 { font-size: 1.375rem; margin-bottom: 0.5rem; }
.cta-blog p { color: var(--muted-foreground); margin-bottom: 1.25rem; }

/* ---- Recommendations ---- */
.rec-section { margin-top: 3rem; }
.rec-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.rec-same-grid {
  display: grid;
  gap: 1rem;
}
.rec-same-grid--1 { grid-template-columns: 1fr; }
.rec-same-grid--2 { grid-template-columns: 1fr 1fr; }
.rec-same-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 639px) {
  .rec-same-grid--2,
  .rec-same-grid--3 { grid-template-columns: 1fr; }
}
.rec-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 150ms;
}
.rec-card:hover { border-color: var(--primary); }
.rec-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rec-card h3 { font-size: 1rem; margin: 0.25rem 0 0.375rem; color: var(--foreground); }
.rec-card:hover h3 { color: var(--primary); }
.rec-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* ---- Pillar callout (injected in satellite articles) ---- */
.pillar-callout {
  margin: 1.5em 0;
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}
.pillar-callout a {
  font-weight: 600;
  color: var(--primary);
}
.pillar-callout a:hover { opacity: 0.8; }

/* ---- Listing page ---- */
.listing-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.listing-card {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.listing-cluster {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.listing-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}
.listing-reading-time {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.listing-cluster-group { margin-bottom: 2.5rem; }
.listing-cluster-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}
.listing-type {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--muted);
  padding: 0.1em 0.5em;
  border-radius: 4px;
  margin-bottom: 0.375rem;
}
.listing-card-labels {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}
.listing-card-labels .listing-type { margin-bottom: 0; }
/* Marks a card whose article is only written in one language: the link goes to
   that language's URL, not to a translation that does not exist. */
.listing-lang {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  padding: 0.05em 0.4em;
  border-radius: 4px;
}
.listing-card h3 { font-size: 1.125rem; margin: 0.25rem 0 0.375rem; }
.listing-card h3 a { color: var(--foreground); text-decoration: none; }
.listing-card h3 a:hover { color: var(--primary); }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .article-header h1 { font-size: 1.5rem; }
  .typeset-article { --typeset-size: 16px; }
}
