:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202e38;
  background: #f6f7f5;
  font-size: 16px;
  line-height: 1.7;
  --accent: #145d70;
  --line: #b7c4c8;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(1400px, 100%); margin: auto; padding: 32px clamp(16px, 4vw, 60px) 80px; }
main, section, header, div, fieldset { min-width: 0; }
h1, h2, h3 { line-height: 1.4; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 4vw, 44px); margin: 12px 0 36px; letter-spacing: -.025em; }
.page-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: -16px 0 36px; }
h2 { font-size: 25px; margin: 0 0 24px; }
h3 { font-size: 19px; margin: 0 0 20px; }
a { color: #075a79; text-underline-offset: 4px; overflow-wrap: anywhere; }
nav { margin-bottom: 28px; }
.design-label { color: #36515a; font-weight: 600; border-left: 4px solid var(--accent); padding-left: 12px; }
button, select, input { font: inherit; }
button, select { max-width: 100%; min-height: 44px; border: 1px solid #789198; border-radius: 5px; color: inherit; background: #fff; padding: 8px 14px; }
button { cursor: pointer; font-weight: 600; }
button[data-action="first"] { background: var(--accent); color: #fff; border-color: var(--accent); }
button:disabled { color: #626c70; background: #e6e9e8; border-color: #c1cacb; cursor: default; }
button:not(:disabled):hover { outline: 1px solid var(--accent); }
:focus-visible { outline: 3px solid #ad4e0d; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: 3px solid #ad4e0d; outline-offset: 4px; }
[hidden] { display: none !important; }
.controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 24px 40px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend, .select-field > label, .docsReader > label { display: block; font-weight: 600; margin-bottom: 6px; }
fieldset label { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-right: 20px; cursor: pointer; }
input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 32px; }
.mechanism { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .85fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.browser-frame { background: white; border: 2px solid #506770; border-radius: 9px; overflow: hidden; padding: 0 20px 20px; }
.browser-frame h3 { margin: 0 -20px 20px; padding: 12px 20px; background: #e7eeef; border-bottom: 1px solid var(--line); }
.response-label { margin-bottom: 12px; color: #4a6069; }
.records { list-style: none; margin: 0; padding: 0; }
.records li { min-height: 45px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 8px 12px; border-bottom: 1px solid #d7dfe0; overflow-wrap: anywhere; }
.records strong { font-size: 20px; }
.records li span { font-size: 16px; }
.vacant { color: #52646c; }
.summary { border-top: 2px solid var(--accent); background: #edf5f4; padding: 12px; margin-top: 20px; font-weight: 600; overflow-wrap: anywhere; }
.next-boundary { margin-top: 16px; padding-top: 8px; border-top: 1px dashed var(--line); }
output { display: block; margin-top: 18px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.service-lane { position: relative; border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent); padding: 12px 0; }
.service-lane h3 { margin: 4px 0 14px; }
.flow-arrow { position: absolute; top: 20px; left: -25px; font-size: 28px; line-height: 1.2; color: var(--accent); }
.service-lane > .flow-arrow:last-child { top: auto; left: auto; right: -25px; bottom: 20px; }
.checks { padding: 0 0 0 22px; margin: 0 0 22px; }
.boundary { padding-top: 14px; border-top: 1px dashed #879da4; font-weight: 600; overflow-wrap: anywhere; }
.read-label { margin: 16px 0 4px; }
.database { border: 2px solid #60766f; border-radius: 30px 30px 16px 16px / 14px 14px 10px 10px; padding: 20px 14px 22px; background: #eef2ed; }
.database h3 { padding: 0 8px 12px; border-bottom: 2px solid #879b91; }
.database h3 span { display: block; font-size: 16px; font-weight: 400; margin-top: 4px; }
.route { margin: 28px 0 0; padding: 18px 20px 18px 44px; border-left: 4px solid var(--accent); background: #e9efef; overflow-wrap: anywhere; }
.route li { padding: 4px 0; }
.docsReader { max-width: 100%; margin-top: 64px; padding-top: 32px; border-top: 2px solid #7e9297; }
.docsReader > select { width: min(100%, 760px); margin-bottom: 32px; }
.document { max-width: 100%; }
.document-header { padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 32px; overflow-wrap: anywhere; }
.document-header h2 { margin-bottom: 12px; }
.document-header code { font-size: 1em; white-space: normal; overflow-wrap: anywhere; }
.document-header a { display: inline-block; margin-top: 12px; }
.document-body { max-width: 100%; overflow-wrap: anywhere; }
.document-body h1 { font-size: 32px; }
.document-body h2 { margin-top: 48px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.document-body h3 { margin-top: 32px; }
.document-body h4, .document-body h5, .document-body h6 { font-size: 17px; margin: 26px 0 12px; }
.document-body p, .document-body ul, .document-body ol { margin: 16px 0; }
.document-body li { margin: 6px 0; }
.document-body img { max-width: 100%; height: auto; }
.document-body code { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 1em; white-space: normal; overflow-wrap: anywhere; background: #e9edeb; padding: 1px 4px; border-radius: 3px; }
.document-body pre { max-width: 100%; padding: 20px; border: 1px solid var(--line); background: #edf0ee; white-space: pre-wrap; overflow-wrap: anywhere; }
.document-body pre code { padding: 0; background: transparent; white-space: pre-wrap; overflow-wrap: anywhere; }
.document-body blockquote { margin: 24px 0; padding: 0 20px; border-left: 4px solid #829b9f; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); }
.document-body table { width: 100%; border-collapse: collapse; font-size: 16px; }
.document-body th, .document-body td { min-width: 130px; padding: 12px 16px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.document-body th { background: #e7edeb; }
.diagram { width: fit-content; max-width: 100%; max-height: 700px; overflow: auto; overflow-wrap: normal; word-break: normal; margin: 24px 0; padding: 20px; border: 1px solid var(--line); background: #fff; }
.diagram svg { display: block; max-width: none; flex-shrink: 0; }
:target { scroll-margin-top: 24px; }
.page-header, .comparison, .demo { max-width: 1100px; margin-inline: auto; }
.page-header nav:first-child { font-size: .9rem; margin-bottom: 16px; }
.comparison { background: white; padding: clamp(16px, 3vw, 36px); border-top: 4px solid var(--accent); }
.comparison h2 { font-size: clamp(18px, 2.5vw, 26px); }
.comparison table { width: 100%; border-collapse: collapse; text-align: left; }
.comparison th, .comparison td { padding: 12px clamp(4px, 1vw, 14px); border-bottom: 1px solid #c8d4d4; }
.comparison thead { background: #edf3f2; }
.comparison tbody td { font: 650 clamp(16px, 2.6vw, 27px)/1.5 ui-monospace, monospace; word-spacing: .1em; }
.comparison em { font-style: normal; border-bottom: 3px solid #a75421; }
.comparison b { color: var(--accent); }
.comparison p { margin: 20px 0 0; }
.demo { background: white; margin-block: 14px; padding: 0 clamp(16px, 3vw, 36px); border: 1px solid var(--line); }
.demo summary { cursor: pointer; font-weight: 700; padding: 15px 0; color: var(--accent); }
.demo[open] { padding-bottom: 24px; }
.docsReader { background: white; padding: clamp(16px, 3vw, 36px); margin-top: 36px; }
.document-body > p, .document-body > ul { max-width: 75ch; }
:is(#doc-posts-screen, #doc-metrics-screen) pre { overflow-x: auto; }
:is(#doc-posts-screen, #doc-metrics-screen) pre code { white-space: pre; overflow-wrap: normal; }
@media (max-width: 760px) {
  main { padding-top: 20px; }
  .mechanism { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .service-lane { padding: 16px; border-left: 3px solid var(--accent); border-top: 0; border-bottom: 0; }
  .flow-arrow { top: -27px; left: 12px; transform: rotate(90deg); width: 32px; }
  .service-lane > .flow-arrow:last-child { right: auto; left: 12px; bottom: -27px; }
  .checks { margin-bottom: 16px; }
  .controls { display: block; }
  .select-field { margin-top: 16px; }
  .actions button { flex: 1 1 140px; }
  .docsReader { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
