/* Punchout Pro: an enterprise reference with a trader's warmth. Cool sage paper, deep jade, brass for the route out, coral for the cart coming home. */
:root {
  --bg: #F2F5F4; --surface: #FFFFFF; --surface-2: #E8EEEC; --surface-3: #DCE5E2;
  --ink: #132B2A; --ink-2: #33504D; --ink-3: #56716D; --line: rgba(19, 43, 42, .13); --line-2: rgba(19, 43, 42, .24);
  --violet: #0E5F55; --violet-2: #137366; --tint: #DDEBE7; --teal: #0E6E48; --teal-fill: #D9A441; --amber: #9A6A12; --amber-fill: #D9A441; --rose: #C2482E;
  --brass: #B07D1E; --brass-fill: #D9A441; --coral: #E06A4E; --jade-deep: #0B3F39;
  --link: #0E5F55; --focus: #D9A441; --ok-bg: #DCEFE4; --warn-bg: #FBEFD3; --bad-bg: #FBE4DD;
  --art-ink: #132B2A; --art-v: #0E5F55; --art-t: #B07D1E;
  --radius-s: 4px; --radius: 8px; --radius-l: 12px;
  --wrap: 1280px; --measure: 70ch;
  --shadow: 0 1px 2px rgba(19, 43, 42, .07), 0 14px 30px -18px rgba(19, 43, 42, .32);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="night"] {
  --bg: #0D1C1B; --surface: #132726; --surface-2: #1A3230; --surface-3: #223D3A;
  --ink: #E7F0EE; --ink-2: #BFD2CE; --ink-3: #8FA9A4; --line: rgba(231, 240, 238, .12); --line-2: rgba(231, 240, 238, .24);
  --violet: #5CC4B2; --violet-2: #7AD3C3; --tint: #1C3B37; --teal: #6FD49B; --teal-fill: #E2B456; --amber: #E8BE62; --amber-fill: #D9A441; --rose: #F08A6E;
  --brass: #E2B456; --brass-fill: #D9A441; --coral: #F08A6E; --jade-deep: #0A1716;
  --link: #7AD3C3; --focus: #E2B456; --ok-bg: rgba(111, 212, 155, .14); --warn-bg: rgba(232, 190, 98, .14); --bad-bg: rgba(240, 138, 110, .14);
  --art-ink: #D6E4E1; --art-v: #5CC4B2; --art-t: #E2B456;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font-body); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: .9em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: .08em .34em; overflow-wrap: anywhere; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--ink-3); }
.hp { position: absolute; left: -9999px; }
main { display: block; min-height: 60vh; }
.test-ribbon { position: fixed; z-index: 90; top: 14px; right: -38px; transform: rotate(45deg); background: var(--rose); color: #fff; font: 700 .72rem/1 var(--font-mono); padding: 6px 44px; letter-spacing: .12em; pointer-events: none; }

/* ---------- Art (inline SVG, themed) ---------- */
.art { display: inline-block; line-height: 0; }
.art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.art .l { fill: none; stroke: var(--art-ink); stroke-linecap: round; stroke-linejoin: round; }
.art .lv { fill: none; stroke: var(--art-v); stroke-linecap: round; stroke-linejoin: round; }
.art .lt { fill: none; stroke: var(--art-t); stroke-linecap: round; stroke-linejoin: round; }
.art .lw { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.art .lnet { fill: none; stroke: var(--line-2); }
.art .v { fill: var(--art-v); } .art .t { fill: var(--teal-fill); } .art .m { fill: var(--amber-fill); } .art .s { fill: var(--tint); } .art .p { fill: var(--surface); }
.art .tx { fill: var(--art-ink); } .art .txv { fill: var(--art-v); } .art .txt { fill: var(--art-t); } .art .txw { fill: #fff; }
.art .t { fill: var(--brass-fill); } .art .m { fill: var(--coral); }
[data-theme="night"] .art .v { fill: #2F8F80; }

/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--violet); background: var(--violet); color: #fff; font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
[data-theme="night"] .btn { background: #2F8F80; border-color: #2F8F80; }
.btn:hover { background: var(--violet-2); border-color: var(--violet-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-ghost, [data-theme="night"] .btn-ghost { background: transparent; color: var(--violet); }
.btn-ghost:hover, [data-theme="night"] .btn-ghost:hover { background: var(--tint); color: var(--violet); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 1.2em 0 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--tint); color: var(--violet); font-size: .88rem; font-weight: 600; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chips button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font: 500 .92rem/1.2 var(--font-body); cursor: pointer; min-height: 36px; }
.chips button:hover { border-color: var(--violet); color: var(--violet); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips-small button { padding: 4px 12px; min-height: 32px; font-size: .86rem; }
.lvl { display: inline-block; font-size: .8rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.lvl-beginner { background: var(--ok-bg); color: var(--teal); }
.lvl-intermediate { background: var(--tint); color: var(--violet); }
.lvl-advanced { background: var(--warn-bg); color: var(--amber); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar { width: min(1320px, 100% - 28px); margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 34px; height: 34px; display: block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark .v { fill: #0E5F55; } .brand-mark .t { fill: #D9A441; } .brand-mark .m { fill: #E06A4E; } .brand-mark .lw { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.brand-word { font: 800 1.32rem/1 var(--font-display); letter-spacing: -.02em; }
.brand-word span { color: var(--violet); }
.main-nav { flex: 1; }
.main-nav > ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; justify-content: center; }
.nav-group { position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 10px; border: 0; background: none; color: var(--ink); font: 500 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; }
.nav-btn svg { width: 11px; transition: transform .2s; }
.nav-btn:hover, .nav-group.open > .nav-btn { background: var(--surface-2); text-decoration: none; }
.nav-group.open > .nav-btn svg { transform: rotate(180deg); }
.nav-panel { position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s var(--ease); }
.nav-group.open .nav-panel { opacity: 1; visibility: visible; transform: none; }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .97rem; }
.nav-panel a:hover { background: var(--tint); color: var(--violet); }
.nav-lead { font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 4px; border-radius: 8px 8px 0 0 !important; }
.tools { display: flex; align-items: center; gap: 4px; flex: none; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 9px; border-radius: 10px; border: 0; background: none; color: var(--ink); cursor: pointer; font: 500 .92rem/1 var(--font-body); }
.tool svg { width: 21px; height: 21px; }
.tool:hover { background: var(--surface-2); }
.music-btn[aria-pressed="true"] { color: var(--violet); background: var(--tint); }
.install-btn { background: var(--tint); color: var(--violet); font-weight: 600; }
.install-btn:hover { background: var(--violet); color: #fff; }
.install-btn[hidden], .is-standalone .install-btn { display: none; }
.menu-btn { display: none; }
.lang-panel { width: min(1320px, 100% - 28px); margin: 0 auto 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.lang-panel[hidden] { display: none; }
.lang-title { margin: 0 0 10px; font-weight: 600; }
.lang-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lang-panel a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.lang-panel a b { font-size: 1.1rem; font-weight: 600; }
.lang-panel a span { font-size: .8rem; color: var(--ink-3); }
.lang-panel a:hover { border-color: var(--line); background: var(--surface-2); }
.lang-panel a[aria-current] { border-color: var(--violet); }
.notice-translate { width: min(var(--wrap), 100% - 40px); margin: 16px auto 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--warn-bg); color: var(--ink); font-size: .95rem; }

/* ---------- Home hero ---------- */
.p-hero { padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 5vw, 56px); background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px; background-color: var(--bg); position: relative; }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--bg)); pointer-events: none; }
.p-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.p-title { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.9rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: .45em; }
.p-line { font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; }
.p-search { display: flex; align-items: center; gap: 8px; margin-top: 22px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 5px 5px 5px 16px; max-width: 560px; box-shadow: var(--shadow); }
.p-search:focus-within { border-color: var(--violet); }
.p-search svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.p-search input[type="search"] { flex: 1; min-width: 0; min-height: 0; border: 0; background: none; font: inherit; color: var(--ink); padding: 8px 0; outline: none; box-shadow: none; }
.p-search .btn { min-height: 40px; }

/* ---------- Sections ---------- */
.section { padding: clamp(30px, 5vw, 56px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-sub { color: var(--ink-3); margin: -4px 0 18px; max-width: 70ch; }
.more { font-weight: 600; white-space: nowrap; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* Learning path (a real sequence) */
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: p; }
.path a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: start; height: 100%; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; transition: border-color .15s, transform .15s; }
.path a:hover { border-color: var(--violet); transform: translateY(-2px); }
.path-n { position: absolute; top: 12px; right: 14px; font: 700 .85rem/1 var(--font-mono); color: var(--ink-3); }
.path-art { grid-row: span 2; width: 52px; height: 52px; }
.path-art .art { width: 52px; height: 52px; }
.path-t { font: 700 1.05rem/1.3 var(--font-display); padding-right: 22px; }
.path-s { color: var(--ink-3); font-size: .92rem; }

.topics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.topic { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.topic:hover { border-color: var(--violet); }
.topic .art { width: 44px; height: 44px; margin-bottom: 6px; }
.topic b { font: 700 1rem/1.25 var(--font-display); }
.topic span { font-size: .86rem; color: var(--ink-3); }

/* ---------- Page head ---------- */
.page-head { padding: clamp(22px, 4vw, 44px) 0 clamp(14px, 3vw, 26px); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.page-head h1 { margin-bottom: .3em; }
.page-summary { font-size: 1.15rem; color: var(--ink-2); margin: 0; max-width: 62ch; }
.page-head-art { width: clamp(84px, 14vw, 150px); height: clamp(84px, 14vw, 150px); }
.page-head-art .art { width: 100%; height: 100%; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--violet); }
.crumbs a + a::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-3); font-size: .92rem; margin-top: 12px; }
.read-progress { position: sticky; top: 66px; height: 3px; z-index: 40; }
.read-progress i { display: block; height: 100%; width: 0; background: var(--violet); }
.guide-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 16px; font-size: .9rem; color: var(--ink-3); }
.save-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 .9rem/1.2 var(--font-body); cursor: pointer; min-height: 36px; }
.save-btn svg { width: 16px; height: 16px; }
.save-btn:hover { border-color: var(--violet); color: var(--violet); }
.save-btn.is-saved { background: var(--ok-bg); border-color: var(--teal); color: var(--teal); }
.save-btn.is-saved svg path { fill: currentColor; }
.save-btn[hidden] { display: none; }

/* ---------- Body and prose ---------- */
.page-body { padding: clamp(20px, 3.5vw, 40px) 0 20px; }
.page-body.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.prose { max-width: var(--measure); min-width: 0; }
.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--violet); }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--violet); background: var(--tint); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.prose img { height: auto; border-radius: var(--radius); }
.prose strong { font-weight: 600; }
pre.code { position: relative; margin: 1.2em 0; padding: 16px 18px; background: #0F2624; color: #E3EEEB; border-radius: var(--radius); overflow-x: auto; font: 400 .86rem/1.6 var(--font-mono); tab-size: 2; border: 1px solid rgba(255, 255, 255, .06); }
[data-theme="night"] pre.code { background: #081211; }
pre.code code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
pre.code[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-size: .72rem; color: #8FB3AC; text-transform: lowercase; pointer-events: none; }
pre.code .cp { position: absolute; top: 6px; right: 6px; opacity: 0; background: #1F4440; color: #fff; border: 0; border-radius: 6px; padding: 4px 10px; font: 600 .78rem/1.3 var(--font-body); cursor: pointer; transition: opacity .15s; }
pre.code:hover .cp, pre.code .cp:focus-visible { opacity: 1; }
pre.code[data-lang]:hover::before { opacity: 0; }
.tk-k { color: #7FD8C6; } .tk-s { color: #F2C46D; } .tk-c { color: #7F9C97; font-style: italic; } .tk-n { color: #F59A80; } .tk-a { color: #C9DDD8; } .tk-p { color: #6E8C87; }
.callout { padding: 12px 16px; border-radius: var(--radius-s); background: var(--tint); border-left: 4px solid var(--violet); }
.callout-warn { background: var(--warn-bg); border-left-color: var(--amber-fill); }
.pick-badge { display: inline-block; background: var(--warn-bg); color: var(--amber); font-weight: 600; padding: 4px 12px; border-radius: 999px; font-size: .9rem; }

.aside { position: sticky; top: 86px; display: grid; gap: 14px; min-width: 0; }
.facts-box, .keys-box, .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.facts-box h2, .keys-box h2, .toc h2 { font-size: 1rem; margin-bottom: 10px; }
.facts-box dl { margin: 0; display: grid; gap: 2px; }
.facts-box dt { font-size: .8rem; color: var(--ink-3); margin-top: 8px; }
.facts-box dt:first-child { margin-top: 0; }
.facts-box dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.facts-box p { margin: 14px 0 0; }
.keys-box { background: var(--tint); border-color: transparent; }
.keys-box ul { margin: 0; padding-left: 1.1em; font-size: .94rem; }
.keys-box li { margin: .35em 0; }
.keys-box li::marker { color: var(--violet); }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .93rem; }
.toc li { margin: .3em 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--violet); }
.page-support { margin-top: 2em; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px auto 20px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--violet); }
.pager small { color: var(--ink-3); }
.pager b { font-family: var(--font-display); }
.pager-next { text-align: right; grid-column: 2; }
.page-faq { margin-top: 2em; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s; min-width: 0; }
.card:hover { border-color: var(--violet); }
.card-media { width: 56px; height: 56px; }
.card-media .art, .card-art { width: 56px; height: 56px; }
.card-media img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-title { font: 700 1.03rem/1.3 var(--font-display); }
.card-text { color: var(--ink-3); font-size: .92rem; }
.card-meta { color: var(--ink-3); font-size: .8rem; font-weight: 500; overflow-wrap: anywhere; }
.related { margin-block: 26px 10px; }
.children { margin: 10px auto 20px; }

/* ---------- Hubs ---------- */
.intro-prose { padding: 22px 0 6px; }
.hub-tools { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-bottom: 10px; }
.filter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.hub-tools .filter { margin: 0; }
.filter input[type="search"] { width: 100%; }
.filter-count { margin: 10px 0 0; color: var(--ink-3); font-size: .9rem; }
.save-all { background: var(--tint); border-radius: var(--radius); padding: 14px 16px; }
.save-all .btn { width: 100%; }
.save-all p { margin: 8px 0 0; font-size: .86rem; }
.hub-sec { padding: 18px 0 8px; }
.hub-sec:not(:has([data-fi]:not([hidden]))):has([data-fi]) { display: none; }
.hub-sec h2 { display: flex; align-items: center; gap: 10px; }
.hub-ico { width: 38px; height: 38px; display: inline-block; }
.hub-ico .art { width: 38px; height: 38px; }
.g-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.g-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.g-card:hover { border-color: var(--violet); }
.g-card b { font: 700 1rem/1.3 var(--font-display); }
.g-card > span { color: var(--ink-3); font-size: .9rem; }
.g-card small { margin-top: auto; padding-top: 6px; color: var(--ink-3); font-size: .82rem; display: flex; gap: 8px; align-items: center; }
.g-card[hidden], .repo[hidden], .dir-item[hidden] { display: none; }
.empty { text-align: center; color: var(--ink-3); padding: 30px 0; }
input[type="text"], input[type="url"], input[type="email"], input[type="search"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 20%, transparent); }
textarea { resize: vertical; line-height: 1.5; }
.code-in { font: 400 .88rem/1.55 var(--font-mono); }
input[type="color"] { width: 46px; height: 40px; padding: 2px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; flex: none; }
input[type="range"] { accent-color: var(--violet); width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--violet); width: 18px; height: 18px; flex: none; }
.hint { font-size: .86rem; color: var(--ink-3); margin: 4px 0 0; }
.label { font-weight: 600; margin: 0; }

/* ---------- Forms (newsletter, contact) ---------- */
.field-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.field-row input { flex: 1; min-width: 0; }
.captcha-row { align-items: center; }
.captcha-row label { font-size: .92rem; color: var(--ink-2); }
.captcha-row input { flex: 0 0 80px; }
.form-fine { font-size: .82rem; color: var(--ink-3); margin-top: 8px; }
.form-title { font-weight: 700; margin: 0 0 8px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-weight: 500; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.letter-band { background: var(--ink); color: var(--bg); padding: clamp(30px, 5vw, 54px) 0; }
[data-theme="night"] .letter-band { background: var(--surface); color: var(--ink); }
.letter-inner { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; align-items: center; }
.letter-art .art { width: 110px; height: 110px; }
.letter-band .art .l { stroke: #D6E4E1; } .letter-band .art .s { fill: #1C3B37; }
.letter-band .newsletter-form { max-width: 620px; }
.letter-band h2 { color: inherit; }
.letter-band p { color: #A9C4BF; max-width: 62ch; }
[data-theme="night"] .letter-band p { color: var(--ink-2); }
.letter-band input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
[data-theme="night"] .letter-band input { background: var(--bg); color: var(--ink); border-color: var(--line-2); }
.letter-band .form-fine, .letter-band .captcha-row label { color: #A9C4BF; }
.newsletter-form .form-msg.ok { color: #7AD3C3; }

/* ---------- FAQ, gallery, sitemap, share, blog ---------- */
.faq-list { display: grid; gap: 8px; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font: 400 1.5rem/1 var(--font-mono); color: var(--violet); }
.faq[open] summary::after { content: "–"; }
.faq-a { padding: 0 16px 6px; color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 30px; }
.g-item { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.g-l { grid-column: span 2; }
.g-media { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--bg); border-radius: var(--radius-s); padding: 16px; }
.g-media svg { width: 100%; height: 100%; max-height: 160px; }
.g-item figcaption b { display: block; font-family: var(--font-display); }
.g-item figcaption span { font-size: .9rem; color: var(--ink-3); }
.g-media .l { fill: none; stroke: var(--art-ink); stroke-linecap: round; stroke-linejoin: round; } .g-media .lv { fill: none; stroke: var(--art-v); stroke-linecap: round; stroke-linejoin: round; }
.g-media .lt { fill: none; stroke: var(--art-t); stroke-linecap: round; stroke-linejoin: round; } .g-media .lw { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.g-media .v { fill: var(--violet); } .g-media .t { fill: var(--brass-fill); } .g-media .m { fill: var(--coral); } .g-media .s { fill: var(--tint); } .g-media .p { fill: var(--surface); }
.g-media .tx { fill: var(--art-ink); } .g-media .txv { fill: var(--art-v); } .g-media .txt { fill: var(--art-t); } .g-media .txw { fill: #fff; } .g-media .lnet { fill: none; stroke: var(--line-2); }
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; padding: 26px 0; }
.sitemap-grid ul { padding-left: 1.1em; margin: 0; font-size: .94rem; }
.sitemap-grid li { margin: .25em 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-3); }
.share-btn { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); text-decoration: none; font: 500 .88rem/1.2 var(--font-body); cursor: pointer; }
.share-btn:hover { border-color: var(--violet); color: var(--violet); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.blog-lead { margin-bottom: 18px; }
.search-form { display: flex; gap: 8px; max-width: 620px; margin: 0 0 18px; }
.search-form input { flex: 1; min-width: 0; }
.lightbox { border: 0; border-radius: var(--radius); padding: 0; max-width: min(900px, 94vw); background: var(--surface); color: var(--ink); }
.lightbox::backdrop { background: rgba(10, 12, 34, .75); }
.lb-close { position: absolute; right: 8px; top: 8px; border: 0; background: var(--surface); border-radius: 50%; width: 36px; height: 36px; font-size: 1.4rem; cursor: pointer; color: var(--ink); }

/* ---------- 404 and offline ---------- */
.not-found { text-align: center; padding: clamp(30px, 6vw, 70px) 0; }
.nf-art { display: block; width: min(320px, 80%); margin: 0 auto 18px; }
.nf-art svg { width: 100%; height: auto; }
.nf-art .l { fill: none; stroke: var(--art-ink); stroke-linecap: round; stroke-linejoin: round; } .nf-art .lt { fill: none; stroke: var(--art-t); stroke-linecap: round; } .nf-art .lv { fill: none; stroke: var(--art-v); stroke-linecap: round; }
.nf-art .v { fill: var(--violet); } .nf-art .t { fill: var(--brass-fill); } .nf-art .m { fill: var(--coral); } .nf-art .s { fill: var(--tint); } .nf-art .p { fill: var(--surface); } .nf-art .txv { fill: var(--art-v); }
.not-found .search-form { margin: 18px auto; }
.offline-page { text-align: left; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.offline-list { columns: 2 220px; padding-left: 1.1em; }
.offline-list li { margin: .3em 0; break-inside: avoid; }


/* ---------- Footer ---------- */
.site-footer { margin-top: 30px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-toran { line-height: 0; overflow: hidden; }
.footer-toran svg { width: 100%; height: 56px; display: block; }
.footer-toran .lnet { fill: none; stroke: var(--line-2); }
.footer-toran .v { fill: var(--violet); } .footer-toran .t { fill: var(--brass-fill); } .footer-toran .m { fill: var(--coral); } .footer-toran .p { fill: var(--surface-3); }
.footer-grid { width: min(var(--wrap), 100% - 40px); margin: 0 auto; display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 28px; padding: 26px 0 30px; }
.footer-about p { color: var(--ink-3); font-size: .94rem; }
.brand-foot { margin-bottom: 12px; }
.footer-col h2 { font: 700 .95rem/1.2 var(--font-display); margin-bottom: 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.footer-col a:hover { color: var(--violet); text-decoration: underline; }
.footer-about .newsletter-form { margin-top: 12px; }
.footer-notice { width: min(var(--wrap), 100% - 40px); margin: 0 auto 14px; color: var(--ink-3); font-size: .88rem; }
.footer-langs { width: min(var(--wrap), 100% - 40px); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.footer-langs a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.footer-base { width: min(var(--wrap), 100% - 40px); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 0 30px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-3); }
.footer-base p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-legal a { color: var(--ink-3); }

/* ---------- Overlays: consent, toast, top, fx ---------- */
.consent { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: .94rem; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.sw-toast { position: fixed; z-index: 85; left: 50%; bottom: 18px; translate: -50% 16px; opacity: 0; display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); padding: 10px 10px 10px 18px; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100% - 24px); transition: opacity .25s, translate .3s var(--ease); }
[data-theme="night"] .sw-toast { background: #E7F0EE; color: #132B2A; }
.sw-toast.show { opacity: 1; translate: -50% 0; }
.sw-toast[hidden] { display: none; }
.sw-toast-text { margin: 0; font-size: .94rem; }
.sw-toast-btn { min-height: 34px; padding: 5px 14px; background: var(--teal-fill) !important; border-color: var(--teal-fill) !important; color: #241800 !important; }
.sw-toast-btn[hidden] { display: none; }
.sw-toast-x { border: 0; background: none; color: inherit; font-size: 1.3rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; opacity: .7; }
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; }
canvas.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
.is-standalone .site-header { padding-top: env(safe-area-inset-top); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-grid, .repo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .main-nav { position: fixed; inset: 66px 0 0 0; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 40px; opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none; transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s linear .3s; }
  .main-nav.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .nav-btn { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-panel { position: static; translate: none; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; background: none; padding: 4px 0 10px 10px; }
  .nav-group.open .nav-panel { display: block; }
  .tools { margin-left: auto; }
  .p-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-grid, .repo-grid, .repo-grid-full, .g-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-body.has-aside, .hub-tools { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .dir-list { grid-template-columns: minmax(0, 1fr); }
  .contact-layout, .mask-tool, .offline-page { grid-template-columns: minmax(0, 1fr); }
  .g-l { grid-column: auto; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .bar { height: 60px; gap: 8px; }
  .main-nav { inset: 60px 0 0 0; }
  .brand-word { font-size: 1.18rem; }
  .brand-mark { width: 30px; height: 30px; }
  .lang-btn span, .install-label { display: none; }
  .tool { padding: 0 6px; min-width: 38px; }
  .path, .topics, .tool-grid, .repo-grid, .repo-grid-full, .g-list { grid-template-columns: minmax(0, 1fr); }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swd-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .page-head-inner { grid-template-columns: minmax(0, 1fr); }
  .page-head-art { display: none; }
  .sc-head .page-head-art { display: block; }
  .mono-xl { width: 90px; height: 90px; font-size: 2.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .letter-inner { grid-template-columns: minmax(0, 1fr); }
  .letter-art { display: none; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: 1; }
  .row-input { flex-direction: column; }
  .ck-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .st { justify-self: start; }
  .save-btn { margin-left: 0; }
  .sw-toast { border-radius: 16px; left: 12px; right: 12px; translate: 0 16px; max-width: none; }
  .sw-toast.show { translate: 0 0; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .topics { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .swd-stats { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .share, .consent, .to-top, .sw-toast, .save-btn, .letter-band, canvas.fx, .aside { display: none !important; }
  .page-body.has-aside { display: block; }
  pre.code { white-space: pre-wrap; background: #fff; color: #000; border: 1px solid #ccc; }
}
.prose { overflow-wrap: break-word; }
.prose p, .prose li { overflow-wrap: anywhere; }

/* =====================================================================
   Punchout Pro components
   ===================================================================== */
h1, h2, .brand-word { font-stretch: 106%; }
h1 { letter-spacing: -.02em; }
.btn, .chips button, .save-btn, .p-search, .chip, .lvl { border-radius: 6px; }
.p-search { padding-left: 14px; }
.brand-word span { color: var(--brass); }
::selection { background: color-mix(in srgb, var(--brass-fill) 45%, transparent); }

/* Hero: a plain statement, the round trip does the showing */
.po-hero { padding: clamp(28px, 4.5vw, 56px) 0 clamp(18px, 2.5vw, 28px); background: var(--bg); }
.po-hero-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.po-title { font-size: clamp(2rem, 1.2rem + 2.5vw, 3.25rem); font-stretch: 104%; line-height: 1.06; letter-spacing: -.025em; font-weight: 800; margin-bottom: .45em; max-width: 24ch; text-wrap: pretty; }
.po-line { font-size: clamp(1.04rem, 1rem + .25vw, 1.18rem); color: var(--ink-2); max-width: 56ch; }
.po-hero .hero-actions { margin-top: 18px; }
.po-hero .p-search { margin-top: 18px; max-width: 540px; }
.po-paths { display: flex; flex-direction: column; gap: 10px; }
.po-paths h2 { font-size: 1rem; font-stretch: 100%; color: var(--ink-3); font-weight: 700; margin: 0 0 2px; }
.po-path { display: block; padding: 14px 16px 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--violet); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.po-path:hover { border-color: var(--violet); transform: translateX(3px); text-decoration: none; }
.po-path-buyer { border-left-color: var(--brass-fill); }
.po-path-dev { border-left-color: var(--coral); }
.po-path b { display: block; font: 700 1.05rem/1.3 var(--font-display); }
.po-path span { display: block; color: var(--ink-3); font-size: .93rem; margin-top: 2px; }

/* The round trip */
.rt-wrap { padding: 8px 0 clamp(30px, 5vw, 60px); }
.rt { background: var(--jade-deep); color: #E3EEEB; border-radius: var(--radius-l); padding: clamp(18px, 3vw, 34px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "head head" "stage steps" "ctrl steps"; gap: 14px 34px; position: relative; overflow: hidden; }
.rt::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 20% 40%, rgba(217, 164, 65, .10), transparent 70%), radial-gradient(50% 60% at 90% 90%, rgba(92, 196, 178, .12), transparent 70%); pointer-events: none; }
.rt > * { position: relative; }
.rt-head { grid-area: head; max-width: 70ch; }
.rt-head h2 { color: #fff; margin-bottom: .25em; }
.rt-head p { color: #A9C4BF; margin: 0; }
.rt-stage { grid-area: stage; align-self: start; position: sticky; top: 90px; }
.rt-svg { width: 100%; height: auto; display: block; font-family: var(--font-body); overflow: visible; }
.rt-win > rect { fill: #12302C; stroke: rgba(227, 238, 235, .22); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.rt-bar { fill: rgba(227, 238, 235, .08); }
.rt-win circle { fill: rgba(227, 238, 235, .28); }
.rt-wt { fill: #fff; font: 700 15px var(--font-display); font-stretch: 112%; }
.rt-ws { fill: #8FB3AC; font-size: 12px; }
.rt-line { fill: rgba(227, 238, 235, .14); }
.rt-shelf rect { fill: rgba(217, 164, 65, .22); stroke: rgba(217, 164, 65, .5); stroke-width: 1; }
.rt-route { fill: none; stroke: rgba(227, 238, 235, .22); stroke-width: 2.5; stroke-dasharray: 3 8; stroke-linecap: round; transition: stroke .3s; }
.rt-rl { fill: #8FB3AC; font: 600 12px var(--font-mono); }
.rt-token circle:first-child { fill: #D9A441; }
.rt-token path { fill: none; stroke: #1B1200; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rt-wheel { fill: #1B1200; }
.rt-stamp { opacity: 0; transition: opacity .3s; }
.rt-stamp circle { fill: #2F8F80; }
.rt-stamp path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rt[data-who="buyer"] .rt-win-buyer > rect, .rt[data-who="supplier"] .rt-win-supplier > rect { stroke: #D9A441; fill: #15382F; }
.rt[data-step="1"] .rt-route-out, .rt[data-step="6"] .rt-route-out { stroke: #D9A441; stroke-dasharray: none; }
.rt[data-step="2"] .rt-route-back, .rt[data-step="4"] .rt-route-back, .rt[data-step="7"] .rt-route-back { stroke: #E06A4E; stroke-dasharray: none; }
.rt[data-step="5"] .rt-stamp, .rt[data-step="6"] .rt-stamp, .rt[data-step="7"] .rt-stamp { opacity: 1; }
.rt[data-step="4"] .rt-token circle:first-child, .rt[data-step="2"] .rt-token circle:first-child, .rt[data-step="7"] .rt-token circle:first-child { fill: #E06A4E; }
.rt-steps { grid-area: steps; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: none; }
.rt-tab { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 8px 10px; color: #CFE0DC; font: 600 1rem/1.3 var(--font-body); cursor: default; }
.rt-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(227, 238, 235, .35); font: 600 .82rem/1 var(--font-mono); }
.rt-detail { padding: 2px 10px 12px 50px; }
.rt-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 6px; font-size: .8rem; color: #8FB3AC; }
.rt-who { font-weight: 700; }
.rt-who-buyer { color: #E2B456; } .rt-who-supplier { color: #F08A6E; }
.rt-msg { color: #fff; font-size: .8rem; }
.rt-text { color: #CFE0DC; margin: 0 0 8px; font-size: .97rem; }
.rt-code { margin: 0; font-size: .78rem; background: #081A18; border-color: rgba(255, 255, 255, .08); max-height: 260px; }
.rt.is-live .rt-tab { cursor: pointer; }
.rt.is-live .rt-tab:hover { background: rgba(227, 238, 235, .06); }
.rt.is-live .rt-step:not(.is-on) .rt-detail { display: none; }
.rt.is-live .rt-step.is-on { background: rgba(227, 238, 235, .05); border-radius: 8px; }
.rt.is-live .rt-step.is-on .rt-tab { color: #fff; }
.rt.is-live .rt-step.is-on .rt-n { background: #D9A441; border-color: #D9A441; color: #1B1200; }
.rt.is-live .rt-step.is-done .rt-n { border-color: #5CC4B2; color: #5CC4B2; }
.rt { grid-template-rows: auto auto 1fr; }
.rt-controls { grid-area: ctrl; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rt-controls[hidden] { display: none; }
.rt-controls .btn { background: #D9A441; border-color: #D9A441; color: #1B1200; }
.rt-controls .btn-ghost { background: transparent; color: #E3EEEB; border-color: rgba(227, 238, 235, .35); }
.rt-controls .btn-ghost:hover { background: rgba(227, 238, 235, .08); color: #fff; }
.rt-controls .more { color: #E2B456; margin-left: auto; }
.rt :focus-visible { outline-color: #E2B456; }

/* Reference strip and flow */
.ref-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ref-chip { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--brass-fill); background: var(--bg); color: var(--ink); text-decoration: none; min-width: 0; }
.ref-chip .mono { font-weight: 600; color: var(--violet); overflow-wrap: anywhere; }
.ref-chip small { color: var(--ink-3); font-size: .88rem; }
.ref-chip:hover { border-color: var(--violet); border-left-color: var(--coral); }
.ref-flow { list-style: none; margin: 10px 0 20px; padding: 0; counter-reset: rf; display: grid; gap: 8px; }
.ref-flow li { counter-increment: rf; }
.ref-item { display: grid; grid-template-columns: 44px minmax(0, 15rem) minmax(0, 12rem) minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ref-item::before { content: counter(rf, decimal-leading-zero); font: 600 .85rem/1 var(--font-mono); color: var(--brass); }
.ref-item:hover { border-color: var(--violet); }
.ref-name { font-weight: 600; color: var(--violet); overflow-wrap: anywhere; }
.ref-dir { font-size: .84rem; color: var(--ink-3); }
.ref-sum { color: var(--ink-2); font-size: .94rem; }

/* Platforms */
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.band .pf-card { background: var(--bg); }
.pf-card:hover { border-color: var(--violet); }
.pf-card[hidden] { display: none; }
.pf-card .pf-tile { grid-row: span 3; }
.pf-card b { font: 700 1rem/1.25 var(--font-display); overflow-wrap: anywhere; }
.pf-vendor { font-size: .82rem; color: var(--ink-3); }
.pf-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-tags i { font: 600 .72rem/1 var(--font-mono); font-style: normal; padding: 3px 6px; border-radius: 4px; background: var(--tint); color: var(--violet); }
.pf-tile { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--violet); color: #fff; font: 800 1.2rem/1 var(--font-display); font-stretch: 112%; position: relative; flex: none; }
.pf-tile::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 3px; background: var(--brass-fill); }
.pf-tile-xl { width: clamp(96px, 16vw, 150px); height: clamp(96px, 16vw, 150px); border-radius: 16px; font-size: clamp(2.8rem, 6vw, 4.6rem); }
.pf-tile-xl::after { width: 30%; height: 30%; right: -8px; bottom: -8px; border-radius: 8px; }
.pf-head .page-head-art { width: auto; height: auto; }
.pf-kind { margin: 0 0 6px; color: var(--brass); font-weight: 700; font-size: .92rem; }
.hub-links { margin: 0 0 14px; }
.hub-note { margin: -6px 0 12px; }
.small { font-size: .85rem; }

/* Compatibility matrix */
.mx-scroll { overflow-x: auto; contain: paint; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 1.2em 0; }
.mx { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .9rem; }
.mx th, .mx td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mx thead th { background: var(--surface-2); font-weight: 700; position: sticky; top: 0; }
.mx tbody th { font-weight: 600; white-space: nowrap; }
.mx-group th { background: var(--tint); color: var(--violet); font: 700 .86rem/1.2 var(--font-display); font-stretch: 112%; }
.mx-tag { display: inline-block; margin: 0 4px 4px 0; font: 600 .74rem/1.2 var(--font-mono); padding: 2px 6px; border-radius: 4px; background: var(--surface-2); }
.mx-yes { color: var(--teal); font-weight: 600; }
.mx-vary { color: var(--amber); }
.mx-na { color: var(--ink-3); }
.prose .mx-scroll table { margin: 0; }

/* Services and industries */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.band .svc-card { background: var(--bg); }
.svc-card:hover { border-color: var(--violet); }
.svc-art { width: 48px; height: 48px; margin-bottom: 4px; }
.svc-art .art { width: 48px; height: 48px; }
.svc-card b { font: 700 1.06rem/1.3 var(--font-display); }
.svc-card > span { color: var(--ink-3); font-size: .93rem; }
.svc-card ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: .9rem; }
.chips-links a { display: inline-flex; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.chips-links a:hover { border-color: var(--violet); color: var(--violet); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin: 26px 0 10px; padding: clamp(20px, 3vw, 30px); border-radius: var(--radius-l); background: var(--jade-deep); color: #E3EEEB; }
.cta-band h2 { color: #fff; margin: 0 0 .25em; }
.cta-band p { margin: 0; color: #A9C4BF; max-width: 60ch; }
.cta-band .btn { background: #D9A441; border-color: #D9A441; color: #1B1200; }
.cta-band .btn:hover { background: #E2B456; border-color: #E2B456; }
.footer-company a { color: inherit; }

@media (max-width: 1100px) {
  .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .rt { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "ctrl" "steps"; grid-template-rows: none; }
  .po-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .rt-stage { position: static; }
  .ref-strip, .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-item { grid-template-columns: 36px minmax(0, 1fr); }
  .ref-dir, .ref-sum { grid-column: 2; }
}
@media (max-width: 640px) {
  .ref-strip, .svc-grid, .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .rt-detail { padding-left: 10px; }
  .rt-controls .more { margin-left: 0; width: 100%; }
  .pf-head .page-head-art { display: block; }
  .pf-tile-xl { width: 84px; height: 84px; font-size: 2.4rem; }
}
.page-body > *, .prose { min-width: 0; } .prose pre.code { max-width: 100%; }

/* Footer: three link columns, balanced against the about block */
.footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.rt-legend { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(227, 238, 235, .14); width: 100%; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: #CFE0DC; }
.rt-legend li { display: flex; align-items: center; gap: 8px; }
.rt-key { display: inline-block; width: 26px; height: 0; border-top: 3px solid #D9A441; border-radius: 2px; }
.rt-key-back { border-color: #E06A4E; }
.rt-note { margin: 10px 0 0; color: #A9C4BF; font-size: .9rem; max-width: 62ch; }
.rt-code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Round trip, live layout: tab row across, diagram and the current step side by side */
.rt.is-live { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; grid-template-areas: "head head" "tabs tabs" "stage panel" "ctrl panel"; gap: 18px 40px; }
.rt-tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; border-bottom: 1px solid rgba(227, 238, 235, .14); padding-bottom: 12px; }
.rt.is-live .rt-tab { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 8px; font-size: .9rem; line-height: 1.25; color: #A9C4BF; cursor: pointer; height: 100%; position: relative; }
.rt.is-live .rt-tab:hover { background: rgba(227, 238, 235, .06); color: #fff; }
.rt.is-live .rt-tab.is-on { background: rgba(217, 164, 65, .12); color: #fff; }
.rt.is-live .rt-tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -13px; height: 3px; border-radius: 2px; background: #D9A441; }
.rt.is-live .rt-tab.is-on .rt-n { background: #D9A441; border-color: #D9A441; color: #1B1200; }
.rt.is-live .rt-tab.is-done .rt-n { border-color: #5CC4B2; color: #5CC4B2; }
.rt-panel { grid-area: panel; align-self: start; background: rgba(227, 238, 235, .05); border: 1px solid rgba(227, 238, 235, .1); border-radius: 10px; padding: 18px 20px; min-height: 100%; }
.rt.is-live .rt-detail { padding: 0; }
.rt.is-live .rt-detail[hidden] { display: none; }
.rt-panel .rt-text { font-size: 1.02rem; }
.rt.is-live .rt-stage { position: static; align-self: center; }
@media (max-width: 980px) {
  .rt.is-live { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "tabs" "stage" "ctrl" "panel"; }
  .rt-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .rt.is-live .rt-tab { flex: 0 0 auto; width: 132px; scroll-snap-align: start; }
}
