/* Resource articles: one reading column, figures built from HTML so type stays readable on a phone. */
.ar { max-width: 760px; margin: 0 auto; }
.ar-header { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.ar-header h1 { margin: 0; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -.035em; font-weight: 550; text-wrap: balance; }
.ar-header .lede { margin: 18px 0 0; font-size: 18px; text-wrap: pretty; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; color: var(--muted); font-size: 13.5px; }
.ar-meta span::before { content: "·"; margin-right: 18px; }
.ar p { margin: 0 0 20px; font-size: 17px; line-height: 1.75; }
.ar p a, .ar-sources a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ar p a:hover, .ar-sources a:hover { color: var(--accent-strong); }
.ar section { margin-top: 56px; }
.ar .ar-part { margin: 0 0 8px; }
.ar h2 { margin: 0 0 18px; font-size: clamp(25px, 3.2vw, 32px); line-height: 1.2; font-weight: 550; letter-spacing: -.025em; text-wrap: balance; }
.ar h3 { margin: 44px 0 12px; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.ar h4 { margin: 30px 0 8px; color: var(--accent); font: 600 16px/1.4 var(--font-display); }
.ar code { font-family: var(--font-mono); font-size: .88em; }
.ar p code, .ar dd code, .ar li code { padding: 2px 6px; border-radius: 5px; background: var(--surface-strong); }
.ar kbd { display: inline-block; min-width: 26px; margin-right: 4px; padding: 0 6px; font: 500 14px/22px var(--font-display); border: 1px solid #3b423f; border-radius: 6px; background: var(--surface-strong); text-align: center; }

.ar-figure { margin: 32px 0; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.ar-figure figcaption { margin-bottom: 18px; font: 600 16px/1.4 var(--font-display); }
.ar-kicker { display: block; margin-bottom: 4px; color: var(--accent); font: 700 11px/1.5 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.ar .ar-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.ar-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ar-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 14px; border-radius: 10px; background: var(--surface-strong); }
.ar-stats dt { color: var(--muted); font-size: 13px; line-height: 1.45; }
.ar-stats dd { margin: 0; color: #eef2ef; font: 700 28px/1.1 var(--font-display); letter-spacing: -.02em; }
.ar-stats small { color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: 0; }

.ar-bars { display: grid; gap: 12px; }
.ar-bar { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 14px; }
.ar-bar-label { color: var(--text); font-size: 14px; line-height: 1.35; }
.ar-bar-track { display: flex; align-items: center; gap: 8px; border-left: 1px solid #3b423f; }
.ar-bar-fill { display: block; height: 14px; border-radius: 0 4px 4px 0; background: #4fc596; }
.ar-bar-value { color: #eef2ef; font: 600 14px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.ar-bar.is-baseline { padding-top: 12px; border-top: 1px dashed var(--border); }
.ar-bar.is-baseline .ar-bar-label { color: var(--muted); }
.ar-bar.is-baseline .ar-bar-fill { background: #7d858b; }
.ar-bar-fill[data-pct="73"] { width: 73%; }
.ar-bar-fill[data-pct="67"] { width: 67%; }
.ar-bar-fill[data-pct="53"] { width: 53%; }
.ar-bar-fill[data-pct="25"] { width: 25%; }

.ar .ar-loop-title { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ar-loop-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.ar-loop-steps li { position: relative; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-strong); font-size: 14.5px; font-weight: 550; line-height: 1.35; }
.ar-loop-steps small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.ar-loop-steps .is-new { border-color: #4fc596; background: #13201a; }
.ar-loop-steps em { display: block; margin-bottom: 4px; color: var(--accent); font: 700 10.5px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.ar-loop-adds { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 0; padding: 0; list-style: none; }
.ar-loop-adds li { padding: 6px 12px; border: 1px dashed #4a6a5b; border-radius: 999px; color: var(--text); font-size: 13.5px; }
.ar-loop-adds li::before { content: "+ "; color: var(--accent); }

.ar-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.ar-table th, .ar-table td { padding: 12px 14px 12px 0; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.ar-table thead th { border-top: 0; padding-top: 0; color: var(--muted); font: 600 11.5px/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ar-table tbody th { width: 24%; color: #eef2ef; font-weight: 600; }
.ar-table td { color: var(--text); }
.ar-table td:last-child, .ar-table th:last-child { padding-right: 0; }

.ar-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.ar-pane { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.ar-pane.is-session { border-color: #2c4437; background: #0f1714; }
.ar .ar-pane-title { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ar-pane.is-session .ar-pane-title { color: var(--accent); }
.ar .ar-file { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 13px; line-height: 1.4; }
.ar-file b { color: #eef2ef; font: 600 13px/1.4 var(--font-mono); }
.ar-file span { color: var(--muted); font-size: 12px; }
.ar-code { margin: 0; padding: 12px; overflow-x: auto; border-radius: 8px; background: var(--surface-strong); color: #dbe4de; font-size: 13px; line-height: 1.7; }
.ar .ar-pane-note { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.ar-files { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ar-files li { padding: 10px 12px; border-radius: 8px; background: #16211c; }
.ar-files li p:last-child { margin: 4px 0 0; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.ar .ar-pane-result { margin: 0; padding-top: 10px; border-top: 1px solid #2c4437; color: #eef2ef; font-size: 14px; font-weight: 550; line-height: 1.5; }

.ar-map { display: grid; margin: 0; }
.ar-map div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--border); }
.ar-map div:first-child { padding-top: 0; border-top: 0; }
.ar-map div:last-child { padding-bottom: 0; }
.ar-map dt { color: var(--text); font-size: 15px; font-style: italic; line-height: 1.5; }
.ar-map dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ar-map dd b { display: block; margin-bottom: 2px; color: #eef2ef; font-size: 15px; font-weight: 600; }
.ar-map dd b::before { content: "→ "; color: var(--accent); }

.ar-flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: ar-flow; }
.ar-flow li { position: relative; padding: 0 0 22px 44px; counter-increment: ar-flow; }
.ar-flow li:last-child { padding-bottom: 0; }
.ar-flow li::before { content: counter(ar-flow); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--accent-deep); border-radius: 50%; color: var(--accent); font: 700 13px/1 var(--font-display); }
.ar-flow li::after { content: ""; position: absolute; top: 34px; bottom: 6px; left: 14px; width: 1px; background: var(--border); }
.ar-flow li:last-child::after { display: none; }
.ar .ar-flow-who { margin: 0 0 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; line-height: 28px; text-transform: uppercase; }
.ar .ar-flow-what { margin: 0 0 10px; color: #eef2ef; font-size: 16px; line-height: 1.5; }
.ar .ar-flow-clue { margin: 0; padding: 10px 12px; border: 1px solid #2c4437; border-radius: 8px; background: #0f1714; color: var(--text); font-size: 14px; line-height: 1.6; }

.ar .story-closing { margin-top: 56px; }
.ar .story-closing h2 { margin-bottom: 10px; }
.ar .story-closing > p { margin: 0; }
.ar-sources ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.ar-sources li { margin-bottom: 10px; padding-left: 4px; }
.ar-sources span { display: block; font-size: 13px; }

@media (max-width: 700px) {
  .ar p { font-size: 16.5px; }
  .ar-figure { padding: 16px; }
  .ar-stats, .ar-loop-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-bar { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .ar-compare, .ar-map div { grid-template-columns: minmax(0, 1fr); }
  .ar-map div { gap: 6px; }
  .ar-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ar-table tr, .ar-table th, .ar-table td { display: block; width: auto; }
  .ar-table tbody tr { padding: 14px 0; border-top: 1px solid var(--border); }
  .ar-table tbody tr:first-child { padding-top: 0; border-top: 0; }
  .ar-table tbody th, .ar-table td { padding: 0; border-top: 0; }
  .ar-table tbody th { margin-bottom: 8px; font-size: 16px; }
  .ar-table td + td { margin-top: 8px; }
  .ar-table td::before { content: attr(data-label); display: block; color: var(--muted); font: 600 11px/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
}
