.ar-panel { padding-bottom: 70px; }
.ar-panel h1 { max-width: 24ch; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.35; }
.ar-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14.5px; color: #4a5c71; }
.ar-facts i { margin-inline-end: 7px; color: var(--blue); font-size: 13px; }
.ar-chips { margin-top: 18px; }

.ar-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start;
  padding-top: 34px; padding-bottom: 90px;
}
.ar-layout.no-toc { grid-template-columns: minmax(0, 1fr) 300px; }
.ar-main { min-width: 0; max-width: 780px; }

.ar-cover { margin: 0 0 28px; border-radius: 22px; overflow: hidden; background: var(--mist); box-shadow: 0 12px 30px rgba(11, 42, 91, .08); }
.ar-cover img { width: 100%; height: auto; display: block; }
.ar-lead {
  margin: 0 0 28px; padding: 0 18px 0 0; border-right: 3px solid var(--blue);
  font-size: 18.5px; line-height: 1.95; font-weight: 600; color: var(--ink);
}

.ar-body { font-size: 17px; line-height: 2.05; color: #33445a; }
.ar-body h2, .ar-body h3 { scroll-margin-top: 160px; color: var(--ink); }
.ar-body h2 { font-size: 26px; margin-top: 44px; padding-top: 6px; }
.ar-body h3 { font-size: 21px; margin-top: 30px; }
.ar-body a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ar-body a:hover { text-decoration-thickness: 2px; }
.ar-body img { border-radius: 16px; height: auto; }
.ar-body ul, .ar-body ol { padding-inline-start: 22px; }
.ar-body li + li { margin-top: 6px; }
.ar-body blockquote { margin: 26px 0; padding: 16px 20px; border-radius: 16px; background: var(--sky); color: var(--ink); }
.ar-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ar-body th, .ar-body td { padding: 10px 12px; border: 1px solid var(--rule); text-align: start; }
.ar-body th { background: var(--mist); }

.ar-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule);
}
.ar-back { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; color: var(--blue); }
.ar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-tags a { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink); background: var(--mist); border: 1px solid var(--rule); }
.ar-tags a:hover { color: var(--blue); }
.ar-help { margin-top: 34px; }

.ar-side { position: sticky; top: 156px; }
.ar-side-inner { display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 176px); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
.ar-side-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 12px; }
.ar-side-title i { color: var(--blue); font-size: 14px; }

.ar-toc--side, .ar-related {
  padding: 18px 18px 16px; border-radius: 20px; background: #fff;
  border: 1px solid #e6eef6; box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 12px 30px rgba(11, 42, 91, .08);
}

.ar-toc-list, .ar-toc-list ol { list-style: none; margin: 0; padding: 0; }
.ar-toc-list > li + li { margin-top: 2px; }
.ar-toc-list a {
  display: block; padding: 7px 12px; border-radius: 10px; border-right: 2px solid transparent;
  font-size: 14.5px; font-weight: 700; line-height: 1.6; color: #34465b; transition: background .15s, color .15s, border-color .15s;
}
.ar-toc-list ol { margin: 2px 12px 6px 0; border-right: 1px dashed #d4e1ec; }
.ar-toc-list ol a { font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 5px 12px; }
.ar-toc-list a:hover, .ar-toc-list a:focus-visible { color: var(--blue); background: var(--sky); border-right-color: var(--blue); outline: none; }
.ar-body :target { animation: arFlash 1.6s ease; }
@keyframes arFlash { 0%, 40% { background: rgba(14, 111, 190, .10); } 100% { background: transparent; } }

.ar-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-rel { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 14px; transition: background .15s; }
.ar-rel:hover { background: var(--mist); }
.ar-rel-img { flex: none; width: 76px; height: 58px; border-radius: 11px; overflow: hidden; background: var(--sky); display: grid; place-items: center; color: #b8c8d8; }
.ar-rel-img img { width: 100%; height: 100%; object-fit: cover; }
.ar-rel-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ar-rel-text b { font-size: 14px; font-weight: 800; line-height: 1.55; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ar-rel:hover b { color: var(--blue); }
.ar-rel-text small { font-size: 12.5px; color: var(--muted); }

.ar-toc--inline { display: none; }

@media (max-width: 1080px) {
  .ar-layout, .ar-layout.no-toc { grid-template-columns: 1fr; gap: 34px; }
  .ar-main { max-width: none; }
  .ar-side { position: static; }
  .ar-side-inner { max-height: none; overflow: visible; }
  .ar-toc--side { display: none; }
  .ar-toc--inline {
    display: block; margin: 0 0 26px; border-radius: 18px; background: #fff;
    border: 1px solid #e6eef6; box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 10px 24px rgba(11, 42, 91, .07);
  }
  .ar-toc--inline summary {
    display: flex; align-items: center; gap: 10px; padding: 15px 18px; cursor: pointer; list-style: none;
    font-size: 16px; font-weight: 800; color: var(--ink);
  }
  .ar-toc--inline summary::-webkit-details-marker { display: none; }
  .ar-toc--inline summary i:first-child { color: var(--blue); }
  .ar-caret { margin-inline-start: auto; font-size: 12px; color: var(--muted); transition: transform .2s; }
  .ar-toc--inline[open] .ar-caret { transform: rotate(180deg); }
  .ar-toc--inline .ar-toc-list { padding: 0 10px 14px; }
}
@media (max-width: 560px) {
  .ar-panel h1 { font-size: 27px; }
  .ar-facts { gap: 6px 16px; font-size: 13.5px; }
  .ar-lead { font-size: 16.5px; }
  .ar-body { font-size: 16px; }
  .ar-body h2 { font-size: 22px; }
  .ar-body h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .ar-body :target { animation: none; }
}

@media (min-width: 1081px) {
  .ar-toc--side .ar-toc-list { max-height: min(46vh, 420px); overflow-y: auto; scrollbar-width: thin; padding-inline-end: 4px; margin-inline-end: -4px; }
}

.ar-by { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
.ar-by img { width: 26px; height: 26px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--rule); padding: 2px; }
.ar-by:hover { color: var(--blue); }

.ar-author {
  position: relative; margin-top: 44px; padding: 26px 26px 22px; border-radius: 24px; overflow: hidden;
  background: #fff; border: 1px solid #dbe9f5;
  box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 14px 34px rgba(11, 42, 91, .09);
}
.ar-author::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 5px; background: linear-gradient(180deg, var(--blue), #5cb8ff); }
.ar-author-head { display: flex; align-items: center; gap: 16px; }
.ar-author-ava {
  flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--sky); border: 1px solid #d5e7f5;
}
.ar-author-ava img { width: 52px; height: 52px; object-fit: contain; }
.ar-author-id { min-width: 0; }
.ar-author-kicker { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.ar-author h2 { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; line-height: 1.35; margin: 0; scroll-margin-top: 170px; }
.ar-author h2 a { color: var(--ink); }
.ar-author h2 a:hover { color: var(--blue); }
.ar-author h2 i { font-size: 16px; color: var(--blue); }
.ar-author-role { margin: 4px 0 0; font-size: 14.5px; font-weight: 600; color: #4a5c71; }
.ar-author-bio { margin: 16px 0 0; font-size: 15.5px; line-height: 1.9; color: #3d4f64; }
.ar-author-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ar-author-facts li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--ink); background: var(--mist); border: 1px solid var(--rule);
}
.ar-author-facts i { color: var(--blue); font-size: 13px; }
.ar-author-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed #dbe5ef; }
.ar-author-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.ar-author-btns .bl-btn.ghost { background: var(--mist); border: 1px solid var(--rule); }
.ar-author-social { display: flex; gap: 8px; }
.ar-author-social a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--ink); background: var(--mist); border: 1px solid var(--rule); transition: color .2s, background .2s, border-color .2s;
}
.ar-author-social a:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
@media (max-width: 560px) {
  .ar-author { padding: 22px 18px 18px; }
  .ar-author-ava { width: 60px; height: 60px; border-radius: 16px; }
  .ar-author-ava img { width: 42px; height: 42px; }
  .ar-author h2 { font-size: 19px; }
  .ar-author-btns, .ar-author-btns .bl-btn { width: 100%; justify-content: center; }
  .ar-author-social { width: 100%; justify-content: center; }
}
