:root {
    --black: #22242C;
    --purple: #6160DC;
    --light-purple: #F0EFFC;
    --gray: #8E8EA1;
    --medium-gray: #BDBDBD;
    --light-gray: #F5F5F5;
    --green: #00A389;
}

html {
    font-size: 56.5%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.7rem;
    color: var(--black);
    display: flex;
    min-height: 100vh;
}

section {
    margin-bottom: 2.4rem;
}

h1 {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

h4 {
    font-size: .8rem;
}

p {
    line-height: 1.4;
}

nav {
    background-color: white;
    min-width: 35rem;
    padding: 5.6rem;
}

nav img {
    width: 19.3rem;
    padding-bottom: 1rem;
}

nav .icon {
    flex-shrink: 0;
    width: 6.5rem;
    height: 6.5rem;
    margin-right: 1.5rem;
    border-radius: 6.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav .active .icon {
    background-color: var(--purple);
}

nav .icon svg {
    height: 3rem;
    width: 3rem;
}

nav .icon path {
    fill: var(--gray);
}

nav .active .icon path {
    fill: white;
}

nav li {
    margin-top: 3rem;
}

nav a {
    color: var(--gray);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

nav a.active {
    color: var(--black);
}

main {
    background-color: var(--light-gray);
    padding: 0 3.8rem;
    flex: 1;
}

main nav {
    padding: 3.8rem 0;
    width: 100%;
    background-color: var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input.search {
    width: 30rem;
    height: 3rem;
    padding-left: 6rem;
    border: none;
    border-radius: 3rem;
    outline: none;
    background-image: url('/images/magnifying-glass.svg');
    background-position: 2rem center;
    background-size: 2.2rem 2.2rem;
    background-repeat: no-repeat;
}

main .profile a {
    display: inline;
}

.flex {
    display: flex;
    align-items: center;
}

header.main {
    margin-bottom: 2.4rem;
    padding-top: 1.5rem;
}

header.main p {
    color: var(--gray);
}

header.flex {
    justify-content: space-between;
}

.error-message {
    background-color: #FFF2F3;
    padding: 1.6rem;
    color: #FF4A55;
    display: flex;
    align-items: center;
    border-radius: 0.8rem;
    margin-bottom: 4.8rem;
}

.error-message dt {
    background-color: #FF4A55;
    padding: 3.6rem;
    border-radius: 1.6rem;
}

.error-message dd {
    padding: 0 2.4rem;
}

.card {
    background-color: white;
    border-radius: 3rem;
    padding: 2.4rem 3.6rem;
}

.tiles {
    padding-top: 6.5rem;
    display: grid;
    grid-template-columns: repeat(3, calc(33% - 1rem));
    grid-auto-rows: 26rem;
    gap: 2rem 2rem;
}

.tiles li {
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 2.5rem;
}

.tiles dt {
    color: var(--gray);
    display: block;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 300;
}

.tiles .monthly-change {
    display: block;
    margin-top: 3rem;
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--gray);
}

.tiles .monthly-change strong {
    color: var(--green);
    font-size: 1.6rem;
    font-weight: 700;
    background-image: url("/images/arrow-up.svg");
    background-repeat: no-repeat;
    background-size: 2.2rem 2.2rem;
    padding-top: 2rem;
    padding-right: 1rem;
}

.tiles .icon {
    flex-shrink: 0;
    width: 11rem;
    height: 11rem;
    margin-left: 4rem;
    border-radius: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard .tiles .icon {
    background-color: var(--purple);
}

.tiles a {
    text-decoration: none;
    color: var(--black);
}

.tiles a:hover {
    cursor: pointer;
    color: var(--purple);
}

.flags {
    background: white;
    border-radius: 3rem;
    padding: 2rem;
}

.flags a {
    color: inherit;
    text-decoration: none;
}

.flags li {
    display: inline;
    color: var(--black);
    opacity: .2;
    margin-right: 1.6rem;
}

.flags li.selected {
    font-weight: bold;
    opacity: 1;
}

.flags li img {
    width: 4.8rem;
    height: 4.8rem;
    vertical-align: middle;
}

.profile-details {
    display: flex;
    gap: 3.2rem;
}

.profile-details main {
    border-right: 1px dashed var(--gray);
    padding: 0 3.2rem 0 0;
    background-color: white;
    flex: 1;
}

.profile-details header {
    margin-bottom: 4.8rem;
}

.profile-details aside {
    background: url('/images/profile-background.svg') no-repeat center;
    background-size: cover;
    color: white;
    flex: 1;
    width: 80rem;
    padding: 3.2rem 3.2rem 1.6rem;
    border-radius: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    justify-content: space-between;
}

.profile-details aside ul {
    list-style-type: disc;
    margin-bottom: 1.6rem;
}

.profile-details aside li {
    margin-bottom: .4rem;
    margin-left: 2rem;
    text-indent: -.4rem;
}

.profile-details aside footer {
    font-size: 1.4rem;
    opacity: 0.8;
}

.profile-details .icon {
    flex: 0;
    padding: 1.6rem 1.6rem 1.6rem 0;
}

.profile-details dl {
    flex: 1;
}

.profile-details dt {
    color: var(--gray);
    font-size: 1.4rem;
    margin-bottom: .4rem;
}

.profile-details dd {
    font-weight: 500;
}

.profile-activity {
    gap: 2.4rem;
}

.profile-activity header {
    height: 9rem;
}

.profile-activity header p {
    color: var(--gray);
}

.profile-activity .card {
    position: relative;
    padding-bottom: 7.2rem;
}

.profile-activity .session {
    flex: 5;
}

.profile-activity .messages {
    flex: 6;
}

.profile-activity .latest {
    flex: 4;
}

.profile-activity .search {
    border: 1px solid var(--black);
    padding: 2.4rem 2.4rem 2.4rem 5.2rem;
    width: 100%;
    margin-bottom: 2.4rem;
}

.profile-activity .icon {
    flex: 0;
    padding-right: 1.6rem;
}

.profile-activity li {
    display: flex;
    align-items: center;
    margin-bottom: 1.6rem;
}

.profile-activity dt {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--black);
}

.profile-activity dd {
    font-size: 1.4rem;
    color: var(--gray);
}

.profile-activity ul {
    margin-bottom: 1.6rem;
}

.profile-activity button {
    color: var(--purple);
    background-color: var(--light-purple);
    border: none;
    padding: 1.6rem;
    border-radius: 3.2rem;
    position: absolute;
    bottom: 2.4rem;
    left: 3.2rem;
    width: calc(100% - 6.4rem);
}

@media screen and (max-width: 1200px) {
    .tiles {
        grid-template-columns: repeat(2, calc(50% - 1rem));
    }
}

@media screen and (max-width: 1000px) {
    .tiles {
        grid-template-columns: 100%;
    }
}

main.analytics .world-map {
    display: flex;
    align-items: center;
    gap: 16rem;
    padding: 6.4rem 0 6.4rem 6.4rem;
}

main.analytics .world-map img {
    flex: 3;
}

main.analytics aside {
    flex: 1;
    padding: 7.2rem;
    background: white;
    border-radius: 3.2rem;
}

main.analytics aside h2 {
    margin-bottom: 4rem;
}

main.analytics aside dl {
    display: flex;
    margin-bottom: 1.6rem;
    justify-content: space-between;
}

main.analytics aside dd {
    font-weight: 600;
}

main.analytics .budget-and-overview {
    display: flex;
    gap: 3.2rem;
}

main.analytics .tile {
    background: url('/images/analytics/overview.svg') white no-repeat center;
    background-size: 80%;
    height: 48rem;
    border-radius: 3.2rem;
    flex: 1;
    padding: 4rem;
}

main.analytics .overview {
    background-image: url('/images/analytics/overview.svg');
}

main.analytics .budget {
    background-image: url('/images/analytics/budget.svg');
}

code {
    font-size: 1.6rem;
    font-weight: normal;
    color: var(--purple);
    font-family: monospace;
}

pre code {
    display: block;
    white-space: pre;
}

pre {
    overflow-x: auto;
}

.wide {
    grid-template-columns: auto;
    grid-auto-rows: auto;
    line-height: 1.4;
    overflow: auto;
}

.logout {
    font-weight: normal;
}

.signin {
    color: var(--purple);
    background-color: var(--light-purple);
    border: none;
    padding: 1.6rem;
    border-radius: 3.2rem;
    bottom: 2.4rem;
    left: 3.2rem;
    cursor: pointer;
}
