/* ======================================== */
/* STUDYNEST REAL NUMBERS LESSONS                  */
/* ======================================== */

:root {
    --navy: #0f438c;
    --navy-dark: #0a326b;
    --blue: #2c73c9;
    --blue-light: #dceafa;
    --page: #eef4fb;
    --card: #ffffff;
    --border: #d9e2ed;
    --text: #1e2c43;
    --muted: #4f5d70;
    --yellow: #fff2bf;
    --yellow-border: #f5ad00;
    --green: #e4f5e8;
    --green-dark: #2f7444;
    --pink: #f8e8ef;
    --pink-dark: #8b4664;
    --purple: #eee8f8;
    --purple-dark: #654d91;
    --shadow: 0 12px 30px rgba(19, 57, 104, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    background: var(--page);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
}

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

.announcement-bar {
    padding: 8px 18px;
    color: #111;
    background: #f7b500;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
}

.site-header {
    display: flex;
    min-height: 76px;
    padding: 0 38px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.logo {
    color: var(--navy);
    font-size: 1.45rem;
    font-weight: 800;
}

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.main-navigation a {
    font-size: .88rem;
    font-weight: 700;
}

.lesson-hero {
    display: grid;
    min-height: 400px;
    padding: 60px clamp(22px, 7vw, 95px);
    align-items: center;
    grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr);
    gap: 45px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,.95), transparent 26%),
        linear-gradient(135deg, #f8fbff, #eaf2fb);
}

.lesson-label,
.eyebrow {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lesson-hero h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(2.9rem, 6vw, 4.8rem);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.lesson-subtitle {
    max-width: 680px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.meta-pill {
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--navy);
    background: white;
    font-size: .78rem;
    font-weight: 800;
}

.hero-visual {
    display: grid;
    min-height: 270px;
    place-items: center;
}

.mini-coordinate-plane {
    position: relative;
    width: 290px;
    height: 245px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background:
        linear-gradient(#dfe8f2 1px, transparent 1px),
        linear-gradient(90deg, #dfe8f2 1px, transparent 1px),
        white;
    background-size: 32px 32px;
    box-shadow: var(--shadow);
}

.mini-coordinate-plane::before,
.mini-coordinate-plane::after {
    content: "";
    position: absolute;
    background: var(--navy);
}

.mini-coordinate-plane::before {
    top: 20px;
    bottom: 20px;
    left: 50%;
    width: 3px;
}

.mini-coordinate-plane::after {
    right: 20px;
    bottom: 50%;
    left: 20px;
    height: 3px;
}

.plot-dot {
    position: absolute;
    z-index: 2;
    width: 15px;
    height: 15px;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 3px 9px rgba(15,67,140,.25);
}

.dot-a { left: 205px; top: 55px; }
.dot-b { left: 75px; top: 155px; }
.dot-c { left: 180px; top: 180px; }

.graph-line-demo {
    position: absolute;
    z-index: 1;
    left: 55px;
    bottom: 65px;
    width: 205px;
    height: 5px;
    border-radius: 999px;
    background: var(--blue);
    transform: rotate(-36deg);
    transform-origin: left center;
}

.lesson-main {
    width: min(1180px, calc(100% - 28px));
    margin: 36px auto 70px;
}

.lesson-section {
    margin-bottom: 28px;
    padding: 38px 52px;
    border: 1px solid var(--border);
    border-radius: 27px;
    background: white;
    box-shadow: var(--shadow);
}

.lesson-section h2 {
    margin: 0 0 18px;
    color: var(--navy);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.lesson-section h3 {
    margin: 25px 0 10px;
    color: var(--navy);
}

.lesson-section p { color: var(--muted); }

.objective-list,
.summary-list,
.practice-list {
    margin: 14px 0 0;
    padding-left: 24px;
}

.objective-list li,
.summary-list li,
.practice-list li {
    margin: 8px 0;
}

.think-box,
.key-idea,
.tip-box,
.warning-box,
.did-you-know,
.challenge-box {
    margin: 22px 0;
    padding: 20px 23px;
    border-radius: 0 17px 17px 0;
}

.think-box {
    border-left: 5px solid var(--yellow-border);
    background: var(--yellow);
}

.key-idea {
    border-left: 5px solid var(--blue);
    background: #eaf3ff;
}

.tip-box {
    border-left: 5px solid #54a46a;
    background: var(--green);
}

.warning-box {
    border-left: 5px solid #d5648f;
    background: var(--pink);
}

.did-you-know {
    border-left: 5px solid #8367b2;
    background: var(--purple);
}

.challenge-box {
    border-left: 5px solid #815a20;
    background: #f9eddc;
}

.math-display {
    margin: 20px 0;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--navy);
    background: #f8fbff;
    font-size: 1.18rem;
    font-weight: 800;
    text-align: center;
}

.visual-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 20px;
    margin-top: 22px;
}

.visual-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 21px;
    background: #f9fbfd;
}

.visual-card h3 { margin-top: 0; }

.coordinate-diagram,
.travel-diagram,
.line-diagram {
    position: relative;
    width: min(100%, 480px);
    height: 310px;
    margin: 24px auto;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(#dde7f1 1px, transparent 1px),
        linear-gradient(90deg, #dde7f1 1px, transparent 1px),
        white;
    background-size: 35px 35px;
    overflow: hidden;
}

.axis-x,
.axis-y {
    position: absolute;
    z-index: 2;
    background: var(--navy);
}

.axis-x {
    left: 25px;
    right: 25px;
    top: 50%;
    height: 3px;
}

.axis-y {
    top: 25px;
    bottom: 25px;
    left: 50%;
    width: 3px;
}

.axis-label {
    position: absolute;
    z-index: 3;
    color: var(--navy);
    font-weight: 900;
}

.x-label { right: 12px; top: calc(50% - 24px); }
.y-label { left: calc(50% + 10px); top: 8px; }

.quadrant {
    position: absolute;
    color: #7c8b9d;
    font-size: .75rem;
    font-weight: 800;
}

.q1 { right: 52px; top: 42px; }
.q2 { left: 52px; top: 42px; }
.q3 { left: 52px; bottom: 42px; }
.q4 { right: 52px; bottom: 42px; }

.example-table {
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

.example-table th,
.example-table td {
    padding: 13px;
    border: 1px solid var(--border);
    text-align: center;
}

.example-table th {
    color: white;
    background: var(--navy);
}

.example-table tr:nth-child(even) td {
    background: #f5f8fc;
}

.worked-example {
    margin: 22px 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fbfcfe;
}

.worked-example h3 { margin-top: 0; }

.step {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 14px;
    margin-top: 16px;
    align-items: start;
}

.step-number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--navy);
    font-weight: 900;
}

.quick-check {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f9fbfd;
}

.level-heading {
    display: inline-flex;
    margin: 22px 0 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--navy);
    background: var(--blue-light);
    font-size: .75rem;
    font-weight: 900;
}

.lesson-navigation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 34px;
}

.nav-button {
    display: flex;
    min-height: 52px;
    padding: 12px 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--navy);
    background: white;
    font-weight: 800;
    text-align: center;
}

.nav-button.primary {
    color: white;
    background: var(--navy);
}

.site-footer {
    padding: 34px 20px 24px;
    color: white;
    background: var(--navy);
    text-align: center;
}

.site-footer p { margin: 8px 0; font-size: .82rem; }

@media (max-width: 900px) {
    .lesson-hero { grid-template-columns: 1fr; }
    .visual-grid-two { grid-template-columns: 1fr; }
    .quick-check { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .site-header {
        padding: 18px 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .lesson-hero {
        padding: 45px 23px;
        text-align: center;
    }

    .lesson-meta { justify-content: center; }
    .lesson-section { padding: 28px 23px; }
    .lesson-navigation { grid-template-columns: 1fr; }
}

/* ======================================== */
/* GRAPH REFRESH: ANSWERS & POLISH          */
/* ======================================== */

.answers-section details {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fbff;
}

.answers-section summary {
    padding: 18px 22px;
    color: var(--navy);
    font-weight: 850;
    cursor: pointer;
    list-style-position: inside;
    transition: background .2s ease;
}

.answers-section summary:hover {
    background: #edf5ff;
}

.answers-content {
    padding: 8px 25px 25px;
    border-top: 1px solid var(--border);
}

.answers-content h3 {
    margin: 22px 0 8px;
}

.answers-content ol {
    padding-left: 25px;
}

.answers-content li {
    margin: 10px 0;
    color: var(--muted);
}

.mini-coordinate-plane {
    animation: graphPlaneFloat 6s ease-in-out infinite;
}

.plot-dot {
    animation: graphPointPulse 3.4s ease-in-out infinite;
}

.dot-b { animation-delay: .45s; }
.dot-c { animation-delay: .9s; }

.graph-line-demo {
    animation: graphLineGlow 4s ease-in-out infinite;
}

@keyframes graphPlaneFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes graphPointPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

@keyframes graphLineGlow {
    0%, 100% { opacity: .82; }
    50% { opacity: 1; box-shadow: 0 0 16px rgba(44,115,201,.34); }
}

@media (prefers-reduced-motion: reduce) {
    .mini-coordinate-plane,
    .plot-dot,
    .graph-line-demo {
        animation: none;
    }
}

/* ======================================== */
/* VECTORS TOPIC THEME                      */
/* Calm emerald / blue-green accent.        */
/* ======================================== */

:root {
    --blue: #4f8b78;
    --blue-light: #e5f1ed;
    --page: #edf6f3;
    --border: #d4e6df;
    --shadow: 0 12px 30px rgba(48, 94, 79, 0.08);
}

.vector-hero-visual {
    position: relative;
    width: 310px;
    height: 245px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background:
        radial-gradient(circle at 18% 15%, rgba(255,255,255,.98), transparent 31%),
        linear-gradient(145deg, #f9fdfb, #e5f1ed);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.vector-axis-x,
.vector-axis-y {
    position: absolute;
    background: var(--navy);
    border-radius: 99px;
}

.vector-axis-x { left: 35px; right: 35px; top: 128px; height: 4px; }
.vector-axis-y { top: 30px; bottom: 28px; left: 153px; width: 4px; }

.vector-arrow {
    position: absolute;
    z-index: 3;
    left: 95px;
    bottom: 87px;
    width: 135px;
    height: 6px;
    border-radius: 99px;
    background: var(--blue);
    transform: rotate(-35deg);
    transform-origin: left center;
    animation: vectorFloat 5s ease-in-out infinite;
}

.vector-arrow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -9px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 19px solid var(--blue);
}

.vector-arrow-secondary {
    position: absolute;
    z-index: 2;
    left: 153px;
    top: 128px;
    width: 82px;
    height: 5px;
    border-radius: 99px;
    background: #7a67a8;
    transform: rotate(28deg);
    transform-origin: left center;
}

.vector-arrow-secondary::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -7px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #7a67a8;
}

.vector-token {
    position: absolute;
    z-index: 6;
    display: grid;
    min-width: 61px;
    height: 48px;
    padding: 7px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--navy);
    background: white;
    box-shadow: var(--shadow);
    font-weight: 900;
    animation: vectorToken 4.8s ease-in-out infinite;
}

.token-a { top: 18px; left: 24px; }
.token-b { top: 18px; right: 23px; animation-delay: .6s; }
.token-mag { right: 25px; bottom: 17px; animation-delay: 1.1s; }

.vector-grid,
.type-grid,
.operation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    margin: 22px 0;
}

.vector-card,
.type-card,
.operation-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f9fdfb;
}

.vector-rule {
    margin: 20px 0;
    padding: 20px 23px;
    border-left: 5px solid var(--blue);
    border-radius: 0 17px 17px 0;
    color: var(--navy);
    background: var(--blue-light);
    font-weight: 800;
}

.vector-diagram {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #f9fdfb;
}

.vector-diagram svg {
    display: block;
    width: min(100%, 760px);
    height: auto;
    margin: 0 auto;
}

.vector-diagram figcaption {
    margin-top: 14px;
    color: var(--muted);
    text-align: center;
}

.column-vector {
    display: inline-grid;
    grid-template-rows: repeat(2, auto);
    margin: 0 5px;
    padding: 3px 12px;
    border-left: 2px solid currentColor;
    border-right: 2px solid currentColor;
    text-align: center;
    vertical-align: middle;
    line-height: 1.15;
}

.calc-steps {
    margin: 16px 0;
    padding: 18px 22px;
    border-radius: 17px;
    background: #f7fbf9;
}

.decision-flow {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.flow-node {
    padding: 18px 21px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: white;
    text-align: center;
    color: var(--navy);
    font-weight: 800;
}

.flow-arrow {
    text-align: center;
    color: var(--blue);
    font-size: 1.5rem;
    font-weight: 900;
}

@keyframes vectorFloat {
    0%,100% { transform: rotate(-35deg) translateY(0); }
    50% { transform: rotate(-35deg) translateY(-7px); }
}

@keyframes vectorToken {
    0%,100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-7px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
    .vector-arrow,
    .vector-token { animation: none; }
}

@media (max-width: 820px) {

}

@media (max-width: 700px) {
    .vector-grid,
    .type-grid,
    .operation-grid,

}
