/* Shared components for service pages, the blog index and articles. Loaded on every page. */

/* Breadcrumb */
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-family: var(--ff-mono); font-size: 0.74rem; color: var(--text-dim);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text-dim); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Category chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.chip {
  font-family: var(--ff-mono); font-size: 0.78rem; color: var(--text);
  border: 1px solid var(--border-accent); border-radius: 999px; padding: 8px 16px;
  text-decoration: none; transition: background .2s, color .2s;
}
.chip:hover { background: var(--accent); color: var(--bg); }

/* Post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.post-card h3 { font-family: var(--ff-display); font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.post-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.75; flex: 1; }
.post-cat {
  align-self: flex-start; font-family: var(--ff-mono); font-size: 0.68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
}
.post-meta { font-family: var(--ff-mono); font-size: 0.78rem; color: var(--accent2); }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; max-width: 820px; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; row-gap: 4px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px;
}
.steps li::before {
  content: counter(step); grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-family: var(--ff-mono); font-weight: 700;
  color: var(--bg); background: var(--accent);
}
.steps li strong { font-family: var(--ff-display); font-size: 1.05rem; }
.steps li span { color: var(--text-muted); font-size: 0.93rem; line-height: 1.7; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq-item[open] { border-color: var(--border-accent); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; line-height: 1.5;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--ff-mono); font-size: 1.3rem; color: var(--accent);
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--text-muted); line-height: 1.85; padding-bottom: 18px; }

/* Article page */
.post-hero { padding-bottom: 36px; }
.post-title { font-size: clamp(1.9rem, 4.2vw, 3.1rem); max-width: 22ch; line-height: 1.15; margin-bottom: 18px; }
.post-hero .post-cat { display: inline-block; margin-bottom: 14px; }
.post-byline { font-family: var(--ff-mono); font-size: 0.8rem; color: var(--text-muted); }
.post-byline a { color: var(--accent); text-decoration: none; }

.post-layout {
  display: grid; grid-template-columns: minmax(0, 740px) 300px; gap: 56px; justify-content: center;
  width: 90%; max-width: 1200px; padding: 30px 5% 90px; margin: 0 auto;
}
.post-aside { position: sticky; top: 100px; align-self: start; display: grid; gap: 20px; }
.toc, .aside-cta { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.toc strong, .aside-cta strong { font-family: var(--ff-display); display: block; margin-bottom: 12px; }
.toc ol { list-style: none; display: grid; gap: 9px; }
.toc a { color: var(--text-muted); text-decoration: none; font-size: 0.86rem; line-height: 1.5; transition: color .2s; }
.toc a:hover { color: var(--accent); }
.aside-cta { background: rgba(0,255,135,.05); border-color: var(--border-accent); }
.aside-cta p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.7; }

.prose { font-size: 1.07rem; line-height: 1.9; color: #cfcfdc; }
.prose > * + *, .prose [role="region"] > * + * { margin-top: 1.25em; }
.post-lead { font-size: 1.22rem; line-height: 1.75; color: var(--text); }
.prose h2 {
  font-family: var(--ff-display); font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.25;
  color: var(--text); margin-top: 2.2em; scroll-margin-top: 100px;
}
.prose h3 { font-family: var(--ff-display); font-size: 1.2rem; color: var(--text); margin-top: 1.8em; }
.prose a:not(.btn-primary):not(.btn-secondary) { color: var(--accent); text-underline-offset: 3px; }
.prose a.btn-primary, .prose a.btn-secondary { text-decoration: none; }
.prose a.btn-primary { color: var(--bg); }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: .55em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--accent); font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.callout {
  background: rgba(0,212,255,.06); border: 1px solid rgba(0,212,255,.25); border-left: 3px solid var(--accent2);
  border-radius: 10px; padding: 18px 22px;
}
.callout strong:first-child { display: block; margin-bottom: 6px; color: var(--accent2); font-family: var(--ff-display); }
.callout p + p { margin-top: .7em; }

.inline-cta {
  display: grid; gap: 8px; justify-items: start; background: rgba(0,255,135,.06);
  border: 1px solid var(--border-accent); border-radius: 14px; padding: 24px 26px; margin: 2em 0;
}
.inline-cta strong { font-family: var(--ff-display); font-size: 1.2rem; color: var(--text); }
.inline-cta span { color: var(--text-muted); font-size: .98rem; line-height: 1.7; margin-bottom: 8px; }

.post-faq h2 { margin-bottom: 18px; }
.end-cta {
  background: linear-gradient(135deg, rgba(0,255,135,.10), rgba(0,212,255,.06));
  border: 1px solid var(--border-accent); border-radius: 18px; padding: 34px 32px; margin-top: 3em;
}
.end-cta h2 { margin-top: 6px; font-size: clamp(1.5rem, 3vw, 2rem); }
.end-cta p { color: var(--text-muted); margin-top: .8em; }
.end-cta ul { list-style: none; padding: 0; margin-top: 1em; }
.end-cta li { font-size: .95rem; color: var(--text); }
.end-cta li::before { content: '✓'; color: var(--accent); font-weight: 700; margin-right: 10px; }
.end-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }

.author-box { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 28px; margin-top: 3em; }
.author-avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--bg3); color: var(--accent);
  border: 1px solid var(--border-accent); display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem;
}
.author-box p { font-size: .94rem; line-height: 1.75; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 980px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .post-aside { position: static; order: -1; }
  .toc { display: none; }
}
@media (max-width: 600px) {
  .end-cta { padding: 26px 20px; }
  .steps li { grid-template-columns: 40px 1fr; padding: 16px; }
  .prose { font-size: 1.02rem; }
}
@media print {
  .post-aside, .inline-cta, .end-cta { display: none !important; }
}

/* At-a-glance facts list */
.facts { display: grid; gap: 14px; }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; }
.facts dt { font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.facts dd { color: var(--text-muted); line-height: 1.8; }
.facts dd a { color: var(--accent); }
@media (max-width: 600px) { .facts > div { grid-template-columns: 1fr; gap: 6px; } }

.fine-print { font-size: .78rem; line-height: 1.7; color: var(--text-dim); margin-top: 1.6em; }
