/* ===========================================================================
   discord-pfp-api

   Layout: Discord's app chrome. A 72px icon rail, a 240px channel sidebar, and
   a content column with a sticky topbar and its own scroll region.

   Three things to know before editing:

   1. [hidden] is forced with !important near the top of this file. The HTML
      hidden attribute only works because the UA stylesheet says
      [hidden] { display: none }, and ANY author rule setting display beats it.
      .notice { display: flex } silently defeated hidden and left an empty red
      bar on screen permanently. Toggling visibility by attribute is only safe
      with the override in place.

   2. Every flex or grid child that needs to scroll carries min-height: 0.
      Flex items default to min-height: auto and refuse to shrink below their
      content, so without it the content column grows past the viewport instead
      of scrolling, and body's overflow: hidden clips it with no scrollbar.

   3. Content is capped and centred inside the scroll region, and wide layouts
      place a second column beside the main one so large displays fill with
      information rather than empty charcoal.
   =========================================================================== */

:root {
  --rail: #1a1b1e;
  --sidebar: #2b2d31;
  --content: #313338;
  --raised: #2b2d31;
  --sunken: #1e1f22;
  --hover: #35373c;
  --active: #404249;

  --border: #3f4147;
  --border-soft: #26282c;

  --text: #f2f3f5;
  --text-2: #b5bac1;
  --text-3: #949ba4;
  --link: #00a8fc;

  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --green: #23a55a;
  --yellow: #f0b232;
  --red: #f23f43;

  --font: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;

  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;

  --rail-w: 72px;
  --sidebar-w: 240px;
  --topbar-h: 48px;
  --measure: 1280px;
}

* {
  box-sizing: border-box;
}

/* See note 1 at the top of this file. This must outrank every display rule. */
[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--rail);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--mono);
}

::selection {
  background: var(--blurple);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.scroll::-webkit-scrollbar,
.sidebar__scroll::-webkit-scrollbar,
.code-block::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scroll::-webkit-scrollbar-thumb,
.sidebar__scroll::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb {
  background: var(--sunken);
  border-radius: 4px;
}

.scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------------------------------------------------------------------
   Shell
   --------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--rail-w) var(--sidebar-w) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

/* Rail --------------------------------------------------------------------- */

.rail {
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
}

.rail__logo,
.rail__item {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--sidebar);
  color: var(--text-2);
  border-radius: 24px;
  font-size: 18px;
  transition:
    border-radius 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.rail__logo:hover,
.rail__item:hover {
  border-radius: var(--r-lg);
  background: var(--blurple);
  color: #fff;
  text-decoration: none;
}

/*
  The mark is a violet robot on a transparent background, so the tile behind it
  stays dark. On blurple, which is what every other rail tile turns on hover,
  the robot would disappear into its own background. The radius still morphs on
  hover, because that is the movement the rail is built around.
*/
.rail__logo {
  background: var(--sidebar);
  color: #fff;
  padding: 7px;
}

.rail__logo:hover {
  background: var(--bg-3, #35373c);
}

.rail__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rail__item.is-active {
  border-radius: var(--r-lg);
  background: var(--blurple);
  color: #fff;
}

.rail__item::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 4px;
  height: 0;
  background: #fff;
  border-radius: 0 4px 4px 0;
  transition: height 0.15s ease;
}

.rail__item:hover::before {
  height: 20px;
}
.rail__item.is-active::before {
  height: 36px;
}

.rail__divider {
  flex: 0 0 auto;
  width: 32px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin: 2px 0;
}

/* Sidebar ------------------------------------------------------------------ */

.sidebar {
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.sidebar__header {
  flex: 0 0 var(--topbar-h);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.sidebar__title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__version {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 2px 5px;
}

.sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 8px 24px;
}

.group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 8px 4px;
}

.group-label--spaced {
  margin-top: 20px;
}

.group-label__action {
  background: none;
  border: none;
  color: var(--text-3);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.group-label__action:hover {
  color: var(--text);
}

.channel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
}

.channel:hover {
  background: var(--hover);
  color: var(--text-2);
  text-decoration: none;
}
.channel.is-active {
  background: var(--active);
  color: var(--text);
}
.channel__hash {
  color: var(--text-3);
  font-weight: 400;
  font-size: 18px;
}

.recent {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  margin-bottom: 2px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.recent:hover {
  background: var(--hover);
  color: var(--text-2);
}

.recent img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: 0 0 20px;
  background: var(--sunken);
}

.recent span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-note {
  font-size: 13px;
  color: var(--text-3);
  padding: 4px 8px;
}

/* Content ------------------------------------------------------------------ */

.content {
  background: var(--content);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  flex: 0 0 var(--topbar-h);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.topbar__menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
}

.topbar__hash {
  color: var(--text-3);
  font-size: 22px;
  line-height: 1;
}
.topbar__title {
  font-size: 16px;
  font-weight: 700;
}

.topbar__rule {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.topbar__note {
  font-size: 13px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  /*
   * Reserve matching space on both sides for the vertical scrollbar.
   * This keeps all centered content visually centered.
   */
  scrollbar-gutter: stable both-edges;

  padding: 32px 40px 96px;

  /* Firefox scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--sunken) transparent;
}

.view {
  display: none;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
}

.view.is-active {
  display: block;
}

/* Two column layouts ------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.split--docs {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
}

.split__main {
  min-width: 0;
  display: grid;
  gap: 20px;
  align-content: start;
}

.split__side {
  min-width: 0;
  display: grid;
  gap: 20px;
  align-content: start;
  position: sticky;
  top: 0;
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */

.hero {
  max-width: 1200px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--raised);
  border-radius: 4px;
  padding: 5px 12px;
}

.eyebrow i {
  color: var(--blurple);
  font-size: 12px;
}

.hero__title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.022em;
  margin-top: 16px;
}

.hero__sub {
  font-size: 17px;
  color: var(--text-2);
  margin-top: 12px;
  max-width: 90ch;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.hero__facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.hero__facts i {
  color: var(--green);
  font-size: 11px;
}

/* ---------------------------------------------------------------------------
   Search
   --------------------------------------------------------------------------- */

.search {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.search__field {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--sunken);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: border-color 0.12s ease;
}

.search__field:focus-within {
  border-color: var(--blurple);
}

.search__icon {
  position: absolute;
  left: 16px;
  color: var(--text-3);
  font-size: 15px;
  pointer-events: none;
}

.search__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  padding: 16px 14px 16px 44px;
}

.search__input:focus {
  outline: none;
}
.search__input::placeholder {
  color: var(--text-3);
  font-family: var(--font);
}

.search__kbd {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px 6px;
  margin-right: 12px;
}

.hint {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 10px;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--active);
  border: none;
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease;
}

.btn:hover {
  background: #4e5058;
  text-decoration: none;
}
.btn--primary {
  background: var(--blurple);
}
.btn--primary:hover {
  background: var(--blurple-hover);
}
.btn--lg {
  padding: 16px 28px;
  font-size: 15px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* ---------------------------------------------------------------------------
   Notice. One element, three appearances, driven by a modifier class.
   --------------------------------------------------------------------------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 3px solid var(--text-3);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--raised);
}

.notice__icon {
  margin-top: 3px;
  font-size: 14px;
}
.notice__body {
  flex: 1;
  min-width: 0;
}
.notice__text {
  font-size: 14px;
  font-weight: 600;
}
.notice__hint {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

.notice__close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
}
.notice__close:hover {
  color: var(--text);
}

.notice--ok {
  border-left-color: var(--green);
  background: rgba(35, 165, 90, 0.09);
}
.notice--ok .notice__icon {
  color: var(--green);
}

.notice--warn {
  border-left-color: var(--yellow);
  background: rgba(240, 178, 50, 0.09);
}
.notice--warn .notice__icon {
  color: var(--yellow);
}

.notice--error {
  border-left-color: var(--red);
  background: rgba(242, 63, 67, 0.09);
}
.notice--error .notice__icon {
  color: var(--red);
}

/* ---------------------------------------------------------------------------
   Skeleton
   --------------------------------------------------------------------------- */

.skeleton {
  position: relative;
  margin-top: 24px;
  background: var(--raised);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 260px;
  max-width: 720px;
}

.skeleton__banner {
  height: 120px;
  background: var(--hover);
}

.skeleton__avatar {
  position: absolute;
  top: 68px;
  left: 16px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--raised);
}

.skeleton__avatar::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--hover);
}

.skeleton__lines {
  padding: 52px 16px 0;
}

.skeleton__line {
  display: block;
  height: 12px;
  width: 120px;
  background: var(--hover);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}

.skeleton__line--wide {
  width: 220px;
  height: 16px;
}

.skeleton__banner,
.skeleton__line,
.skeleton__avatar::after {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------------------------------------------------------------------------
   Profile card
   --------------------------------------------------------------------------- */

.result {
  margin-top: 24px;
}

.card {
  position: relative;
  background: var(--raised);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.card__banner {
  position: relative;
  height: 120px;
  background-color: var(--blurple);
  background-size: cover;
  background-position: center;
}

.card__banner-tag {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--r-sm);
  padding: 3px 7px;
}

.card__avatar-ring {
  position: absolute;
  top: 68px;
  left: 16px;
  padding: 6px;
  background: var(--raised);
  border-radius: 50%;
  line-height: 0;
}

.card__avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--sunken);
  object-fit: cover;
}

.card__avatar-badge {
  position: absolute;
  right: 2px;
  bottom: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--green);
  border: 3px solid var(--raised);
  border-radius: 8px;
  padding: 3px 5px;
}

.card__body {
  padding: 20px 18px 18px;
  margin-top: 44px;
}

.card__names {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card__display {
  font-size: 22px;
  font-weight: 700;
}

.card__handle {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-2);
  margin-top: 1px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--blurple);
  border-radius: var(--r-sm);
  padding: 2px 5px;
}

.card__panel {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--sunken);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px 24px;
}

.field__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field__value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin-top: 3px;
  word-break: break-all;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.copy {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
  line-height: 1;
}
.copy:hover {
  color: var(--text);
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

/* ---------------------------------------------------------------------------
   Detail panels
   --------------------------------------------------------------------------- */

.panel {
  background: var(--raised);
  border-radius: var(--r-lg);
  padding: 18px;
}

.panel__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
}

.panel__note {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 8px;
  max-width: 60ch;
}

.kv {
  margin: 14px 0 0;
  display: grid;
  gap: 1px;
}

.kv > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.kv > div:last-child {
  border-bottom: none;
}
.kv dt {
  font-size: 13px;
  color: var(--text-3);
}

.kv dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.urls {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.url-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}

.url-row__verb {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 2px;
  padding: 1px 4px;
}

.url-row__path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.size-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 7px 11px;
}

.size-link:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}

.raw summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
}

.raw summary::-webkit-details-marker {
  display: none;
}

.raw summary::before {
  content: "\203A";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}

.raw[open] summary::before {
  transform: rotate(90deg);
}
.raw summary:hover {
  color: var(--text);
}

/* ---------------------------------------------------------------------------
   Content blocks below the tool
   --------------------------------------------------------------------------- */

.block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}

.block__h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.block__lead {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 10px;
  max-width: 68ch;
}

/* Steps */

.steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  background: var(--raised);
  border-radius: var(--r-lg);
  padding: 18px;
}

.step__n {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blurple);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  padding-top: 5px;
}
.step p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 5px;
}
.step strong {
  color: var(--text);
  font-weight: 600;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.feature {
  background: var(--raised);
  border-radius: var(--r-lg);
  padding: 20px;
}

.feature i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--sunken);
  color: var(--blurple);
  font-size: 15px;
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 14px;
}
.feature p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 7px;
}

/* FAQ */

.faq {
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.qa {
  background: var(--raised);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.qa summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "\002B";
  margin-left: auto;
  color: var(--text-3);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.qa[open] summary::after {
  content: "\2212";
}
.qa summary:hover {
  background: var(--hover);
}

.qa > p {
  padding: 0 18px 18px;
  font-size: 14px;
  color: var(--text-2);
}

.qa code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  color: var(--text);
}

/* ---------------------------------------------------------------------------
   Docs and terms
   --------------------------------------------------------------------------- */

.toc {
  position: sticky;
  top: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}
.toc .panel__title {
  padding: 0 8px 6px;
}

.toc a {
  font-size: 14px;
  color: var(--text-3);
  padding: 6px 8px;

  border-left: 2px solid transparent;
}

.toc a:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}
.toc a.is-active {
  color: var(--text);
  border-left-color: var(--blurple);
}

.doc-head {
  padding-bottom: 4px;
}
.doc-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.doc-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 12px;
  font-family: var(--mono);
}

.doc-h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  scroll-margin-top: 16px;
}

.doc-p {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 14px;
  max-width: 74ch;
}

.doc-p code,
.ep__desc code,
.bullets code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--sunken);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  color: var(--text);
}

/* The can and cannot table on the terms page */

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.compare__side {
  background: var(--raised);
  border-radius: var(--r-lg);
  padding: 18px;
}

.compare__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.compare__side--yes .compare__head {
  color: var(--green);
}
.compare__side--no .compare__head {
  color: var(--red);
}

.compare ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compare li {
  font-size: 14px;
  color: var(--text-2);
  padding: 7px 0 7px 22px;
  position: relative;
}

.compare li::before {
  position: absolute;
  left: 0;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
  top: 10px;
}

.compare__side--yes li::before {
  content: "\f00c";
  color: var(--green);
}
.compare__side--no li::before {
  content: "\f00d";
  color: var(--red);
}

.ep {
  margin-top: 20px;
  padding: 18px;
  background: var(--raised);
  border-radius: var(--r-lg);
}
.ep__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.verb {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--r-sm);
  padding: 2px 6px;
}

.ep__path {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}
.ep__path em {
  color: var(--yellow);
  font-style: normal;
}
.ep__desc {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 10px;
  max-width: 74ch;
}

.params {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.params th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 12px 6px 0;
  border-bottom: 1px solid var(--border);
}

.params td {
  padding: 8px 12px 8px 0;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.params td.mono {
  color: var(--text);
}

.bullets {
  color: var(--text-2);
  font-size: 15px;
  margin: 14px 0 0;
  padding-left: 20px;
  max-width: 74ch;
}
.bullets li {
  padding: 5px 0;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-top: 20px;
  border-bottom: 1px solid var(--border);
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text-2);
}
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--blurple);
}

.tab-panel {
  display: none;
}
.tab-panel.is-active {
  display: block;
}

/* ---------------------------------------------------------------------------
   Code blocks
   --------------------------------------------------------------------------- */

.code-block,
pre[class*="language-"] {
  position: relative;
  isolation: isolate;

  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;

  background: var(--sunken) !important;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);

  /* Normal padding only. No extra top or right gap. */
  padding: 14px 16px !important;
  margin: 14px 0 0 !important;

  overflow-x: hidden;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;

  font-family: var(--mono) !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  text-shadow: none !important;
  tab-size: 2;
}

.code-block code,
code[class*="language-"],
pre[class*="language-"] code {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;

  white-space: inherit !important;
  overflow-wrap: anywhere;
  word-break: break-word;

  font-family: var(--mono) !important;
  font-size: 13px !important;
  text-shadow: none !important;
  color: var(--text-2);
}

/* Floating copy button */
.code-copy {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 10;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);

  background: var(--raised);
  color: var(--text-3);

  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;

  cursor: pointer;
  opacity: 1;
  transform: translateY(0);

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.code-copy:hover {
  background: var(--hover);
  border-color: var(--text-3);
  color: var(--text);
}

.code-copy:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.code-copy.is-copied {
  color: var(--green);
  border-color: var(--green);
}

/* Automatically hidden after inactivity */
.code-copy.is-idle {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
}

/* Always reveal while the code block is being hovered or focused */
.code-block:hover > .code-copy,
.code-block:focus-within > .code-copy,
pre[class*="language-"]:hover > .code-copy,
pre[class*="language-"]:focus-within > .code-copy {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.code-copy i {
  font-size: 11px;
}

/* Use an icon-only button on small screens */
@media (max-width: 560px) {
  .code-copy {
    padding: 7px;
  }

  .code-copy span {
    display: none;
  }
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6d7178;
  font-style: normal;
}
.token.punctuation {
  color: #8a8f98;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #f0b232;
}
.token.boolean,
.token.number {
  color: #ff9d5c;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #6fcf7f;
}
.token.operator,
.token.entity,
.token.url {
  color: #b5bac1;
  background: none;
}
.token.atrule,
.token.attr-value,
.token.keyword {
  color: #b48ef2;
}
.token.function,
.token.class-name {
  color: #7ec4ff;
}
.token.regex,
.token.important,
.token.variable {
  color: #f0b232;
}

/* ---------------------------------------------------------------------------
   Toast
   --------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  z-index: 50;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split__side {
    position: static;
  }
  .split--docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .creator-menu {
    left: 16px;
    bottom: 16px;
  }

  .creator-menu__toggle {
    background: var(--blurple);
    color: #fff;
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .creator-menu__toggle::before {
    display: none;
  }

  .creator-card {
    left: 16px;
    bottom: 76px;

    width: min(340px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;

    transform-origin: left bottom;
  }

  .creator-card::before {
    left: 18px;
    bottom: -7px;

    border: none;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Remove the desktop icon rail */
  .rail {
    display: none;
  }

  /* Sidebar is now fully off-screen when closed */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .topbar__menu {
    display: block;
  }

  .topbar__rule,
  .topbar__note {
    display: none;
  }

  .scroll {
    padding: 24px 24px 80px;
  }

  .hero__title {
    font-size: 32px;
  }

  .search {
    flex-direction: column;
  }

  .search__kbd {
    display: none;
  }

  .btn,
  .card__actions .btn {
    width: 100%;
  }

  .steps,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .split__side {
    position: static;
  }

  .split--docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 560px) {
  .creator-menu {
    left: 12px;
    bottom: 12px;
  }

  .creator-menu__toggle {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .creator-card {
    left: 12px;
    bottom: 66px;

    width: calc(100vw - 24px);
    padding: 14px;
  }

  .creator-card__header {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .creator-card__avatar {
    width: 50px;
    height: 50px;
  }
  .scroll {
    padding: 20px 16px 64px;
  }

  .hero__title {
    font-size: 27px;
  }

  .hero__sub {
    font-size: 15px;
  }

  .card__body {
    padding: 18px 14px 14px;
  }

  .card__panel {
    padding: 14px;
  }

  .kv > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .kv dd {
    text-align: left;
  }

  .block {
    margin-top: 40px;
    padding-top: 32px;
  }

  .block__h2 {
    font-size: 21px;
  }

  .doc-title {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1050px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ep,
.ep__head,
.ep__desc,
.tab-panel,
.split__main,
.doc-p {
  min-width: 0;
  max-width: 100%;
}

/* Wrap long endpoint paths */
.ep__path,
.doc-p code,
.ep__desc code,
.bullets code,
.qa code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Prevent API tables from widening the page */
.params {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.params th,
.params td {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content,
.scroll,
.view,
.split,
.split__main,
.tab-panel {
  min-width: 0;
  max-width: 100%;
}

.scroll {
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------------
   Creator popup
   --------------------------------------------------------------------------- */

.creator-menu {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 70;
}

/* The waving-hand button at the bottom of the rail */
.creator-menu__toggle {
  position: relative;
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  padding: 0;
  border: none;
  border-radius: 50%;

  background: var(--sidebar);
  color: var(--text-2);

  font-family: inherit;
  font-size: 19px;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

  transition:
    border-radius 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.creator-menu__toggle::before {
  content: "";
  position: absolute;
  left: -12px;

  width: 4px;
  height: 0;

  border-radius: 0 4px 4px 0;
  background: #fff;

  transition: height 0.15s ease;
}

.creator-menu__toggle:hover,
.creator-menu__toggle.is-open {
  border-radius: var(--r-lg);
  background: var(--blurple);
  color: #fff;
}

.creator-menu__toggle:hover::before {
  height: 20px;
}

.creator-menu__toggle.is-open::before {
  height: 36px;
}

.creator-menu__toggle:active {
  transform: scale(0.96);
}

/* Small waving animation on hover */
.creator-menu__toggle:hover i {
  animation: creator-wave 0.7s ease-in-out;
  transform-origin: 70% 75%;
}

@keyframes creator-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(16deg);
  }

  40% {
    transform: rotate(-10deg);
  }

  60% {
    transform: rotate(14deg);
  }

  80% {
    transform: rotate(-6deg);
  }
}

/* Popup card */
.creator-card {
  position: fixed;
  left: 82px;
  bottom: 12px;

  width: min(340px, calc(100vw - 98px));
  padding: 16px;

  border: 1px solid var(--border);
  border-radius: var(--r-lg);

  background: var(--raised);
  color: var(--text);

  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);

  transform-origin: left bottom;
}

/* Arrow pointing toward the hand button */
.creator-card::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 20px;

  width: 12px;
  height: 12px;

  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  background: var(--raised);
  transform: rotate(45deg);
}

.creator-card:not([hidden]) {
  animation: creator-card-open 0.16s ease-out;
}

@keyframes creator-card-open {
  from {
    opacity: 0;
    transform: translateX(-6px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.creator-card__header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.creator-card__avatar {
  display: block;
  width: 56px;
  height: 56px;

  border: 3px solid var(--content);
  border-radius: 50%;

  background: var(--sunken);
  object-fit: cover;
}

.creator-card__identity {
  min-width: 0;
}

.creator-card__eyebrow {
  margin: 0;

  color: var(--text-3);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.creator-card__name {
  margin: 3px 0 0;

  overflow: hidden;
  color: var(--text);

  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-card__handle {
  margin: 2px 0 0;

  overflow: hidden;
  color: var(--text-3);

  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-card__close {
  align-self: start;

  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;
  padding: 0;

  border: none;
  border-radius: var(--r-sm);

  background: transparent;
  color: var(--text-3);

  font-size: 14px;
  cursor: pointer;
}

.creator-card__close:hover {
  background: var(--hover);
  color: var(--text);
}

.creator-card__description {
  margin-top: 14px;
  padding-bottom: 14px;

  border-bottom: 1px solid var(--border-soft);

  color: var(--text-2);

  font-size: 13px;
  line-height: 1.5;
}

.creator-card__links {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.creator-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;

  min-width: 0;
  padding: 9px;

  border-radius: var(--r-md);

  color: var(--text-2);
  text-decoration: none;

  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}

.creator-link:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}

.creator-link__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border-radius: var(--r-md);

  background: var(--sunken);
  color: var(--text-2);

  font-size: 14px;
}

.creator-link:hover .creator-link__icon {
  color: var(--blurple);
}

.creator-link__content {
  display: grid;
  min-width: 0;
}

.creator-link__label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.creator-link__value {
  overflow: hidden;

  color: var(--text-3);

  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-link__arrow {
  color: var(--text-3);
  font-size: 10px;
  opacity: 0;

  transform: translate(-3px, 3px);

  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

.creator-link:hover .creator-link__arrow {
  opacity: 1;
  transform: translate(0, 0);
}
