/* OneBroadcast token aliases: blog.css was written against these names */
:root {
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --text: var(--color-ink);
  --muted: var(--color-muted);
  --line: var(--color-line);
  --accent: var(--color-accent);
}
.sources { list-style: decimal; }
.sectors ul { list-style: disc; }
/* prose rhythm */
.prose p, .prose ul, .prose ol, .article p { margin: 0 0 1em; }
.prose h2 { margin-bottom: 0.55em; }
.prose h3 { margin-bottom: 0.4em; }
.prose li { margin-bottom: 0.35em; }
.panel p:last-child, .keydates p, .steps p, .faq details p { margin-bottom: 0; }
.faq details p { margin-top: 10px; }
.sectors p { margin-bottom: 12px; }
.cta p { margin: 0 0 1.1em; }
.article ul:not(.legend) { list-style: disc; }
.keydates, .steps, .legend, .toc ol, .post-timeline { list-style: none; }

/* Blog: listing timeline, article layout and article components.
   Builds on styles.css tokens (--bg, --surface, --line, --accent, fonts). */

/* Reading progress */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 50;
}

/* Blog listing */
.blog-hero h1 { max-width: 18ch; }
.post-timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 0;
}
.post-timeline::before {
  content: "";
  position: absolute;
  left: 120px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.post-timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 40px;
  padding-bottom: 40px;
}
.post-timeline > li::before {
  content: "";
  position: absolute;
  left: 115px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.post-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
  padding-right: 20px;
}
.post-date strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  padding: 28px 30px;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--text); border-left-color: var(--accent); transform: translateX(4px); }
.post-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(12, 74, 110, 0.08);
  padding: 3px 8px;
  border-radius: 2px;
}
.post-card h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 10px; }
.post-card p { color: var(--muted); margin: 0 0 16px; }
.post-card .more { color: var(--accent); font-weight: 700; }
.post-meta { color: var(--muted); font-size: 0.92rem; }

/* Article layout */
.article-hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}
.article-hero .meta strong { color: var(--text); }
.article-hero h1 { max-width: 20ch; }
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  flex: none;
}
.byline > span:not(.avatar) { line-height: 1.35; color: var(--muted); font-size: 0.95rem; }
.byline strong { color: var(--text); }

.article-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 42rem);
  gap: 64px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 28px;
  font-size: 0.92rem;
}
.toc .eyebrow { margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); font-weight: 700; border-left-color: var(--accent); }

.article { font-size: 1.08rem; }
.article > *:first-child { margin-top: 0; }
.article h2 { scroll-margin-top: 24px; margin-top: 64px; }
.article p, .article li { color: var(--muted); }
.article strong { color: var(--text); }
.article .lead { font-size: 1.22rem; color: var(--text); }

/* Citations */
sup.ref { font-size: 0.66em; line-height: 0; margin-left: 1px; }
sup.ref a { color: var(--accent); text-decoration: none; font-weight: 700; }
sup.ref a:hover { text-decoration: underline; }

/* Pull quote */
.pull {
  margin: 48px 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--accent);
}
.pull p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 8px;
}
.pull cite { font-style: normal; color: var(--muted); font-size: 0.95rem; }

/* Key dates timeline */
.keydates {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0;
  position: relative;
}
.keydates::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--line), var(--line) 85%, rgba(12, 74, 110, 0.6));
}
.keydates li {
  position: relative;
  padding: 0 0 26px 40px;
  margin: 0;
}
.keydates li:last-child { padding-bottom: 0; }
.keydates li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.keydates li.done::before { background: var(--accent); }
.keydates li.next::before {
  background: var(--surface);
  box-shadow: 0 0 0 5px rgba(12, 74, 110, 0.15);
  animation: pulse 2.4s ease-in-out infinite;
}
.keydates time {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.keydates h3 {
  font-family: var(--font-sans) !important;
  font-size: 1.05rem !important;
  font-weight: 700;
  letter-spacing: 0 !important;
  margin: 0 0 4px !important;
  color: var(--text);
}
.keydates p { margin: 0; font-size: 1rem; }
.keydates .badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 2px 7px;
  border-radius: 2px;
  vertical-align: 2px;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(12, 74, 110, 0.18); }
  50% { box-shadow: 0 0 0 9px rgba(12, 74, 110, 0.04); }
}
@media (prefers-reduced-motion: reduce) {
  .keydates li.next::before { animation: none; }
  .post-card { transition: none; }
}

/* Panels: worked examples, scenario, notes */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 28px 30px 12px;
  margin: 32px 0 40px;
}
.panel-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.article .panel h3 { margin-top: 0; }
.panel .big {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  margin: 6px 0 6px;
}
.panel p { font-size: 1rem; }
.panel.note { border-left: 4px solid var(--accent); padding-bottom: 6px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; margin: 18px 0 20px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th { font-size: 0.84rem; color: var(--muted); font-weight: 700; }
.data-table td { color: var(--muted); }
.data-table td:first-child { color: var(--text); font-weight: 600; }
.data-table.num td:not(:first-child), .data-table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 12px; }
.data-table tr.total td { color: var(--text); font-weight: 700; border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 22px 0 8px; border-top: 1px solid var(--line); padding-top: 18px; }
.stats3 strong { display: block; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
.stats3 span { display: block; font-size: 0.9rem; color: var(--muted); line-height: 1.4; margin-top: 6px; }
.fineprint { font-size: 0.86rem !important; color: var(--muted); line-height: 1.5; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.principles div { padding: 22px 22px 6px 0; }
.principles div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.principles .n { font-family: var(--font-sans); color: var(--accent); font-weight: 700; font-size: 0.95rem; }
.article .principles h3 { margin: 8px 0 6px; }
.principles p { font-size: 0.98rem; }

/* Playbook steps timeline */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 28px 0;
  padding: 0;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--line);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 64px;
  margin: 0;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article .steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; font-size: 1rem; }

/* Chart */
.viz-root {
  --surface-1: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  position: relative;
  margin: 0 0 8px;
}
.viz-title { font-weight: 700; color: var(--text); font-size: 1rem; }
.viz-sub { font-size: 0.9rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 12px 0 6px; font-size: 0.88rem; color: var(--text-secondary); }
.legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.legend .sw { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-svg text { font-family: var(--font-sans); }
.tick { font-size: 12px; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.dlabel { font-size: 12px; fill: var(--text-primary); font-weight: 700; }
.tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(18, 22, 28, 0.10);
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  min-width: 200px;
}
.tt-h { color: var(--text-secondary); margin-bottom: 6px; font-weight: 700; }
.tt-r { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.tt-k { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.tt-k i { width: 10px; height: 2px; border-radius: 2px; display: inline-block; }
details.tableview { margin: 6px 0 16px; font-size: 0.95rem; color: var(--muted); }
details.tableview summary { cursor: pointer; font-weight: 600; color: var(--accent); }

/* Author */
.author { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; }
.author .avatar { width: 64px; height: 64px; font-size: 1.2rem; }
.author p { margin-top: 0; }

/* Sources */
.sources { padding-left: 1.4rem !important; font-size: 0.95rem; }
.sources li { margin-bottom: 8px; line-height: 1.5; }
.article .sources a { font-weight: 600; color: var(--accent); text-underline-offset: 2px; }

@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .post-timeline::before { left: 5px; }
  .post-timeline > li { grid-template-columns: 1fr; padding-left: 32px; }
  .post-timeline > li::before { left: 0; }
  .post-date { margin-bottom: 12px; }
  .post-date strong { display: inline; font-size: 1.1rem; margin-right: 6px; }
  .stats3, .principles { grid-template-columns: 1fr; }
  .principles div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .panel { padding: 22px 20px 8px; }
  .author { grid-template-columns: 1fr; }
}

/* Service page extras: sector grid and FAQ */
.sectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 28px; }
.sectors article { padding: 26px 28px 22px 0; border-bottom: 1px solid var(--line); }
.sectors article:nth-child(even) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--line); }
.sectors .n { font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.sectors h3 { font-size: 1.35rem; margin: 6px 0 10px; }
.sectors p { color: var(--muted); margin: 0 0 12px; }
.sectors ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.sectors li { margin-bottom: 4px; }
.faq { border-top: 1px solid var(--line); margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
@media (max-width: 720px) {
  .sectors { grid-template-columns: 1fr; }
  .sectors article:nth-child(even) { padding-left: 0; border-left: 0; }
}
