:root {
    color-scheme: light;
    font-family: Georgia, "Times New Roman", serif;
    color: #20352e;
    background: #f3f1e8;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-image: linear-gradient(135deg, #f3f1e8, #e4eee9 55%, #e7eee3);
    min-height: 100vh;
}

.page-header {
    padding: 3rem max(1.25rem, calc((100vw - 760px) / 2));
    color: #f6f4e9;
    background: #234e43;
    border-bottom: 7px solid #e4aa52;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: #f1c779;
    font: 700 0.8rem/1.2 Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 700px;
    margin-bottom: 0.7rem;
    font-size: 3.5rem;
    line-height: 1.05;
}

.page-header > p:last-child {
    max-width: 620px;
    margin-bottom: 0;
    color: #dce9de;
    font: 1.05rem/1.6 Arial, sans-serif;
}

main {
    width: min(760px, calc(100% - 2rem));
    margin: 2rem auto;
}

.lesson-section {
    margin-bottom: 1.2rem;
    padding: 1.5rem;
    border: 1px solid #ccd7cd;
    border-left: 5px solid #4b8067;
    background: rgba(255, 255, 250, 0.83);
}

h2 {
    margin-bottom: 0.65rem;
    color: #234e43;
    font-size: 1.45rem;
}

.lesson-section p,
.lesson-section li {
    font: 1rem/1.6 Arial, sans-serif;
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

code {
    padding: 0.12rem 0.3rem;
    color: #174638;
    background: #e7eee5;
}

pre {
    overflow-x: auto;
    padding: 1rem;
    color: #f6f4e9;
    background: #203b34;
    line-height: 1.45;
}

pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.tip {
    padding: 0.75rem 1rem;
    border-left: 3px solid #e4aa52;
    background: #f7f1de;
}

.demo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.demo-row p {
    flex: 1 1 260px;
    margin: 0;
}

button {
    min-height: 2.7rem;
    padding: 0.6rem 1rem;
    border: 0;
    color: white;
    background: #28624f;
    font: 700 0.95rem Arial, sans-serif;
    cursor: pointer;
}

button:hover {
    background: #174638;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #d28a2f;
    outline-offset: 3px;
}

input {
    min-height: 2.7rem;
    width: min(100%, 320px);
    padding: 0.6rem 0.75rem;
    border: 1px solid #9eafa3;
    background: white;
    font: 1rem Arial, sans-serif;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font: 700 0.9rem Arial, sans-serif;
}

.color-sample {
    padding: 0.5rem 0.7rem;
    background: #f2dfa9;
    font: 1rem Arial, sans-serif;
}

.color-sample.is-highlighted {
    color: #fff;
    background: #a43d32;
}

.output {
    min-height: 1.6em;
    margin: 0.9rem 0 0;
    color: #234e43;
    font-weight: 700 !important;
}

#item-list {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.3rem;
    font-family: Arial, sans-serif;
}

#item-list li {
    padding-left: 0.2rem;
}

#item-list button {
    min-height: 2rem;
    margin-left: 0.6rem;
    padding: 0.3rem 0.6rem;
    background: #a43d32;
    font-size: 0.85rem;
}

.summary ul {
    margin-bottom: 0;
    padding-left: 1.3rem;
}

footer {
    padding: 1.25rem;
    color: #f6f4e9;
    background: #234e43;
    text-align: center;
    font: 0.9rem/1.5 Arial, sans-serif;
}

@media (max-width: 520px) {
    .page-header {
        padding-top: 2.25rem;
        padding-bottom: 2.25rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .lesson-section {
        padding: 1.1rem;
    }

    .demo-row > button,
    .demo-row > input {
        width: 100%;
    }
}
