:root {
    --background: #e4f5ed;
    --color: #000;

    --promo-banner-background: #6ee7b7;
    --promo-banner-border: #59c59a;

    --box-background: #d9f3e8;
    --box-color: #2f604c;
    --box-border: #b1d2c4;
    --box-header-background: #6ee7b7;

    --promo-button-background: linear-gradient(0deg, #ff9028 0% 50%, #ffb224 50% 100%);
    --promo-button-background-hover: #ff9028;
    --promo-button-foreground: #662000;
    --promo-button-border: #ac6019;

    --table-header-background: #a4ffdb;
    --table-row-background: #cbf0e1;
    --table-row-alt-background: #beead7;
    --table-border: #a5cebc;

    --anchor-color: #2a493c;
    --anchor-color-hover: #6ee7b7;

    --script-anchor-color: #0d744b;
}

* {
    padding: 0;
    margin: 0;
}

body {
    background-color: var(--background);
    color: var(--color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    width: 100%;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
}

main {
    width: 35em;
    margin: 0 auto;
}

body>main {
    display: flex;
    flex-direction: column;
    width: 50%;
    flex-grow: 1;
}

main.main-page {
    gap: 32px;
}

/**
--- HEADER
*/
body>main>header {
    display: flex;
    flex-direction: row;
    align-items: center;

    gap: 16px;

    padding: 16px 0;
}

header>a.logo:hover {
    background-color: unset;
}

/**
--- FOOTER
*/

footer,
hugefooter {
    background: var(--box-background);
    color: var(--box-border);
    border-top: 1px solid var(--box-border);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    margin-top: 64px;
}

hugefooter {
    color: var(--color);
    padding: 32px 0;
}

footer>main {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

hugefooter .brand {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

/**
--- ANCHORS
*/

a {
    color: var(--anchor-color);
    text-decoration: underline;
}

a:hover {
    color: var(--anchor-color-hover);
    background: var(--anchor-color);
    text-decoration: line-through;
}

.command {
    text-shadow: 0 0 4px var(--anchor-color);
}

.command:hover {
    text-shadow: 0 0 8px var(--anchor-color-hover);
}

/**
--- BUTTON
*/
button {
    background: var(--promo-button-background);
    border: 1px solid var(--promo-button-border);
    border-radius: 4px;
    color: var(--promo-button-foreground);
    text-shadow: 0 1px #804e15;
    font-weight: bold;

    font-size: 16px;
    padding: 8px;
}

button:hover {
    cursor: pointer;
    background: var(--promo-button-background-hover);
}

/**
--- TABLE
*/

table {
    border-collapse: collapse;
    border: solid 1px var(--box-border);
}

table tr {
    background-color: var(--table-row-background);
    border-bottom: 1px solid var(--table-border);
}

tr:nth-child(even) {
    background-color: var(--table-row-alt-background);
}

table td,
table th {
    border-right: 1px solid var(--table-border);
}

table td:last-child,
table th:last-child {
    border-right: none;
}

table td,
table th {
    padding: 4px;
    text-align: left;
}

table tr:last-child {
    border-bottom: none;
}

table tr:first-child {
    background: var(--table-header-background);
}

table.vertical tr:first-child {
    background: var(--table-row-background);
}

/**
--- BOX
*/
box {
    background-color: var(--box-background);
    border: solid 1px var(--box-border);
    padding: 16px;
}

box:has(header):has(content) {
    padding: unset;

    display: flex;
    flex-direction: column;
}

box>header {
    background-color: var(--box-header-background);
    color: black;
    border-bottom: solid 1px var(--box-border);
    box-shadow: 0 2px 6px var(--box-border);
    padding: 4px;
    display: flex;
    flex-direction: row;
}

box>content {
    padding: 16px;
}

/**
--- PROMOTIONAL BANNER
*/

.promo-banner {
    background-color: var(--promo-banner-background);
    color: black;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border: solid 1px var(--promo-banner-border);
    border-radius: 4px;
}

.promo-banner .bot-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.promo-banner .bot-image img {
    border-radius: 4px;
}

.promo-banner .bot-image:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: inline-block;
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, var(--promo-banner-background) 100%);
}

.promo-banner .description {
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    padding: 16px;
}

.promo-banner .description * {
    text-align: right;
    align-self: flex-end;
}

/**
--- FEATURES
*/
.features>header {
    font-size: 32px;
    font-weight: bold;
    justify-content: center;
}

.features>content {
    display: flex;
    flex-direction: column;
    gap: 128px;
}

.features>content>section:first-child {
    margin-top: 64px;
}

.features>content>section {
    display: flex;
    flex-direction: row;
    gap: 32px;
}

.features>content>section:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
}


.features>content>section .description p {
    line-height: 1.5em;
}

.features>content>section .icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.features>content>section img {
    width: 96px;
}

.small-features {
    display: grid;
    grid-template-columns: auto auto;
    gap: 32px;
}

.small-features>section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    line-height: 1.5em;
}

.small-features>section>.icon>img {
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--box-border);
}

.small-features>section:nth-child(1)>.icon>img {
    background: linear-gradient(to left, #059669, #065f46);
}

.small-features>section:nth-child(2)>.icon>img {
    background: linear-gradient(to left, #d97706, #92400e);
}

.small-features>section:nth-child(3)>.icon>img {
    background: linear-gradient(to left, #2563eb, #1e40af);
}

.small-features>section:nth-child(4)>.icon>img {
    background: linear-gradient(to left, #dc2626, #991b1b);
}

/**
--- SCRIPT
*/
.script-description {
    margin-top: 4px;
}

.script-description h1 {
    font-size: 32px;
    font-weight: 600;
}

.script-description h2 {
    font-size: 24px;
    font-weight: 600;
}

.script-description h3 {
    font-size: 18px;
}

.script-description h1,
.script-description h2,
.script-description h3,
.script-description h4 {
    margin: 16px 0;
    color: var(--box-color);
    border-bottom: solid 1px var(--box-border);
}

.script-description p {
    margin: 4px 0;
}

.script-description ul {
    margin: 0 32px;
}

.script-description li {
    list-style-type: disc;
}

.script-description a {
    color: var(--script-anchor-color);
}

.script-description a:hover {
    color: var(--anchor-color-hover);
}

.script-description code {
    background-color: var(--box-border);
    color: var(--box-color);
    padding: 2px 4px;
}

.script-description pre code {
    display: block;
    width: 100%;
}

.script-description blockquote {
    background-color: var(--box-color);
    color: var(--box-background);
    padding: 8px;
    margin: 16px 0;
}

.script-description blockquote a {
    color: var(--anchor-color-hover);
}

/**
--- SCRIPT LINKS
*/
.script-links {
    display: flex;
    flex-direction: row;
    margin-top: 8px;
    gap: 8px;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
}

.script-links img {
    height: 12px;
    vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #1e2622;
        --color: #e4f5ed;

        --box-background: #262c2a;
        --box-color: #70e7b7;
        --box-border: #3c584c;

        --table-header-background: #356250;
        --table-row-background: #303b37;
        --table-row-alt-background: #2e3733;
        --table-border: #293630;

        --anchor-color: #41eaa4;
        --anchor-color-hover: #1f4938;

        --script-anchor-color: #41eaa4;
    }
}