.docs-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 30px; align-items: start; padding: 26px 28px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.docs-hero h1 { max-width: 760px; font-size: 1.75rem; line-height: 1.25; letter-spacing: -.035em; }
.docs-hero p { max-width: 820px; margin-top: 12px; color: #59717d; font-size: .92rem; line-height: 1.7; }
.docs-hero .docs-live-config { grid-column: 1 / -1; margin-top: 0; padding-top: 14px; border-top: 1px solid #e7edf0; font-size: .79rem; color: #34767a; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.docs-navigation { position: sticky; top: 15px; min-width: 0; max-height: calc(100dvh - 30px); overflow-y: auto; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.docs-navigation nav { display: grid; gap: 3px; }
.docs-navigation nav a { padding: 8px 0; color: #426775; font-size: .81rem; line-height: 1.5; text-decoration: none; }
.docs-navigation nav a:hover { color: var(--accent); text-decoration: underline; }
.docs-nav-note { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: #6a7e88; font-size: .75rem; line-height: 1.9; }
.docs-content { display: grid; gap: 16px; min-width: 0; }
.doc-section { min-width: 0; padding: 26px 28px; border: 1px solid var(--line); border-radius: 9px; background: #fff; scroll-margin-top: 15px; }
.doc-heading { display: flex; align-items: start; gap: 14px; margin-bottom: 20px; }
.doc-number { flex: 0 0 35px; padding-top: 3px; color: #8198a3; font-family: 'IBM Plex Mono', monospace; font-size: .87rem; }
.doc-heading h2 { font-size: 1.35rem; line-height: 1.3; }
.doc-heading p { margin: 6px 0 0 !important; color: #738690 !important; font-size: .84rem !important; }
.doc-section p, .doc-section li { margin: 14px 0; color: #4a6573; font-size: .91rem; line-height: 1.8; }
.doc-section h3 { margin: 23px 0 10px; font-size: 1rem; }
.doc-section b { color: #284b59; }
.docs-tag { display: inline-block; margin: 0 5px 2px 0; padding: 2px 6px; border-radius: 4px; font-size: .71rem; font-weight: 600; line-height: 1.6; vertical-align: middle; }
.docs-tag.implemented { background: #e7f4ef; color: #26785f; }
.docs-tag.proposed { background: #edf0f9; color: #566898; }
.doc-table-wrap { max-width: 100%; margin: 17px 0; overflow-x: auto; border: 1px solid #e2e9ed; border-radius: 6px; scrollbar-width: thin; }
.doc-table-wrap table { width: 100%; min-width: 630px; border-collapse: collapse; text-align: left; font-size: .84rem; line-height: 1.65; }
.doc-table-wrap th { padding: 10px 12px; border-bottom: 1px solid #dce6ea; background: #f3f7f9; color: #3d5e6d; font-weight: 600; vertical-align: top; }
.doc-table-wrap td { padding: 11px 12px; border-bottom: 1px solid #e8eef1; color: #536c79; vertical-align: top; }
.doc-table-wrap td:first-child { width: 23%; color: #274c5b; }
.doc-table-wrap tr:last-child td { border-bottom: 0; }
.doc-table-wrap .docs-schema { min-width: 770px; }
.docs-schema td:first-child { width: 25%; }
.doc-section code { font-family: 'IBM Plex Mono', Consolas, monospace; font-size: .8em; overflow-wrap: anywhere; }
.doc-section pre { max-width: 100%; overflow-x: auto; padding: 17px 19px; margin: 17px 0; border: 1px solid #dbe7eb; border-radius: 6px; background: #f2f7f8; color: #2a5662; font-size: .86rem; line-height: 1.8; tab-size: 2; }
.doc-section pre code { font-size: .9em; overflow-wrap: normal; }
.doc-callout { margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid #168c8e; background: #edf7f6; color: #386971; font-size: .87rem; line-height: 1.8; }
.docs-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.docs-flow > div { min-width: 0; padding: 14px; border: 1px solid #dce8eb; border-radius: 6px; background: #f4f9fa; counter-increment: flow; }
.docs-flow > div::before { display: block; margin-bottom: 6px; color: #6a929e; content: counter(flow, decimal-leading-zero); font-size: .73rem; }
.docs-flow { counter-reset: flow; }
.docs-flow b { display: block; font-size: .88rem; }
.docs-flow span { display: block; margin-top: 6px; color: #69828e; font-size: .76rem; line-height: 1.6; }
.doc-algorithm { padding-left: 22px; }
.doc-algorithm li { padding-left: 5px; }
.docs-probabilities { display: grid; gap: 10px; padding: 18px; border-radius: 6px; background: #f7f9fb; }
.docs-probabilities > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) 55px; align-items: center; gap: 12px; font-size: .82rem; }
.docs-probabilities i { width: var(--share); height: 9px; border-radius: 3px; background: var(--bar); }
.docs-probabilities b { text-align: right; }
.docs-random-example { margin: 18px 0; padding: 14px 16px; border: 1px solid #e0e7ec; border-radius: 6px; }
.docs-random-example summary { color: #346f7c; font-size: .85rem; }
#docs-random-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
#docs-random-form .field { max-width: 210px; margin: 0; }
.docs-adapter-diagram { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 12px; align-items: stretch; margin: 20px 0; }
.docs-adapter-diagram > div { display: grid; align-content: center; gap: 8px; padding: 16px; border: 1px solid #dce5ed; border-radius: 6px; background: #f2f6f9; color: #426477; font-size: .85rem; }
.docs-adapter-diagram small { font-size: .76rem; line-height: 1.6; }
.docs-adapter-diagram .docs-sources { padding: 0; border: 0; background: transparent; }
.docs-sources span { padding: 9px 12px; border: 1px solid #dce5ed; border-radius: 4px; background: #f9fafc; }
.docs-empty { padding: 25px; font-size: .9rem; color: #657985; }

.guided-demo-body { padding: 0 18px 16px; }
.guided-demo-body > p:first-child { color: #456e7b; font-size: .83rem; line-height: 1.6; }
.demo-launch { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 15px 0 9px; }
.demo-launch > .text-button { margin-bottom: 8px; }
.guided-demo-body .hint { margin-bottom: 0; }
.live-demo-panel { padding: 16px 18px; border-top: 1px solid var(--line); background: #fbfaff; }
.live-demo-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.live-demo-heading strong { color: #65517e; font-size: .87rem; }
.demo-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.demo-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 5px 0 14px; list-style: none; }
.demo-steps li { display: flex; align-items: start; gap: 5px; padding: 8px 6px; border: 1px solid #e1dceb; border-radius: 5px; color: #7c7189; background: #fff; font-size: .73rem; line-height: 1.5; }
.demo-steps li span { color: #a096ad; }
.demo-steps li.done { border-color: #c3dfd2; color: #346954; background: #f0f8f4; }
.demo-steps li.done span { color: #2c7e5e; }
.demo-visit-result { margin-top: 12px; color: #426d5a; font-size: .81rem; line-height: 1.7; }
@media(max-width:1200px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 12px; } .doc-section { padding: 22px; } .demo-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(max-width:1050px) { .docs-layout { grid-template-columns: minmax(0, 1fr); } .docs-navigation { position: static; max-height: none; } .docs-navigation nav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; } .docs-nav-note { margin-top: 8px; } }
@media(max-width:700px) {
  .docs-hero { grid-template-columns: minmax(0, 1fr); padding: 19px; gap: 14px; }
  .docs-hero h1 { font-size: 1.35rem; }
  .docs-hero p { font-size: .85rem; }
  .docs-hero > .button { justify-self: start; }
  .docs-navigation nav { max-height: 190px; overflow-y: auto; }
  .doc-section { padding: 19px 15px; }
  .doc-heading { gap: 8px; }
  .doc-number { flex-basis: 26px; }
  .doc-heading h2 { font-size: 1.15rem; }
  .doc-section p, .doc-section li { font-size: .86rem; }
  .docs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-adapter-diagram { grid-template-columns: minmax(0, 1fr); }
  .docs-probabilities { padding: 12px; }
  .docs-probabilities > div { grid-template-columns: 80px minmax(0, 1fr) 42px; gap: 7px; font-size: .76rem; }
  .guided-demo-body { padding-inline: 13px; }
  .guided-demo .records-heading h1 { line-height: 1.4; }
  .live-demo-panel { padding-inline: 13px; }
  .demo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(prefers-reduced-motion:reduce) { .doc-section { scroll-behavior: auto; } }

.live-demo-panel { background: #f5faf8; }
.live-demo-panel .live-demo-heading strong { color: #2b6e5d; }
.live-demo-panel .live-demo-heading p { margin-top: 5px; color: #698178; font-size: .77rem; line-height: 1.6; }
.live-demo-panel .check-label select { width: 86px; min-height: 31px; padding-block: 4px; font-size: .8rem; }
.live-demo-vehicles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.live-demo-vehicle { display: grid; gap: 5px; min-width: 0; padding: 11px; border: 1px solid #d8e7df; border-radius: 6px; background: #fff; text-align: left; }
.live-demo-vehicle strong { color: #376e5b; font-size: .85rem; }
.live-demo-vehicle span { color: #70877c; font-size: .74rem; line-height: 1.5; }
.live-demo-vehicle.active { border-color: #4d9a7d; background: #eaf6ef; box-shadow: inset 0 0 0 1px #4d9a7d; }
@media(max-width:700px) { .live-demo-vehicles { grid-template-columns: minmax(0, 1fr); } .live-demo-vehicle { grid-template-columns: 1fr 1fr; } .live-demo-vehicle span:last-child { grid-column: 1 / -1; } }
