:root {
  --primary: #3f3bdf;
  --secondary: #26243f;
  --accent: #c9f453;
  --primary-fg: #fff;
  --body-fg: #242131;
  --body-bg: #f5f0e8;
  --body-quiet-color: #6d6878;
  --body-loud-color: #171524;
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: #171524;
  --header-link-color: #fff;
  --breadcrumbs-fg: #171524;
  --breadcrumbs-link-fg: #3f3bdf;
  --breadcrumbs-bg: #c9f453;
  --link-fg: #3431c8;
  --link-hover-color: #ff3f68;
  --link-selected-fg: #ff3f68;
  --hairline-color: #d7d1c7;
  --border-color: #c6bfb5;
  --error-fg: #ba1738;
  --message-success-bg: #dbf6a2;
  --message-warning-bg: #ffe2a8;
  --message-error-bg: #ffd1da;
  --darkened-bg: #eee8df;
  --selected-bg: #e0dcff;
  --selected-row: #f7e8ac;
  --button-fg: #fff;
  --button-bg: #3f3bdf;
  --button-hover-bg: #2e2bb2;
  --default-button-bg: #ff4f73;
  --default-button-hover-bg: #db3457;
  --close-button-bg: #625d68;
  --delete-button-bg: #c52242;
  --object-tools-fg: #171524;
  --object-tools-bg: #c9f453;
  --object-tools-hover-bg: #acd82f;
  color-scheme: light;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #8b87ff;
    --secondary: #191726;
    --accent: #c9f453;
    --body-fg: #f5f0e8;
    --body-bg: #11101d;
    --body-quiet-color: #b9b2c5;
    --body-loud-color: #fffaf1;
    --header-bg: #08070d;
    --breadcrumbs-fg: #171524;
    --breadcrumbs-link-fg: #3431c8;
    --breadcrumbs-bg: #c9f453;
    --link-fg: #aaa7ff;
    --link-hover-color: #ff7b95;
    --link-selected-fg: #ff7b95;
    --hairline-color: #3d3949;
    --border-color: #504b5c;
    --darkened-bg: #191726;
    --selected-bg: #2c2953;
    --selected-row: #342f22;
    --message-success-bg: #293916;
    --message-warning-bg: #453619;
    --message-error-bg: #482331;
    color-scheme: dark;
  }
}

body {
  letter-spacing: -0.006em;
}

#header {
  min-height: 4.75rem;
  padding: 0.75rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 3px solid #ff5c7a;
}

#branding {
  min-width: 12rem;
}

.studio-brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.studio-mark {
  display: grid;
  width: 2.8rem;
  aspect-ratio: 1;
  place-items: center;
  transform: rotate(-4deg);
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff5c7a;
  box-shadow: 3px 3px 0 #c9f453;
  color: #171524 !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.studio-brand p {
  margin: 0;
  color: #c9f453;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.studio-brand #site-name {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
}

.studio-brand #site-name a {
  color: #fff;
}

.studio-preview {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.8rem;
  border: 2px solid #fff;
  border-radius: 0.55rem;
  background: #c9f453;
  box-shadow: 3px 3px 0 #ff5c7a;
  color: #171524 !important;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.studio-welcome {
  font-weight: 700;
}

.studio-welcome span {
  color: #c9f453;
}

div.breadcrumbs {
  padding: 0.75rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 2px solid #171524;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

#content {
  padding: clamp(1rem, 4vw, 2.5rem);
}

#content h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.module,
.inline-group,
div.submit-row,
#changelist-filter {
  overflow: hidden;
  border: 2px solid var(--body-fg);
  border-radius: 0.8rem;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--body-fg) 30%, transparent);
}

.module h2,
.module caption,
.inline-group h2 {
  padding: 0.8rem 1rem;
  background: var(--secondary);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: none;
}

.dashboard .module table th,
.dashboard .module table td {
  padding-block: 0.75rem;
}

.dashboard .module table th a {
  font-weight: 850;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
  min-height: 2.5rem;
  border: 2px solid var(--body-fg);
  border-radius: 0.55rem;
  box-shadow: 2px 2px 0 var(--body-fg);
  font-weight: 850;
  transition:
    box-shadow 120ms ease,
    transform 120ms ease;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
a.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--body-fg);
}

input,
textarea,
select,
.vTextField {
  border-width: 2px !important;
  border-radius: 0.45rem !important;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent);
  outline-offset: 2px;
}

.object-tools a:link,
.object-tools a:visited {
  border: 2px solid var(--body-fg);
  border-radius: 0.55rem;
  box-shadow: 2px 2px 0 var(--body-fg);
  color: #171524;
  font-weight: 850;
}

.messagelist li {
  border: 2px solid currentColor;
  border-radius: 0.65rem;
  font-weight: 750;
}

#changelist-filter h2 {
  border-radius: 0;
}

.login #container {
  overflow: hidden;
  border: 2px solid var(--body-fg);
  border-radius: 1rem;
  box-shadow: 7px 7px 0 #ff5c7a;
}

.login #header {
  height: auto;
}

@media (max-width: 767px) {
  #header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .studio-preview {
    font-size: 0.62rem;
  }

  .studio-welcome {
    display: none;
  }

  #content {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
