:root {
  color-scheme: dark;
  --background: #080b12;
  --surface: #10151f;
  --surface-hover: #151c2a;
  --border: #242d3c;
  --text: #f6f8ff;
  --muted: #a5b1c7;
  --quiet: #8897b1;
  --focus: #91b8ff;
  --mono: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--background);
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:where(a, button):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell {
  width: min(1600px, 100% - 2 * clamp(18px, 4vw, 68px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-200%);
  border-radius: 8px;
  background: #2259bb;
}

.skip-link:focus { transform: none; }

.topbar {
  border-bottom: 1px solid #1a2130;
  background: #090d15;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.045em;
}

.brand-suffix { color: #a9c3ff; }

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #355899;
  border-radius: 11px;
  background: radial-gradient(circle at 45% 38%, #233f75, #141d31 68%);
  box-shadow: inset 0 0 9px #6096fa25, 0 0 16px #6395ff1c;
}

.brand-mark::before {
  width: 17px;
  height: 10px;
  transform: rotate(-42deg);
  border: 1px solid #a8cdff;
  border-radius: 50%;
  content: "";
}

.brand-mark::after {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1ecff;
  box-shadow: 0 0 8px #7bafff;
  content: "";
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 13px;
  border: 1px solid #293346;
  border-radius: 10px;
  color: #dce6f8;
  font-size: 13px;
  font-weight: 600;
}

.home-link:hover { background: #19253b; }
.external-arrow { color: #9dbaff; font-size: 16px; }

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 330px;
  margin-top: clamp(20px, 3vw, 37px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #293650;
  border-radius: 24px;
  background: radial-gradient(ellipse at 81% 46%, #172e62, #0d121e 62%);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #0d121e 0%, #0d121e 15%, #0d121eec 31%, #0d121e38 59%, #0d121e08 100%),
    linear-gradient(0deg, #0a0f1bcc, transparent 35%),
    url("./orbital-hero.webp") right 48% / auto max(100%, 44vw) no-repeat;
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#9cbcff13 1px, transparent 1px),
    linear-gradient(90deg, #9cbcff13 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 67%);
  pointer-events: none;
  content: "";
}

.hero-content {
  padding: clamp(30px, 4.2vw, 68px);
}

.hero-count {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #b6ccf4;
  font: 500 13px/1.4 var(--mono);
  letter-spacing: .025em;
}

.hero-count > span:first-child {
  width: 7px;
  height: 7px;
  margin-inline: 1px 3px;
  border-radius: 50%;
  background: #88bcff;
  box-shadow: 0 0 12px #80aaffb0;
}

.hero-separator { color: #8497ba; }

.hero h1 {
  margin: 0;
  color: #f4f8ff;
  font-size: clamp(46px, 5.2vw, 86px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.07;
}

.hero-intro {
  margin: 15px 0 25px;
  color: #b8c8e4;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.6;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 480px);
  min-height: 56px;
  padding: 0 12px 0 17px;
  border: 1px solid #506486;
  border-radius: 13px;
  background: #101a2c;
  box-shadow: inset 0 1px #c0d7ff14, 0 12px 32px #02061055;
}

.search-form:focus-within {
  border-color: #a5c8ff;
  box-shadow: 0 0 0 3px #89b5ff30;
}

.search-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-right: 1px;
  border: 1.7px solid #abbee3;
  border-radius: 50%;
  cursor: text;
}

.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.7px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: #abbee3;
  content: "";
}

#search {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16px;
}

#search::placeholder { color: #a0b0cb; opacity: 1; }
#search::-webkit-search-cancel-button { -webkit-appearance: none; }

.shortcut {
  flex: none;
  padding: 5px 7px;
  border: 1px solid #475675;
  border-radius: 6px;
  background: #1d2940;
  color: #c3d3ee;
  font: 600 12px/1 var(--mono);
  white-space: nowrap;
}

.clear-search {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #c2d3f2;
  font-size: 24px;
  line-height: 1;
}

.clear-search:hover { background: #293956; }

.directory {
  margin-top: clamp(29px, 4vw, 46px);
  scroll-margin-top: 20px;
}

.directory:focus { outline: 0; }

.directory-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 17px;
}

.directory-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 14px;
}

.directory-title h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 740;
  letter-spacing: -.035em;
  line-height: 1.2;
}

#directory-count {
  margin: 0;
  color: var(--quiet);
  font-size: 13px;
  white-space: nowrap;
}

.filters {
  display: inline-flex;
  gap: 3px;
  min-inline-size: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0e131d;
}

.filters label {
  position: relative;
  display: block;
  cursor: pointer;
}

.filters input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
}

.filters label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b3bfd6;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.filters small {
  color: inherit;
  font: 500 11px/1 var(--mono);
}

.filters label:hover > span { background: #192235; }
.filters input:checked + span {
  border-color: #334d7d;
  background: #1c2c4b;
  color: #e5efff;
}

.filters input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry { min-width: 0; }

.card {
  --accent: #a8c5ff;
  --accent-fill: #192744;
  --accent-border: #35466c;
  position: relative;
  display: flex;
  height: 100%;
  min-height: 171px;
  flex-direction: column;
  padding: 17px 19px 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(124deg, #ffffff03, transparent 49%), var(--surface);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.card--violet { --accent: #c3baff; --accent-fill: #262141; --accent-border: #493d70; }
.card--green { --accent: #8de7b2; --accent-fill: #183126; --accent-border: #2e5443; }
.card--sky { --accent: #97dcfc; --accent-fill: #172c3b; --accent-border: #305467; }
.card--amber { --accent: #f8ce89; --accent-fill: #382b1e; --accent-border: #605037; }
.card--lilac { --accent: #dfbaf5; --accent-fill: #302139; --accent-border: #553c60; }
.card--mint { --accent: #92ebde; --accent-fill: #163335; --accent-border: #2d5859; }
.card--rose { --accent: #ffb4ca; --accent-fill: #39222f; --accent-border: #623b4c; }
.card--silver { --accent: #d3dcf1; --accent-fill: #252e3f; --accent-border: #404d66; }

.card:focus-visible {
  border-color: var(--focus);
  background-color: var(--surface-hover);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 11px;
  background: var(--accent-fill);
  color: var(--accent);
  font: 700 15px/1 var(--mono);
  letter-spacing: -.035em;
}

.card-icon--han {
  font-family: inherit;
  font-size: 16px;
}

.card-icon--grid {
  grid-template: repeat(2, 5px) / repeat(2, 5px);
  align-content: center;
  justify-content: center;
  gap: 3px;
}

.card-icon--grid i {
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.card-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #2b3649;
  border-radius: 9px;
  color: #b0c0dc;
  font-size: 18px;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

@media (hover: hover) {
  .card:hover {
    z-index: 1;
    transform: translateY(-2px);
    border-color: var(--accent-border);
    background-color: var(--surface-hover);
  }

  .card:hover .card-arrow {
    border-color: var(--accent-border);
    background-color: var(--accent-fill);
    color: var(--accent);
  }
}

.card h3 {
  margin: 12px 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.card-description {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #253044;
}

.card-domain {
  color: #9eb0cc;
  font: 500 12px/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.access {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #182f29;
  color: #a2e5c6;
  font-size: 11px;
  font-weight: 630;
  line-height: 1.35;
  white-space: nowrap;
}

.access::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.access--protected {
  background: #332c23;
  color: #f2ce9f;
}

.empty {
  display: grid;
  min-height: 172px;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px dashed #3b4c6b;
  border-radius: 15px;
  background: var(--surface);
  color: #c7d4ec;
  text-align: center;
}

.empty p { margin: 0; }

.empty button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #3a516e;
  border-radius: 9px;
  background: #1b2c46;
  color: #d9e8ff;
  font-size: 13px;
}

.empty button:hover { background: #253f65; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 33px;
  padding: 17px 1px 24px;
  border-top: 1px solid #222c3a;
  color: var(--quiet);
  font-size: 12px;
}

.footer > span { font-family: var(--mono); }
.footer a { color: #b7c6e1; }
.footer a:hover { text-decoration: underline; }

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

@media (max-width: 600px) {
  .topbar-inner { min-height: 62px; }
  .hero { min-height: 288px; border-radius: 19px; }
  .hero::before {
    background:
      linear-gradient(90deg, #0d121ef2 0%, #0d121ede 37%, #0d121e5c 100%),
      linear-gradient(0deg, #0a0f1bc9, transparent 58%),
      url("./orbital-hero.webp") 69% 43% / auto 115% no-repeat;
  }

  .hero::after { opacity: .6; }
  .hero-content { padding: 30px 20px; }
  .hero-count { margin-bottom: 13px; font-size: 12px; }
  .hero-intro { margin-block: 12px 19px; }
  .search-form { gap: 10px; padding-inline: 13px 10px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 155px; padding: 15px 16px 12px; }
  .card h3 { margin-top: 10px; }
  .card-description { margin-bottom: 9px; }
  .card-footer { padding-top: 9px; }
  .directory-bar { align-items: flex-start; flex-direction: column; }
  .filters label > span { min-height: 38px; }
}

@media (pointer: coarse) {
  .shortcut { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
  }
  .card:hover { transform: none; }
}
