/* Shared Working Principle presentation; all reviewed copy remains server-rendered. */
.ds-page .ds-working { display:grid; gap:20px; min-width:0; color:#182c38; }
.ds-working [hidden] { display:none!important; }
.ds-working-guide { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:20px; align-items:start; }
.ds-working-guide>section:only-child { grid-column:1/-1; }
.ds-page .ds-working-card { min-width:0; margin:0; border:1px solid #bdddeb; border-radius:8px; background:#fff; overflow:hidden; box-shadow:0 4px 15px #22627b0d; }
.ds-page .ds-working-heading { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid #0496d1; background:linear-gradient(112deg,#00badc,#0798ee); }
.ds-working-heading>div { min-width:0; flex:1; }
.ds-page .ds-working-heading h2 { margin:0 0 3px; font-size:17px; line-height:1.35; font-weight:700; letter-spacing:0; color:white; }
.ds-page .ds-working-heading p { margin:0; color:#f4fcff; font-size:11px; line-height:1.5; }
.ds-working-heading>.ds-icon-tile { width:40px; height:40px; border-radius:9px; flex:none; }
.ds-working-heading>.ds-icon-tile .ds-icon { width:25px; height:25px; }
.ds-working-expand { display:flex; align-items:center; justify-content:center; width:32px; height:32px; flex:none; color:white; border:1px solid #ffffff75; border-radius:6px; background:#ffffff20; }
.ds-working-expand:hover { background:#ffffff50; }
.ds-working-image { display:grid; place-items:center; padding:14px; background:linear-gradient(145deg,#f5faff,#fff); }
.ds-working-image img { display:block; width:100%; height:auto; max-height:540px; object-fit:contain; border-radius:4px; }
.ds-page .ds-working-diagram figcaption { display:flex; gap:7px; align-items:center; padding:11px 15px; border-top:1px solid #cbe6f3; background:#eaf7ff; font-size:11px; line-height:1.5; color:#31556b; }
.ds-working-diagram figcaption .ds-icon { width:16px; height:16px; flex:none; }
.ds-working-step-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:14px; border-bottom:1px solid #d5e8f2; background:#f6fbfe; }
.ds-working button { font:inherit; cursor:pointer; }
.ds-working-step-picker button { --working-accent:#087bb8; display:flex; align-items:center; text-align:left; gap:9px; min-width:0; padding:9px 10px; border:1px solid #d3e4ee; border-radius:7px; background:#fff; color:#18394c; font-size:12px; line-height:1.4; transition:background .15s,border-color .15s,box-shadow .15s; }
.ds-working-step-picker button.amber { --working-accent:#ac740a; }
.ds-working-step-picker button.violet { --working-accent:#8052bf; }
.ds-working-step-picker button.mint { --working-accent:#0b8b72; }
.ds-working-step-picker button.rose { --working-accent:#bf4565; }
.ds-working-step-picker button:hover { border-color:var(--working-accent); background:color-mix(in srgb,var(--working-accent),white 94%); }
.ds-working-step-picker button[aria-pressed="true"] { border-color:var(--working-accent); background:linear-gradient(115deg,#fff,color-mix(in srgb,var(--working-accent),white 85%)); box-shadow:inset 3px 0 var(--working-accent),0 2px 6px #315c7115; }
.ds-working-step-picker .ds-icon-tile { width:31px; height:31px; border-radius:7px; flex:none; }
.ds-working-step-picker .ds-icon { width:19px; height:19px; }
.ds-working-step-picker small { display:block; margin-bottom:2px; font-size:10px; font-weight:600; color:#526d7d; }
.ds-working-step-content { padding:20px; }
.ds-working-step:not([hidden])~.ds-working-step:not([hidden]) { margin-top:20px; padding-top:20px; border-top:1px dashed #c7dfeb; }
.ds-working-step-number { display:inline-block; padding:4px 9px; background:#eaf6ff; border:1px solid #c5e2f4; border-radius:5px; color:#136a98; font-size:11px; font-weight:650; }
.ds-page .ds-working-step h3 { margin:12px 0 10px; color:#142e40; font-size:19px; line-height:1.4; letter-spacing:-.2px; }
.ds-page .ds-working-step p { margin:0 0 12px; font-size:14px; line-height:1.8; color:#1d303c; }
.ds-working-step p:last-child { margin-bottom:0; }
.ds-working-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:12px 14px; border-top:1px solid #d0e6f1; background:#f3faff; }
.ds-working-controls button { display:inline-flex; align-items:center; justify-content:center; gap:6px; background:#fff; border:1px solid #b9d7e7; border-radius:6px; padding:7px 10px; color:#145e86; font-size:11px; font-weight:600; }
.ds-working-controls button:hover:not(:disabled) { background:#dff4ff; border-color:#4ea3cc; }
.ds-working-controls button:disabled { opacity:.45; cursor:default; }
.ds-working-controls .ds-icon { width:16px; height:16px; }
.ds-working-back { display:flex; transform:rotate(180deg); }
.ds-working-controls [role="status"] { flex:1; text-align:center; font-size:11px; color:#36586a; }
.ds-working-controls [data-working-all] { margin-left:6px; }
.ds-working-controls [aria-pressed="true"] { background:#ddf3ff; }
.ds-page .ds-working-takeaway { display:flex; align-items:center; gap:13px; margin:0; padding:15px 18px; background:linear-gradient(105deg,#ecfbf4,#f8fffc); border:1px solid #badfce; border-radius:8px; }
.ds-working-takeaway>.ds-icon-tile { width:38px; height:38px; flex:none; }
.ds-page .ds-working-takeaway h2 { margin:0 0 5px; font-size:14px; color:#195943; }
.ds-page .ds-working-takeaway p { margin:0; font-size:13px; line-height:1.7; color:#244437; }
.ds-working-mode { border:1px solid #ffffff70; background:#ffffff20; color:#fff; padding:5px 9px; border-radius:5px; font-size:10px; white-space:nowrap; }
.ds-working-channels { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; padding:16px; border-bottom:1px solid #d2e6f1; background:#f6fbff; }
.ds-working-channels button { display:grid; grid-template-columns:21px 1fr; column-gap:8px; row-gap:3px; text-align:left; padding:11px 12px; border:1px solid #c6dfed; border-radius:7px; background:white; color:#23475e; font-size:13px; font-weight:650; }
.ds-working-channels .ds-icon { grid-row:1/3; align-self:center; width:21px; height:21px; color:#1784b5; }
.ds-working-channels small { grid-column:2; font-weight:400; font-size:10px; color:#48667a; }
.ds-working-channels button:hover { border-color:#0a96d1; background:#effaff; }
.ds-working-channels button[aria-pressed="true"] { border-color:#0797d4; background:linear-gradient(110deg,#edfaff,#d8f2ff); box-shadow:inset 0 -2px #069ed9; }
.ds-working-signal-panel { padding:18px 20px; }
.ds-page .ds-working-signal-panel h3 { font-size:17px; margin:0 0 6px; color:#17374d; }
.ds-page .ds-working-signal-panel>p { margin:0; font-size:13px; line-height:1.7; }
.ds-working-levels { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:14px 0; }
.ds-working-levels>span { font-size:12px; font-weight:600; color:#325569; margin-right:5px; }
.ds-working-levels button { font-size:12px; font-weight:600; padding:8px 13px; border:1px solid #b9d8e8; border-radius:6px; background:#fff; color:#1a5776; }
.ds-working-levels button[aria-pressed="true"] { color:#fff; background:#087fb8; border-color:#087fb8; box-shadow:inset 0 1px #ffffff40; }
.ds-working-levels button:hover { border-color:#087fb8; }
.ds-working-signal-flow { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,.8fr) minmax(0,1fr); align-items:center; gap:16px; margin-top:14px; }
.ds-working-port { min-width:0; border:1px solid #b8dcef; border-radius:7px; padding:14px 18px 6px; background:linear-gradient(130deg,#f7fcff,#e6f5ff); }
.ds-working-output { border-color:#d8c7f0; background:linear-gradient(130deg,#fdfbff,#f0e9fc); }
.ds-working-port>span { font-size:10px; text-transform:uppercase; letter-spacing:1px; font-weight:650; color:#42677d; }
.ds-page .ds-working-port h4 { font-size:12px; margin:8px 0 14px; color:#263f51; line-height:1.5; }
.ds-working-port>strong { display:block; font-size:25px; letter-spacing:.5px; color:#086aa0; }
.ds-working-output>strong { color:#7952af; }
.ds-working-port>small { display:block; font-size:11px; color:#3d5b6d; margin-top:4px; }
.ds-working-port>svg { display:block; width:100%; height:48px; margin-top:5px; overflow:visible; }
.ds-working-baseline { stroke:#91afc2; stroke-width:1; stroke-dasharray:3 4; fill:none; }
.ds-working-level-trace { stroke:#079bd1; stroke-width:3; fill:none; stroke-linecap:round; }
.ds-working-output .ds-working-level-trace { stroke:#8c64c8; }
.ds-working-transfer { display:flex; align-items:center; gap:8px; text-align:center; color:#1a91bd; }
.ds-working-transfer>.ds-icon { width:25px; height:25px; flex:none; }
.ds-working-transfer>div { flex:1; min-width:0; padding:13px 8px; border:1px solid #2a5064; border-radius:8px; background:linear-gradient(135deg,#234d64,#163144); color:#fff; box-shadow:0 4px 12px #14334724; }
.ds-working-transfer span { font-size:13px; font-weight:700; letter-spacing:1px; }
.ds-working-transfer svg:not(.ds-icon) { display:block; width:100%; height:62px; fill:none; stroke:#b1eaff; stroke-width:2; }
.ds-working-transfer strong { display:block; font-size:10px; line-height:1.4; font-weight:500; }
.ds-page .ds-working-signal-panel .ds-working-signal-result { margin-top:16px; padding:10px 13px; border-left:3px solid #1397d1; border-radius:0 5px 5px 0; background:#edf8ff; color:#214a62; font-size:13px; }
.ds-working-signal-note { display:flex; gap:10px; align-items:center; padding:12px 18px; border-top:1px solid #d2e7f1; background:#f6fbff; color:#466276; }
.ds-working-signal-note>.ds-icon { width:20px; height:20px; flex:none; }
.ds-page .ds-working-signal-note p { margin:0; font-size:11px; line-height:1.65; }
.ds-working-related { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.ds-working-related a { display:flex; align-items:center; gap:12px; padding:16px; color:#163e54; text-decoration:none; background:linear-gradient(110deg,#fff,#eff9ff); border:1px solid #c5e0ef; border-radius:8px; }
.ds-working-related a:hover { border-color:#55acd4; background:#e9f7ff; }
.ds-working-related .ds-icon-tile { width:38px; height:38px; flex:none; }
.ds-working-related a>span:nth-child(2) { flex:1; }
.ds-working-related strong { display:block; font-size:13px; line-height:1.5; }
.ds-working-related small { display:block; font-size:11px; margin-top:4px; line-height:1.5; color:#3f6177; }
.ds-working-related a>.ds-icon { width:18px; height:18px; flex:none; }
.ds-working-source { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:17px; border:1px solid #bcdcec; border-radius:8px; background:#f0f9ff; }
.ds-working-source>div { flex:1; min-width:180px; }
.ds-working-source strong { font-size:13px; color:#193d52; }
.ds-page .ds-working-source p { margin:5px 0 0; font-size:11px; line-height:1.7; color:#3d5f72; }
.ds-working-source a { display:inline-flex; gap:6px; align-items:center; border:1px solid #badbeb; padding:9px 11px; border-radius:6px; color:#086897; background:#fff; text-decoration:none; font-size:11px; font-weight:600; }
.ds-working-source a:hover { background:#def3ff; }
.ds-working-source a .ds-icon { width:16px; height:16px; }
.ds-working :is(button,a):focus-visible { outline:3px solid #f1b737; outline-offset:3px; }
@media(min-width:1200px) { .ds-working-step-content { min-height:240px; } }
@media(max-width:1050px) { .ds-working-guide { grid-template-columns:1fr; } .ds-working-image img { max-height:480px; } }
@media(max-width:700px) {
 .ds-working-guide { gap:14px; }
 .ds-working-channels { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; }
 .ds-working-heading { flex-wrap:wrap; }
 .ds-working-mode { display:none; }
 .ds-working-signal-flow { grid-template-columns:1fr; gap:12px; }
 .ds-working-transfer { justify-content:center; }
 .ds-working-transfer>div { flex:0 1 180px; }
 .ds-working-transfer>.ds-icon { transform:rotate(90deg); }
 .ds-working-port { display:grid; grid-template-columns:1fr auto; column-gap:8px; }
 .ds-working-port h4 { grid-column:1; margin:6px 0; }
 .ds-working-port>strong { grid-column:2; grid-row:1/3; align-self:center; font-size:22px; }
 .ds-working-port>svg { grid-column:1/-1; height:32px; }
 .ds-working-source>div { flex-basis:70%; }
}
@media(max-width:430px) {
 .ds-page .ds-working-heading { padding:12px; gap:9px; }
 .ds-page .ds-working-heading h2 { font-size:16px; }
 .ds-working-heading>.ds-icon-tile { width:34px; height:34px; }
 .ds-working-step-picker { grid-template-columns:1fr; padding:12px; }
 .ds-working-step-content,.ds-working-signal-panel { padding:15px; }
 .ds-working-controls [data-working-all] { width:100%; margin:2px 0 0; }
 .ds-working-channels button { font-size:12px; padding:9px; }
 .ds-working-takeaway { align-items:flex-start; }
}
@media(prefers-reduced-motion:reduce) { .ds-working button { transition:none; } }
