/* Blog post: header, illustration, table of contents beside the text, the
   post's own figures, questions, sharing, author, and links to more posts. */

html { scroll-behavior: smooth; }

/* ---------- Head */
.ar-head { max-width: 980px; margin: 0 auto; padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 18px; }
.crumbs { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-ink); }
.ar-h1 { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
.ar-lead { margin: 0; max-width: 760px; font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.ar-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.ar-hero { max-width: 1120px; margin: 0 auto; padding: 0 24px 48px; }
.ar-hero-fig { margin: 0; padding: clamp(20px, 4vw, 48px); border: 1px solid var(--line); border-radius: 22px; background: var(--tint); }
.ar-hero-fig svg { display: block; width: 100%; height: auto; }

/* ---------- Text with its table of contents */
.ar-main { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.ar-wrap { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 56px; justify-content: center; align-items: start; }
.ar-toc { position: sticky; top: 24px; }
.ar-toc-box { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; }
.ar-toc-h { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.ar-toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ar-toc a { display: flex; align-items: center; min-height: 44px; padding: 7px 0 7px 12px; line-height: 1.3; border-left: 2px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; transition: color .15s ease, border-color .15s ease; }
.ar-toc a:hover, .ar-toc a[aria-current="true"] { color: var(--accent-ink); border-color: var(--accent); }

.ar-body { min-width: 0; font-size: 18px; line-height: 1.7; color: var(--ink); }
.ar-body > p { margin: 0 0 22px; }
.ar-body h2 { margin: 44px 0 14px; scroll-margin-top: 24px; font-family: var(--font-head); font-weight: 500; font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.015em; }
.ar-body h3 { margin: 30px 0 10px; font-family: var(--font-head); font-weight: 600; font-size: 21px; line-height: 1.25; }
.ar-body > ul, .ar-body > ol { margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.ar-body > ul { padding-left: 22px; }
.ar-body > ol { padding-left: 26px; }
.ar-body strong { font-weight: 600; }

/* Words shown per tile: a sample figure */
.ar-fig { margin: 32px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); font-size: 15px; line-height: 1.5; }
.ar-fig-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.ar-fig-title { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.ar-fig-note { font-size: 13px; color: var(--muted); }
.ar-bar-group { display: flex; flex-direction: column; gap: 6px; }
.ar-bar-group + .ar-bar-group { margin-top: 22px; }
.ar-bar-label { font-weight: 500; }
.ar-track { position: relative; height: 28px; border-radius: 999px; background: #F3F3F8; }
.ar-range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #E3E3FC; border: 1px solid var(--accent); }
.ar-range-title { left: 37.5%; width: 18.75%; }
.ar-range-desc { left: 50%; width: 37.5%; }
.ar-you { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.ar-you-title { left: calc(31.25% - 1px); }
.ar-you-desc { left: 0; }
.ar-key { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.ar-key-you, .ar-key-range { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
.ar-key-you { background: var(--ink); }
.ar-key-range { background: #E3E3FC; border: 1px solid var(--accent); }
.ar-scale { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.ar-fig figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Key point */
.ar-key-point { margin: 32px 0; padding: 22px 24px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px 18px 18px 4px; background: var(--accent-wash); }
.ar-kp-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.02em; }
.ar-kp-text { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 21px; line-height: 1.4; }

/* Call to action inside the post */
.ar-cta { margin: 36px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; padding: 24px; border: 1px solid var(--accent); border-radius: 22px; background: var(--accent-wash); }
.ar-cta-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; }
.ar-cta-h { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 21px; line-height: 1.3; }
.ar-cta-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.ar-cta .btn { flex: 0 0 auto; }

/* Questions */
.ar-faq { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.ar-faq details { border-top: 1px solid var(--line); }
.ar-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; font-weight: 600; font-size: 17px; list-style: none; cursor: pointer; }
.ar-faq summary::-webkit-details-marker { display: none; }
.ar-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.ar-faq p { margin: 0 0 18px; font-size: 16px; color: var(--muted); }
.faq-plus { flex: 0 0 18px; transition: transform .2s ease; }
.ar-faq details[open] .faq-plus { transform: rotate(45deg); }

/* Share and author */
.ar-share { margin: 40px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ar-share-label { font-size: 15px; font-weight: 500; }
.ar-share-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ar-share-note { font-size: 14px; color: var(--muted); }
.copy-i-done, .is-copied .copy-i-link { display: none; }
.is-copied .copy-i-done { display: inline; }
.ar-author { margin: 32px 0 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; }
.ar-author-text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; }
.ar-author-by { font-size: 13px; color: var(--muted); }
.ar-author-name { font-family: var(--font-head); font-weight: 600; font-size: 19px; }
.ar-author p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- More posts */
.ar-more { max-width: 1120px; margin: 0 auto; padding: 0 24px 56px; }
.ar-pn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.ar-pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s ease; }
a.ar-pn:hover { color: var(--ink); border-color: var(--accent); }
.ar-pn-next { align-items: flex-end; text-align: right; }
.ar-pn-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ar-pn-title { font-family: var(--font-head); font-weight: 500; font-size: 18px; line-height: 1.3; }
.ar-related { border-top: 1px solid var(--line); }
.ar-related-in { max-width: 1120px; margin: 0 auto; padding: 56px 24px; display: flex; flex-direction: column; gap: 24px; }
.ar-related-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ar-related-h { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.ar-all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; font-size: 15px; }
.ar-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }

@media (max-width: 899px) {
  .ar-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ar-toc { position: static; }
}
@media (max-width: 760px) {
  .ar-body { font-size: 17px; }
}

/* These boxes are border-box in the design; everything else keeps the browser's content-box. */
.ar-toc a, .ar-range, .ar-key-range { box-sizing: border-box; }

/* The byline's author name links to the author box at the end of the post. */
.ar-meta .by a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ar-meta .by a:hover { text-decoration-color: var(--accent); }
