/*
 * The documentation uses Material's layout and controls. These variables
 * apply the UnrealPy palette without changing how those controls work.
 */
:root {
  --md-text-font: "Segoe UI", system-ui, sans-serif;
  --md-code-font: "Cascadia Mono", Consolas, monospace;
}

[data-md-color-scheme="slate"] {
  color-scheme: dark;
  --md-default-bg-color: #141219;
  --md-default-bg-color--light: #1d1924;
  --md-default-fg-color: #f3eff8;
  --md-default-fg-color--light: #c6bed2;
  --md-default-fg-color--lighter: #aba2b8;
  --md-default-fg-color--lightest: #373040;
  --md-primary-fg-color: #1d1924;
  --md-primary-bg-color: #f8f4ff;
  --md-accent-fg-color: #ffe18a;
  --md-typeset-a-color: #f6d477;
  --md-code-bg-color: #211b2a;
  --md-code-fg-color: #f0e8fa;
  --md-footer-bg-color: #1b1722;
  --md-footer-bg-color--dark: #100e15;
  --up-faint: #201a29;
  --up-border: #3c3348;
  --up-tag: #e6cb80;
  --up-hover: #2a2236;
}

[data-md-color-scheme="default"] {
  color-scheme: light;
  --md-default-bg-color: #fdfbff;
  --md-default-fg-color: #261d31;
  --md-default-fg-color--light: #584d66;
  --md-default-fg-color--lighter: #695f75;
  --md-default-fg-color--lightest: #e3d9eb;
  --md-primary-fg-color: #f6f0fa;
  --md-primary-bg-color: #271d32;
  --md-accent-fg-color: #6b3c86;
  --md-typeset-a-color: #643c83;
  --md-code-bg-color: #f2edf7;
  --md-footer-bg-color: #2b2136;
  --md-footer-bg-color--dark: #1b1622;
  --up-faint: #f9f5fc;
  --up-border: #e1d6eb;
  --up-tag: #704688;
  --up-hover: #f3eaf8;
}

.md-header,
.md-tabs {
  border-bottom: 1px solid var(--up-border);
}

.md-header__button.md-logo svg {
  color: var(--up-tag);
}

.md-header__title .md-ellipsis {
  font-weight: 700;
  letter-spacing: -0.025em;
}

.md-tabs__item--active {
  border-bottom: 2px solid var(--up-tag);
}

.md-search__form {
  border-radius: 6px;
}

.md-typeset .md-button--primary {
  background: #f8d677;
  border-color: #f8d677;
  color: #271d32;
}

.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus-visible {
  background: #ffebae;
  border-color: #ffebae;
  color: #271d32;
}

.md-typeset .guide-screenshot {
  display: block;
  height: auto;
  margin-block: 0.65rem 1rem;
  border: 1px solid var(--up-border);
  border-radius: 0.3rem;
}

.md-content__inner:not(.unrealpy-home) h1 {
  color: var(--md-default-fg-color);
  font-weight: 720;
  letter-spacing: -0.04em;
}

.md-content__inner:not(.unrealpy-home) h2 {
  font-weight: 640;
  letter-spacing: -0.025em;
}

.md-content__inner:not(.unrealpy-home) a:not(.md-button, .headerlink) {
  text-underline-offset: 0.16em;
}

.md-content__inner:not(.unrealpy-home) a:not(.md-button, .headerlink):hover {
  text-decoration: underline;
}

.md-typeset :focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 4px;
}

/* Landing page */
.md-main__inner:has(.unrealpy-home) {
  width: 100%;
  max-width: none;
  margin: 0;
}

.md-content__inner.unrealpy-home {
  width: 100%;
  margin: 0;
  padding: 0;
}

.unrealpy-home .up-frame {
  width: min(100% - 3.2rem, 60rem);
  margin-inline: auto;
}

.unrealpy-home .up-hero {
  color-scheme: dark;
  background:
    linear-gradient(90deg, transparent 31px, #cbb7f010 32px, transparent 33px) 50% 0 / 64px 64px,
    linear-gradient(transparent 31px, #cbb7f010 32px, transparent 33px) 50% 0 / 64px 64px,
    radial-gradient(ellipse at 79% 46%, #3b294e 0, #251c32 37%, #191520 74%);
  color: #f7f2fe;
  border-bottom: 1px solid #483955;
  padding-block: clamp(2.3rem, 5vw, 4.8rem) clamp(2rem, 4.6vw, 4.2rem);
  --md-accent-fg-color: #ffe496;
}

.unrealpy-home .up-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
}

.unrealpy-home .up-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.95rem;
  color: #e9d4ff;
  font: 0.61rem/1.5 var(--md-code-font);
  letter-spacing: 0.045em;
}

.up-signal,
.up-editor-indicator {
  width: 0.33rem;
  height: 0.33rem;
  flex: 0 0 auto;
  background: #f8d677;
  border-radius: 50%;
}

.unrealpy-home h1 {
  margin: 0;
  color: #f7f2fe;
  font-weight: 760;
  font-size: clamp(2.4rem, 5.35vw, 4.05rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.unrealpy-home h1 em {
  color: #f8d677;
  font-style: normal;
}

.unrealpy-home .up-intro {
  max-width: 24rem;
  margin: 1.15rem 0 1.45rem;
  color: #dbd0e8;
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  line-height: 1.55;
}

.unrealpy-home .up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.unrealpy-home .up-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 690;
  font-size: 0.72rem;
}

.unrealpy-home .up-button-primary {
  background: #f8d677;
  border-color: #f8d677;
  color: #271d32;
}

.unrealpy-home .up-button-primary:is(:hover, :focus-visible) {
  background: #ffe8a9;
}

.unrealpy-home .up-button-secondary {
  background: #1d152a9c;
  border-color: #8873a2;
  color: #f7f2fe;
}

.unrealpy-home .up-button-secondary:is(:hover, :focus-visible) {
  background: #3c2e4d;
}

.unrealpy-home .up-purchase,
.unrealpy-home .up-demo-caption {
  color: #d0bfdc;
  font-size: 0.65rem;
}

.unrealpy-home .up-purchase {
  margin: 0.78rem 0 0;
}

.unrealpy-home .up-hero a:not(.up-button) {
  color: #f8d677;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.unrealpy-home .up-editor {
  overflow: hidden;
  border: 1px solid #735c8c;
  border-radius: 12px;
  background: #191320;
  box-shadow: 0 18px 60px #110c1980;
}

.up-editor-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #443651;
  background: #2b2237;
  color: #e7d7f5;
  font: 0.57rem/1.5 var(--md-code-font);
  overflow-wrap: anywhere;
}

.up-editor-dots {
  display: flex;
  gap: 0.2rem;
}

.up-editor-dots i {
  width: 0.24rem;
  height: 0.24rem;
  border-radius: 50%;
  background: #a78cb8;
}

.up-editor-dots i:first-child {
  background: #f8d677;
}

.up-editor-language {
  margin-inline-start: auto;
  color: #f2cb79;
}

.unrealpy-home .up-editor-code .highlight,
.unrealpy-home .up-editor-code pre {
  margin: 0;
}

.unrealpy-home .up-editor-code {
  --md-code-bg-color: #191320;
  --md-code-fg-color: #f0e8fa;
  --md-code-hl-keyword-color: #d8b4ff;
  --md-code-hl-string-color: #f4d28a;
  --md-code-hl-function-color: #a9e1c7;
  --md-code-hl-name-color: #f0e8fa;
  --md-code-hl-generic-color: #f0e8fa;
  --md-code-hl-operator-color: #ddc2f0;
  --md-code-hl-punctuation-color: #ddc2f0;
  --md-code-hl-special-color: #f4d28a;
  --md-code-hl-variable-color: #c7d6fa;
  --md-default-fg-color--light: #d6c3e7;
  --md-default-fg-color--lighter: #b5a0c3;
}

.unrealpy-home .up-editor-code pre > code {
  padding: 0.8rem 0.75rem;
  font-size: clamp(0.58rem, 1.1vw, 0.7rem);
  line-height: 1.65;
}

.up-editor-result {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
  padding: 0.56rem 0.75rem;
  border-top: 1px solid #443651;
  color: #cfbedc;
  font-size: 0.6rem;
}

.up-editor-result strong {
  margin-inline-end: 0.6rem;
  font-weight: 640;
}

.unrealpy-home .up-editor-result code {
  background: transparent;
  color: #b6ebc8;
  padding: 0;
}

.up-editor-indicator {
  align-self: center;
  background: #9fdfb9;
}

.unrealpy-home .up-demo-caption {
  margin: 0.6rem 0 0;
}

.unrealpy-home .up-demo-caption a {
  white-space: nowrap;
}

.unrealpy-home .up-paths {
  padding-block: 2.25rem 1.65rem;
}

.unrealpy-home .up-strengths {
  padding-block: 2.25rem 0;
}

.up-strength-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 2rem;
  margin-top: 0.85rem;
}

.up-strength-grid > div {
  padding-top: 0.65rem;
  border-top: 1px solid var(--up-border);
}

.unrealpy-home .up-strength-grid h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.unrealpy-home .up-strength-grid p,
.unrealpy-home .up-showcase p {
  margin: 0.3rem 0 0;
  color: var(--md-default-fg-color--light);
}

.unrealpy-home .up-showcase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding-block: 1.35rem 1.6rem;
  border-top: 1px solid var(--up-border);
}

.unrealpy-home .up-showcase p {
  max-width: 32rem;
}

.unrealpy-home .up-strength-grid a,
.unrealpy-home .up-showcase a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.unrealpy-home h2 {
  margin: 0;
  color: var(--md-default-fg-color);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 710;
  letter-spacing: -0.035em;
}

.up-section-heading p {
  margin: 0.3rem 0 1rem;
  color: var(--md-default-fg-color--light);
}

.up-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.unrealpy-home .up-card {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--up-border);
  border-radius: 8px;
  background: var(--up-faint);
  color: var(--md-default-fg-color);
}

.unrealpy-home .up-card:is(:hover, :focus-visible) {
  border-color: var(--up-tag);
  background: var(--up-hover);
}

.up-card-tag {
  color: var(--up-tag);
  font: 0.59rem/1.5 var(--md-code-font);
}

.up-card-title {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}

.up-card-title span {
  color: var(--up-tag);
}

.up-card-copy {
  color: var(--md-default-fg-color--light);
  font-size: 0.71rem;
}

.unrealpy-home .up-reference {
  padding-block: 1.35rem 2.4rem;
  border-top: 1px solid var(--up-border);
}

.unrealpy-home .up-reference ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.unrealpy-home .up-reference ul > li {
  margin: 0;
}

.unrealpy-home .up-reference a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

@media (max-width: 52rem) {
  .unrealpy-home .up-frame {
    width: min(100% - 2rem, 38rem);
  }

  .unrealpy-home .up-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .unrealpy-home h1 {
    max-width: 22rem;
    text-wrap: initial;
  }
}

@media (max-width: 34rem) {
  .up-card-grid,
  .up-strength-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
