:root {
  color-scheme: dark;
  --bg: #071014;
  --surface: #0c171d;
  --surface-raised: #111f26;
  --line: rgba(150, 201, 214, .13);
  --line-strong: rgba(150, 201, 214, .23);
  --text: #f1f7f8;
  --muted: #91a4aa;
  --dim: #5d737a;
  --cyan: #73e7e5;
  --violet: #b1a4ff;
  --lime: #c7e879;
  --amber: #f0c477;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(45, 154, 164, .14), transparent 34%),
    radial-gradient(circle at 92% 24%, rgba(119, 86, 177, .10), transparent 28%),
    var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .28;
  background-image:
    linear-gradient(rgba(137, 207, 215, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 207, 215, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
input { font: inherit; }

a { color: inherit; }

.page-shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(115, 231, 229, .35);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(115, 231, 229, .06);
  box-shadow: inset 0 0 14px rgba(115, 231, 229, .04);
  font-size: 19px;
  line-height: 1;
}

.wordmark-dot { color: var(--cyan); }

.header-time,
.header-status,
.module-count,
.card-index,
.card-state,
.module-kicker,
.eyebrow,
.footer-version {
  font-family: var(--mono);
  letter-spacing: .07em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
}

.header-time {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #7f949a;
  background: rgba(10, 22, 27, .55);
  font-size: 10px;
  letter-spacing: 0;
  white-space: nowrap;
}

.header-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(115, 231, 229, .16);
  border-radius: 999px;
  color: #7da2a6;
  background: rgba(115, 231, 229, .04);
  font-size: 9px;
  white-space: nowrap;
}

.status-dot,
.state-mark {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(115, 231, 229, .75);
}

.intro {
  position: relative;
  isolation: isolate;
  padding: 82px 0 70px;
}

.intro::before {
  position: absolute;
  top: 38px;
  right: 3%;
  z-index: -1;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(115, 231, 229, .07);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 34px rgba(115, 231, 229, .018),
    0 0 0 68px rgba(115, 231, 229, .012);
}

.intro::after {
  position: absolute;
  top: 162px;
  right: calc(3% + 89px);
  z-index: -1;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(115, 231, 229, .3), transparent);
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 19px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 500;
}

.eyebrow-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

h1 {
  display: flex;
  margin: 0;
  color: var(--text);
  font-size: 60px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.1;
}

h1 span,
h1 em { white-space: nowrap; }

h1 em {
  color: transparent;
  background: linear-gradient(108deg, #8cf1ef 10%, #76d6df 55%, #a9a4ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.intro-copy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.modules-section {
  padding-top: 4px;
}

.section-heading {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 11px;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
}

.module-count {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  background: rgba(255, 255, 255, .015);
  font-size: 9px;
}

.module-search {
  position: relative;
  display: flex;
  width: 220px;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 13px;
  z-index: 1;
  color: var(--dim);
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

.module-search input {
  width: 100%;
  height: 40px;
  padding: 0 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(11, 23, 29, .76);
  font: 11px var(--mono);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.module-search input::placeholder { color: var(--dim); }

.module-search input:hover {
  border-color: var(--line-strong);
  background: rgba(15, 30, 37, .82);
}

.module-search input:focus {
  border-color: rgba(115, 231, 229, .55);
  background: rgba(15, 30, 37, .92);
  box-shadow: 0 0 0 3px rgba(115, 231, 229, .07);
}

.module-search input::-webkit-search-cancel-button {
  opacity: .55;
  filter: invert(1);
}

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

.module-card {
  --accent: var(--cyan);
  position: relative;
  display: flex;
  min-height: 248px;
  flex-direction: column;
  overflow: hidden;
  padding: 17px 17px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 42%),
    rgba(11, 23, 29, .8);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .12);
  transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}

.module-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  opacity: .8;
  background: linear-gradient(90deg, transparent 3%, var(--accent) 24%, transparent 72%);
  content: "";
}

.module-card::after {
  position: absolute;
  top: -52px;
  right: -52px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 84%), transparent 68%);
  content: "";
  pointer-events: none;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 64%);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent), transparent 94%), transparent 46%),
    rgba(14, 29, 36, .94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
  transform: translateY(-3px);
}

.module-card--cyan { --accent: var(--cyan); }
.module-card--violet { --accent: var(--violet); }
.module-card--lime { --accent: var(--lime); }
.module-card--amber { --accent: var(--amber); }

.module-card--maintenance {
  opacity: .67;
  filter: saturate(.7);
}

.module-card--maintenance:hover {
  border-color: var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .12);
  transform: none;
}

.card-topline,
.card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-index {
  color: color-mix(in srgb, var(--accent), white 10%);
  font-size: 10px;
}

.card-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 8px;
}

.card-state .state-mark {
  width: 5px;
  height: 5px;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent), transparent 25%);
}

.module-card--maintenance .state-mark {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(240, 196, 119, .4);
}

.module-glyph {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 72%);
  border-radius: 13px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 93%);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent), transparent 94%);
  font-family: var(--mono);
  font-size: 23px;
  line-height: 1;
}

.module-copy { margin-top: 17px; }

.module-kicker {
  margin: 0 0 6px;
  color: var(--dim);
  font-size: 8px;
}

h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 620;
  letter-spacing: 0;
}

.module-description {
  display: -webkit-box;
  max-width: 30em;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-bottom {
  min-height: 45px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.module-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}

.module-action span {
  font-size: 16px;
  line-height: 1;
  transition: transform .2s ease;
}

.module-action:hover span,
.module-action:focus-visible span { transform: translate(3px, -3px); }

.module-action:focus-visible,
.wordmark:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.module-action--disabled { color: var(--dim); }

.card-corner {
  width: 7px;
  height: 7px;
  border-right: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  border-bottom: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 62px 0 30px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}

.footer-note p { margin: 0; }

.footer-rule {
  width: 24px;
  height: 1px;
  background: var(--line-strong);
}

.footer-version {
  margin-left: auto;
  font-size: 8px;
}

.no-script,
.empty-state {
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(11, 23, 29, .7);
  font-size: 12px;
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
}

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

@media (min-width: 621px) and (max-width: 960px) {
  .page-shell { width: min(100% - 48px, 840px); }
  h1 { font-size: 46px; }
  .intro::before { right: 0; transform: scale(.82); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 32px, 500px); }

  .site-header { min-height: 72px; }

  .wordmark { font-size: 14px; }

  .wordmark-mark {
    width: 26px;
    height: 26px;
  }

  .header-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }

  .header-time {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 9px;
  }

  .header-status {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 8px;
  }

  .intro { padding: 52px 0 48px; }

  .intro::before {
    top: 24px;
    right: -86px;
    width: 190px;
    height: 190px;
  }

  .intro::after { display: none; }

  .eyebrow { margin-bottom: 16px; }

  h1 {
    flex-direction: column;
    font-size: 39px;
    letter-spacing: -.02em;
    line-height: 1.14;
  }

  .intro-copy {
    margin-top: 15px;
    font-size: 14px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    padding-bottom: 14px;
  }

  .module-search { width: 100%; }
  .module-search input { height: 42px; }
  .module-grid { grid-template-columns: 1fr; gap: 12px; }

  .module-card {
    min-height: 230px;
    padding: 17px;
  }

  .module-glyph { margin-top: 19px; }

  .module-description {
    max-width: 36em;
    -webkit-line-clamp: 1;
  }

  .module-action { min-height: 44px; }

  .footer-note {
    padding-top: 48px;
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .page-shell { width: calc(100% - 28px); }
  .header-time { font-size: 8px; }
  .header-status { font-size: 7px; }
  h1 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
