.decoder-tool-wrap { padding-top: 48px; padding-bottom: 88px; }
.schain-decoder { margin: 58px 0 76px; border: 1px solid #bdccc2; background: #fff; box-shadow: 0 28px 70px rgba(22, 57, 43, .08); }
.technical-article .article-body > .schain-decoder { width: min(1120px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
.article-body .schain-decoder section { margin-bottom: 0; }
.decoder-tool-wrap .schain-decoder { margin-top: 0; }
.decoder-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); gap: 32px; align-items: end; padding: 34px 36px; border-bottom: 1px solid #d6ded8; background: #fff; }
.decoder-kicker { margin: 0 0 9px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.decoder-intro h2 { margin: 0; font-family: var(--serif); font-size: clamp(35px, 4.5vw, 50px); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.decoder-intro-copy { max-width: 560px; margin: 13px 0 0; color: #526059; font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.decoder-private { display: flex; gap: 12px; align-items: flex-start; justify-self: end; max-width: 390px; padding: 15px 16px; border: 1px solid #c6d5cb; background: #f4f8f5; color: #3f5047; font-size: 12px; line-height: 1.5; }
.decoder-private-mark { display: inline-flex; width: 24px; height: 24px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-weight: 700; }
.decoder-private strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 12px; }
.decoder-workspace { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 660px; }
.decoder-input-panel { display: flex; min-width: 0; flex-direction: column; padding: 28px; border-right: 1px solid #d6ded8; background: #f8faf8; }
.decoder-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.decoder-label-row label { color: #173d2f; font-size: 13px; font-weight: 700; }
.decoder-label-row span { color: #75867d; font-size: 10px; }
.decoder-editor { position: relative; min-height: 470px; flex: 1; overflow: hidden; border: 1px solid #bdcbc2; border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 62, 46, .02); }
.decoder-editor:focus-within { border-color: #347a59; box-shadow: 0 0 0 3px rgba(52, 122, 89, .12); }
.decoder-highlight, .decoder-input { width: 100%; height: 100%; min-height: 470px; margin: 0; padding: 20px; border: 0; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: 0; tab-size: 2; white-space: pre; overflow: auto; }
.decoder-highlight { position: absolute; inset: 0; z-index: 1; overflow: hidden; color: #294a3e; background: #fff; pointer-events: none; }
.decoder-highlight code { font: inherit; }
.decoder-input { position: relative; z-index: 2; display: block; resize: vertical; outline: 0; color: transparent; -webkit-text-fill-color: transparent; caret-color: #123f2e; background: transparent; }
.decoder-input::placeholder { color: #809087; -webkit-text-fill-color: #809087; }
.decoder-input::selection { background: rgba(81, 151, 112, .24); }
.json-editor-key { color: #075d88; }
.json-editor-string { color: #197147; }
.json-editor-number { color: #9a4a05; }
.json-editor-boolean { color: #7340a2; font-weight: 700; }
.json-editor-null { color: #8a445a; font-weight: 700; }
.json-editor-punctuation { color: #52635b; }
.json-editor-invalid { color: #a33d2a; text-decoration: underline wavy #d58978; }
.decoder-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.decoder-button { min-height: 44px; padding: 10px 15px; border: 1px solid #aabbb0; border-radius: 3px; color: #204838; background: #fff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.decoder-button:hover { border-color: #587d6b; color: #123f2e; background: #f3f7f4; }
.decoder-button-primary { border-color: #123f2e; color: #fff; background: #123f2e; }
.decoder-button-primary:hover { border-color: #1d5a42; color: #fff; background: #1d5a42; }
.decoder-button-quiet { border-color: transparent; color: #697c72; background: transparent; }
.decoder-input-status { min-height: 18px; margin: 12px 0 0; color: #687a70; font-size: 10px; line-height: 1.5; }
.decoder-output-panel { min-width: 0; padding: 28px; overflow: hidden; background: #fbfbf8; }
.decoder-empty { display: flex; min-height: 100%; flex-direction: column; align-items: flex-start; justify-content: center; padding: 48px; border: 1px dashed #c2cec6; color: #68756e; background: #f5f7f3; }
.decoder-empty-mark { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; margin-bottom: 22px; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-weight: 700; }
.decoder-empty h3 { margin: 0 0 10px; color: var(--ink); font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.decoder-empty p { max-width: 380px; margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.55; }
.decoder-empty-error { min-height: 250px; border-color: #d7bbb1; background: #fff8f4; }
.decoder-empty-error .decoder-empty-mark { background: #9b4b34; }
.decoder-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; padding-bottom: 25px; border-bottom: 1px solid #d6ddd8; }
.decoder-state { display: inline-flex; min-height: 24px; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.decoder-state-good { color: #0d4d33; background: #dff3e6; }
.decoder-state-warning { color: #6a4b0a; background: #f7e9bc; }
.decoder-state-error { color: #7c2e21; background: #f7ddd6; }
.decoder-summary h3, .decoder-path h3, .decoder-diagnostics h3 { margin: 13px 0 5px; font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -.025em; }
.decoder-summary p { margin: 0; color: #69766f; font-size: 11px; }
.decoder-facts { display: grid; grid-template-columns: repeat(3, auto); gap: 15px; }
.decoder-field { min-width: 0; }
.decoder-field-label { display: block; margin-bottom: 4px; color: #839087; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.decoder-field-value { display: block; max-width: 100%; overflow-wrap: anywhere; color: #193d2f; background: transparent; font-size: 10px; }
.decoder-path { padding: 26px 0 6px; }
.decoder-node-flow { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 2px 2px 16px; scrollbar-width: thin; }
.decoder-flow-arrow { display: flex; flex: 0 0 21px; align-items: center; justify-content: center; color: #6e8277; font-size: 20px; }
.decoder-node-card { min-width: 210px; flex: 1 0 210px; padding: 18px; border: 1px solid #bdcfc4; background: linear-gradient(145deg, #f8fbf7 0%, #e6efe8 100%); box-shadow: 0 12px 24px rgba(27, 66, 49, .06); }
.decoder-node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid #cbd8d0; }
.decoder-node-number { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--green); font-size: 9px; font-weight: 800; }
.decoder-node-role { color: #64736b; font-size: 9px; font-weight: 700; text-align: right; }
.decoder-node-system { padding: 18px 0 12px; }
.decoder-node-system small { display: block; margin-bottom: 5px; color: #78877f; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.decoder-node-system strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.15; }
.decoder-payment { margin: 0 0 5px; color: #5b6a62; font-size: 9px; }
.decoder-node-sid { display: block; margin-bottom: 17px; padding: 9px 10px; overflow-wrap: anywhere; color: #d8f1e3; background: #13392c; font-size: 10px; }
.decoder-node-card .decoder-field { padding-top: 9px; border-top: 1px solid #d5dfd8; }
.decoder-node-card .decoder-field + .decoder-field { margin-top: 9px; }
.decoder-diagnostics { padding-top: 20px; border-top: 1px solid #d6ddd8; }
.decoder-diagnostic-list { display: grid; gap: 8px; margin-top: 14px; }
.decoder-diagnostic { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 11px 12px; border-left: 3px solid #668474; background: #f1f5f1; }
.decoder-diagnostic strong { font-size: 9px; }
.decoder-diagnostic p { margin: 0; color: #4f5d55; font-size: 10px; line-height: 1.45; }
.decoder-error { border-color: #a54e37; background: #fff2ed; }
.decoder-error strong { color: #8c3824; }
.decoder-warning { border-color: #c29127; background: #fff8df; }
.decoder-warning strong { color: #795810; }
.decoder-note strong { color: var(--green); }
.decoder-disclaimer { margin: 0; padding: 16px 28px; border-top: 1px solid #cbd6cf; color: #68766e; background: #f1f4f0; font-size: 9px; line-height: 1.55; }
.decoder-context { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 42px; border: 1px solid #cdd7d0; background: #cdd7d0; }
.decoder-context article { padding: 25px; background: #fbfbf8; }
.decoder-context span { color: var(--green); font-size: 10px; font-weight: 800; }
.decoder-context h2 { margin: 14px 0 10px; font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.025em; }
.decoder-context p { margin: 0; color: #5f6d65; font-family: var(--serif); font-size: 15px; line-height: 1.55; }

@media (max-width: 900px) {
  .decoder-intro { grid-template-columns: 1fr; }
  .decoder-private { justify-self: start; }
  .decoder-workspace { grid-template-columns: 1fr; }
  .decoder-input-panel { border-right: 0; border-bottom: 1px solid #cbd6cf; }
  .decoder-editor, .decoder-highlight, .decoder-input { min-height: 390px; }
  .decoder-output-panel { min-height: 520px; }
  .decoder-context { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .decoder-tool-wrap { padding-top: 28px; }
  .schain-decoder { width: calc(100% + 32px); margin-right: -16px; margin-left: -16px; border-right: 0; border-left: 0; box-shadow: none; }
  .decoder-intro { padding: 27px 20px; }
  .decoder-private { width: 100%; }
  .decoder-input-panel, .decoder-output-panel { padding: 20px; }
  .decoder-editor, .decoder-highlight, .decoder-input { min-height: 340px; }
  .decoder-highlight, .decoder-input { padding: 16px; font-size: 11px; }
  .decoder-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .decoder-button { width: 100%; }
  .decoder-button-quiet { grid-column: 1 / -1; }
  .decoder-summary { grid-template-columns: 1fr; }
  .decoder-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .decoder-empty { min-height: 380px; padding: 28px; }
  .decoder-disclaimer { padding: 15px 20px; }
}
