/* The directory starts in dark mode. The theme controls opt into the light palette. */
:root {
  color-scheme: dark;
  --ink: #edf5f0;
  --muted: #b0c1ba;
  --accent: #95dfbe;
  --border: #354941;
  --paper: #101714;
  --surface: #19231f;
  --header: #111b17;
  --inset: #121d18;
  --divider: #304038;
  --code: #c4e9d3;
  --hover-border: #669a80;
  --highlight: #2c4738;
  --active-bg: #96dcba;
  --active-ink: #153e2d;
  --focus: #f0b66d;
  --line: #72bc94;
  --green-bg: #243f30;
  --green-ink: #9fdbb6;
  --violet-bg: #303347;
  --violet-ink: #c0c8fc;
  --amber-bg: #423826;
  --amber-ink: #f2cc89;
  --card-shadow: 0 3px 8px #080d0a20;
  --hover-shadow: 0 7px 18px #050a072c;
  --hero-outline: #39624e;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font: 100%/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #152e29;
  --muted: #526862;
  --accent: #126452;
  --border: #d6e3de;
  --paper: #f5f8f6;
  --surface: #fff;
  --header: #fcfdfc;
  --inset: #f5f8f6;
  --divider: #e2ebe6;
  --code: #244d3f;
  --hover-border: #70a996;
  --highlight: #e0ede5;
  --active-bg: #215e49;
  --active-ink: #fff;
  --focus: #965e0d;
  --line: #248268;
  --green-bg: #e4f2e9;
  --green-ink: #287659;
  --violet-bg: #e9ebfa;
  --violet-ink: #5867a3;
  --amber-bg: #faecd4;
  --amber-ink: #875818;
  --card-shadow: 0 3px 7px #153c2b04;
  --hover-shadow: 0 6px 16px #183b2b12;
  --hero-outline: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.shell { width: min(1136px, calc(100% - 80px)); margin-inline: auto; }
.jump {
  position: absolute; top: 10px; left: 10px; z-index: 4; transform: translateY(-150%);
  padding: .45rem .9rem; color: var(--active-ink); background: var(--active-bg); border-radius: 6px;
}
.jump:focus { transform: translateY(0); }
.icon { display: block; width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header { border-bottom: 1px solid var(--border); background: var(--header); }
.header-inner { min-height: 67px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; font-family: var(--mono); font-size: 1.22rem; line-height: 1; font-weight: 700; letter-spacing: -.065em; }
.brand-suffix { color: var(--accent); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: .9rem; font-weight: 550; }
.nav a { padding: 8px 0; }
.nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.theme-switch {
  display: inline-flex; align-items: center; flex: none; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--inset);
}
.theme-switch[hidden] { display: none; }
.theme-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 33px;
  padding: 4px 10px; border: 0; border-radius: 7px; color: var(--muted); background: transparent;
  font-size: .88rem; font-weight: 620; line-height: 1.25; white-space: nowrap; cursor: pointer;
}
.theme-switch .icon { width: 16px; height: 16px; }
.theme-switch button[aria-pressed="false"]:hover { color: var(--accent); background: var(--highlight); }
.theme-switch button[aria-pressed="true"] { color: var(--active-ink); background: var(--active-bg); }
main { flex: 1; padding: 27px 0 44px; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 210px;
  padding: 38px clamp(25px, 4.4vw, 58px); border-radius: 22px;
  background: radial-gradient(ellipse at 80% 67%, #245c50 0%, transparent 60%), linear-gradient(110deg, #102f2b, #123e36 70%, #16483e);
  color: #f5faf6; box-shadow: inset 0 0 0 1px var(--hero-outline);
}
.hero-copy { position: relative; z-index: 1; max-width: 52%; }
.hero h1 { margin: 0; font-size: clamp(2.35rem, 4.3vw, 3.55rem); font-weight: 730; line-height: 1.15; letter-spacing: -.045em; }
.hero p { margin: 12px 0 0; font-size: 1rem; color: #d2e5dc; text-wrap: pretty; }
.hero-art { position: absolute; z-index: 0; right: 3%; top: 45%; transform: translateY(-50%); width: min(48%, 485px); height: auto; pointer-events: none; }
.section { margin-top: 27px; scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.section-heading h2 { margin: 0; font-size: 1.28rem; letter-spacing: -.025em; line-height: 1.55; font-weight: 700; }
.section-heading::before { content: ""; width: 4px; height: 1.02rem; border-radius: 3px; background: var(--line); }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--card-shadow); }
.panel { display: flex; flex-direction: column; gap: 16px; padding: 19px 22px 17px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.panel:hover { transform: translateY(-2px); border-color: var(--hover-border); box-shadow: var(--hover-shadow); }
.title-row { display: flex; align-items: center; gap: 13px; min-width: 0; }
.glyph { display: inline-grid; flex: none; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: var(--icon-bg, var(--green-bg)); color: var(--icon-ink, var(--green-ink)); }
.glyph .icon { width: 24px; height: 24px; }
.glyph.monitor { --icon-bg: var(--green-bg); --icon-ink: var(--green-ink); }
.glyph.console { --icon-bg: var(--violet-bg); --icon-ink: var(--violet-ink); }
.glyph.api { --icon-bg: var(--amber-bg); --icon-ink: var(--amber-ink); }
.title-row h3, .api-info h3 { margin: 0; font-size: 1.12rem; line-height: 1.4; font-weight: 690; letter-spacing: -.025em; }
.title-row p, .api-info p { margin: 2px 0 0; color: var(--muted); font-size: .94rem; }
.panel-domain { display: flex; align-items: center; gap: 9px; color: var(--accent); border-top: 1px solid var(--divider); padding-top: 12px; font: 500 .92rem/1.45 var(--mono); overflow-wrap: anywhere; }
.panel-domain .icon { width: 15px; height: 15px; }
.panel-domain .link-icon { margin-left: auto; color: var(--muted); }
.api-card { display: grid; grid-template-columns: minmax(235px, .9fr) minmax(340px, 1.33fr); gap: 24px; padding: 19px 22px; align-items: center; }
.api-info .title-row { align-items: flex-start; }
.addresses { display: grid; gap: 7px; }
.address { display: flex; align-items: center; min-width: 0; gap: 11px; padding: 4px 5px 4px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--inset); }
.address-label { flex: none; color: var(--muted); font-size: .82rem; }
.address code { font-family: var(--mono); font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; min-width: 0; color: var(--code); }
.copy { display: none; align-items: center; justify-content: center; flex: none; width: 37px; height: 37px; margin-left: auto; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.copy-enabled .copy { display: inline-flex; }
.copy .icon { width: 17px; height: 17px; }
.copy:hover, .copy.copied { background: var(--highlight); color: var(--accent); }
.copy .check { display: none; }
.copy.copied .check { display: block; }
.copy.copied .copy-shape { display: none; }
.footer { border-top: 1px solid var(--border); color: var(--muted); }
.footer .shell { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .84rem; }
.footer-domain { font: .87rem/1.5 var(--mono); color: var(--muted); }
.footer a:hover { text-decoration: underline; }
.feedback { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); border-radius: 9px; background: var(--active-bg); color: var(--active-ink); box-shadow: 0 5px 18px #102c2325; z-index: 2; font-size: .9rem; }
.feedback:not(:empty) { padding: 8px 15px; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 48px); }
  .hero { min-height: 192px; }
  .api-card { grid-template-columns: minmax(195px, .8fr) minmax(310px, 1.3fr); gap: 15px; }
  .api-info .title-row { flex-direction: column; gap: 7px; }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 57px; gap: 12px; }
  .brand { font-size: 1.08rem; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .nav { gap: 14px; font-size: .84rem; }
  main { padding: 16px 0 32px; }
  .hero { min-height: 167px; padding: 25px; border-radius: 16px; }
  .hero-copy { max-width: 56%; }
  .hero h1 { font-size: 2.35rem; }
  .hero p { margin-top: 8px; font-size: .94rem; }
  .hero-art { right: -10%; width: 58%; }
  .section { margin-top: 21px; }
  .section-heading { gap: 9px; margin-bottom: 8px; }
  .section-heading h2 { font-size: 1.17rem; }
  .panel-grid { grid-template-columns: 1fr; gap: 9px; }
  .panel { gap: 11px; padding: 14px 16px 12px; }
  .panel-domain { padding-top: 9px; }
  .api-card { grid-template-columns: 1fr; gap: 15px; padding: 15px 16px; }
  .api-info .title-row { flex-direction: row; align-items: center; gap: 13px; }
  .address code { font-size: .84rem; }
}
@media (max-width: 570px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding-block: 10px 2px; }
  .brand { grid-area: 1 / 1; justify-self: start; }
  .theme-switch { grid-area: 1 / 2; justify-self: end; }
  .theme-switch button { min-height: 34px; padding-inline: 8px; }
  .nav { grid-area: 2 / 1 / 3 / -1; justify-self: start; margin: 0; gap: 18px; }
}
@media (max-width: 430px) {
  .nav { gap: 12px; }
  .nav a { font-size: .8rem; }
  .hero { min-height: 155px; padding: 20px; }
  .hero h1 { font-size: 2rem; }
  .hero-copy { max-width: 64%; }
  .hero-art { right: -14%; width: 61%; }
  .address { gap: 6px; padding-left: 8px; }
}
@media (max-width: 360px) {
  .nav { gap: 20px; }
  .hero-copy { max-width: 72%; }
  .hero-art { opacity: .65; right: -19%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.panel { position: relative; }
.panel-domain::after { content: ""; position: absolute; inset: 0; border-radius: 15px; }
.panel-domain:hover span, .secondary-domain:hover code { text-decoration: underline; text-underline-offset: 3px; }
.panel-domain:focus-visible { outline: none; }
.panel-domain:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.secondary-domain { position: relative; display: inline-flex; align-items: baseline; gap: 8px; min-height: 25px; margin-top: 5px; padding-top: 2px; color: var(--muted); font-size: .8rem; }
.secondary-domain code { font: .82rem var(--mono); }
.footer-alias { color: var(--muted); }
.footer .footer-domain { margin-left: 4px; }
@media (max-width: 470px) {
  .footer .shell { align-items: flex-start; padding-block: 14px; }
  .footer-alias { display: block; }
  .footer-alias .footer-domain { margin-left: 0; }
}
