:root {
  --pub-dev-bg: #f3f7fc;
  --pub-dev-surface: #ffffff;
  --pub-dev-surface-soft: #f8fbff;
  --pub-dev-border: rgba(15, 23, 42, 0.12);
  --pub-dev-text: #1f2937;
  --pub-dev-muted: #64748b;
  --pub-dev-heading: #0f172a;
  --pub-dev-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
  --pub-dev-shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.pub-devdocs-page {
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(59, 130, 246, 0.08), transparent 65%),
    radial-gradient(900px 420px at 90% -10%, rgba(139, 92, 246, 0.07), transparent 60%),
    var(--pub-dev-bg);
}

.pub-devdocs {
  padding: 2.1rem 0 4.2rem;
  color: var(--pub-dev-text);
}

.pub-devdocs__hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pub-dev-border);
  border-radius: 1.1rem;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.98));
  box-shadow: var(--pub-dev-shadow);
  margin-bottom: 1.15rem;
  padding: 1.5rem 1.45rem 1.2rem;
}

.pub-devdocs__hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pub-devdocs__orb {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(38px);
  opacity: .55;
  animation: pubDevFloat 9s ease-in-out infinite;
}

.pub-devdocs__orb--a { left: -80px; top: -120px; background: rgba(59, 130, 246, 0.22); }
.pub-devdocs__orb--b { right: -110px; top: -110px; background: rgba(139, 92, 246, 0.18); animation-delay: 1.4s; }
.pub-devdocs__orb--c { right: 15%; bottom: -160px; background: rgba(20, 184, 166, 0.16); animation-delay: 2.6s; }

.pub-devdocs__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 0.65), transparent 78%);
}

.pub-devdocs__hero-main,
.pub-devdocs__hero-preview {
  position: relative;
  z-index: 1;
}

.pub-devdocs__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 1rem;
}

.pub-devdocs__eyebrow {
  display: inline-flex;
  padding: .28rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pub-devdocs__hero h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.07;
  letter-spacing: -.03em;
  margin: .62rem 0 .62rem;
  color: var(--pub-dev-heading);
  max-width: 16ch;
}

.pub-devdocs__hero p {
  color: #64748b;
  font-size: 1rem;
  max-width: 54ch;
  line-height: 1.62;
}

.pub-devdocs__hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .62rem;
  margin-top: 1rem;
}

.pub-devdocs__hero-stats {
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .48rem;
}

.pub-devdocs__hero-stats span {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  font-size: .72rem;
  font-weight: 600;
  padding: .28rem .52rem;
  border-radius: .45rem;
}

.pub-devdocs__hero-preview {
  display: grid;
  gap: .56rem;
  align-content: start;
}

.pub-devdocs__mini-console {
  border-radius: .9rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: var(--pub-dev-shadow-soft);
}

.pub-devdocs__mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .7rem;
  font-size: .73rem;
  font-weight: 700;
  color: #334155;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.pub-devdocs__mini-head em {
  font-style: normal;
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857;
  border-radius: .4rem;
  padding: .1rem .38rem;
  font-size: .68rem;
}

.pub-devdocs__mini-console pre {
  margin: 0;
  padding: .78rem .82rem;
  background: #f8fbff;
  color: #0f172a;
  font-size: .78rem;
  line-height: 1.5;
  overflow: auto;
}

.pub-devdocs__mini-pill {
  font-size: .74rem;
  font-weight: 600;
  padding: .36rem .55rem;
  border-radius: .5rem;
  border: 1px solid rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
}

.pub-devdocs__mini-pill--alt {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}

.pub-devdocs__quick-actions {
  margin-bottom: .9rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .54rem;
}

.pub-devdocs__quick-actions a {
  text-decoration: none;
  text-align: center;
  border-radius: .7rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: .8rem;
  font-weight: 600;
  padding: .56rem .45rem;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.pub-devdocs__quick-actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.5);
  background: #f5f9ff;
}

.pub-devdocs__feature-row {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.pub-devdocs__feature-row article {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: .75rem;
  background: rgba(255, 255, 255, 0.94);
  padding: .7rem .72rem;
}

.pub-devdocs__feature-row h3 {
  margin: 0 0 .22rem;
  font-size: .87rem;
  color: #0f172a;
}

.pub-devdocs__feature-row p {
  margin: 0;
  color: #64748b;
  font-size: .77rem;
  line-height: 1.45;
}

.pub-devdocs__shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.pub-devdocs__sidebar {
  position: sticky;
  top: 90px;
}

.pub-devdocs__toc-toggle {
  width: 100%;
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: .75rem;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  padding: .62rem .82rem;
  font-weight: 700;
}

.pub-devdocs__nav {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: .9rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: .7rem;
  display: flex;
  flex-direction: column;
  gap: .18rem;
  box-shadow: var(--pub-dev-shadow-soft);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.pub-devdocs__nav::-webkit-scrollbar { width: 8px; }
.pub-devdocs__nav::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 999px; }

.pub-devdocs__nav-group-label {
  margin-top: .55rem;
  margin-bottom: .15rem;
  padding: 0 .48rem;
  color: #64748b;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pub-devdocs__nav-group-label:first-child { margin-top: 0; }

.pub-devdocs__nav a {
  text-decoration: none;
  color: #334155;
  font-size: .83rem;
  font-weight: 500;
  padding: .42rem .5rem;
  border-radius: .5rem;
  border-left: 2px solid transparent;
  transition: all .18s ease;
}

.pub-devdocs__nav a:hover {
  color: #0f172a;
  background: rgba(37, 99, 235, 0.1);
  transform: translateX(2px);
}

.pub-devdocs__nav a.is-active {
  color: #0f172a;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0));
  border-left-color: #60a5fa;
}

.pub-devdocs__content {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 1));
  box-shadow: var(--pub-dev-shadow);
  padding: 1.3rem 1.4rem;
}

.pub-devdocs__section + .pub-devdocs__section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.pub-devdocs__section h2 {
  margin: 0 0 .7rem;
  font-size: 1.35rem;
  letter-spacing: -.01em;
  color: var(--pub-dev-heading);
}

.pub-devdocs__section h2::after {
  content: '';
  display: block;
  width: 74px;
  height: 2px;
  border-radius: 999px;
  margin-top: .42rem;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, transparent);
}

.pub-devdocs__section p {
  color: #475569;
  font-size: .98rem;
  line-height: 1.72;
  max-width: 76ch;
}

.pub-devdocs__section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .84rem;
  padding: .08rem .34rem;
  border-radius: .34rem;
  background: #eef4fb;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #1d4ed8;
}

.pub-devdocs__inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: .72rem;
  background: #f8fbff;
  color: #1f2937;
  padding: .76rem .88rem;
  overflow: auto;
}

.pub-devdocs__code {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: .82rem;
  overflow: hidden;
  margin-top: .75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pub-devdocs__code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #f7fbff, #edf3fb);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding: .48rem .72rem;
  font-size: .8rem;
  font-weight: 700;
  color: #334155;
}

.pub-devdocs__copy {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border-radius: .45rem;
  padding: .2rem .52rem;
  font-size: .72rem;
  cursor: pointer;
  transition: all .18s ease;
}

.pub-devdocs__copy:hover {
  border-color: rgba(96, 165, 250, 0.55);
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.pub-devdocs__code pre {
  margin: 0;
  padding: .92rem 1rem;
  background: #f8fbff;
  color: #0f172a;
  overflow: auto;
  font-size: .82rem;
  line-height: 1.58;
}

.pub-devdocs__endpoint {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: .6rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: .76rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: .6rem .72rem;
  margin: .45rem 0;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pub-devdocs__endpoint:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.pub-devdocs__method {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
  border-radius: .42rem;
  padding: .2rem .3rem;
  border: 1px solid transparent;
  color: #fff;
}

.pub-devdocs__method--get { background: linear-gradient(120deg, #059669, #10b981); border-color: #34d399; }
.pub-devdocs__method--post { background: linear-gradient(120deg, #2563eb, #3b82f6); border-color: #60a5fa; }
.pub-devdocs__method--patch { background: linear-gradient(120deg, #d97706, #f59e0b); border-color: #fbbf24; }
.pub-devdocs__method--delete { background: linear-gradient(120deg, #dc2626, #ef4444); border-color: #f87171; }

.pub-devdocs__path {
  font-size: .84rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-devdocs__desc { color: #64748b; font-size: .81rem; }

.pub-devdocs__scope {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: .36rem;
  background: rgba(37, 99, 235, 0.1);
  padding: .18rem .4rem;
  color: #1d4ed8;
}

@keyframes pubDevFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 1100px) {
  .pub-devdocs__hero { grid-template-columns: 1fr; }
  .pub-devdocs__quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pub-devdocs__feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-devdocs__shell { grid-template-columns: 1fr; }
  .pub-devdocs__sidebar { position: static; }
  .pub-devdocs__toc-toggle { display: block; margin-bottom: .6rem; }
  .pub-devdocs__nav { display: none; max-height: none; }
  .pub-devdocs__nav.is-open { display: flex; }
}

@media (max-width: 780px) {
  .pub-devdocs { padding-top: 1.35rem; }
  .pub-devdocs__hero,
  .pub-devdocs__content { padding: 1rem; }
  .pub-devdocs__quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-devdocs__feature-row { grid-template-columns: 1fr; }
  .pub-devdocs__endpoint { grid-template-columns: 60px minmax(0, 1fr); }
  .pub-devdocs__desc, .pub-devdocs__scope { grid-column: 2 / -1; }
}
