/* ==========================================================================
   SpeakoFlow blog — shared article components
   Relies on the design tokens declared in each post's :root block
   (--ink, --ink-2, --muted, --line, --teal*, --radius*, --font-*).
   Loaded after the inline <style> block so it can extend it.
   ========================================================================== */

/* --- Figures: product screenshots with captions ------------------------- */
.figure {
  margin-block: 2.2rem;
}
.figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}
.figure figcaption strong {
  color: var(--ink-2);
  font-weight: 700;
}
/* Screenshots of tall, narrow UI (the assistant panel) shouldn't stretch */
.figure-narrow img {
  max-width: 380px;
  margin-inline: auto;
}

/* --- Key point: per-section takeaway ----------------------------------- */
.keypoint {
  border-left: 3px solid var(--teal);
  background: var(--teal-wash-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
  margin-block: 1.8rem;
}
.keypoint .keypoint-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.35rem;
}
.keypoint p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
}

/* --- Pros and cons ----------------------------------------------------- */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block: 1.6rem;
}
.proscons > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  background: var(--surface);
}
.proscons h4 {
  margin: 0 0 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.proscons .pros h4 { color: var(--teal-deep); }
.proscons .cons h4 { color: #9a5b2c; }
.proscons ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.94rem;
}
.proscons li + li { margin-top: 0.4rem; }
@media (max-width: 640px) {
  .proscons { grid-template-columns: 1fr; }
}

/* --- Stat cards -------------------------------------------------------- */
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-block: 1.8rem;
}
.statgrid .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1rem 1.1rem;
}
.statgrid .stat-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal-deep);
  letter-spacing: -0.025em;
}
.statgrid .stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.83rem;
  line-height: 1.4;
  color: var(--muted);
}

/* --- Cost bars: CSS-only horizontal chart ------------------------------ */
.costchart {
  margin-block: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.3rem 1.4rem;
}
.costchart h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.costchart .costchart-sub {
  margin: 0 0 1.1rem;
  font-size: 0.83rem;
  color: var(--muted);
}
.costrow {
  display: grid;
  grid-template-columns: minmax(96px, 132px) 1fr auto;
  align-items: center;
  gap: 0.75rem;
}
.costrow + .costrow { margin-top: 0.65rem; }
.costrow .costrow-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.costrow .costrow-track {
  background: var(--bg-2);
  border-radius: 999px;
  height: 15px;
  overflow: hidden;
}
.costrow .costrow-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b07a3c, #d0a05e);
}
.costrow.is-us .costrow-fill {
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  min-width: 4px;
}
.costrow .costrow-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.costchart .costchart-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 560px) {
  .costrow { grid-template-columns: 1fr auto; }
  .costrow .costrow-track { grid-column: 1 / -1; order: 3; }
}

/* --- Decision block ---------------------------------------------------- */
.decision {
  margin-block: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.decision-head {
  background: var(--bg-2);
  padding: 0.85rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}
.decision-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0.5rem 1.2rem;
  padding: 0.95rem 1.2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}
.decision-row dt {
  font-weight: 700;
  color: var(--ink);
}
.decision-row dd {
  margin: 0;
  color: var(--ink-2);
}
@media (max-width: 640px) {
  .decision-row { grid-template-columns: 1fr; }
  .decision-row dd { padding-left: 0; }
}

/* --- Disclosure note --------------------------------------------------- */
.disclosure {
  margin-block: 1.6rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  background: transparent;
}
.disclosure p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}
.disclosure strong { color: var(--ink-2); }

/* --- Author card ------------------------------------------------------- */
.author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.author-card img {
  /* Reserved: only used if a real author photo is added. Logo marks read oddly
     as a person's avatar, so the cards are text-only for now. */
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.author-card .author-name {
  font-weight: 800;
  color: var(--ink);
  font-size: 0.95rem;
}
.author-card .author-bio {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* --- Steps ------------------------------------------------------------- */
.steps {
  margin-block: 1.8rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  counter-increment: step;
  padding-left: 2.6rem;
  min-height: 1.9rem;
}
.steps > li + li { margin-top: 1.05rem; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}
.steps strong { color: var(--ink); }

/* --- On this page ------------------------------------------------------ */
.toc {
  margin-block: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.1rem 1.3rem;
}
.toc h2 {
  margin: 0 0 0.6rem !important;
  font-family: var(--font-sans) !important;
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.94rem;
  columns: 2;
  column-gap: 1.5rem;
}
.toc li { break-inside: avoid; }
.toc li + li { margin-top: 0.35rem; }
@media (max-width: 640px) {
  .toc ol { columns: 1; }
}
