:root {
  --ink: #012c3d;
  --ink-soft: #36576b;
  --blue: #215387;
  --accent: #0b82bd;
  --accent-dark: #0b6fae;
  --sky: #9ed8f2;
  --sky-soft: #d9f3ff;
  --paper: #ffffff;
  --surface: #f7fbfc;
  --surface-strong: #eef5f7;
  --line: #c8d7df;
  --line-soft: #dcebf0;
  --muted: #597483;
  --danger: #a23a43;
  --danger-soft: #fff1f2;
  --warning: #8a5a08;
  --warning-soft: #fff8e6;
  --success: #176b52;
  --success-soft: #e9f8f1;
  --code-bg: #071016;
  --shadow-sm: 0 1px 2px rgba(1, 44, 61, 0.08), 0 4px 18px rgba(1, 44, 61, 0.05);
  --shadow-lg: 0 24px 70px rgba(1, 44, 61, 0.2);
  --sidebar-width: 286px;
  --banner-height: 38px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.public-site {
  --banner-height: 0px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid rgba(11, 130, 189, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.preview-banner {
  position: fixed;
  z-index: 80;
  inset: 0 0 auto 0;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.preview-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sky);
  box-shadow: 0 0 0 4px rgba(158, 216, 242, 0.14);
}

.preview-banner__meta {
  color: #c8e8f5;
  font-weight: 500;
}

.mobile-header {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  padding-top: var(--banner-height);
}

.sidebar {
  position: sticky;
  z-index: 50;
  top: var(--banner-height);
  height: calc(100vh - var(--banner-height));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  background: var(--surface);
}

.sidebar__top {
  position: relative;
  padding: 24px 20px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.sidebar__close {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--blue));
  box-shadow: 0 7px 20px rgba(11, 130, 189, 0.24);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.brand__name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.brand__sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.search-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: #fff;
  box-shadow: 0 1px 1px rgba(1, 44, 61, 0.02);
  cursor: pointer;
  text-align: left;
}

.search-trigger:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.search-trigger__icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  opacity: 0.72;
}

.search-trigger__icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -3px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-trigger__label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.keycap {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.5;
}

.sidebar__scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.review-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #b9d9e7;
  border-radius: 10px;
  color: var(--blue);
  background: #edf8fc;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.review-link:hover,
.review-link[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--sky-soft);
  text-decoration: none;
}

.review-link__count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  text-align: center;
}

.nav-section {
  margin: 2px 0 6px;
}

.nav-section > summary {
  list-style: none;
  position: relative;
  padding: 9px 28px 7px 10px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
}

.nav-section > summary::-webkit-details-marker {
  display: none;
}

.nav-section > summary::after {
  content: "+";
  position: absolute;
  right: 11px;
  top: 7px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.nav-section[open] > summary::after {
  content: "−";
}

.nav-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #36576b;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.35;
  text-decoration: none;
}

.public-site .nav-item {
  grid-template-columns: minmax(0, 1fr);
}

.nav-item:hover {
  color: var(--ink);
  background: #eaf4f7;
  text-decoration: none;
}

.nav-item[aria-current="page"] {
  color: var(--ink);
  background: #dff2fa;
  font-weight: 750;
}

.nav-item__dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.nav-item__dot--verified-live,
.nav-item__dot--verified-live-read-only {
  border-color: #4ca883;
  background: #4ca883;
}

.nav-item__dot--verified-code {
  border-color: var(--accent);
  background: var(--accent);
}

.nav-item__dot--needs-verification {
  border-color: #d3a13a;
  background: #f3c65c;
}

.nav-item__dot--draft {
  border-color: #c86a72;
  background: #e28b92;
}

.sidebar__foot {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  line-height: 1.45;
}

.page-wrap {
  min-width: 0;
  background: #fff;
}

.content-shell {
  width: min(1130px, calc(100% - 64px));
  display: grid;
  grid-template-columns: minmax(0, 820px) 230px;
  align-items: start;
  gap: 64px;
  margin: 0 auto;
  padding: 62px 0 90px;
}

.content-shell--wide {
  display: block;
  width: min(1080px, calc(100% - 64px));
}

.article {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.breadcrumb__sep {
  color: #a7bdc7;
}

.article-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}

.article-kicker {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-head h1,
.review-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 51px);
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 1.07;
}

.article-summary {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.status-badge,
.meta-pill,
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--verified-live {
  color: var(--success);
  border-color: #b8e2cf;
  background: var(--success-soft);
}

.status-badge--verified-live-read-only {
  color: #296a6a;
  border-color: #b8dddd;
  background: #edfafa;
}

.status-badge--verified-code {
  color: var(--blue);
  border-color: #bed3e8;
  background: #edf5fc;
}

.status-badge--needs-verification {
  color: var(--warning);
  border-color: #ead29b;
  background: var(--warning-soft);
}

.status-badge--draft {
  color: var(--danger);
  border-color: #efc2c7;
  background: var(--danger-soft);
}

.meta-pill {
  color: var(--ink-soft);
  background: #fff;
  font-weight: 650;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--surface);
  text-decoration: none;
}

.button--primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.button--primary:hover {
  color: #fff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button--quiet {
  border-color: transparent;
  background: transparent;
}

.review-details {
  margin-top: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--surface);
}

.review-details summary {
  padding: 10px 13px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.review-details__body {
  display: grid;
  gap: 10px;
  padding: 0 13px 13px;
  color: var(--ink-soft);
  font-size: 12px;
}

.review-details__body p {
  margin: 0;
}

.prose {
  max-width: 75ch;
  padding-top: 20px;
  color: #173f50;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--ink);
  letter-spacing: -0.022em;
  scroll-margin-top: 76px;
}

.prose h2 {
  margin: 48px 0 16px;
  padding-top: 8px;
  font-size: 28px;
  line-height: 1.2;
}

.prose h3 {
  margin: 34px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.prose h4 {
  margin: 26px 0 10px;
  font-size: 17px;
}

.heading-anchor {
  position: absolute;
  left: -24px;
  top: 50%;
  color: var(--accent);
  opacity: 0;
  transform: translateY(-50%);
  font-size: 16px;
  text-decoration: none;
  transition: opacity 120ms ease;
}

.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  padding-left: 1.45em;
}

.prose li {
  margin: 6px 0;
  padding-left: 4px;
}

.prose li::marker {
  color: var(--accent-dark);
  font-weight: 700;
}

.prose strong {
  color: var(--ink);
}

.prose blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid #b9dceb;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #264f61;
  background: #f0f9fc;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.manual-visual {
  margin: 30px 0;
}

.manual-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.manual-visual--intrinsic img {
  width: auto;
  max-width: 100%;
}

.manual-visual__link {
  display: block;
}

.placement-example {
  margin: 42px 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.placement-example:first-child {
  margin-top: 30px;
}

.placement-example .article-kicker {
  margin-bottom: 8px;
}

.placement-example h2 {
  margin-top: 0;
}

.review-pagination {
  margin: 34px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.review-pagination__summary {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.review-pagination__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.review-pagination__link {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.review-pagination__link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.review-pagination__link--current {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.review-pagination__link--direction {
  min-width: 92px;
}

.manual-visual__link[data-image-lightbox-link] {
  cursor: zoom-in;
}

.image-lightbox {
  width: min(1440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  color: #fff;
  background: #07161d;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.image-lightbox[open] {
  display: block;
}

.image-lightbox::backdrop {
  background: rgba(0, 18, 28, 0.88);
  backdrop-filter: blur(5px);
}

.image-lightbox__frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 34px);
}

.image-lightbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.image-lightbox__head p {
  margin: 0 0 2px;
  color: #9ed8f2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.image-lightbox__head h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.image-lightbox__close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.image-lightbox__close:hover {
  border-color: #9ed8f2;
  background: rgba(158, 216, 242, 0.16);
}

.image-lightbox__stage {
  min-height: 180px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #020a0e;
}

.image-lightbox__stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
}

.image-lightbox__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.image-lightbox__foot p {
  max-width: 90ch;
  margin: 0;
  color: #c9dce4;
  font-size: 12px;
  line-height: 1.45;
}

.image-lightbox__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.manual-visual figcaption {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.manual-video {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 18px;
  align-items: center;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid #b9dceb;
  border-radius: 12px;
  background: #f0f9fc;
}

.manual-video__eyebrow {
  grid-column: 1 / -1;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-video__link {
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
}

.manual-video__transcript {
  font-size: 12px;
  font-weight: 720;
}

.prose code {
  padding: 0.14em 0.35em;
  border: 1px solid #d8e5ea;
  border-radius: 5px;
  color: #1e4f63;
  background: #f3f8fa;
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px;
  border-radius: 12px;
  color: #e7f2f6;
  background: var(--code-bg);
  box-shadow: var(--shadow-sm);
}

.prose pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 22px 0 28px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
}

.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}

.prose th,
.prose td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.toc {
  position: sticky;
  top: calc(var(--banner-height) + 28px);
  max-height: calc(100vh - var(--banner-height) - 56px);
  overflow-y: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line-soft);
}

.toc__title {
  margin: 0 0 11px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-dark);
}

.toc .toc__level-3 a {
  padding-left: 12px;
  font-size: 11px;
}

.toc__review {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line-soft);
}

.toc__review p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.article-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 58px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.pagination-link {
  display: block;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.pagination-link:hover {
  border-color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.pagination-link--next {
  text-align: right;
}

.pagination-link__label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pagination-link__title {
  display: block;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.3;
}

.review-callout {
  margin-top: 44px;
  padding: 22px;
  border: 1px solid #b9dceb;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #f2fbfe, #fff);
}

.review-callout h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

.review-callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.review-callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.review-hero {
  padding: 34px;
  border: 1px solid #c9e4ef;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(158, 216, 242, 0.34), transparent 34%),
    linear-gradient(145deg, #f3fbfe, #ffffff 62%);
}

.review-hero p {
  max-width: 70ch;
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.review-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 40px;
}

.stat-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-card__value {
  display: block;
  color: var(--ink);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card__label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.review-section {
  margin-top: 42px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.section-head p {
  max-width: 52ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 16px;
}

.filter-button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.review-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}

.review-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.review-table th,
.review-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.review-table th {
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.review-table tbody tr:last-child td {
  border-bottom: 0;
}

.review-table tbody tr:hover td {
  background: #fbfdfe;
}

.review-table__title {
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.review-table__meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.workflow-card {
  padding: 19px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--surface);
}

.workflow-card__step {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.workflow-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.visual-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 18px;
}

.visual-panel[hidden] {
  display: none;
}

.capture-note {
  max-width: 52ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.priority-badge {
  min-height: 23px;
  padding: 3px 8px;
  color: var(--blue);
  background: #edf5fc;
}

.priority-badge--P0 {
  color: var(--danger);
  border-color: #efc2c7;
  background: var(--danger-soft);
}

.legacy-notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #ead7a2;
  border-radius: 11px;
  color: #5f4812;
  background: #fff9e7;
  font-size: 13px;
  line-height: 1.5;
}

.review-table--legacy {
  min-width: 1180px;
}

.legacy-targets {
  min-width: 210px;
}

.legacy-targets .review-table__title {
  display: block;
}

.legacy-link-separator {
  display: block;
  margin: 4px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.provenance-details {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 11px;
}

.provenance-details summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 760;
}

.provenance-details dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 4px 9px;
  margin: 9px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
}

.provenance-details dt {
  color: var(--muted);
  font-weight: 700;
}

.provenance-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.provenance-details__locator {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.search-dialog,
.feedback-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 40px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.feedback-dialog {
  width: min(620px, calc(100% - 28px));
}

.feedback-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-dialog::backdrop,
.feedback-dialog::backdrop {
  background: rgba(1, 27, 38, 0.63);
  backdrop-filter: blur(5px);
}

.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.dialog-head h2 {
  flex: 1;
  margin: 0;
  font-size: 18px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.sidebar .sidebar__close {
  display: none;
}

.search-box {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
}

.search-results {
  max-height: min(610px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 10px;
}

.search-empty {
  padding: 42px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.search-result {
  display: block;
  padding: 13px 14px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  color: var(--ink);
  background: var(--surface-strong);
  text-decoration: none;
}

.search-result__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-result__title {
  font-size: 14px;
  font-weight: 790;
}

.search-result__area {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-result__excerpt {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.feedback-body {
  overflow-y: auto;
  padding: 20px;
}

.feedback-context {
  margin: 0 0 18px;
  padding: 12px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.field select,
.field textarea,
.field input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field-help {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100% - 40px));
  padding: 11px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

.drawer-scrim {
  display: none;
}

.drawer-scrim[hidden] {
  display: none;
}

.mobile-review-bar {
  display: none;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 264px;
  }

  .content-shell {
    width: min(900px, calc(100% - 48px));
    display: block;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --banner-height: 34px;
  }

  .preview-banner {
    justify-content: flex-start;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .preview-banner__meta {
    display: none;
  }

  .mobile-header {
    position: fixed;
    z-index: 70;
    top: var(--banner-height);
    right: 0;
    left: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .mobile-header__button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
  }

  .mobile-header__title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell {
    display: block;
    padding-top: calc(var(--banner-height) + 56px);
  }

  .sidebar {
    position: fixed;
    z-index: 95;
    top: var(--banner-height);
    bottom: 0;
    left: 0;
    width: min(326px, calc(100vw - 44px));
    height: calc(100vh - var(--banner-height));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar .sidebar__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid;
  }

  .sidebar .brand {
    padding-right: 34px;
  }

  body[data-drawer-open="true"] {
    overflow: hidden;
  }

  body[data-drawer-open="true"] .sidebar {
    transform: translateX(0);
  }

  .drawer-scrim {
    position: fixed;
    z-index: 90;
    inset: var(--banner-height) 0 0;
    display: block;
    border: 0;
    background: rgba(1, 27, 38, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body[data-drawer-open="true"] .drawer-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .content-shell,
  .content-shell--wide {
    width: min(100% - 32px, 780px);
    padding: 36px 0 calc(112px + env(safe-area-inset-bottom));
  }

  .article-head h1,
  .review-hero h1 {
    font-size: clamp(31px, 8vw, 42px);
  }

  .article-summary {
    font-size: 16px;
  }

  .prose h2 {
    margin-top: 40px;
    font-size: 25px;
  }

  .heading-anchor {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .mobile-review-bar {
    position: fixed;
    z-index: 65;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
  }

  .mobile-review-bar .button {
    min-height: 40px;
  }
}

@media (max-width: 560px) {
  .content-shell,
  .content-shell--wide {
    width: min(100% - 24px, 780px);
    padding-top: 28px;
  }

  .article-head {
    padding-bottom: 22px;
  }

  .article-actions {
    display: none;
  }

  .review-hero {
    padding: 24px 20px;
  }

  .stat-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card__value {
    font-size: 24px;
  }

  .section-head {
    display: block;
  }

  .section-head .button {
    margin-top: 10px;
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .pagination-link--next {
    text-align: left;
  }

  .review-callout {
    padding: 18px;
  }

  .placement-example {
    margin: 28px 0;
    padding: 20px;
  }

  .review-pagination {
    margin: 26px 0;
    padding: 16px;
  }

  .review-pagination__links {
    gap: 6px;
  }

  .review-pagination__link {
    min-width: 40px;
    min-height: 40px;
    padding: 7px 10px;
  }

  .review-pagination__link--direction {
    min-width: 86px;
  }

  .image-lightbox {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .image-lightbox__frame {
    max-height: calc(100vh - 18px);
  }

  .image-lightbox__head {
    padding: 11px 10px 10px 14px;
  }

  .image-lightbox__head h2 {
    font-size: 15px;
  }

  .image-lightbox__stage {
    padding: 8px;
  }

  .image-lightbox__stage img {
    max-height: calc(100vh - 245px);
  }

  .image-lightbox__foot {
    display: block;
    padding: 10px 12px 12px;
  }

  .image-lightbox__foot p {
    max-height: 3.5em;
    overflow: auto;
  }

  .image-lightbox__actions {
    margin-top: 10px;
  }

  .image-lightbox__actions .button {
    flex: 1;
  }

  .manual-video {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .preview-banner,
  .mobile-header,
  .sidebar,
  .toc,
  .article-actions,
  .mobile-review-bar,
  .review-callout,
  .drawer-scrim {
    display: none !important;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .content-shell {
    width: 100%;
    display: block;
    padding: 0;
  }

  .prose {
    max-width: none;
  }

  a {
    color: inherit;
  }
}
