/* =============================================
   XO Medtech — Blog styles
   Uses brand tokens from colors_and_type.css:
   --font-sans: "Eudoxus Sans", --accent-xos (cyan-blue), slate neutrals
   ============================================= */

/* ---- Blog index hero ---- */
.blog-hero {
  padding: clamp(56px, 7vw, 88px) 0 clamp(32px, 4vw, 52px);
  border-bottom: 1px solid var(--slate-200);
}
.blog-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--slate-950);
}
.blog-hero p {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--muted-foreground);
  margin: 0;
  max-width: 540px;
  line-height: 1.6;
  font-weight: 400;
}

/* ---- Blog grid ---- */
.blog-grid-section {
  padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 96px);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; gap: 16px; } }

.blog-grid .blog-card:first-child {
  grid-column: 1 / -1;
}

/* ---- Blog card ---- */
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: var(--background);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}
.blog-card:hover {
  box-shadow: 0 6px 28px oklch(0 0 0 / 0.07);
  border-color: var(--slate-300);
  transform: translateY(-2px);
}

/* Featured card: horizontal layout on wide screens */
.blog-grid .blog-card:first-child {
  flex-direction: row;
}
@media (max-width: 760px) {
  .blog-grid .blog-card:first-child { flex-direction: column; }
}

.blog-card-img {
  width: 100%;
  overflow: hidden;
  background: var(--slate-100);
  flex-shrink: 0;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.blog-card:hover .blog-card-img img {
  transform: scale(1.025);
}

/* Default (non-featured) card image height */
.blog-card:not(:first-child) .blog-card-img {
  aspect-ratio: 16 / 9;
}

/* Featured card: image takes ~55% width */
.blog-grid .blog-card:first-child .blog-card-img {
  width: 55%;
  aspect-ratio: unset;
  min-height: 300px;
}
@media (max-width: 760px) {
  .blog-grid .blog-card:first-child .blog-card-img {
    width: 100%;
    aspect-ratio: 16 / 8;
    min-height: unset;
  }
}

.blog-card-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  justify-content: center;
}

/* ---- Tags ---- */
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-bottom: 2px;
}
.blog-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-xos);
}
.blog-tag + .blog-tag::before {
  content: '·';
  margin: 0 7px;
  color: var(--slate-400);
  font-weight: 400;
}

/* ---- Card title ---- */
.blog-card-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--slate-950);
  margin: 0;
}
.blog-grid .blog-card:first-child .blog-card-title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
}

/* ---- Card excerpt ---- */
.blog-card-dek {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.62;
  color: var(--muted-foreground);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-grid .blog-card:first-child .blog-card-dek {
  font-size: 15px;
  -webkit-line-clamp: 4;
}

/* ---- Card meta ---- */
.blog-card-meta {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-400);
  border-top: 1px solid var(--slate-100);
  letter-spacing: 0.01em;
}
.blog-card-meta .sep { opacity: 0.5; }

/* ---- Empty / loading states ---- */
.blog-loading, .blog-error, .blog-empty {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--muted-foreground);
  padding: 48px 0;
}
.blog-error { color: oklch(0.5 0.18 25); }


/* ============================================================
   Article page
   Warm neutral palette for the reading experience,
   brand cyan (--accent-xos) used for interactive / eyebrow elements
   ============================================================ */
:root {
  --paper:        #FAFAF9;
  --paper-2:      #FFFFFF;
  --carbon:       #141412;
  --ink:          #18160F;
  --body-text:    #38342C;
  --muted-text:   #8A8074;
  --line:         #E9E4DC;
  --line-strong:  #DAD4C8;
  --highlight:    #F3EDE3;
}

.article-layout {
  background: var(--paper);
  min-height: 100vh;
}

/* -- Hero -- */
.art-hero {
  background: var(--carbon);
  color: #EFE9E0;
  padding: clamp(56px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
/* Subtle grid texture */
.art-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 48px);
}
/* Brand cyan glow top-left */
.art-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 80% at 0% 0%, oklch(0.6571 0.1279 228.83 / 0.18), transparent 55%);
  pointer-events: none;
}
.art-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Back link */
.art-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(0.6571 0.1279 228.83);
  text-decoration: none;
  margin-bottom: 28px;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.art-back:hover { opacity: 1; }

.art-eyebrow {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.6571 0.1279 228.83);
  margin: 0 0 18px;
}
.art-h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: #FBF8F3;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.art-dek {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: #C8BFB4;
  max-width: 640px;
  margin: 0 0 28px;
}
.art-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: #9C9284;
}
.art-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: oklch(0.6571 0.1279 228.83);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.art-byline b { color: #E0D9D0; font-weight: 600; }
.art-byline .sep { opacity: 0.35; }

/* Stat strip */
.art-statstrip {
  border-top: 1px solid rgba(255,255,255,.09);
  margin-top: 36px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 1;
}
.art-stat .num {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  color: #FBF8F3;
  line-height: 1;
  letter-spacing: -0.025em;
}
.art-stat .num em { color: oklch(0.6571 0.1279 228.83); font-style: normal; }
.art-stat .lbl {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: #9C9284;
  letter-spacing: 0.01em;
  margin-top: 8px;
  line-height: 1.4;
}
@media (max-width: 560px) { .art-statstrip { grid-template-columns: 1fr; } }

/* -- Article body -- */
.art-body {
  background: var(--paper);
  padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 7vw, 96px);
}
.art-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--body-text);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.72;
}
.art-wrap p { margin: 0 0 24px; }
.art-wrap strong { color: var(--ink); font-weight: 700; }
.art-lead {
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
}
.art-pull {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.015em;
  border-left: 3px solid oklch(0.6571 0.1279 228.83);
  padding: 4px 0 4px 22px;
  margin: 44px 0;
}
.art-kicker {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.6571 0.1279 228.83);
  margin: 0 0 14px;
}
.art-h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 52px 0 4px;
}
.art-wrap a { color: oklch(0.6571 0.1279 228.83); text-decoration: none; border-bottom: 1px solid oklch(0.6571 0.1279 228.83 / 0.35); }
.art-wrap a:hover { border-bottom-color: oklch(0.6571 0.1279 228.83); }

/* Data card */
.art-datacard {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 26px;
  margin: 32px 0;
}
.art-datacard .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.art-datacard .row:last-child { border-bottom: none; padding-bottom: 0; }
.art-datacard .row:first-child { padding-top: 0; }
.art-datacard .k { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--muted-text); }
.art-datacard .v { font-family: var(--font-sans); font-weight: 800; font-size: 26px; color: var(--ink); white-space: nowrap; }
.art-datacard .v em { color: oklch(0.6571 0.1279 228.83); font-style: normal; }

/* Table */
.art-tablewrap { margin: 36px 0 12px; }
.art-tablecap { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 12px; }
.art-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); }
.art-table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14px; }
.art-table thead th {
  font-family: var(--font-sans); font-weight: 700; font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted-text); text-align: left; padding: 14px 12px;
  border-bottom: 1px solid var(--line-strong); vertical-align: bottom;
  background: #FAFAF8;
}
.art-table tbody td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body-text); font-family: var(--font-sans); }
.art-table tbody tr:last-child td { border-bottom: none; }
.art-table td.mat { font-weight: 700; color: var(--ink); }
.art-table td.mat small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 11px; color: var(--muted-text); margin-top: 2px; }
.art-table td.num { font-family: var(--font-sans); font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; }
.art-table tr.carbon td { background: oklch(0.9578 0.0237 223.67 / 0.25); }
.art-table tr.carbon td.mat { color: oklch(0.5 0.14 228.83); }
.art-footnote { font-family: var(--font-sans); font-size: 12px; color: var(--muted-text); line-height: 1.5; margin-top: 14px; font-weight: 400; }
.art-tag { font-family: var(--font-sans); font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted-text); white-space: nowrap; }
.art-tag.hi { background: oklch(0.6571 0.1279 228.83); color: #fff; border-color: oklch(0.6571 0.1279 228.83); }
.art-tag.mid { color: var(--body-text); }

/* Problem cards */
.art-cards { display: grid; gap: 14px; margin: 28px 0 6px; }
.art-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 22px 22px 20px; }
.art-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.art-card h3 { font-family: var(--font-sans); font-weight: 700; font-size: 17px; color: var(--ink); margin: 0; letter-spacing: -0.015em; line-height: 1.2; }
.art-card .idx { font-family: var(--font-sans); font-size: 11px; font-weight: 700; color: var(--muted-text); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.art-card .score { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--muted-text); white-space: nowrap; flex-shrink: 0; }
.art-card .score em { color: oklch(0.6571 0.1279 228.83); font-style: normal; font-weight: 700; }
.art-card p { font-family: var(--font-sans); font-size: 15px; font-weight: 400; line-height: 1.64; color: var(--body-text); margin: 0; }
@media (max-width: 640px) { .art-card-head { flex-direction: column; } }

/* Bottom CTA */
.art-cta-bar {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.art-cta-bar h4 { font-family: var(--font-sans); font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.art-cta-bar p { font-family: var(--font-sans); font-size: 15px; font-weight: 400; color: var(--muted-text); margin: 0; }
.art-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.art-cta-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: 10px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 700;
  text-decoration: none; transition: opacity 0.15s ease;
  letter-spacing: -0.01em;
}
.art-cta-link:hover { opacity: 0.82; }
.art-cta-link.primary { background: oklch(0.6571 0.1279 228.83); color: #fff; }
.art-cta-link.secondary { background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink); }
