@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f6f4ef;
  --paper: #fffdf7;
  --ink: #302a30;
  --muted: #695f5c;
  --line: #ded6cb;
  --copper: #ad5737;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, p, pre { margin: 0; }
button, a { touch-action: manipulation; }
button { cursor: pointer; font: inherit; }
button:disabled { cursor: progress; }
button, a, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
code { font-family: var(--mono); }
.page { width: min(1180px, calc(100% - clamp(32px, 8vw, 128px))); margin: 0 auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: clamp(20px, 2.4vw, 38px) 1px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { display: block; width: 39px; height: 39px; }
.brand span { font: 500 30px/1 Georgia, "Times New Roman", serif; letter-spacing: -1.5px; }
.health { display: inline-flex; align-items: center; padding: 0 3px; border: 1px solid var(--line); border-radius: 8px; background: #fbf9f3; }
.health-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 10px; border-radius: 5px; color: #554b4a; text-decoration: none; font-size: 12px; font-weight: 560; }
.health-link:hover { color: var(--copper); }
.signal { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #928980; }
[data-state="connected"] .signal { background: #578063; }
[data-state="failed"] .signal { background: #a65136; }
[data-state="checking"] .signal { background: #b09166; }
.recheck { position: relative; display: grid; place-items: center; flex: none; min-width: 32px; min-height: 34px; padding: 0; border: none; border-radius: 5px; color: #756963; background: transparent; }
.recheck::before { position: absolute; left: -1px; top: 8px; bottom: 8px; width: 1px; background: var(--line); content: ""; }
.recheck svg { width: 15px; height: 15px; }
.recheck:hover { background-color: #f2ede5; color: #78472e; }
.recheck:disabled svg { animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.hero {
  display: flex; align-items: center; position: relative; min-height: clamp(330px, 30vw, 445px); overflow: hidden;
  color: #fff7f0; border-radius: 17px; background-color: #372b37;
  background-image: linear-gradient(90deg, #29232eea 0%, #302532d6 29%, #35283787 53%, #3827370d 77%), url("/assets/sonoran-dusk.webp");
  background-size: cover; background-position: 50% 22%;
}
.hero-body { width: 100%; padding: clamp(34px, 4.5vw, 69px); }
h1 { font-size: clamp(36px, 4.65vw, 67px); line-height: 1.13; font-weight: 610; letter-spacing: -.055em; }
h1 [lang="en"] { font-weight: 565; letter-spacing: -.065em; }
.intro { max-width: 36em; margin-top: 14px; color: #ecded8; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.6; }
.endpoint { margin-top: clamp(29px, 3vw, 46px); }
.endpoint h2 { margin-bottom: 8px; font-size: 12px; font-weight: 560; letter-spacing: .04em; color: #e6d7d0; }
.address-bar { display: inline-flex; align-items: center; flex-wrap: wrap; max-width: 100%; gap: 6px 17px; padding: 5px 5px 5px 15px; border: 1px solid #a3959b91; border-radius: 8px; background: #2c2631d9; box-shadow: 0 1px 3px #1f192a20; }
#gateway-address { color: #fffaf4; max-width: 100%; min-height: 34px; align-content: center; font-size: clamp(12px, 1.15vw, 15px); font-weight: 480; line-height: 1.6; overflow-wrap: anywhere; user-select: all; }
.hero :focus-visible { outline-color: #ffe0b7; }
.copy-address, .copy-command { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 5px; font-size: 12px; font-weight: 610; line-height: 1.2; white-space: nowrap; }
.copy-address { min-height: 37px; border: 1px solid transparent; padding: 8px 13px; background: #edbf9f; color: #382832; }
.copy-address:hover { background: #f7cfaf; }
.copy-address svg, .copy-command svg { width: 15px; height: 15px; }
.feedback { font-size: 12px; font-weight: 500; line-height: 1.5; }
.endpoint .feedback:not(:empty) { margin-top: 7px; color: #fff4e6; }

.guide { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr); align-items: start; gap: clamp(32px, 6vw, 95px); margin: clamp(30px, 3.7vw, 60px) 0; }
.guide-copy { max-width: 405px; }
.guide h2 { font-size: clamp(23px, 2vw, 31px); font-weight: 620; line-height: 1.3; letter-spacing: -.045em; }
.guide-copy p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.guide-copy p code { padding: 1px 4px; border-radius: 3px; background: #ece6dc; color: #5e4941; font-size: .84em; }
.example { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.example-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 43px; padding: 3px clamp(13px, 1.5vw, 24px); border-bottom: 1px solid #e7dfd4; background: #f2eee5; }
.request-path, .request-path b { display: inline-flex; align-items: center; }
.request-path { gap: 8px; }
.request-path b { border-radius: 3px; color: #4d6c53; font: 660 11px/1 "Instrument Sans", sans-serif; letter-spacing: .05em; }
.request-path code { color: #564c49; font-size: 12px; }
.copy-command { min-height: 33px; padding: 4px 5px; border: none; background: transparent; color: #775643; font-size: 11px; }
.copy-command:hover { color: #8a3d25; background: #e9e2d8; }
.example pre { padding: 17px clamp(14px, 1.5vw, 24px) 19px; white-space: pre-wrap; overflow-wrap: anywhere; }
.example pre code { display: block; color: #3c3339; font-size: clamp(11px, 1vw, 13px); line-height: 1.75; user-select: all; }
.example .feedback:not(:empty) { margin: -4px clamp(14px, 1.5vw, 24px) 12px; color: #755141; }
footer { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 26px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.65; }
footer svg { width: 14px; height: 14px; margin-top: 3px; color: #8c7b70; }

@media (max-width: 750px) {
  .page { width: calc(100% - 36px); }
  .hero { min-height: 320px; background-position: 60% center; }
  .hero-body { padding: 32px; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 27px 0; }
  .guide-copy { max-width: 55em; }
  .guide-copy p { margin-top: 7px; }
}
@media (max-width: 500px) {
  .page { width: calc(100% - 28px); }
  .masthead { padding: 17px 1px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: 26px; }
  .health-link { min-height: 36px; padding: 5px 7px; font-size: 11px; }
  .hero { min-height: 313px; align-items: flex-end; border-radius: 12px; background-image: linear-gradient(90deg, #2f2535cf 0%, #342736a6 56%, #392b3a35 100%), linear-gradient(0deg, #2a232ece 0%, #33273459 63%, #382a3400 100%), url("/assets/sonoran-dusk.webp"); background-position: 65% center; }
  .hero-body { padding: 29px 20px; }
  h1 { font-size: clamp(33px, 8.6vw, 42px); }
  .intro { max-width: 23em; margin-top: 10px; font-size: 13px; }
  .endpoint { margin-top: 24px; }
  .address-bar { width: max-content; padding: 4px 4px 4px 9px; gap: 4px 8px; }
  #gateway-address { font-size: clamp(11px, 3vw, 13px); }
  .copy-address { padding: 6px 8px; min-height: 36px; }
  .copy-address svg { display: none; }
  .guide-copy p { font-size: 13px; }
  .example-head { min-height: 41px; }
}
@media (max-width: 360px) {
  .hero-body { padding: 24px 14px; }
  .address-bar { gap: 4px 5px; }
  .copy-address { padding: 5px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .recheck:disabled svg { animation: none; }
}
