:root {
  --bg: #050607;
  --panel: #0b0e12;
  --panel-top: #11151b;
  --line: #2a303a;
  --line-soft: rgba(235, 238, 245, 0.08);
  --text: #f3f5f8;
  --muted: #9aa3b2;
  --muted-2: #687180;
  --green: #58f08b;
  --amber: #f1b85a;
  --danger: #ff6b5f;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 255, 255, 0.06), transparent 30%),
    radial-gradient(circle at 14% 84%, rgba(88, 240, 139, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%, rgba(0, 0, 0, 0.5)),
    linear-gradient(90deg, rgba(235, 238, 245, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(235, 238, 245, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 100%, 100% 100%, 100% 100%, 42px 42px, 42px 42px, auto;
}

body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.72)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.7));
}

body::before {
  position: fixed;
  inset: auto auto 6vh -9vw;
  width: 34vw;
  height: 34vw;
  min-width: 230px;
  min-height: 230px;
  border: 1px solid rgba(88, 240, 139, 0.12);
  border-radius: 999px;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 50%, rgba(88, 240, 139, 0.1), rgba(88, 240, 139, 0.02) 58%, transparent 68%),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(235, 238, 245, 0.08) 18px 20px);
  opacity: 0.72;
}

.workspace {
  position: relative;
  display: grid;
  align-content: start;
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0;
  margin-left: clamp(18px, 5vw, 84px);
  padding: clamp(54px, 9vh, 88px) 0 42px;
  gap: 18px;
}

.workspace::after {
  position: absolute;
  top: 8vh;
  right: -4vw;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(235, 238, 245, 0.1);
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    repeating-linear-gradient(90deg, rgba(235, 238, 245, 0.06) 0 1px, transparent 1px 18px);
  transform: rotate(9deg);
  box-shadow: 0 0 70px rgba(255, 255, 255, 0.04);
}

.site-title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.22em;
  width: min(980px, 100%);
  margin: 0 0 clamp(28px, 4vh, 52px);
  color: var(--text);
  font-family: "Didot", "Bodoni 72", "Bodoni 72 Smallcaps", "Georgia", serif;
  font-size: clamp(2.65rem, 6.9vw, 6.2rem);
  font-style: italic;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.092em;
  text-wrap: balance;
  transform: skewX(-7deg);
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.title-for {
  margin-left: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .package-marquee-track {
    animation: none;
  }
}

.auth-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  width: min(620px, 100%);
  justify-self: start;
  color: var(--text);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.package-marquee {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, 100%);
  margin: clamp(22px, 4vh, 34px) 0 clamp(30px, 4vh, 42px);
  justify-self: start;
}

.package-marquee-viewport {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(243, 245, 248, 0.09);
  border-bottom: 1px solid rgba(243, 245, 248, 0.09);
  padding: 22px 0 12px;
}

.package-marquee-viewport::before,
.package-marquee-viewport::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  content: "";
  pointer-events: none;
  z-index: 1;
}

.package-marquee-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), rgba(5, 6, 7, 0));
}

.package-marquee-viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), rgba(5, 6, 7, 0));
}

.package-marquee-track {
  display: flex;
  width: max-content;
  animation: packageMarquee 26s linear infinite;
}

.package-marquee-viewport:hover .package-marquee-track {
  animation-play-state: paused;
}

.package-marquee-group {
  display: flex;
  gap: 34px;
  padding-right: 34px;
}

.marquee-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.marquee-item::after {
  content: "/";
  margin-left: 34px;
  color: rgba(243, 245, 248, 0.18);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 1rem;
}

.package-marquee-group .marquee-item:last-child::after {
  content: "";
  margin-left: 0;
}

.marquee-item-name {
  color: var(--text);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

@keyframes packageMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.auth-status {
  padding: 6px 10px;
  border: 1px solid rgba(88, 240, 139, 0.34);
  color: var(--green);
  background: rgba(88, 240, 139, 0.08);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 2px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.text-button:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.18);
}

.logout-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.logout-icon:hover {
  color: var(--text);
}

.logout-icon span {
  position: relative;
  width: 22px;
  height: 18px;
  border: 2px solid currentColor;
  border-right: 0;
}

.logout-icon span::before,
.logout-icon span::after {
  position: absolute;
  content: "";
}

.logout-icon span::before {
  top: 6px;
  left: 8px;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.logout-icon span::after {
  top: 2px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.login-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.login-icon::before,
.login-icon::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.login-icon::before {
  top: 9px;
  left: 5px;
  width: 11px;
  height: 2px;
}

.login-icon::after {
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  background: transparent;
  transform: rotate(45deg);
}

.hidden {
  display: none;
}

.terminal {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(920px, 100%);
  margin-top: 8px;
  justify-self: start;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-top);
}

.traffic {
  display: flex;
  gap: 8px;
}

.traffic span {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(243, 245, 248, 0.22);
  border-radius: 50%;
}

.red {
  background: var(--danger);
}

.amber {
  background: var(--amber);
}

.green {
  background: var(--green);
}

.agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: 8px;
}

.tab,
.copy-icon {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tab {
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(235, 238, 245, 0.04);
}

.tab.active {
  color: var(--text);
  border-color: rgba(235, 238, 245, 0.28);
  background: rgba(235, 238, 245, 0.08);
}

.copy-icon {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: transparent;
}

.copy-icon:hover {
  color: var(--text);
}

.copy-icon::before,
.copy-icon::after {
  position: absolute;
  display: block;
  width: 14px;
  height: 17px;
  border: 2px solid currentColor;
  content: "";
  background: var(--panel-top);
}

.copy-icon::before {
  top: 10px;
  left: 8px;
}

.copy-icon::after {
  top: 6px;
  left: 13px;
  box-shadow: 0 0 0 2px var(--panel-top);
}

.copy-icon span {
  display: none;
}

.copy-status {
  flex: 0 0 auto;
  min-width: 5.2em;
  color: var(--green);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

pre {
  min-height: 230px;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  overflow-x: auto;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font: 450 clamp(0.98rem, 1.9vw, 1.12rem) / 1.7 "SFMono-Regular", "Menlo", monospace;
}

pre::selection {
  color: var(--panel);
  background: var(--text);
}

.post-login-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  width: min(920px, 100%);
  margin-top: -2px;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.post-login-links.hidden {
  display: none;
}

.post-login-links button {
  border: 0;
  padding: 0;
  color: rgba(243, 245, 248, 0.52);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-transform: lowercase;
}

.post-login-links button:hover,
.post-login-links button.active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.support-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  border-top: 1px solid rgba(243, 245, 248, 0.1);
  padding-top: 18px;
  color: rgba(243, 245, 248, 0.74);
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.support-panel.hidden {
  display: none;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 520;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.panel-head p {
  margin: 0;
  color: rgba(243, 245, 248, 0.38);
  font-size: 0.72rem;
  text-transform: lowercase;
}

.package-list {
  display: grid;
  gap: 0;
  max-height: 300px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.package-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 72px 96px 72px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(243, 245, 248, 0.07);
  padding: 9px 0;
  font-size: 0.78rem;
}

.package-type,
.package-version,
.package-docs {
  color: rgba(243, 245, 248, 0.46);
}

.package-docs {
  color: rgba(88, 240, 139, 0.72);
}

.support-form {
  display: grid;
  gap: 14px;
}

.request-rows {
  display: grid;
  gap: 10px;
}

.request-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px;
  gap: 10px;
}

.support-form input,
.support-form select,
.support-form textarea {
  width: 100%;
  border: 1px solid rgba(243, 245, 248, 0.14);
  border-radius: 2px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
}

.support-form textarea {
  resize: vertical;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
  color: rgba(243, 245, 248, 0.3);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plus-button,
.submit-link {
  border: 1px solid rgba(243, 245, 248, 0.16);
  border-radius: 2px;
  color: rgba(243, 245, 248, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.plus-button {
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  line-height: 1;
}

.submit-link {
  padding: 8px 12px;
  text-transform: lowercase;
}

.plus-button:hover,
.submit-link:hover {
  border-color: rgba(243, 245, 248, 0.34);
  color: var(--text);
}

@media (max-width: 700px) {
  body {
    background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px, 28px 28px, auto;
  }

  body::before {
    inset: auto auto 3vh -12vw;
    width: 38vw;
    height: 38vw;
    min-width: 108px;
    min-height: 108px;
  }

  .workspace {
    width: min(100% - 18px, 1120px);
    min-height: 100svh;
    margin-left: 9px;
    padding: 24px 0 26px;
    gap: 12px;
  }

  .workspace::after {
    top: 4vh;
    right: -15vw;
    width: 92px;
    height: 92px;
  }

  .site-title {
    margin-bottom: 28px;
    font-size: clamp(2.05rem, 12vw, 3.3rem);
    line-height: 0.92;
    letter-spacing: -0.1em;
    transform: skewX(-5deg);
  }

  .auth-row {
    gap: 8px;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
  }

  .package-marquee {
    margin: 18px 0 20px;
  }

  .package-marquee-viewport {
    padding: 18px 0 10px;
  }

  .package-marquee-viewport::before,
  .package-marquee-viewport::after {
    width: 34px;
  }

  .package-marquee-group {
    gap: 22px;
    padding-right: 22px;
  }

  .marquee-item::after {
    margin-left: 22px;
    font-size: 0.84rem;
  }

  .marquee-item-name {
    font-size: 0.82rem;
  }

  .auth-status {
    padding: 4px 7px;
  }

  .text-button {
    padding: 9px 11px;
  }

  .terminal-bar {
    align-items: flex-start;
    gap: 7px;
    min-height: auto;
    padding: 9px 8px;
  }

  .traffic {
    gap: 5px;
    padding-top: 8px;
  }

  .traffic span {
    width: 10px;
    height: 10px;
  }

  .agent-tabs {
    gap: 5px;
    margin-left: 2px;
  }

  .tab {
    flex: 1 1 auto;
    padding: 6px 7px;
    font-size: clamp(0.62rem, 2.9vw, 0.8rem);
    letter-spacing: -0.045em;
  }

  .copy-icon {
    width: 30px;
    height: 30px;
  }

  .copy-icon::before,
  .copy-icon::after {
    width: 11px;
    height: 14px;
    border-width: 2px;
  }

  .copy-icon::before {
    top: 9px;
    left: 7px;
  }

  .copy-icon::after {
    top: 5px;
    left: 11px;
  }

  .copy-status {
    min-width: 4.7em;
    font-size: 0.7rem;
  }

  .post-login-links {
    gap: 12px;
    font-size: 0.7rem;
  }

  .package-row {
    grid-template-columns: 1fr 52px;
    gap: 6px 10px;
  }

  .package-version,
  .package-docs {
    font-size: 0.68rem;
  }

  .request-row {
    grid-template-columns: 1fr;
  }

  pre {
    min-height: 250px;
    padding: 14px;
    font-size: clamp(0.76rem, 3vw, 0.9rem);
    line-height: 1.62;
  }
}
