.ref-head { max-width: 900px; margin-bottom: clamp(30px,5vw,65px); }
.ref-back, .ref-next a { color: var(--teal); font-size: 15px; text-underline-offset: .25em; }
.ref-head h1 { margin: 22px 0 16px; font-weight:500;font-size:var(--read-title);line-height:1.22;letter-spacing:0; }
.ref-head p { color: var(--muted); font-size: clamp(17px,1.4vw,22px); line-height: 1.75; }
.api-release-note { margin: 20px 0 0; border-left: 2px solid #8db6b2; padding: 6px 12px; color: var(--ink); font-size: 15px; line-height: 1.6; }
.ref-layout { display: grid; grid-template-columns: minmax(155px,220px) minmax(0,850px); gap: clamp(22px,6vw,92px); align-items: start; }
.ref-contents { border-top: 2px solid #8db6b2; position: sticky; top: calc(var(--shell-height) + 20px); }
.ref-contents h2 { font-size: 14px; color: #5b6664; }
.ref-contents a { text-decoration: none; display: block; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ref-contents a:hover, .ref-contents a[aria-current] { background: #eaf3f3; color: #135e59; }
.ref-body { min-width: 0; }
.ref-body section { border-top: 1px solid var(--line); padding: 20px 0 32px; }
.ref-body h2 { margin: 0 0 12px; font-size: clamp(22px,2vw,31px); line-height: 1.35; font-weight: 580; letter-spacing: -.035em; }
.ref-body p { font-size: var(--read-size,16px); line-height: var(--read-leading,1.9); color: var(--muted); margin: 0; }
.ref-body code { overflow-wrap: anywhere; font-family: var(--font-mono,ui-monospace),"SFMono-Regular",monospace; }
.ref-body pre { margin: 16px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-sunken,#f2f4f4); border: 1px solid var(--line); border-left: 3px solid #81a9a7; color: var(--ink); border-radius: 10px; padding: 20px; font-size: 13.5px; line-height: 1.7; }
.reference-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; }
.reference-table th, .reference-table td { border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: 10px; overflow-wrap: anywhere; }
.reference-table th { background: #eef4f5; color: #3e5557; font-weight: 550; }
.reference-table th:first-child, .reference-table td:first-child { width: 30%; }
.ref-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); padding: 28px 0 54px; margin-top: 34px; }
.ref-directory { margin: clamp(44px,6vw,88px) 0; }
.ref-directory h2 { font-size: clamp(28px,3vw,45px); line-height: 1.25; letter-spacing: -.05em; font-weight: 560; }
.ref-directory > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(25px,5vw,84px); }
.ref-directory a { display: block; padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; }
.ref-directory h3 { font-size: clamp(19px,1.5vw,25px); font-weight: 580; margin: 0 0 8px; }
.ref-directory h3 span { font-family: system-ui,sans-serif; font-weight: 400; color: var(--teal); }
.ref-directory p { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.7; }
.ref-directory h3,.ref-contents a,.ref-next a{transition:color var(--ui-motion),background-color var(--ui-motion)}
.ref-directory h3 span{display:inline-block;transition:transform var(--ui-motion)}
.ref-directory a:is(:hover,:focus-visible) h3,.ref-next a:is(:hover,:focus-visible){color:#3c4441}
.ref-directory a:is(:hover,:focus-visible) h3 span{transform:translate(2px,-2px)}
#api-samples { margin-top: 28px; }
#api-samples h3 { margin-bottom: 12px; }
.sample-box { background: var(--surface,#fff); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.sample-tools { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; padding: 0 8px 0 16px; background: var(--surface-sunken,#f4f8f8); border-bottom: 1px solid var(--line); }
.sample-tools [role=tablist] { display: flex; gap: 2px; flex-wrap: wrap; }
.sample-tools button { border: 0; background: transparent; color: var(--muted); border-radius: 4px; padding: 6px 10px; font: 12px/1.4 var(--font-mono,ui-monospace),monospace; cursor: pointer; transition: color var(--ui-motion),background-color var(--ui-motion); }
.sample-tools button[aria-selected=true], .sample-tools button:hover { background: #deeeec; color: var(--ink); }
.api-panels .sample-box pre { margin: 0; padding: 20px; max-height: 33em; overflow: auto; border: 0; border-radius: 0; white-space: pre-wrap; background: transparent; color: var(--ink); font: 13.5px/1.7 var(--font-mono,ui-monospace),monospace; }
.sample-box [role=tabpanel]:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; }
.api-panels .sample-env, .api-panels .sample-feedback { margin-top: 8px; font-size: 13px; line-height: 1.65; }
.api-panels .sample-feedback { color: var(--teal); }
.sample-feedback:empty { display: none; }
@media (max-width: 690px) {
  .sample-tools { padding-left: 6px; gap: 4px; }
  .sample-tools button { padding-inline: 6px; }
  .ref-layout, .ref-directory > div { grid-template-columns: 1fr; }
  .ref-contents { position: static; display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 12px; }
  .ref-contents h2 { width: 100%; margin: 0 0 3px; }
  .ref-contents a { font-size: 13px; border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
  .ref-directory a { padding: 15px 0; }
}
