:root {
  --bg: #070b12;
  --surface: rgba(16, 27, 45, 0.86);
  --panel: rgba(255, 255, 255, 0.04);
  --text: #eaf2ff;
  --muted: rgba(234, 242, 255, 0.72);
  --muted-strong: rgba(234, 242, 255, 0.9);
  --line: rgba(234, 242, 255, 0.12);
  --blue: #6cd4ff;
  --blue-soft: rgba(108, 212, 255, 0.14);
  --emerald: #2be4a7;
  --hot: #ff5c7a;
  --amber: #ffb020;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(108, 212, 255, 0.18), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(43, 228, 167, 0.16), transparent 36%),
    radial-gradient(circle at 40% 110%, rgba(255, 92, 122, 0.10), transparent 38%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0;
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234, 242, 255, 0.10);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; }
.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: .9rem; }
.nav { display: flex; flex-wrap: wrap; gap: 10px; }
.nav a, .metric-card, .dashboard-card, .service-card, .framework, .framework-grid article, .faq-grid article { border: 1px solid var(--line); }
.nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(234, 242, 255, 0.88);
}
.nav a:hover, .nav a:focus-visible,
.subpage-nav a:hover, .subpage-nav a:focus-visible {
  outline: none;
  border-color: rgba(108,212,255,.32);
  box-shadow: 0 0 0 4px rgba(108,212,255,.10);
  color: var(--text);
}
.content { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding-bottom: 72px; }
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.hero-copy,
.hero-side {
  align-self: start;
  min-width: 0;
}
.hero-copy, .metric-card, .dashboard-card, .service-card, .framework, .faq-grid article {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.hero-copy { padding: 34px; }
.eyebrow, .label { display: inline-flex; padding: 7px 12px; border-radius: 999px; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow {
  background: rgba(200, 238, 255, 0.26);
  color: #0a1524;
  border: 1px solid rgba(108, 212, 255, 0.38);
}
.eyebrow.soft, .label {
  background: rgba(208, 255, 236, 0.22);
  color: #061c14;
  border: 1px solid rgba(43, 228, 167, 0.32);
}
.hero h1, .section-head h2, .framework-copy h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.02em;
}
.hero h1 { margin: 12px 0 14px; font-size: clamp(2rem, 3.5vw, 3.35rem); line-height: 1.12; font-weight: 700; }
.hero p, .metric-card span, .dashboard-card p, .service-card p, .framework-grid p, .faq-grid p { color: var(--muted); line-height: 1.8; }
.hero-figure { border: 1px solid rgba(234,242,255,.12); border-radius: 22px; background: rgba(255,255,255,0.04); box-shadow: 0 24px 70px rgba(0,0,0,.28); overflow: hidden; }
.hero-figure, .dashboard-card, .faq-grid article { overflow: hidden; }
.hero-figure, .dashboard-card img, .faq-grid img {
  width: 100%; display: block; border-radius: 24px; object-fit: cover; background: #eef4fa;
}
.article-cover {
  width: 100%; display: block; margin: 16px 0 0; border-radius: 24px; border: 1px solid rgba(28,37,50,.08);
  aspect-ratio: 16 / 10; object-fit: cover; background: #eef4fa;
}
.hero-figure { border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: 0 18px 44px rgba(24,39,56,.06); overflow: hidden; }
.hero-figure img { width: 100%; display: block; }
.dashboard-card img { margin-bottom: 16px; }
.hero-figure img { aspect-ratio: 16 / 10; object-fit: cover; background: #eef4fa; }
.dashboard-card img { aspect-ratio: 16 / 11; border: 1px solid rgba(234,242,255,.12); }
.faq-grid img { aspect-ratio: 16 / 11; margin-bottom: 16px; border: 1px solid rgba(234,242,255,.12); }
.hero-side { display: grid; gap: 18px; }
.metric-card {
  padding: 20px 22px 22px;
  display: grid;
  align-content: start;
}
.metric-card strong { font-size: 1.45rem; line-height: 1.45; font-family: Georgia, "Times New Roman", serif; }
.hero-figure-hit {
  display: block;
  line-height: 0;
  color: inherit;
}
a.metric-hit,
a.dashboard-hit,
a.service-hit,
a.framework-hit,
a.faq-hit {
  display: block;
  min-height: 0;
  color: inherit;
  text-decoration: none;
}
a.metric-hit {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}
a.metric-hit:hover strong,
a.metric-hit:focus-visible strong,
a.dashboard-hit:hover h2,
a.dashboard-hit:focus-visible h2,
a.dashboard-hit:hover strong,
a.dashboard-hit:focus-visible strong,
a.service-hit:hover h3,
a.service-hit:focus-visible h3,
a.framework-hit:hover strong,
a.framework-hit:focus-visible strong,
a.faq-hit:hover strong,
a.faq-hit:focus-visible strong {
  text-decoration: underline;
  text-decoration-color: rgba(108, 212, 255, 0.45);
  text-underline-offset: 3px;
}
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
  align-items: start;
}
.dashboard-card { padding: 22px; }
.tall {
  grid-row: auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(108, 212, 255, 0.1), rgba(16, 27, 45, 0));
}
.wide {
  grid-column: auto;
  background: linear-gradient(180deg, rgba(43, 228, 167, 0.1), rgba(16, 27, 45, 0));
}
.section, .framework, .faq-section { margin-top: 28px; }
.section-head h2, .framework-copy h2 { margin: 12px 0 0; font-size: clamp(1.72rem, 2.75vw, 2.45rem); line-height: 1.15; }
.service-grid, .framework-grid, .faq-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}
.service-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.service-card, .framework, .framework-grid article, .faq-grid article { padding: 24px; }
.framework { display: grid; gap: 18px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.framework-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.framework-grid article { border-radius: 18px; background: rgba(255,255,255,.06); }
.faq-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.site-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  margin-top: 28px;
  align-items: start;
}
.site-links a { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.06); text-align: center; color: var(--muted); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.site-links a:hover, .site-links a:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 26px 76px rgba(0,0,0,.30);
  border-color: rgba(43,228,167,.28);
}
.subpage-body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 30% -10%, rgba(108, 212, 255, 0.18), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(43, 228, 167, 0.16), transparent 36%),
    var(--bg);
}
.subpage-shell { width: min(940px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 56px; }
.subpage-header, .subpage-main, .subpage-aside, .site-links a { border: 1px solid var(--line); border-radius: 22px; background: rgba(16, 27, 45, 0.86); }
.subpage-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 18px 44px rgba(24,39,56,.05); }
.subpage-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.subpage-nav a { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,0.06); }
.subpage-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.subpage-main, .subpage-aside { padding: 24px; box-shadow: 0 18px 44px rgba(24,39,56,.05); }
.subpage-main h1, .subpage-main h2 { font-family: Georgia, "Times New Roman", serif; }
.subpage-main h1 { margin: 10px 0 10px; font-size: clamp(1.72rem, 3.2vw, 2.85rem); line-height: 1.1; }
.subpage-main h2 { margin: 24px 0 10px; font-size: 1.55rem; }
.subpage-main p, .subpage-main li, .subpage-aside p { color: var(--muted); line-height: 1.85; }
.subpage-main ul { padding-left: 20px; }
.breadcrumb, .article-meta { color: var(--muted-strong); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: .92rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 0; font-size: .92rem; }
.article-hero {
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.article-hero .eyebrow {
  background: rgba(200, 238, 255, 0.28);
  color: #0a1524;
  border-color: rgba(108, 212, 255, 0.42);
}
.author-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(11, 20, 36, 0.12);
  border-radius: 22px;
  background: #e8eef8;
  color: #0f172a;
}
.author-box strong { color: #0b1220; }
.author-box p,
.author-box .author-role {
  color: #334155;
}
.author-box .author-role {
  font-size: 0.86rem;
  margin: 0 0 8px;
}
.site-footer {
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(11, 20, 36, 0.12);
  border-radius: 22px;
  background: #e8eef8;
  line-height: 1.65;
  color: #1e293b;
}
.site-footer a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: #1e3a8a; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; }
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.related-links a {
  flex: 1 1 160px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 20, 36, 0.12);
  border-radius: 18px;
  background: #e8eef8;
  color: #0f172a;
}
.related-links a:hover {
  border-color: rgba(108, 212, 255, 0.45);
  color: #1e40af;
}
.subpage-nav a.is-here {
  border-color: rgba(108, 212, 255, 0.45);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(108, 212, 255, 0.12);
}
.ops-magazine {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.ops-card {
  padding: 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(16, 27, 45, 0.92);
  overflow: hidden;
}
a.ops-hit {
  display: grid;
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-height: 0;
}
a.ops-hit:hover .ops-card-body h3,
a.ops-hit:focus-visible .ops-card-body h3 {
  text-decoration: underline;
  text-decoration-color: rgba(108, 212, 255, 0.45);
  text-underline-offset: 3px;
}
.ops-hit img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(234, 242, 255, 0.12);
}
.ops-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-variant-numeric: tabular-nums;
}
.ops-card-body h3 {
  margin: 6px 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.ops-card-body p {
  margin: 0;
  font-size: 0.9rem;
}
.library-more {
  margin-top: 16px;
  text-align: right;
  font-size: 0.92rem;
}
.library-more a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.library-shell {
  padding-bottom: 72px;
}
.library-hero {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.library-hero h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  margin: 8px 0 0;
}
.library-grid {
  display: grid;
  gap: 18px;
}
.library-card {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(16, 27, 45, 0.9);
}
.library-card-media img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.library-card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.library-card-body h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.library-card-body p.library-excerpt {
  line-height: 1.72;
  margin-bottom: 12px;
  color: rgba(234, 242, 255, 0.82);
}
.text-link {
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-detail .article-deck {
  font-size: 1.08rem;
}
.article-figure {
  margin: 0;
}
.prose-flow {
  max-width: 54rem;
}
.prose-flow h2 {
  margin-top: 1.6rem;
  margin-bottom: 0.35em;
}
.prose-flow h2:first-child {
  margin-top: 0;
}
.prose-flow p {
  margin: 0 0 1.1em;
  max-width: 46rem;
}
@media (max-width: 980px) {
  .topbar, .hero, .dashboard, .service-grid, .framework-grid, .faq-grid, .ops-magazine, .site-links, .subpage-layout, .library-card { grid-template-columns: 1fr; }
  a.ops-hit {
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  }
  .topbar { display: grid; }
  .wide, .tall { grid-column: auto; grid-row: auto; min-height: 0; }
  .subpage-header { display: grid; }
}
@media (max-width: 640px) {
  .topbar, .content { width: min(100% - 18px,1180px); }
  .hero-copy, .metric-card, .dashboard-card, .service-card, .framework, .framework-grid article, .faq-grid article { padding: 20px; }
  .hero h1 { font-size: 1.95rem; line-height: 1.14; }
}

/* --- Article detail: QueueCraft “ops runbook” (metrics rail, numbered sections) --- */
.detail-pattern--queuecraft .subpage-body {
  background: radial-gradient(1200px 500px at 10% -10%, rgba(52, 211, 153, 0.12), transparent 55%), var(--bg);
}
.detail-pattern--queuecraft .subpage-main {
  border-radius: 10px 24px 24px 10px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: linear-gradient(165deg, rgba(16, 27, 45, 0.92), rgba(10, 18, 32, 0.88));
}
.detail-pattern--queuecraft .article-meta {
  margin: 0 -24px 16px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(52, 211, 153, 0.2);
  gap: 12px 20px;
}
.detail-pattern--queuecraft .article-hero {
  border-bottom: 0;
  padding-bottom: 0;
}
.detail-pattern--queuecraft .breadcrumb {
  margin-bottom: 12px;
}
.detail-pattern--queuecraft .prose-flow {
  counter-reset: qcsection;
}
.detail-pattern--queuecraft .prose-flow h2 {
  counter-increment: qcsection;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.28rem;
  border-left: 3px solid var(--emerald);
  padding-left: 14px;
  margin-left: -6px;
}
.detail-pattern--queuecraft .prose-flow h2::before {
  content: counter(qcsection, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.06em;
}
.detail-pattern--queuecraft .author-box {
  border-radius: 10px;
  border: 1px dashed rgba(52, 211, 153, 0.35);
  background: rgba(0, 0, 0, 0.25);
}
.detail-pattern--queuecraft .subpage-aside {
  border-radius: 10px;
  border: 1px dashed rgba(234, 242, 255, 0.2);
  background: rgba(8, 14, 26, 0.75);
}
.detail-pattern--queuecraft .related-links a {
  border-radius: 8px;
  font-size: 0.9rem;
}
@media (min-width: 900px) {
  .detail-pattern--queuecraft .subpage-layout {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: 22px;
    align-items: start;
  }
  .detail-pattern--queuecraft .subpage-aside {
    position: sticky;
    top: 16px;
  }
}
@media (max-width: 820px) {
  .detail-pattern--queuecraft .article-meta {
    margin: 0 -18px 14px;
    padding: 12px 18px;
  }
}

.detail-pattern--queuecraft .detail-rail-note {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(234, 242, 255, 0.88);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(52, 211, 153, 0.22);
}
.detail-pattern--queuecraft .detail-rail-note strong {
  color: var(--emerald);
}
