:root {
  color-scheme: light dark;
  --page: light-dark(#f7f7fb, #101014);
  --surface: light-dark(#ffffff, #19191f);
  --surface-raised: light-dark(#ffffff, #202027);
  --surface-soft: light-dark(#f0effa, #25232e);
  --text: light-dark(#1e1d29, #f5f3fb);
  --text-soft: light-dark(#676475, #aaa6b6);
  --border: light-dark(#e1dfea, #34323c);
  --border-strong: light-dark(#d1cedd, #46434f);
  --primary: light-dark(#5b45d6, #9c8cff);
  --primary-strong: light-dark(#4632ba, #b4a8ff);
  --primary-soft: light-dark(#ece9ff, #2d2942);
  --success: light-dark(#247a58, #77d2aa);
  --success-soft: light-dark(#e3f5ed, #19372c);
  --danger: light-dark(#b33b4b, #ff98a5);
  --danger-soft: light-dark(#fae8eb, #41242a);
  --shadow: 0 18px 50px light-dark(rgba(30, 29, 41, .09), rgba(0, 0, 0, .3));
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-width: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, light-dark(rgba(99, 77, 229, .08), rgba(128, 106, 255, .08)), transparent 28rem),
    var(--page);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--page);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid light-dark(rgba(225, 223, 234, .8), rgba(52, 50, 60, .8));
  background: light-dark(rgba(247, 247, 251, .88), rgba(16, 16, 20, .88));
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--content-width));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand > span:last-child {
  display: flex;
  gap: 5px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.brand-mark,
.footer-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary-strong), var(--primary));
  color: white;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px light-dark(rgba(91, 69, 214, .24), rgba(0, 0, 0, .2));
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-nav > a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.header-nav > a:hover {
  color: var(--text);
}

.token-button,
.primary-button,
.secondary-button,
.download-button,
.detail-button,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.token-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 4px 16px light-dark(rgba(30, 29, 41, .05), rgba(0, 0, 0, .12));
}

.token-button:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.token-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-soft);
  box-shadow: 0 0 0 3px light-dark(rgba(103, 100, 117, .12), rgba(170, 166, 182, .12));
}

.token-button.has-token .token-indicator {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

main {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, .5fr);
  align-items: center;
  min-height: 390px;
  padding: 68px 0 54px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-description {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.hero-graphic {
  position: relative;
  width: 300px;
  height: 300px;
  justify-self: end;
  opacity: .92;
}

.orbit {
  position: absolute;
  inset: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.orbit::before,
.orbit::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 24px var(--primary);
  content: "";
}

.orbit::before {
  top: 18px;
  left: 48px;
}

.orbit::after {
  right: 12px;
  bottom: 67px;
}

.orbit-two {
  inset: 70px 15px;
  transform: rotate(60deg);
}

.hero-cube {
  position: absolute;
  display: block;
  border: 1px solid light-dark(rgba(91, 69, 214, .28), rgba(156, 140, 255, .32));
  border-radius: 16px;
  background: linear-gradient(145deg, light-dark(rgba(255, 255, 255, .9), rgba(45, 41, 66, .85)), var(--primary-soft));
  box-shadow: var(--shadow);
  transform: rotate(15deg);
}

.hero-cube::after {
  position: absolute;
  inset: 25%;
  border: 2px solid var(--primary);
  border-radius: 8px;
  content: "";
}

.cube-one {
  top: 92px;
  left: 105px;
  width: 92px;
  height: 92px;
}

.cube-two {
  top: 34px;
  right: 25px;
  width: 52px;
  height: 52px;
  transform: rotate(-12deg);
}

.cube-three {
  right: 24px;
  bottom: 27px;
  width: 62px;
  height: 62px;
  transform: rotate(32deg);
}

.catalog-section {
  padding: 36px 0 76px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.catalog-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -.035em;
}

.catalog-count {
  margin: 0 0 5px;
  color: var(--text-soft);
  font-size: 14px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px;
  gap: 12px;
  margin-bottom: 26px;
}

.search-field,
.select-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 5px 18px light-dark(rgba(30, 29, 41, .035), rgba(0, 0, 0, .1));
}

.search-field:focus-within,
.select-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-field svg {
  width: 19px;
  height: 19px;
  margin-left: 15px;
  color: var(--text-soft);
}

.search-field input,
.select-field select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-field input {
  padding: 0 15px 0 11px;
}

.search-field input::placeholder {
  color: var(--text-soft);
}

.select-field select {
  padding: 0 36px 0 14px;
  cursor: pointer;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.module-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 32px light-dark(rgba(30, 29, 41, .045), rgba(0, 0, 0, .14));
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.module-card:hover {
  border-color: light-dark(#cbc6e9, #514b6b);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-topline,
.card-footer,
.module-meta,
.card-actions {
  display: flex;
  align-items: center;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 22px;
}

.module-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.03em;
}

.status-badge,
.category-badge,
.release-channel,
.release-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.status-badge {
  background: var(--success-soft);
  color: var(--success);
  text-transform: capitalize;
}

.status-badge.deprecated,
.release-status.yanked {
  background: var(--danger-soft);
  color: var(--danger);
}

.publisher {
  margin: 0 0 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.module-name {
  margin: 0;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.module-summary {
  display: -webkit-box;
  min-height: 50px;
  margin: 12px 0 20px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.module-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-bottom: 20px;
}

.category-badge,
.release-channel {
  background: var(--surface-soft);
  color: var(--text-soft);
  text-transform: capitalize;
}

.version {
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.card-footer {
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.updated {
  color: var(--text-soft);
  font-size: 11px;
}

.card-actions {
  gap: 7px;
}

.detail-button,
.download-button,
.primary-button,
.secondary-button,
.text-button {
  min-height: 38px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.detail-button,
.secondary-button {
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.detail-button:hover,
.secondary-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.download-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  background: var(--text);
  color: var(--page);
}

.download-button:hover,
.primary-button:hover {
  background: var(--primary-strong);
  color: white;
}

.download-button svg {
  width: 15px;
  height: 15px;
}

.download-button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: .55;
}

.catalog-message {
  padding: 44px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  text-align: center;
}

.catalog-message .retry-button {
  margin-top: 16px;
}

.catalog-message strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--content-width));
  min-height: 110px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

.footer-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

dialog {
  width: min(calc(100% - 28px), 820px);
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}

dialog::backdrop {
  background: rgba(13, 12, 18, .62);
  backdrop-filter: blur(7px);
}

.dialog-shell {
  max-height: calc(100vh - 34px);
  overflow: auto;
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--border);
  background: light-dark(rgba(255, 255, 255, .96), rgba(32, 32, 39, .96));
  backdrop-filter: blur(14px);
}

.dialog-header h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
}

.icon-button:hover {
  background: var(--surface-soft);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.dialog-content {
  padding: 26px;
}

.detail-summary {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 30px;
}

.detail-fact {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.detail-fact span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-fact strong {
  font-size: 13px;
  font-weight: 650;
}

.releases-heading {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 650;
}

.release-list {
  display: grid;
  gap: 12px;
}

.release-item {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.release-heading,
.artifact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.release-heading > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.release-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 750;
}

.release-date {
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

.release-notes {
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.compatibility-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  margin-top: 13px;
  color: var(--text-soft);
  font-size: 11px;
}

.artifact-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.artifact-row {
  min-width: 0;
}

.artifact-name {
  min-width: 0;
}

.artifact-name strong,
.artifact-name span {
  display: block;
}

.artifact-name strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-name span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
  text-transform: uppercase;
}

.artifact-row .download-button {
  min-height: 34px;
}

.detail-loading,
.detail-error,
.empty-releases {
  padding: 36px 12px;
  color: var(--text-soft);
  text-align: center;
}

.token-dialog {
  width: min(calc(100% - 28px), 560px);
}

.token-form {
  overflow: auto;
}

.token-copy {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  margin: 24px 26px 20px;
  padding: 15px;
  border-radius: 13px;
  background: var(--primary-soft);
}

.token-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.token-copy code {
  color: var(--text);
  font-size: 11px;
}

.lock-illustration {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary);
}

.lock-illustration svg {
  width: 23px;
  height: 23px;
}

.form-field,
.checkbox-field,
.form-error {
  margin-right: 26px;
  margin-left: 26px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field > span {
  font-size: 12px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-error {
  margin-top: 14px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding: 18px 26px 24px;
  border-top: 1px solid var(--border);
}

.action-spacer {
  flex: 1;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 16px;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--text-soft);
}

.danger-button {
  color: var(--danger);
}

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100% - 40px));
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--text);
  color: var(--page);
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--shadow);
}

.toast.error {
  background: light-dark(#8f2f3c, #ff98a5);
  color: light-dark(#ffffff, #2b1217);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 72px 0 58px;
  }

  .hero-graphic {
    position: absolute;
    right: -90px;
    width: 280px;
    height: 280px;
    opacity: .34;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .header-inner,
  main,
  .site-footer {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .header-inner {
    min-height: 64px;
  }

  .brand > span:last-child,
  .header-nav > a {
    display: none;
  }

  .token-button {
    min-height: 38px;
    padding: 0 12px;
  }

  .hero {
    padding-top: 55px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 56px);
  }

  .hero-description {
    font-size: 16px;
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .module-card {
    min-height: 0;
    padding: 20px;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions,
  .card-actions button {
    width: 100%;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .dialog-header,
  .dialog-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .release-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .artifact-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .artifact-row .download-button {
    width: 100%;
  }

  .token-copy,
  .form-field,
  .checkbox-field,
  .form-error {
    margin-right: 20px;
    margin-left: 20px;
  }

  .token-copy {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    flex-wrap: wrap;
    padding-right: 20px;
    padding-left: 20px;
  }

  .danger-button {
    width: 100%;
    order: 4;
    text-align: left;
  }
}

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