* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Fira Sans", Arial, sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 217, 140, 0.45), transparent 34%),
        radial-gradient(circle at 82% 0%, rgba(115, 200, 185, 0.4), transparent 30%),
        linear-gradient(150deg, #fff6e7, #fefefe 52%, #e9f7f4);
    color: #263136;
    padding: 20px;
}

.page-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero {
    border: 2px solid #233a3a;
    border-radius: 20px;
    padding: 26px 22px;
    background: linear-gradient(120deg, #fffdf8, #f0fffa);
    box-shadow: 8px 8px 0 #233a3a;
    text-align: left;
}

.hero-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    color: #233a3a;
    background: #ffd681;
}

.hero h1 {
    font-size: clamp(1.7rem, 4.3vw, 2.8rem);
    line-height: 1.12;
    margin-bottom: 6px;
    color: #102222;
}

.hero p {
    color: #365355;
    margin-bottom: 14px;
}

.main-btn {
    border: 2px solid #183435;
    border-radius: 10px;
    background: #1f9d8d;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 4px 4px 0 #183435;
}

.main-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #183435;
}

.hero-notes {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-notes span {
    border: 1px solid #233a3a;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    color: #233a3a;
}

.activities {
    border: 2px solid #233a3a;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 8px 8px 0 #233a3a;
    padding: 18px;
}

.activities h2 {
    font-size: 1.6rem;
    color: #102222;
    margin-bottom: 14px;
}

.exercise {
    border: 2px solid #233a3a;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}

.exercise-header {
    background: linear-gradient(90deg, #ffd681, #ffad72);
    color: #1d2f2f;
    font-weight: 800;
    padding: 12px 14px;
    cursor: pointer;
}

.exercise-content {
    display: none;
    padding: 14px;
    background: #f6fffc;
}

.exercise-content.show {
    display: block;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.button-group button,
.demo-box button {
    border: 2px solid #183435;
    border-radius: 10px;
    background: #ffffff;
    color: #183435;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #183435;
}

.button-group button:hover,
.demo-box button:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #183435;
}

.week3-panel {
    display: none;
}

.week3-panel.show {
    display: block;
}

.demo-box {
    margin-top: 12px;
    border: 2px solid #183435;
    border-radius: 12px;
    background: #fffdf5;
    padding: 12px;
}

.demo-box h3 {
    margin-bottom: 6px;
    color: #102222;
}

.demo-box p {
    color: #365355;
}

.demo-box input {
    margin-top: 8px;
    margin-right: 6px;
    padding: 8px 10px;
    border: 2px solid #315a5a;
    border-radius: 8px;
    font-family: inherit;
}

.demo-box ul {
    list-style-position: inside;
    margin-top: 8px;
}

#w3activity7 img {
    width: 220px;
    height: 140px;
    object-fit: cover;
    border: 2px solid #183435;
    border-radius: 10px;
    margin-top: 10px;
}

#w3activity8 #todoList {
    padding-left: 8px;
}

.dark-mode {
    background: linear-gradient(150deg, #142121, #233535) !important;
    color: #e9fff9 !important;
}

.dark-mode .hero,
.dark-mode .activities,
.dark-mode .exercise-content,
.dark-mode .demo-box {
    background: #1d2f2f !important;
    color: #e9fff9 !important;
    border-color: #5ec7b3 !important;
    box-shadow: none !important;
}

.dark-mode .hero-tag {
    background: #5ec7b3 !important;
    color: #0f2323 !important;
}

.dark-mode .hero h1,
.dark-mode .activities h2,
.dark-mode .demo-box h3 {
    color: #e9fff9 !important;
}

.dark-mode .hero p,
.dark-mode .demo-box p {
    color: #bcebe1 !important;
}

.dark-mode .hero-notes span,
.dark-mode .button-group button,
.dark-mode .demo-box button,
.dark-mode .main-btn,
.dark-mode .demo-box input {
    background: #163737 !important;
    color: #e9fff9 !important;
    border-color: #5ec7b3 !important;
    box-shadow: none !important;
}

.dark-mode .exercise-header {
    background: linear-gradient(90deg, #2d6767, #3f8a8a) !important;
    color: #f4fffd !important;
}

@media (max-width: 900px) {
    body {
        padding: 12px;
    }

    .hero,
    .activities {
        box-shadow: 5px 5px 0 #233a3a;
    }

    .button-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .button-group {
        grid-template-columns: 1fr;
    }
}

.quiz-row {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f0fdfa;
    padding: 5px;
    border-radius: 5px;
}

.input-pair {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-pair input {
    width: 100px !important;
    margin-top: 0 !important;
}

.demo-box h4 {
    margin: 10px 0 5px 0;
    font-size: 0.9rem;
    color: #183435;
    text-transform: uppercase;
}