/* ------------------------------
   Global Layout
------------------------------ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f3e9;
    color: #222;
}

main {
    margin: auto;
    padding: 2rem;
    box-sizing: border-box;
    line-height: 1.6;
}

/* ------------------------------
   Headings
------------------------------ */
h1,
h2,
h3 {
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

/* ------------------------------
   Text Elements
------------------------------ */
p,
ul,
ol {
    margin: 0.8rem 0;
}

ul {
    padding-left: 1.3rem;
}

li {
    margin: 0.4rem 0;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ------------------------------
   Mobile First Adjustments
------------------------------ */
@media (max-width: 600px) {
    main {
        padding: 1.2rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    body {
        font-size: 0.95rem;
    }
}

/* ------------------------------
   Code / Terms Specific
------------------------------ */
code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ------------------------------
   Utility Helpers
------------------------------ */
.section-block {
    margin-top: 2.5rem;
}

/* Prevent iOS from auto-zooming the entire layout */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Improved mobile reading & prevent shrink */
@media (max-width: 600px) {
    body {
        font-size: 1rem;
        /* was 0.95rem */
        -webkit-text-size-adjust: 100%;
        /* prevents Safari auto-scaling */
    }

    main {
        max-width: 100%;
        padding: 1.4rem;
    }
}