Publish Sophon Realtime calling tool protocol and latency guide

This commit is contained in:
wuyang6
2026-11-09 12:30:33 +08:00
commit 83f47dd857
17 changed files with 2244 additions and 0 deletions
+931
View File
@@ -0,0 +1,931 @@
:root {
color-scheme: light;
--paper: #f4f3ef;
--surface: #fffefa;
--ink: #202b29;
--muted: #69756f;
--line: #d5dcd3;
--green: #2d755c;
--green-soft: #e2ece5;
--blue: #3d68a3;
--code: #eaece7;
--amber: #94652b;
--amber-soft: #f1e8d7;
}
html[data-theme="dark"] {
color-scheme: dark;
--paper: #18201d;
--surface: #202a24;
--ink: #e2e9df;
--muted: #a6b1a5;
--line: #3c4c40;
--green: #9ac6a6;
--green-soft: #2d4434;
--blue: #9fbfe8;
--code: #28362c;
--amber: #dfb16e;
--amber-soft: #443b2c;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 100px;
}
body {
margin: 0;
background: var(--paper);
color: var(--ink);
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
"Microsoft YaHei", sans-serif;
line-height: 1.85;
-webkit-font-smoothing: antialiased;
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
color: var(--green);
}
button,
select {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
}
button:disabled {
opacity: 0.35;
cursor: default;
}
a:focus-visible,
button:focus-visible,
select:focus-visible {
outline: 3px solid var(--blue);
outline-offset: 4px;
}
h1,
h2,
h3,
h4,
p {
margin: 0;
}
strong {
font-weight: 600;
}
code,
pre {
font-family: "SFMono-Regular", Consolas, monospace;
}
p code,
td code {
font-size: 0.87em;
overflow-wrap: anywhere;
color: var(--green);
}
.skip-link {
position: absolute;
top: -80px;
left: 20px;
background: var(--ink);
color: var(--paper);
padding: 8px 15px;
z-index: 20;
}
.skip-link:focus {
top: 15px;
}
.site-header {
position: sticky;
top: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: space-between;
height: 80px;
background: var(--paper);
border-bottom: 1px solid var(--line);
padding: 0 5vw;
}
.brand {
display: flex;
align-items: center;
gap: 17px;
}
.brand b {
font:
37px Georgia,
serif;
letter-spacing: -4px;
}
.brand > span {
font-size: 11px;
letter-spacing: 1.8px;
}
.brand i {
font-style: normal;
color: var(--muted);
margin-left: 9px;
}
.site-header nav {
display: flex;
gap: 24px;
align-items: center;
font-size: 12px;
}
#theme-toggle {
border: 1px solid var(--line);
background: transparent;
border-radius: 50%;
width: 35px;
height: 35px;
padding: 0;
font-size: 20px;
}
.layout {
display: grid;
grid-template-columns: 180px minmax(0, 900px);
gap: 70px;
max-width: 1300px;
margin: 0 auto;
padding: 0 45px;
}
.contents {
position: sticky;
top: 80px;
align-self: start;
padding-top: 63px;
}
.eyebrow {
color: var(--muted);
font-size: 10px;
font-weight: 600;
letter-spacing: 1.6px;
}
.contents nav {
display: flex;
flex-direction: column;
gap: 15px;
margin-top: 32px;
font-size: 12px;
color: var(--muted);
}
.version-note {
margin-top: 32px;
padding-top: 21px;
border-top: 1px solid var(--line);
font-size: 11px;
color: var(--muted);
line-height: 1.9;
}
.version-note strong {
color: var(--ink);
font-size: 13px;
letter-spacing: 1px;
}
.version-note span {
display: block;
margin-top: 11px;
}
.hero {
padding-top: 60px;
}
h1 {
font-size: clamp(35px, 4.1vw, 56px);
line-height: 1.27;
font-weight: 600;
letter-spacing: -1.3px;
margin: 20px 0 22px;
}
.deck {
font-size: 17px;
color: var(--muted);
line-height: 1.9;
}
.hero-meta {
display: flex;
flex-wrap: wrap;
gap: 10px 20px;
color: var(--muted);
font-size: 11px;
margin: 23px 0 33px;
}
.hero-meta a {
color: var(--green);
}
.hero-route {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
padding: 26px 0;
margin-bottom: 31px;
font-size: 13px;
}
.hero-route b {
color: var(--muted);
font-weight: 400;
}
.hero-route code {
color: var(--green);
font-size: 15px;
background: var(--green-soft);
padding: 7px 12px;
}
main p {
font-size: 14px;
line-height: 1.95;
}
p + p {
margin-top: 17px;
}
main .lead {
font-size: 18px;
line-height: 1.95;
margin-bottom: 18px;
}
.hero > p:last-child {
color: var(--muted);
font-size: 12px;
}
.hero > p:last-child code {
overflow-wrap: anywhere;
}
.article-section {
border-top: 1px solid var(--line);
padding-top: 37px;
margin-top: 58px;
scroll-margin-top: 105px;
}
.section-number {
font-size: 10px;
color: var(--green);
letter-spacing: 1.8px;
font-weight: 600;
margin-bottom: 12px;
}
h2 {
font-size: 28px;
line-height: 1.5;
font-weight: 600;
letter-spacing: -0.3px;
margin-bottom: 23px;
}
h3 {
font-size: 19px;
font-weight: 600;
line-height: 1.6;
margin: 28px 0 13px;
}
.ref {
font-size: 11px;
color: var(--green);
margin-left: 6px;
white-space: nowrap;
}
.table-wrap {
margin: 25px 0;
overflow-x: auto;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
}
table {
border-collapse: collapse;
width: 100%;
min-width: 610px;
font-size: 12px;
line-height: 1.9;
}
th,
td {
padding: 14px 12px;
text-align: left;
vertical-align: top;
border-bottom: 1px solid var(--line);
}
th {
font-weight: 600;
}
thead th {
font-size: 11px;
color: var(--muted);
}
tbody th {
width: 20%;
min-width: 100px;
}
tr:last-child > * {
border-bottom: 0;
}
th:first-child,
td:first-child {
padding-left: 0;
}
th:last-child,
td:last-child {
padding-right: 0;
}
.source-line {
color: var(--muted);
}
main .source-line {
font-size: 11px;
line-height: 1.9;
}
.source-line a {
color: var(--green);
}
.evidence-note {
border-left: 2px solid var(--green);
padding: 13px 0 13px 20px;
margin: 25px 0;
}
.evidence-note > strong {
font-size: 14px;
}
.evidence-note p {
margin-top: 9px;
font-size: 12px;
color: var(--muted);
}
.evidence-note a {
color: var(--green);
}
.figure {
background: var(--surface);
border: 1px solid var(--line);
border-radius: 5px;
padding: 26px;
margin: 26px 0;
}
.figure-heading {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.figure-heading h3 {
font-size: 20px;
margin: 5px 0 22px;
}
.tag {
font-size: 10px;
white-space: nowrap;
padding: 4px 7px;
border-radius: 3px;
line-height: 1.6;
}
.audit {
background: var(--green-soft);
color: var(--green);
}
.example {
background: var(--amber-soft);
color: var(--amber);
}
.segmented {
display: inline-flex;
border: 1px solid var(--line);
border-radius: 4px;
overflow: hidden;
}
.segmented button {
background: transparent;
border: 0;
padding: 8px 22px;
font-size: 12px;
}
.segmented button[aria-pressed="true"] {
background: var(--ink);
color: var(--paper);
}
.flow {
display: flex;
align-items: center;
gap: 9px;
justify-content: space-between;
margin: 30px 0 24px;
}
.flow > span {
flex: 1;
background: var(--code);
text-align: center;
padding: 15px 8px;
font-size: 12px;
line-height: 1.8;
}
.flow > span:first-child {
background: var(--green-soft);
}
.flow > b {
font-weight: 400;
color: var(--muted);
}
.selected-detail {
font-size: 12px;
color: var(--muted);
min-height: 45px;
border-top: 1px solid var(--line);
padding-top: 17px;
line-height: 1.9;
}
.call-controls {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.call-controls label {
font-size: 11px;
color: var(--muted);
}
select {
display: block;
width: 100%;
border: 1px solid var(--line);
border-radius: 3px;
background: var(--paper);
padding: 9px 12px;
margin-top: 7px;
font-size: 13px;
}
.endpoint {
display: flex;
align-items: center;
gap: 12px;
margin: 22px 0 12px;
}
.endpoint > span {
font-size: 10px;
color: var(--green);
font-weight: 600;
}
.endpoint code {
font-size: 13px;
overflow-wrap: anywhere;
}
main .small {
font-size: 11px;
color: var(--muted);
line-height: 1.9;
}
.code-heading {
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0 11px;
font-size: 11px;
color: var(--muted);
}
.recipe-parts {
display: flex;
gap: 8px;
margin-top: 19px;
}
.recipe-parts button {
background: transparent;
border: 1px solid var(--line);
border-radius: 3px;
padding: 5px 12px;
font-size: 11px;
}
.recipe-parts button[aria-pressed="true"] {
background: var(--green-soft);
color: var(--green);
}
.code-heading button,
.step-controls button {
border: 1px solid var(--line);
border-radius: 3px;
background: transparent;
padding: 5px 12px;
font-size: 11px;
}
pre {
background: var(--code);
margin: 0 0 11px;
padding: 20px;
font-size: 11px;
line-height: 1.9;
overflow-x: auto;
tab-size: 2;
}
#copy-status {
min-height: 21px;
}
.step-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 24px;
}
.step-list button {
background: transparent;
border: 1px solid var(--line);
padding: 6px 9px;
font-size: 10px;
border-radius: 3px;
}
.step-list button[aria-pressed="true"] {
background: var(--green-soft);
color: var(--green);
border-color: var(--green);
}
.step-head {
display: flex;
gap: 14px;
align-items: center;
margin-bottom: 12px;
}
.step-head > span {
font:
28px Georgia,
serif;
color: var(--green);
}
.step-head h4 {
font-size: 17px;
font-weight: 600;
}
#step-explanation {
min-height: 59px;
margin-bottom: 19px;
font-size: 13px;
}
#step-code {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.step-controls {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 18px;
}
.step-controls > span {
font-size: 11px;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.two-paths {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 31px;
margin: 28px 0;
}
.two-paths > div {
border-top: 1px solid var(--line);
padding-top: 15px;
}
.two-paths h3 {
font-size: 17px;
margin: 8px 0 12px;
}
.two-paths p {
font-size: 12px;
}
.clock-boundaries {
margin: 26px 0;
}
.clock-boundaries > div {
padding: 15px 0;
border-top: 1px solid var(--line);
}
.clock-boundaries span {
color: var(--muted);
display: block;
font-size: 11px;
margin-bottom: 7px;
}
.clock-boundaries strong {
display: block;
font-size: 13px;
font-weight: 500;
}
.text-link {
display: inline-block;
margin-top: 22px;
color: var(--green);
font-size: 13px;
}
.source-list {
margin: 26px 0;
padding-left: 24px;
}
.source-list li {
border-top: 1px solid var(--line);
padding: 13px 0 13px 6px;
scroll-margin-top: 105px;
}
.source-list li::marker {
font-size: 11px;
color: var(--green);
}
.source-list a {
font-size: 13px;
font-weight: 500;
}
.source-list span {
display: block;
font-size: 11px;
color: var(--muted);
margin-top: 4px;
}
footer {
margin-top: 55px;
padding: 26px 0 35px;
border-top: 1px solid var(--line);
display: flex;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
color: var(--muted);
font-size: 10px;
}
footer > div {
display: flex;
gap: 20px;
}
footer small {
flex-basis: 100%;
font-size: 9px;
}
@media (max-width: 1050px) {
.layout {
grid-template-columns: 145px minmax(0, 1fr);
gap: 35px;
padding: 0 28px;
}
.contents nav {
font-size: 11px;
}
h1 {
font-size: 44px;
}
.figure {
padding: 22px;
}
.flow > span {
font-size: 11px;
}
}
@media (max-width: 780px) {
.site-header {
height: 68px;
padding: 0 22px;
}
.site-header nav {
gap: 17px;
font-size: 11px;
}
.brand {
gap: 10px;
}
.brand > span {
font-size: 10px;
}
.brand i {
display: none;
}
.layout {
display: block;
padding: 0 24px;
}
.contents {
position: static;
padding: 20px 0 0;
}
.contents > .eyebrow,
.version-note {
display: none;
}
.contents nav {
margin: 0;
flex-direction: row;
flex-wrap: wrap;
gap: 7px 17px;
padding-bottom: 17px;
border-bottom: 1px solid var(--line);
font-size: 10px;
}
.contents nav a:nth-child(n + 5) {
display: none;
}
.hero {
padding-top: 35px;
}
h1 {
font-size: 39px;
}
.deck {
font-size: 15px;
}
.article-section {
margin-top: 47px;
padding-top: 29px;
}
h2 {
font-size: 25px;
}
.hero-route {
font-size: 11px;
gap: 6px;
}
.hero-route code {
font-size: 12px;
padding: 6px 9px;
}
.flow {
gap: 7px;
}
}
@media (max-width: 480px) {
.site-header {
padding: 0 17px;
}
.site-header nav > a:first-child {
display: none;
}
.site-header nav {
gap: 14px;
}
.brand b {
font-size: 32px;
}
.layout {
padding: 0 19px;
}
.hero > .eyebrow {
font-size: 8px;
letter-spacing: 1px;
}
h1 {
font-size: clamp(28px, 7.9vw, 31px);
letter-spacing: -0.6px;
line-height: 1.35;
margin-top: 16px;
}
.hero-meta {
font-size: 10px;
gap: 7px 13px;
}
.hero-route {
flex-wrap: nowrap;
justify-content: space-between;
gap: 3px;
padding: 19px 0;
}
.hero-route > span {
font-size: 10px;
}
.hero-route code {
font-size: 10px;
padding: 5px 6px;
}
main .lead {
font-size: 16px;
}
main p {
font-size: 13px;
}
h2 {
font-size: clamp(21px, 5.9vw, 23px);
}
h3 {
font-size: 18px;
}
.figure {
padding: 18px 14px;
margin: 23px -3px;
}
.figure-heading {
display: block;
}
.figure-heading h3 {
font-size: 17px;
margin-bottom: 12px;
}
.tag {
font-size: 8px;
padding: 4px 5px;
display: inline-block;
margin-bottom: 17px;
}
.eyebrow {
font-size: 9px;
}
.segmented {
width: 100%;
}
.segmented button {
flex: 1;
padding: 8px 10px;
font-size: 11px;
}
.flow {
flex-direction: column;
gap: 7px;
margin: 22px 0;
}
.flow > span {
width: 100%;
padding: 11px;
font-size: 12px;
}
.flow > b {
line-height: 1;
transform: rotate(90deg);
}
.selected-detail {
font-size: 11px;
min-height: 73px;
}
.call-controls {
grid-template-columns: 1fr;
gap: 14px;
}
.endpoint {
align-items: flex-start;
gap: 9px;
}
.endpoint code {
font-size: 11px;
}
pre {
padding: 14px;
font-size: 10px;
}
.step-list button {
font-size: 9px;
padding: 6px 7px;
}
.step-head h4 {
font-size: 15px;
}
#step-explanation {
font-size: 12px;
min-height: 91px;
}
.two-paths {
grid-template-columns: 1fr;
gap: 24px;
}
.two-paths h3 {
font-size: 16px;
}
.clock-boundaries strong {
font-size: 12px;
}
.source-list a {
font-size: 12px;
}
footer {
display: block;
font-size: 9px;
}
footer > div {
margin: 16px 0;
gap: 15px;
}
footer small {
display: block;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation: none !important;
transition: none !important;
}
}
@media print {
.site-header,
.contents,
button,
select {
display: none;
}
.layout {
display: block;
padding: 0;
}
.figure {
break-inside: avoid;
}
.table-wrap {
overflow: visible;
}
table {
min-width: 0;
}
}