/* ==========================================================================
   ERP Pics — main stylesheet
   ========================================================================== */

:root {
	--blue-900: #0f2a6b;
	--blue-800: #16348a;
	--blue-700: #1d3f8f;
	--blue-600: #1f4fd8;
	--blue-500: #2f62e6;
	--blue-100: #e3ecfd;
	--blue-50:  #f3f7ff;
	--green-100: #e4f5d6;
	--green-700: #3d7a17;
	--ink:      #101828;
	--ink-2:    #344054;
	--muted:    #667085;
	--line:     #e4e7ec;
	--line-2:   #d0d5dd;
	--bg:       #ffffff;
	--bg-soft:  #f8fafc;
	--radius:   10px;
	--radius-sm: 6px;
	--shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
	--shadow:   0 4px 16px rgba(16, 24, 40, .08);
	--container: 1200px;
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--header-h: 72px;
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-800); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid rgba(47, 98, 230, .45); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 10px 14px; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.dot { color: var(--line-2); margin: 0 .15em; }
.bar { color: var(--line-2); margin: 0 .35em; }

/* Buttons ----------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn--primary { background: var(--blue-600); color: #fff; }
.btn--primary:hover { background: var(--blue-800); color: #fff; }
.btn--outline { background: #fff; border-color: var(--blue-600); color: var(--blue-600); min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--outline:hover { background: var(--blue-50); }
.btn--ghost { background: var(--bg-soft); border-color: var(--line); color: var(--ink-2); }
.btn--text { background: none; border: 0; color: var(--ink-2); min-height: 38px; padding: 0 8px; font-weight: 500; font-size: 14px; }
.btn--text:hover { color: var(--blue-600); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--blue-100); color: var(--blue-700); }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600); }

/* Header ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-header__brand { display: flex; align-items: center; gap: 16px; min-width: 0; margin-right: auto; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--blue-500), var(--blue-900)); color: #fff; font-size: 10px; font-weight: 800; line-height: 1.05; text-align: center; letter-spacing: .02em; flex: none; }
.brand__logo { width: 44px; height: 44px; object-fit: contain; }
.brand__name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.brand__tag { padding-left: 16px; border-left: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list > li { position: relative; }
.nav__list > li > a, .nav__drop-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border: 0; background: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; cursor: pointer; }
.nav__list > li > a:hover, .nav__drop-btn:hover, .nav__drop-btn[aria-expanded="true"] { background: var(--bg-soft); color: var(--blue-700); }
.nav__list > li > a[aria-current="page"], .nav__list > .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav__drop-btn .icon { transition: transform .15s; }
.nav__drop-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav__sub, .nav__list .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.nav__drop.is-open .nav__sub, .nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav__sub a, .nav__list .sub-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: 15px; }
.nav__sub a:hover, .nav__list .sub-menu a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav__sub small { color: var(--muted); font-size: 13px; }
.nav__search { display: none; }

.nav-toggle, .search-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; }
.nav-toggle:hover, .search-toggle:hover { background: var(--bg-soft); }
.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.header-search { border-top: 1px solid var(--line); background: #fff; padding: 14px 0; }

/* Search ------------------------------------------------------------------ */
.sform { display: flex; gap: 8px; width: 100%; }
.sform__field { position: relative; flex: 1; min-width: 0; }
.sform__field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.sform input[type="search"] { width: 100%; height: 44px; padding: 0 14px 0 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; font-size: 15px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.sform input[type="search"]::placeholder { color: var(--muted); }
.sform input[type="search"]:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 98, 230, .15); }
.sform--hero { max-width: 600px; }
.sform--hero input[type="search"], .sform--hero .btn { height: 52px; }
.sform--hero .btn { padding: 0 24px; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--blue-50) 100%); border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(29, 63, 143, .08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 35%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 75%); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
.hero__title { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 16px; }
.hero__lead { font-size: 18px; color: var(--ink-2); max-width: 560px; margin-bottom: 28px; }
.hero__try { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.hero__try a { font-weight: 500; }
.hero__art { justify-self: end; width: 100%; max-width: 440px; }
.hero__svg-text { font: 600 11.5px var(--font); fill: var(--blue-900); text-anchor: middle; font-style: italic; }
.hero__svg-label { font: 700 13px var(--font); fill: var(--blue-900); text-anchor: middle; }

/* Sections ---------------------------------------------------------------- */
.section { padding: 40px 0; }
.section--library { padding-top: 28px; }
.section--modules { padding-top: 0; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 20px; }
.section__title { font-size: 30px; font-weight: 800; margin: 0; }
.section__title--sm { font-size: 22px; margin-bottom: 18px; }
.section__count { margin: 0; color: var(--muted); font-size: 15px; }
.section__more { margin: 28px 0 0; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* Tabs -------------------------------------------------------------------- */
.tabs { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 4px; min-width: max-content; }
.tabs__tab { display: block; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tabs__tab:hover { background: var(--bg-soft); color: var(--blue-700); }
.tabs__tab.is-active { background: var(--blue-600); color: #fff; font-weight: 600; }

/* Select ------------------------------------------------------------------ */
.select { position: relative; display: inline-flex; }
.select select { height: 40px; padding: 0 38px 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; -webkit-appearance: none; appearance: none; }
.select select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 98, 230, .15); }
.select .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.sort { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards ------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card__media { display: block; aspect-ratio: 16 / 10.5; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .3s; }
.card__placeholder { display: grid; place-items: center; height: 100%; padding: 16px; text-align: center; font-weight: 700; color: var(--blue-700); background: var(--blue-50); }
.card:hover .card__media { border-color: var(--blue-500); box-shadow: var(--shadow); }
.card:hover .card__media img { transform: scale(1.02); }
.card__body { padding-top: 12px; }
.card__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -.005em; line-height: 1.35; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { color: var(--blue-700); }
.card__meta { margin: 0; font-size: 13px; color: var(--muted); }

.card--row { flex-direction: row; align-items: center; gap: 16px; }
.card--row .card__media { flex: none; width: 180px; aspect-ratio: 16 / 9.5; }
.card--row .card__body { padding: 0; }
.card--row .card__title { font-size: 15px; }

/* Modules ----------------------------------------------------------------- */
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.module { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.module:hover { border-color: var(--blue-500); box-shadow: var(--shadow-sm); color: var(--ink); }
.module__code { display: grid; place-items: center; min-width: 46px; height: 32px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--blue-100); color: var(--blue-700); font-weight: 800; font-size: 13px; }
.module__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.module__count { font-size: 13px; color: var(--muted); }

/* Page head (archives/search) --------------------------------------------- */
.page-head { padding: 44px 0 8px; background: linear-gradient(180deg, var(--blue-50), #fff); }
.page-head__title { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.025em; }
.page-head__desc { max-width: 720px; color: var(--ink-2); font-size: 17px; }
.page-head--search .sform { margin-top: 18px; }
.page-head--center { text-align: center; padding: 96px 0; }
.page-head--center .sform { margin: 24px auto 0; }
.page-head--center .page-head__desc { margin: 0 auto; }

/* Pagination -------------------------------------------------------------- */
.pagination { margin-top: 40px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.pagination a:hover { border-color: var(--blue-500); color: var(--blue-700); }
.pagination .current { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pagination .dots { border: 0; }

/* Article ----------------------------------------------------------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding-top: 28px; padding-bottom: 24px; }
.article { min-width: 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-size: 14px; color: var(--ink-2); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.breadcrumb .crumb-plain { color: var(--ink-2); text-decoration: none; }
.breadcrumb .crumb-plain:hover { color: var(--blue-600); text-decoration: underline; }
.article__title { font-size: clamp(30px, 3.8vw, 44px); font-weight: 800; letter-spacing: -.028em; max-width: 820px; }
.article__lead { font-size: 18px; color: var(--ink-2); max-width: 760px; margin-bottom: 8px; }
.article__meta { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* Diagram viewer */
.viewer { margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.viewer__title { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__tools { display: flex; align-items: center; gap: 8px; }
.viewer__zoom { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; }
.viewer__level { min-width: 56px; height: 32px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.viewer__stage { position: relative; overflow: hidden; display: grid; place-items: center; max-height: 78vh; min-height: 240px; padding: 12px; cursor: zoom-in; touch-action: pan-y; background: #fff; }
.viewer__img { max-height: calc(78vh - 24px); width: auto; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.viewer.is-zoomed .viewer__stage { cursor: grab; touch-action: none; place-items: start; }
.viewer.is-dragging .viewer__stage { cursor: grabbing; }
.viewer.is-zoomed .viewer__img { max-height: none; max-width: none; }
.viewer:fullscreen { display: flex; flex-direction: column; border-radius: 0; border: 0; }
.viewer:fullscreen .viewer__stage { flex: 1; max-height: none; }
.viewer:fullscreen .viewer__img { max-height: calc(100vh - 80px); }
.viewer.is-zoomed:fullscreen .viewer__img { max-height: none; }

.article__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 32px; }
.article__actions .is-copied { color: var(--green-700); }

/* Prose */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 760px; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.6em 0 .4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--blue-600); }
.prose img { border-radius: var(--radius-sm); }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--blue-500); background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose code { font-family: var(--font-mono); font-size: .88em; padding: .15em .4em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 16px; background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose .wp-block-table { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 600; color: var(--ink); }
.prose .wp-block-table table { border: 0; }
.prose .wp-block-image img { height: auto; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.article__tags-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }

/* Aside */
.article__aside { min-width: 0; }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 28px; margin-top: 140px; }
.aside-title { font-size: 17px; font-weight: 800; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.glance__list { display: grid; gap: 12px; margin: 0; }
.glance__list > div { display: grid; grid-template-columns: 76px 1fr; align-items: start; gap: 8px; }
.glance__list dt { font-size: 14px; color: var(--ink-2); padding-top: 3px; }
.glance__list dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.5; }
.chip--blue { background: var(--blue-100); color: var(--blue-700); }
.chip--blue:hover { background: #d3e1fb; color: var(--blue-800); }
.chip--green { background: var(--green-100); color: var(--green-700); }
.chip--green:hover { background: #d4edbf; color: var(--green-700); }
.chip--neutral { background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }
.chip--neutral:hover { border-color: var(--blue-500); color: var(--blue-700); }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.toc__item--h3 { padding-left: 14px; font-size: 14px; }
.toc a { color: var(--blue-600); }
.toc a.is-active { font-weight: 700; color: var(--blue-800); }

/* Related */
.section--related { padding-top: 16px; padding-bottom: 48px; }
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; }

/* Static page */
.page-layout { padding-top: 40px; padding-bottom: 48px; }
.article--page { max-width: 760px; }
.page-hero { margin: 0 0 24px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { margin-top: 24px; border-top: 1px solid var(--line); background: #fff; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.site-footer__brand { display: flex; align-items: center; gap: 16px; }
.site-footer .brand__mark { width: 36px; height: 36px; font-size: 8px; }
.site-footer .brand__name { font-size: 19px; }
.site-footer .brand__tag { font-size: 13px; }
.site-footer__meta { text-align: right; font-size: 13px; color: var(--muted); }
.site-footer__meta p { margin: 0; }
.site-footer__meta strong { color: var(--ink-2); }
.site-footer__copy { margin-top: 4px !important; }
.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.site-footer__nav a { color: var(--ink-2); text-decoration: none; }
.site-footer__nav a:hover { color: var(--blue-600); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
	.modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.article-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; }
}

@media (max-width: 960px) {
	:root { --header-h: 64px; }
	/* backdrop-filter would make the fixed mobile menu position relative to the header. */
	.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
	.brand__tag { display: none; }
	.nav-toggle { display: inline-grid; order: 3; }
	.search-toggle { order: 2; }
	.nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 24px 32px; background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; }
	.nav-open .nav { transform: none; visibility: visible; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: inline; }
	.nav-open { overflow: hidden; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav__list > li > a, .nav__drop-btn { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
	.nav__sub, .nav__list .sub-menu { position: static; display: none; min-width: 0; box-shadow: none; border: 0; padding: 4px 0 8px 8px; opacity: 1; visibility: visible; transform: none; }
	.nav__drop.is-open .nav__sub { display: block; }
	.nav__search { display: block; order: -1; }

	.hero__inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
	.hero__art { display: none; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
	.modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.article-layout { grid-template-columns: 1fr; gap: 0; }
	.article__aside { order: -1; }
	.aside-sticky { position: static; margin-top: 0; display: none; }
	.related { grid-template-columns: 1fr; }
	.site-footer__meta { text-align: left; }
}

@media (max-width: 960px) {
	/* On small screens show "At a glance" under the title, inside the article flow. */
	.article__aside { order: 0; }
	.article-layout .aside-sticky { display: grid; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
	.article-layout { display: flex; flex-direction: column; }
}

@media (max-width: 600px) {
	.container { padding: 0 16px; }
	.brand__name { font-size: 20px; }
	.brand__mark { width: 38px; height: 38px; font-size: 9px; }
	.hero__title { font-size: 32px; }
	.hero__lead { font-size: 16px; }
	.sform--hero .btn { padding: 0 16px; }
	.section__head { flex-wrap: wrap; margin-top: 24px; }
	.section__title { font-size: 24px; }
	.grid { grid-template-columns: 1fr; }
	.modules { grid-template-columns: 1fr; }
	.card--row .card__media { width: 120px; }
	.viewer__title { display: none; }
	.viewer__bar { justify-content: flex-end; }
	.prose { font-size: 16px; }
	.prose h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .site-footer, .article__actions, .viewer__bar, .article__aside, .section--related { display: none !important; }
	.viewer { border: 0; box-shadow: none; }
	.viewer__stage { max-height: none; }
	.viewer__img { max-height: none; }
}

/* Mockup tuning */
.nav__list > li > a, .nav__drop-btn { white-space: nowrap; }
.ref-link { white-space: nowrap; }
.glance__list dd .ref-link .icon { vertical-align: -2px; }
.brand__name { white-space: nowrap; }

/* ==========================================================================
   Header v2 (centered nav + CTA) and dark home hero
   ========================================================================== */
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; }
.site-header__brand { margin-right: 0; }
.site-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-cta { white-space: nowrap; font-size: 15px; }
.brand--header .brand__mark, .brand--header .brand__logo { width: 52px; height: 52px; font-size: 11px; }
.site-header .brand__tag { font-size: 18px; font-weight: 700; color: var(--ink); border-left-color: var(--line-2); padding-left: 18px; margin-left: 2px; }
.nav__list > li > a, .nav__drop-btn { font-size: 16px; padding: 8px 18px; }
.home .search-toggle { display: none; }

.hero--dark { background: #0b2147; border-bottom: 0; color: #fff; text-align: center; }
.hero--dark::after { display: none; }
.hero--dark .hero__inner { display: block; padding-top: 56px; padding-bottom: 48px; }
.hero--dark .eyebrow { color: #86b1ff; font-size: 17px; letter-spacing: .06em; margin-bottom: 18px; }
.hero--dark .hero__title { color: #fff; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -.035em; margin-bottom: 18px; }
.hero--dark .hero__lead { color: #d3dcee; font-size: 20px; max-width: none; margin: 0 auto 32px; }
.hero--dark .sform--hero { max-width: 800px; margin: 0 auto; padding: 6px; gap: 6px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.hero--dark .sform--hero input[type="search"] { height: 52px; border: 0; background: transparent; font-size: 18px; box-shadow: none; }
.hero--dark .sform--hero input[type="search"]:focus { box-shadow: none; }
.hero--dark .sform--hero .sform__field .icon { left: 16px; width: 24px; height: 24px; color: var(--ink-2); }
.hero--dark .sform--hero .btn { height: 52px; padding: 0 34px; font-size: 18px; font-weight: 700; border-radius: 8px; }
.hero--dark .hero__try { margin: 18px 0 0; font-size: 17px; color: #d3dcee; }
.hero--dark .hero__try a { color: #9fc2ff; }
.hero--dark .hero__try .dot { color: #6f86b3; }

.shortcuts { display: flex; justify-content: center; flex-wrap: wrap; list-style: none; margin: 44px 0 0; padding: 0; }
.shortcuts li { padding: 4px 30px; }
.shortcuts li + li { border-left: 1px solid rgba(255, 255, 255, .22); }
.shortcuts a { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-size: 18px; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.shortcuts a:hover { color: #9fc2ff; }
.shortcuts .icon { flex: none; stroke-width: 1.6; }

.section--start { padding-top: 48px; background: var(--bg-soft); }
.section--start .section__head { margin-top: 0; }
.section--start .section__title { font-size: 36px; }
.grid--feature { gap: 28px; }
.grid--feature .card { padding: 16px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.grid--feature .card:hover { border-color: var(--blue-500); box-shadow: var(--shadow); }
.grid--feature .card__media { border: 0; box-shadow: none; background: #fff; }
.grid--feature .card__title { font-size: 20px; font-weight: 800; }
.grid--feature .card__body { padding-top: 14px; }
.home .section--modules { padding-top: 24px; background: var(--bg-soft); }

@media (max-width: 960px) {
	.site-header__inner { display: flex; }
	.site-header__brand { margin-right: auto; }
	.header-cta { display: none; }
	.site-header .brand__tag { display: block; font-size: 16px; padding-left: 12px; }
	.nav-toggle { order: 0; }
	.search-toggle { order: 0; }
	.nav__list > li > a, .nav__drop-btn { padding: 14px 8px; }
	.home .search-toggle { display: none; }
	.hero--dark .hero__inner { padding-top: 40px; padding-bottom: 36px; }
	.hero--dark .hero__lead { font-size: 17px; }
	.hero--dark .eyebrow { font-size: 13px; }
	.shortcuts { gap: 14px 0; margin-top: 32px; }
	.shortcuts li { padding: 4px 16px; }
	.shortcuts a { font-size: 16px; }
}
@media (max-width: 600px) {
	.site-header .brand__tag { display: none; }
	.hero--dark .sform--hero { flex-direction: column; }
	.hero--dark .sform--hero .btn { width: 100%; }
	.shortcuts li { border-left: 0 !important; }
	.section--start .section__title { font-size: 26px; }
}

@media (min-width: 961px) {
	.shortcuts { flex-wrap: nowrap; }
	.shortcuts li { padding: 4px 16px; }
	.shortcuts a { font-size: 16px; gap: 9px; white-space: nowrap; }
	.shortcuts .icon { width: 24px; height: 24px; }
}

/* Hero shortcuts as dropdowns (same groups as the live menu) */
.shortcuts .nav__drop { position: relative; }
.shortcuts .nav__drop-btn { color: #fff; font-size: 16px; padding: 6px 4px; gap: 9px; white-space: nowrap; background: none; }
.shortcuts .nav__drop-btn:hover, .shortcuts .nav__drop-btn[aria-expanded="true"] { background: none; color: #9fc2ff; }
.shortcuts .nav__drop-btn .icon:last-child { width: 16px; height: 16px; }
.shortcuts .nav__sub { left: 50%; margin-left: -130px; text-align: left; }
.shortcuts .nav__drop:hover > .nav__sub, .shortcuts .nav__drop:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.shortcuts .nav__sub a { color: var(--ink); font-size: 15px; white-space: normal; }
@media (max-width: 960px) {
	.shortcuts .nav__sub { position: absolute; }
	.shortcuts .nav__drop-btn { font-size: 16px; }
}
.hero--dark { overflow: visible; z-index: 5; }
.shortcuts .nav__sub { z-index: 20; }

/* Hero search with category + picture type filters */
.hero--dark .sform--hero { max-width: 1040px; }
.hero--dark .sform--hero .sform__field { flex: 1 1 220px; min-width: 0; }
.hero--dark .sform--hero .select { position: relative; flex: 0 1 220px; min-width: 0; border-left: 1px solid var(--line); }
.hero--dark .sform--hero .select select { width: 100%; height: 52px; padding: 0 36px 0 14px; border: 0; background: transparent; font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none; text-overflow: ellipsis; cursor: pointer; }
.hero--dark .sform--hero .select .icon { position: absolute; right: 12px; top: 50%; margin-top: -8px; pointer-events: none; color: var(--ink-2); }
@media (max-width: 960px) {
	.hero--dark .sform--hero { flex-wrap: wrap; }
	.hero--dark .sform--hero .sform__field { flex-basis: 100%; }
	.hero--dark .sform--hero .select { flex: 1 1 45%; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
	.hero--dark .sform--hero .select { flex-basis: 100%; }
}

/* Search results page */
.page-head--search { padding: 36px 0 20px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.page-head--search .page-head__title { margin: 0 0 18px; font-size: clamp(26px, 3.2vw, 36px); overflow-wrap: anywhere; }
.page-head--search .sform--bar { max-width: none; margin: 0; padding: 5px; gap: 5px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-sm); }
.page-head--search .sform--bar:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 98, 230, .12); }
.page-head--search .sform--bar .sform__field { flex: 1 1 260px; min-width: 0; }
.page-head--search .sform--bar input[type="search"] { height: 48px; border: 0; background: transparent; font-size: 17px; box-shadow: none; }
.page-head--search .sform--bar input[type="search"]:focus { box-shadow: none; }
.page-head--search .sform--bar .select { position: relative; display: block; flex: 0 1 240px; min-width: 0; border-left: 1px solid var(--line); }
.page-head--search .sform--bar .select select { width: 100%; height: 48px; padding: 0 36px 0 14px; border: 0; border-radius: 0; background: transparent; font-size: 15px; text-overflow: ellipsis; box-shadow: none; }
.page-head--search .sform--bar .btn { height: 48px; padding: 0 28px; font-size: 16px; font-weight: 700; border-radius: 8px; }

.search-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.search-bar .section__count { font-weight: 600; color: var(--ink-2); }
.search-bar__sort { margin-left: auto; }
.search-bar__sort .select select { height: 38px; background-color: #fff; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 14px; font-weight: 600; text-decoration: none; }
.filter-chip:hover { background: #d3e1fb; color: var(--blue-800); }
.filter-chip .icon { opacity: .75; }
.filter-clear { font-size: 14px; color: var(--muted); }
.filter-clear:hover { color: var(--blue-700); }

.section--results { padding-top: 28px; }
.card__title mark { padding: 0 1px; border-radius: 2px; background: #fff1a8; color: inherit; }
.empty--search .empty__title { margin: 0 0 12px; font-size: 20px; font-weight: 700; color: var(--ink); }
.empty--search .btn { display: inline-flex; margin-bottom: 4px; }

@media (max-width: 960px) {
	.page-head--search .sform--bar { flex-wrap: wrap; }
	.page-head--search .sform--bar .sform__field { flex-basis: 100%; }
	.page-head--search .sform--bar .select { flex: 1 1 40%; border-left: 0; border-top: 1px solid var(--line); }
	.page-head--search .sform--bar .select + .select { border-left: 1px solid var(--line); }
}
@media (max-width: 600px) {
	.page-head--search { padding-top: 24px; }
	.page-head--search .sform--bar .select { flex-basis: 100%; }
	.page-head--search .sform--bar .select + .select { border-left: 0; }
	.page-head--search .sform--bar .btn { width: 100%; }
	.search-bar__sort { margin-left: 0; width: 100%; }
	.search-bar__sort .select, .search-bar__sort .select select { width: 100%; }
}

/* Article: tags inside "At a glance" */
.chip--tag { background: #fdf0d2; color: #8a5300; }
.chip--tag:hover { background: #fbe3ae; color: #6b3f00; }
.article__header { padding-top: 8px; }
/* Article title spans the full width (above the sidebar too) */
.article-layout > .article__header { grid-column: 1 / -1; order: -2; padding-top: 8px; margin-bottom: -20px; }
.article-layout > .article__header .article__title, .article-layout > .article__header .article__lead { max-width: none; }
.article-layout .aside-sticky { margin-top: 0; }
@media (max-width: 960px) {
	.article-layout > .article__header { margin-bottom: 16px; }
}

/* Header: centred logo + tagline only */
.site-header__inner { display: flex; justify-content: center; }
.site-header__brand { margin: 0; }
.site-header .brand__tag { display: block; white-space: normal; }
@media (max-width: 960px) {
	.site-header__inner { display: flex; justify-content: center; }
	.site-header__brand { margin: 0; }
	.site-header .brand__tag { display: block; font-size: 16px; }
}
@media (max-width: 600px) {
	.site-header .brand__tag { display: block; font-size: 14px; line-height: 1.3; padding-left: 12px; max-width: 220px; }
	.brand--header .brand__mark, .brand--header .brand__logo { width: 42px; height: 42px; }
}

/* ==========================================================================
   Article page v2: calm canvas + elevated panels
   Page sits on a soft canvas; the reading column and each sidebar block are
   separate white panels, so content and sidebar never blur together.
   ========================================================================== */
.single { --canvas: #f2f4f8; --panel-r: 14px; --panel-line: #e3e7ee; --panel-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04); background: var(--canvas); }
.single .site-main { background: var(--canvas); }

.single .article-layout { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 32px; row-gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.single .article-layout > .article__header { margin-bottom: 0; padding-top: 0; }
.single .article__title { margin: 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.03em; }
.single .article__lead { margin: 12px 0 0; }

/* Diagram viewer as its own panel */
.single .viewer { border: 1px solid var(--panel-line); border-radius: var(--panel-r); box-shadow: var(--panel-shadow); }
.single .viewer__bar { background: #fff; padding: 8px 10px 8px 18px; }
.single .viewer__stage { background: #fbfcfd; }
.single .article__actions { margin: 14px 0 24px; }
.single .article__actions .btn--outline { background: #fff; }

/* Reading panel */
.single .prose { max-width: none; padding: 44px 52px 48px; background: #fff; border: 1px solid var(--panel-line); border-radius: var(--panel-r); box-shadow: var(--panel-shadow); }
.single .prose > * { max-width: 720px; }
.single .prose > .wp-block-table, .single .prose > figure, .single .prose > .wp-block-image { max-width: none; }
.single .prose h2 { margin-top: 2em; padding-top: 1.4em; border-top: 1px solid var(--line); font-size: 24px; letter-spacing: -.02em; }
.single .prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.single .prose h3 { font-size: 19px; }

/* Sidebar panels */
.single .aside-sticky { top: calc(var(--header-h) + 16px); gap: 16px; margin-top: 0; }
.single .glance, .single .toc { padding: 20px 20px 22px; background: #fff; border: 1px solid var(--panel-line); border-radius: var(--panel-r); box-shadow: var(--panel-shadow); }
.single .aside-title { margin: 0 0 14px; padding: 0; border: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.single .glance__list { gap: 0; }
.single .glance__list > div { grid-template-columns: 64px 1fr; padding: 11px 0; border-top: 1px solid var(--line); }
.single .glance__list > div:first-child { padding-top: 0; border-top: 0; }
.single .glance__list > div:last-child { padding-bottom: 0; }
.single .glance__list dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.single .glance__list .ref-link { display: inline-flex; align-items: center; gap: 4px; padding-top: 2px; font-size: 14px; font-weight: 600; text-decoration: none; }
.single .glance__list .ref-link:hover { text-decoration: underline; }

/* Contents: rail with active marker */
.single .toc__list { gap: 0; max-height: calc(100vh - 360px); overflow-y: auto; border-left: 2px solid var(--line); font-size: 14px; scrollbar-width: thin; }
.single .toc__item a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.single .toc__item--h3 { padding-left: 0; font-size: 13px; }
.single .toc__item--h3 a { padding-left: 28px; color: var(--muted); }
.single .toc a:hover { color: var(--blue-700); }
.single .toc a.is-active { border-left-color: var(--blue-600); color: var(--blue-700); font-weight: 600; }

/* Related visuals */
.single .section--related { padding-top: 8px; padding-bottom: 64px; background: var(--canvas); }
.single .related { gap: 16px; }
.single .card--row { padding: 12px; background: #fff; border: 1px solid var(--panel-line); border-radius: 12px; box-shadow: var(--panel-shadow); transition: border-color .15s, box-shadow .15s; }
.single .card--row:hover { border-color: var(--blue-500); box-shadow: var(--shadow); }
.single .card--row .card__media { border-radius: 8px; }
.single .site-footer { margin-top: 0; }

@media (max-width: 1100px) {
	.single .article-layout { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 24px; }
	.single .prose { padding: 36px 36px 40px; }
}
@media (max-width: 960px) {
	.single .article-layout { display: flex; flex-direction: column; gap: 0; padding-top: 28px; }
	.single .article-layout > .article__header { margin-bottom: 20px; }
	.single .article-layout .aside-sticky { margin: 20px 0 0; padding: 0; border: 0; }
	.single .toc__list { max-height: none; }
}
@media (max-width: 600px) {
	.single .prose { padding: 24px 20px 28px; font-size: 16px; border-radius: 12px; }
	.single .viewer { border-radius: 12px; }
	.single .prose h2 { font-size: 21px; }
}

/* ==========================================================================
   Footer v2: dark band that bookends the dark hero
   ========================================================================== */
.site-footer { margin-top: 0; border-top: 0; background: #0b2147; color: #b9c6df; font-size: 15px; }
.site-footer a { color: #dfe7f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 40px 48px; padding: 64px 0 48px; }

.site-footer .brand { gap: 12px; color: #fff; }
.site-footer .brand:hover { text-decoration: none; }
.site-footer .brand__mark { width: 44px; height: 44px; font-size: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); }
.site-footer .brand__name { font-size: 22px; color: #fff; }
.site-footer__about .brand__tag { display: block; margin-top: 10px; padding: 0; border: 0; font-size: 14px; font-weight: 600; color: #9fc2ff; white-space: normal; }
.site-footer__desc { max-width: 340px; margin: 12px 0 0; line-height: 1.6; }
.site-footer__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 14px; }
.site-footer__stats strong { color: #fff; font-weight: 700; }

.site-footer__title { margin: 4px 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7f93ba; }
.site-footer__col ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer__topics { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.site-footer__topics a { display: inline-block; padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; font-size: 13px; line-height: 1.4; }
.site-footer__topics a:hover { border-color: #9fc2ff; background: rgba(159, 194, 255, .1); text-decoration: none; }

.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 22px 0 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #7f93ba; }
.site-footer__bottom p { margin: 0; }
.site-footer__copy { margin: 0 !important; color: #b9c6df; }
.site-footer__legal { flex: 1 1 360px; }
.site-footer__nav ul { gap: 18px; font-size: 13px; }
.site-footer__nav a { color: #b9c6df; }
.site-footer__top { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; color: #b9c6df !important; }
.site-footer__top .icon { transform: rotate(-90deg); }

@media (max-width: 1100px) {
	.site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.site-footer__about { grid-column: 1 / -1; }
	.site-footer__desc { max-width: 560px; }
}
@media (max-width: 600px) {
	.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding: 44px 0 32px; }
	.site-footer__col--topics { grid-column: 1 / -1; }
	.site-footer__top { margin-left: 0; }
}

/* ==========================================================================
   Header v3: brand row + process navigation bar
   ========================================================================== */
:root { --header-h: 109px; }
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 60px; }
.site-header__side { display: flex; align-items: center; min-width: 0; }
.site-header__side--end { justify-content: flex-end; }
.site-header__brand { justify-content: center; }
.brand--header .brand__mark, .brand--header .brand__logo { width: 44px; height: 44px; }
.site-header .brand__tag { font-size: 17px; }

.search-toggle { display: inline-flex; align-items: center; gap: 8px; width: auto; height: 38px; padding: 0 14px 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: border-color .15s, color .15s, background .15s; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.home .search-toggle { display: none; }
.header-search { padding: 12px 0; border-top: 1px solid var(--line); background: #fff; }
.header-search .sform { max-width: 720px; margin: 0 auto; }

.pnav-toggle { display: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); cursor: pointer; }
.pnav-toggle:hover { background: var(--bg-soft); }
.pnav-toggle__close { display: none; }

/* Process bar */
.pnav { border-top: 1px solid var(--line); }
.pnav__list { display: flex; justify-content: center; gap: 4px; height: 48px; margin: 0; padding: 0; list-style: none; }
.pnav__item { position: relative; display: flex; }
.pnav__btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: color .15s; }
.pnav__btn > .icon:first-child { color: var(--muted); transition: color .15s; }
.pnav__btn > .icon:last-child { color: var(--muted); transition: transform .2s; }
.pnav__btn::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue-600); transform: scaleX(0); transition: transform .2s; }
.pnav__btn:hover, .pnav__item.is-open .pnav__btn { color: var(--ink); }
.pnav__btn:hover > .icon:first-child, .pnav__item.is-open .pnav__btn > .icon:first-child { color: var(--blue-600); }
.pnav__item.is-open .pnav__btn::after { transform: scaleX(1); }
.pnav__item.is-open .pnav__btn > .icon:last-child { transform: rotate(180deg); }
.pnav__btn:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -4px; border-radius: 8px; }

/* Dropdown panel */
.pnav__panel { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 60; width: 360px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06); opacity: 0; visibility: hidden; transform: translate(-50%, -6px); transition: opacity .15s, transform .15s, visibility .15s; }
.pnav__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* hover bridge */
.pnav__item.is-open .pnav__panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.pnav__item:first-child .pnav__panel { left: 0; transform: translate(0, -6px); }
.pnav__item:first-child.is-open .pnav__panel { transform: none; }
.pnav__item:last-child .pnav__panel { left: auto; right: 0; transform: translate(0, -6px); }
.pnav__item:last-child.is-open .pnav__panel { transform: none; }
.pnav__head { display: flex; flex-direction: column; gap: 1px; margin: 0 0 8px; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); }
.pnav__head strong { color: var(--ink); font-size: 15px; }
.pnav__head span { color: var(--muted); font-size: 13px; }
.pnav__links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pnav__link { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background .12s; }
.pnav__link:hover { background: var(--bg-soft); color: var(--ink); }
.pnav__ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; }
.pnav__ico--flow { background: var(--blue-100); color: var(--blue-700); }
.pnav__ico--layers { background: var(--green-100); color: var(--green-700); }
.pnav__ico--sheet { background: #fdf0d2; color: #8a5300; }
.pnav__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pnav__label { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pnav__desc { font-size: 13px; color: var(--muted); line-height: 1.35; }
.pnav__link:hover .pnav__label { color: var(--blue-700); }
.pnav__count { flex: none; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pnav__all { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 10px 8px 2px; border-top: 1px solid var(--line); color: var(--blue-600); font-size: 14px; font-weight: 600; text-decoration: none; }
.pnav__all span { color: var(--muted); font-weight: 500; }
.pnav__all:hover { color: var(--blue-800); }
.pnav__all .icon { transition: transform .15s; }
.pnav__all:hover .icon { transform: translateX(3px); }

@media (max-width: 1100px) {
	.pnav__btn { padding: 0 10px; font-size: 14px; }
	.pnav__btn > .icon:first-child { display: none; }
}
@media (max-width: 960px) {
	:root { --header-h: 64px; }
	.site-header__inner { height: 64px; }
	.pnav-toggle { display: inline-grid; }
	.pnav-open .pnav-toggle__open { display: none; }
	.pnav-open .pnav-toggle__close { display: inline; }
	.search-toggle { width: 40px; height: 40px; padding: 0; justify-content: center; }
	.search-toggle__label { display: none; }
	.pnav { display: none; position: fixed; inset: 64px 0 0 0; z-index: 45; overflow-y: auto; background: #fff; }
	.pnav-open { overflow: hidden; }
	.pnav-open .pnav { display: block; }
	.pnav .container { padding-top: 8px; padding-bottom: 32px; }
	.pnav__list { flex-direction: column; height: auto; gap: 0; }
	.pnav__item { display: block; border-bottom: 1px solid var(--line); }
	.pnav__btn { width: 100%; height: 56px; padding: 0 4px; font-size: 16px; }
	.pnav__btn > .icon:first-child { display: inline; color: var(--blue-600); }
	.pnav__btn > .icon:last-child { margin-left: auto; }
	.pnav__btn::after { display: none; }
	.pnav__panel, .pnav__item:first-child .pnav__panel, .pnav__item:last-child .pnav__panel { position: static; display: none; width: auto; padding: 0 0 12px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
	.pnav__item.is-open .pnav__panel { display: block; }
	.pnav__head { display: none; }
}
@media (max-width: 600px) {
	.site-header .brand__tag { max-width: 190px; font-size: 13px; }
}
@media (max-width: 960px) {
	.site-header__inner { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; }
	.site-header__brand { min-width: 0; }
}
@media (max-width: 600px) {
	.site-header .brand__tag { max-width: none; padding-left: 10px; font-size: 13px; }
	.brand--header { gap: 10px; }
	.brand--header .brand__mark, .brand--header .brand__logo { width: 38px; height: 38px; }
}
.section--start { padding-top: 40px; }
/* One-line hero headline on wide screens, balanced wrap on small ones */
.hero--dark .hero__title { max-width: none; text-wrap: balance; }
@media (min-width: 961px) { .hero--dark .hero__title { font-size: clamp(40px, 4.4vw, 58px); } }

/* Figure caption under the diagram (Google Images context + readers) */
.viewer__caption { margin: 0; padding: 10px 18px 12px; border-top: 1px solid var(--line); background: #fff; font-size: 14px; line-height: 1.5; color: var(--ink-2, #4b5563); }
.viewer:fullscreen .viewer__caption { display: none; }
@media print { .viewer__caption { display: block; } }

/* Header tagline is now a link to the home page: keep the plain-text look. */
.site-header a.brand__tag, .site-header a.brand__tag:hover, .site-header a.brand__tag:focus-visible { color: var(--ink); text-decoration: none; }
/* "View full size / Copy link" buttons were removed: keep the gap between the viewer and the text. */
.single .viewer { margin-bottom: 28px; }
