:root {
  color-scheme: light;
  --bg: #eefaff;
  --text: #102237;
  --muted: #5a7288;
  --soft: #2b455c;
  --cyan: #009cc6;
  --magenta: #c451a6;
  --green: #008f6b;
  --gold: #9a6a00;
  --line: rgba(18, 57, 82, 0.16);
  --panel: rgba(255, 255, 255, 0.72);
  --shadow: 0 24px 80px rgba(38, 91, 124, 0.15);
  --radius: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(122deg, #fbfdff 0%, #edf9fb 34%, #f8f2fb 68%, #fff8e8 100%),
    #f7fcfd;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.9), rgba(219, 246, 246, 0.6) 28%, transparent 50%),
    linear-gradient(28deg, rgba(255, 244, 218, 0.78), transparent 42%),
    linear-gradient(222deg, rgba(245, 223, 243, 0.54), transparent 44%);
  animation: breathe 18s var(--ease) infinite alternate;
}

body::after {
  background:
    linear-gradient(104deg, transparent 0 30%, rgba(255, 255, 255, 0.32) 44%, transparent 60%),
    linear-gradient(244deg, transparent 0 36%, rgba(235, 249, 243, 0.42) 58%, transparent 82%);
  opacity: 0.72;
  animation: drift 24s var(--ease) infinite alternate;
}

@keyframes breathe {
  from {
    opacity: 0.76;
    transform: scale(1);
  }
  to {
    opacity: 0.96;
    transform: scale(1.025);
  }
}

@keyframes drift {
  from {
    transform: translate3d(-1.5%, -1%, 0);
  }
  to {
    transform: translate3d(1.5%, 1%, 0);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 14px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(18, 57, 82, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.12);
}

.brand {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 0.9rem;
  font-weight: 850;
  text-transform: uppercase;
}

.brand span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}

.ghost-button:hover {
  border-color: rgba(0, 156, 198, 0.34);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.doc-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) 0 64px;
}

.doc-loading {
  min-height: 56svh;
  display: grid;
  align-content: center;
}

.doc-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.78fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  min-height: 68svh;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--green), transparent);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  margin-top: 12px;
  max-width: 780px;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  font-weight: 900;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 850;
}

h4 {
  color: var(--soft);
  font-size: 0.96rem;
  font-weight: 850;
}

.lead {
  max-width: 720px;
  margin-top: 18px;
  color: var(--soft);
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.75;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(18, 57, 82, 0.12);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 760;
  white-space: nowrap;
}

.tag.cyan {
  border-color: rgba(0, 156, 198, 0.34);
  color: #006d8d;
}

.tag.gold {
  border-color: rgba(154, 106, 0, 0.26);
  color: var(--gold);
}

.tag-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid rgba(18, 57, 82, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 14px 36px rgba(38, 91, 124, 0.08);
}

.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 860;
  text-transform: uppercase;
}

.tag-label::before {
  content: "🏷️";
}

.hero-card,
.doc-content {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 42%), rgba(0, 156, 198, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(229, 248, 255, 0.56) 50%, rgba(250, 240, 255, 0.44)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
}

.hero-card {
  overflow: hidden;
  min-height: 410px;
  padding: 18px;
}

.hero-card img {
  width: 100%;
  height: 250px;
  border: 1px solid rgba(18, 57, 82, 0.12);
  border-radius: calc(var(--radius) - 6px);
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.hero-card .mini {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero-card .mini p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(300px, 0.34fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  margin-top: 24px;
}

.content-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.doc-content {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3.2vw, 42px);
  width: 100%;
}

.doc-content > * + h2 {
  margin-top: 14px;
}

.doc-content > * + h3 {
  margin-top: 8px;
}

.doc-content p,
.doc-content li {
  color: var(--muted);
  line-height: 1.72;
}

.doc-content ul,
.doc-content ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2rem;
}

.doc-content a {
  color: #075f78;
  font-weight: 780;
  text-decoration: underline;
  text-decoration-color: rgba(0, 156, 198, 0.28);
  text-underline-offset: 4px;
}

.doc-content code,
.doc-content pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.doc-content :not(pre) > code {
  border: 1px solid rgba(18, 57, 82, 0.12);
  border-radius: 7px;
  padding: 0.08rem 0.32rem;
  background: rgba(255, 255, 255, 0.74);
  color: #1d5265;
  font-size: 0.9em;
}

.code-wrap {
  overflow: hidden;
  border: 1px solid rgba(18, 57, 82, 0.12);
  border-radius: 14px;
  background: rgba(16, 34, 55, 0.92);
}

.code-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 13px;
  color: rgba(234, 247, 251, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 14px;
  color: #eaf7fb;
  font-size: 0.8rem;
  line-height: 1.62;
  white-space: pre-wrap;
}

blockquote {
  margin: 0;
  border-left: 3px solid var(--cyan);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--soft);
  line-height: 1.68;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

th,
td {
  border-bottom: 1px solid rgba(18, 57, 82, 0.12);
  padding: 10px 12px;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.doc-error {
  min-height: 56svh;
  display: grid;
  align-content: center;
  gap: 16px;
}

@media (max-width: 900px) {
  .doc-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .doc-hero {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-shell {
    width: min(100% - 28px, 1120px);
  }

  .hero-card img {
    height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
