:root {
  --rem-blue-50: #f2f9ff;
  --rem-blue-100: #dff1ff;
  --rem-blue-200: #b9e1ff;
  --rem-blue-300: #86ccff;
  --rem-blue-400: #55b5f5;
  --rem-blue-500: #3499df;
  --rem-blue-600: #257dc2;
  --rem-pink: #f09bd1;
  --rem-ink: #29435d;
  --rem-pointer-x: 50vw;
  --rem-pointer-y: 20vh;
  --md-primary-fg-color: #55b5f5;
  --md-primary-fg-color--light: #86ccff;
  --md-primary-fg-color--dark: #257dc2;
  --md-accent-fg-color: #3499df;
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: #f8fcff;
  --md-default-fg-color: #29435d;
  --md-typeset-a-color: #257dc2;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #101b2a;
  --md-default-fg-color: #dceeff;
  --md-typeset-a-color: #86ccff;
  --rem-ink: #dceeff;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--md-default-bg-color);
  background-image:
    radial-gradient(
      circle 26rem at var(--rem-pointer-x) var(--rem-pointer-y),
      rgba(134, 204, 255, 0.2),
      transparent 72%
    ),
    linear-gradient(135deg, rgba(223, 241, 255, 0.16), transparent 46%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/images/theme/rem-hero.webp");
  background-repeat: no-repeat;
  background-position: calc(100% - 2vw) bottom;
  background-size: auto 96vh;
  content: "";
  opacity: 0.2;
  filter: saturate(0.95) drop-shadow(-1.5rem 0 2.6rem rgba(52, 153, 223, 0.18));
  animation: rem-background-float 7s ease-in-out infinite;
}

.md-container,
.md-footer {
  position: relative;
  z-index: 1;
}

html:not([data-rem-theme="off"]) .md-content__inner {
  box-sizing: border-box;
  margin-top: 1.2rem;
  padding: clamp(1rem, 2.4vw, 2rem);
  border: 1px solid rgba(134, 204, 255, 0.26);
  border-radius: 1.35rem;
  background: rgba(248, 252, 255, 0.82);
  box-shadow: 0 1rem 2.8rem rgba(43, 111, 163, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

[data-md-color-scheme="slate"]:not([data-rem-theme="off"]) .md-content__inner {
  background: rgba(16, 27, 42, 0.82);
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.24);
}

@keyframes rem-background-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-0.35rem, -0.7rem, 0) scale(1.008);
  }
}

.md-grid {
  max-width: 1760px;
}

.md-header {
  background: linear-gradient(110deg, #3499df 0%, #62bdf5 54%, #8ea8f8 100%);
  box-shadow: 0 0.15rem 0.7rem rgba(36, 106, 161, 0.22);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  object-fit: cover;
  object-position: top;
  box-shadow: 0 0.12rem 0.5rem rgba(27, 91, 145, 0.28);
}

.md-tabs {
  background: linear-gradient(90deg, #2d8fd3, #66bdf3 68%, #92aaf6);
}

/* Material 通过 hidden 控制页签动画，并同时关闭 pointer-events。
   自定义主题会保留这条导航栏，因此必须恢复其交互能力。 */
.md-tabs[hidden] {
  pointer-events: auto;
}

.md-tabs__link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 2.05rem;
  margin-top: 0.175rem;
  padding: 0 0.72rem;
  border-radius: 0.72rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

/* Material 会在页签动画期间保留 hidden 属性；自定义背景仍可见时，
   同步恢复文字，避免顶部导航只剩下一条空色带。 */
.md-tabs[hidden] .md-tabs__link {
  opacity: 0.76;
  transform: none;
}

.md-tabs[hidden] .md-tabs__item--active .md-tabs__link {
  opacity: 1;
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link--active,
.md-tabs__link:hover,
.md-tabs__link:focus-visible {
  color: #fff;
  text-shadow: 0 0 0.6rem rgba(255, 255, 255, 0.65);
}

.md-tabs__item--active .md-tabs__link {
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 -2px 0 rgba(255, 255, 255, 0.78),
    0 0.2rem 0.55rem rgba(30, 105, 164, 0.16);
}

.md-tabs__link:hover,
.md-tabs__link:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.md-tabs__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.md-typeset {
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.8;
}

.md-content,
.md-content__inner,
.md-typeset > *,
.md-nav__item,
.md-nav__link {
  min-width: 0;
}

.md-typeset :is(p, li, h1, h2, h3, h4, a, strong, span, time),
.md-nav__link {
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: break-word;
}

.md-nav__link {
  width: auto;
  max-width: 100%;
  white-space: normal;
}

.md-typeset h1 {
  color: var(--rem-ink);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.md-typeset h2 {
  margin-top: 2.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid rgba(85, 181, 245, 0.28);
  color: var(--rem-ink);
}

.md-typeset h3 {
  margin-top: 1.8em;
}

.md-typeset .md-button {
  border-color: var(--rem-blue-400);
  border-radius: 999px;
}

.md-typeset .md-button--primary {
  background: linear-gradient(110deg, var(--rem-blue-500), #6ebff1);
  border-color: transparent;
  box-shadow: 0 0.35rem 0.9rem rgba(52, 153, 223, 0.2);
}

.md-typeset .grid.cards > ul > li {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(85, 181, 245, 0.3);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 100% 0, rgba(240, 155, 209, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(223, 241, 255, 0.72));
  box-shadow: 0 0.55rem 1.4rem rgba(43, 111, 163, 0.09);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.md-typeset .grid.cards > ul {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.md-typeset .grid.cards > ul > li::after {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  color: rgba(85, 181, 245, 0.38);
  content: "✦";
  font-size: 1rem;
}

.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-0.2rem);
  border-color: rgba(52, 153, 223, 0.62);
  box-shadow: 0 0.85rem 1.8rem rgba(43, 111, 163, 0.16);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li {
  background:
    radial-gradient(circle at 100% 0, rgba(240, 155, 209, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(30, 54, 79, 0.94), rgba(21, 43, 66, 0.9));
}

.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: var(--rem-blue-600);
}

[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__link:focus,
[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: var(--rem-blue-300);
}

.rem-hero {
  --rem-tilt-x: 0deg;
  --rem-tilt-y: 0deg;
  position: relative;
  display: grid;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 21rem;
  margin: 0 0 2.6rem;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 31%);
  border: 1px solid rgba(85, 181, 245, 0.34);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.92), transparent 24%),
    radial-gradient(circle at 92% 4%, rgba(240, 155, 209, 0.24), transparent 28%),
    linear-gradient(125deg, rgba(248, 253, 255, 0.98), rgba(211, 237, 255, 0.92));
  box-shadow:
    0 1.1rem 3rem rgba(43, 111, 163, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  isolation: isolate;
}

.rem-hero::before,
.rem-hero::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(85, 181, 245, 0.2);
  border-radius: 50%;
  content: "";
}

.rem-hero::before {
  top: -9rem;
  right: 4rem;
  width: 24rem;
  height: 24rem;
}

.rem-hero::after {
  right: -6rem;
  bottom: -10rem;
  width: 22rem;
  height: 22rem;
  border-color: rgba(240, 155, 209, 0.2);
}

.rem-hero__copy {
  z-index: 2;
  align-self: center;
  min-width: 0;
  padding: clamp(2rem, 5vw, 4.2rem);
}

.rem-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.45rem;
  color: var(--rem-blue-600);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.rem-hero__eyebrow::before {
  width: 1.8rem;
  height: 1px;
  margin-right: 0.6rem;
  background: linear-gradient(90deg, var(--rem-blue-400), var(--rem-pink));
  content: "";
}

.md-typeset .rem-hero h1 {
  margin: 0 0 0.7rem;
  color: #2e618c;
  font-size: clamp(2rem, 4.5vw, 3.65rem);
  line-height: 1.1;
}

.rem-hero__intro {
  max-width: 43rem;
  margin: 0;
  overflow-wrap: anywhere;
  color: #45647f;
  font-size: clamp(0.84rem, 1.4vw, 1.02rem);
  line-height: 1.95;
}

.rem-hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 21rem;
  transform: perspective(900px) rotateX(var(--rem-tilt-x)) rotateY(var(--rem-tilt-y));
  transform-origin: 50% 70%;
  transition: transform 120ms ease-out;
}

.rem-hero__visual img {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: 100%;
  height: 20rem;
  margin-bottom: -0.2rem;
  object-fit: contain;
  filter: drop-shadow(0 1rem 1.2rem rgba(56, 116, 164, 0.24));
}

.rem-hero__halo {
  position: absolute;
  top: 2.1rem;
  left: 50%;
  width: 13rem;
  height: 13rem;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(134, 204, 255, 0.3) 54%, transparent 55%);
  box-shadow: 0 0 2.2rem rgba(85, 181, 245, 0.34);
}

.rem-hero__name {
  position: absolute;
  right: -0.2rem;
  bottom: -0.6rem;
  z-index: 1;
  color: rgba(52, 153, 223, 0.11);
  font-size: 5.4rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
}

[data-md-color-scheme="slate"] .rem-hero {
  background:
    radial-gradient(circle at 82% 28%, rgba(89, 165, 218, 0.2), transparent 25%),
    radial-gradient(circle at 92% 4%, rgba(240, 155, 209, 0.12), transparent 28%),
    linear-gradient(125deg, rgba(25, 49, 73, 0.98), rgba(24, 62, 91, 0.94));
  box-shadow: 0 1rem 2.6rem rgba(0, 0, 0, 0.28);
}

[data-md-color-scheme="slate"] .md-typeset .rem-hero h1,
[data-md-color-scheme="slate"] .rem-hero__intro {
  color: #dceeff;
}

.latest-note-card {
  position: relative;
  padding: 1.35rem 1.5rem 1.45rem;
  overflow: hidden;
  border: 1px solid rgba(85, 181, 245, 0.3);
  border-radius: 1rem;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.96), rgba(231, 246, 255, 0.9));
  box-shadow: 0 0.55rem 1.5rem rgba(43, 111, 163, 0.09);
}

.latest-note-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 0.23rem;
  height: 100%;
  background: linear-gradient(var(--rem-blue-400), var(--rem-pink));
  content: "";
}

.latest-note-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: var(--rem-blue-600);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.latest-note-card__meta span {
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--rem-blue-100);
}

.md-typeset .latest-note-card h3 {
  margin: 0.42rem 0 0.3rem;
  font-size: 1.05rem;
}

.latest-note-card p {
  margin: 0.3rem 0 0.65rem;
}

.latest-note-card__link {
  font-weight: 700;
}

[data-md-color-scheme="slate"] .latest-note-card {
  background: linear-gradient(100deg, rgba(30, 54, 79, 0.96), rgba(24, 61, 89, 0.9));
}

[data-md-color-scheme="slate"] .latest-note-card__meta span {
  background: rgba(85, 181, 245, 0.14);
}

.portal-grid {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 2.4rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 8.2rem;
  padding: 1rem 1.05rem;
  overflow: hidden;
  flex-direction: column;
  color: var(--md-default-fg-color);
  border: 1px solid rgba(85, 181, 245, 0.3);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 100% 0, rgba(240, 155, 209, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(223, 241, 255, 0.72));
  box-shadow: 0 0.5rem 1.25rem rgba(43, 111, 163, 0.08);
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.portal-card:hover {
  color: var(--md-typeset-a-color);
  transform: translateY(-0.18rem);
  border-color: rgba(52, 153, 223, 0.62);
  box-shadow: 0 0.75rem 1.5rem rgba(43, 111, 163, 0.15);
}

.portal-card__index {
  margin-bottom: 0.45rem;
  color: var(--rem-blue-600);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.portal-card strong {
  margin-bottom: 0.28rem;
  color: var(--rem-ink);
  font-size: 1rem;
}

.portal-card > span:last-child {
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
  line-height: 1.7;
}

.portal-card--current::after {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  color: rgba(85, 181, 245, 0.46);
  content: "✦";
}

.updates-list,
.directory-list {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  margin: 1rem 0;
}

.updates-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.updates-list > *,
.directory-list > * {
  min-width: 0;
}

.section-more {
  margin-top: 0.8rem;
  text-align: right;
}

.category-directory {
  display: grid;
  gap: 1rem;
  margin: 1.3rem 0;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.category-directory__card {
  display: flex;
  min-width: 0;
  min-height: 11rem;
  padding: 1.35rem;
  flex-direction: column;
  color: var(--md-default-fg-color);
  border: 1px solid rgba(85, 181, 245, 0.32);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 100% 0, rgba(240, 155, 209, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(223, 241, 255, 0.76));
  box-shadow: 0 0.65rem 1.5rem rgba(43, 111, 163, 0.1);
  transition:
    transform 170ms ease,
    border-color 170ms ease;
}

.category-directory__card:hover {
  color: var(--md-default-fg-color);
  transform: translateY(-0.18rem);
  border-color: rgba(52, 153, 223, 0.62);
}

.category-directory__count {
  align-self: flex-start;
  margin-bottom: 0.55rem;
  padding: 0.08rem 0.5rem;
  color: var(--rem-blue-600);
  border-radius: 999px;
  background: var(--rem-blue-100);
  font-size: 0.66rem;
  font-weight: 700;
}

.category-directory__card strong {
  margin-bottom: 0.35rem;
  color: var(--rem-ink);
  font-size: 1.08rem;
}

.category-directory__card > span:not(.category-directory__count) {
  color: var(--md-default-fg-color--light);
}

.category-directory__card em {
  margin-top: auto;
  padding-top: 0.8rem;
  color: var(--md-typeset-a-color);
  font-style: normal;
  font-weight: 700;
}

.directory-item {
  min-width: 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(85, 181, 245, 0.28);
  border-radius: 1rem;
  background: rgba(248, 252, 255, 0.78);
  box-shadow: 0 0.5rem 1.3rem rgba(43, 111, 163, 0.08);
}

.directory-item__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--rem-blue-600);
  font-size: 0.68rem;
  font-weight: 700;
}

.directory-item__meta span {
  padding: 0.05rem 0.48rem;
  border-radius: 999px;
  background: var(--rem-blue-100);
}

.md-typeset .directory-item h2 {
  margin: 0.4rem 0 0.25rem;
  padding: 0;
  border: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.directory-item p {
  margin: 0.3rem 0 0.55rem;
}

[data-md-color-scheme="slate"] .portal-card,
[data-md-color-scheme="slate"] .category-directory__card,
[data-md-color-scheme="slate"] .directory-item {
  background:
    radial-gradient(circle at 100% 0, rgba(240, 155, 209, 0.09), transparent 36%),
    rgba(22, 45, 68, 0.88);
}

[data-md-color-scheme="slate"] .category-directory__count,
[data-md-color-scheme="slate"] .directory-item__meta span {
  background: rgba(85, 181, 245, 0.14);
}

.rem-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 1.05rem;
  height: 1.05rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: rgba(134, 204, 255, 0.22);
  box-shadow:
    0 0 0.85rem rgba(85, 181, 245, 0.95),
    0 0 1.9rem rgba(134, 204, 255, 0.72);
  transition: opacity 160ms ease;
}

#rem-particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.rem-theme-switch {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0.36rem;
  align-items: center;
  min-height: 1.8rem;
  margin: 0 0.15rem;
  padding: 0.3rem 0.58rem;
  cursor: pointer;
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0.18rem 0.65rem rgba(39, 110, 164, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.rem-theme-switch:hover {
  transform: translateY(-0.06rem);
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 0.28rem 0.8rem rgba(39, 110, 164, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.rem-theme-switch:focus-visible {
  outline: 3px solid rgba(134, 204, 255, 0.55);
  outline-offset: 0.16rem;
}

.rem-theme-switch__icon {
  display: inline-grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.76rem;
}

html[data-rem-theme="off"] {
  --md-primary-fg-color: #4051b5;
  --md-primary-fg-color--light: #5d6cc0;
  --md-primary-fg-color--dark: #303f9f;
  --md-accent-fg-color: #536dfe;
}

html[data-rem-theme="off"] body {
  background-color: var(--md-default-bg-color);
  background-image: none;
}

html[data-rem-theme="off"] body::before,
html[data-rem-theme="off"] #rem-particle-canvas,
html[data-rem-theme="off"] .rem-cursor-glow {
  display: none;
}

html[data-rem-theme="off"] .md-header,
html[data-rem-theme="off"] .md-tabs {
  background: var(--md-primary-fg-color);
}

html[data-rem-theme="off"] .md-content__inner {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-rem-theme="off"] .rem-hero {
  min-height: auto;
  grid-template-columns: 1fr;
  border-color: var(--md-default-fg-color--lightest);
  background: transparent;
  box-shadow: none;
}

html[data-rem-theme="off"] .rem-hero__copy {
  padding: 2rem;
}

html[data-rem-theme="off"] .rem-hero__eyebrow,
html[data-rem-theme="off"] .rem-hero__visual,
html[data-rem-theme="off"] .rem-hero::before,
html[data-rem-theme="off"] .rem-hero::after {
  display: none;
}

html[data-rem-theme="off"] .md-typeset .rem-hero h1,
html[data-rem-theme="off"] .rem-hero__intro {
  color: var(--md-default-fg-color);
}

html[data-rem-theme="off"] .md-typeset .grid.cards > ul > li,
html[data-rem-theme="off"] .latest-note-card,
html[data-rem-theme="off"] .portal-card,
html[data-rem-theme="off"] .category-directory__card,
html[data-rem-theme="off"] .directory-item {
  border-color: var(--md-default-fg-color--lightest);
  background: transparent;
  box-shadow: none;
}

html[data-rem-theme="off"] .md-typeset .grid.cards > ul > li::after,
html[data-rem-theme="off"] .latest-note-card::before,
html[data-rem-theme="off"] .portal-card--current::after {
  display: none;
}

html[data-rem-theme="off"] .rem-theme-switch {
  background: rgba(255, 255, 255, 0.16);
}

.landing-page-marker {
  display: none;
}

@media screen and (min-width: 76.25em) {
  html:has(.landing-page-marker) .md-sidebar--primary,
  html.is-landing-page .md-sidebar--primary {
    display: none;
  }
}

.md-typeset div.arithmatex {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0;
  -webkit-overflow-scrolling: touch;
}

.md-typeset div.arithmatex > mjx-container {
  min-width: max-content;
}

.md-typeset table:not([class]) {
  font-size: 0.72rem;
}

@media screen and (max-width: 74.984375em) {
  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media screen and (max-width: 44.984375em) {
  body::before {
    right: -3rem;
    left: auto;
    width: 22rem;
    background-position: right bottom;
    background-size: auto 78vh;
    opacity: 0.14;
  }

  html:not([data-rem-theme="off"]) .md-content__inner {
    margin-top: 0.75rem;
    padding: 0.8rem;
    border-radius: 1rem;
  }

  .rem-hero {
    min-height: 27rem;
    grid-template-columns: 1fr;
  }

  .rem-hero__copy {
    align-self: start;
    padding: 2rem 1.45rem 12.5rem;
  }

  .rem-hero__visual {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 12rem;
    min-height: 14rem;
  }

  .rem-hero__visual img {
    height: 14rem;
  }

  .rem-hero__halo {
    top: 1.4rem;
    width: 9rem;
    height: 9rem;
  }

  .rem-hero__name {
    font-size: 3.8rem;
  }

  .latest-note-card {
    padding: 1.15rem 1.1rem 1.25rem;
  }

  .portal-grid,
  .updates-list,
  .category-directory,
  .md-typeset .grid.cards > ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-card {
    min-height: auto;
  }

  .directory-item {
    padding: 1rem;
  }

  .rem-theme-switch {
    gap: 0;
    min-width: 1.85rem;
    padding: 0.3rem;
  }

  .rem-theme-switch__label {
    display: none;
  }

  .md-typeset__table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .md-typeset__table table:not([class]) {
    min-width: 42rem;
  }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .rem-cursor-glow,
  #rem-particle-canvas {
    display: none;
  }

  body::before {
    animation: none;
  }

  .rem-hero__visual,
  .md-typeset .grid.cards > ul > li {
    transition: none;
  }
}
