@font-face {
    font-family: "DM Sans";
    src: url("assets/dm-sans.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
    color-scheme: light;
    --ink: #1a213d;
    --muted: #505b75;
    --line: #dce1eb;
    --page: #f5f6fa;
    --surface: #fff;
    --accent: #403ea5;
    --accent-dark: #2d2b83;
    --accent-soft: #ecebfc;
    --hero: #22234f;
    --gold: #ffda83;
    font: 16px/1.55 "DM Sans", system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 4.1rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 3px solid #655cd0; outline-offset: 3px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar, .container, .footer { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.topbar { min-height: 71px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.topbar a, .brand { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.13rem; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: white; background: var(--accent); font-size: 1.3rem; }
.topbar nav, .footer nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: .94rem; font-weight: 650; }
.topbar nav a, .footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }
.topbar nav a:hover, .footer nav a:hover { color: var(--accent); text-decoration: underline; }
.skip-link { position: absolute; z-index: 3; left: 12px; top: 12px; transform: translateY(-160%); border-radius: 8px; background: white; padding: 10px 16px; }
.skip-link:focus { transform: none; }
#main:focus { outline: none; }
[id] { scroll-margin-top: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 9px 15px; border: 1px solid #cbd1e0; border-radius: 9px; color: var(--ink); background: var(--surface); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--accent); background: var(--accent-soft); }
.primary { border-color: var(--accent); color: white; background: var(--accent); }
.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }

.library { margin-block: 37px 0; }
.money-library { margin-bottom: 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 25px; }
.section-heading h2 + p { margin-top: 5px; color: var(--muted); }
.section-heading .latest-edition { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.latest-edition time { color: var(--ink); font-weight: 750; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.daily-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: block; padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-decoration: none; }
.card:hover { border-color: #a7a5d2; box-shadow: 0 4px 14px #2123440e; }
.class-card { display: flex; flex-direction: column; gap: 9px; min-height: 125px; }
.class-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.class-label { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: .79rem; font-weight: 750; white-space: nowrap; }
.group-0, .green { color: #225746; background: #dcf1e8; }
.group-1, .yellow { color: #68490e; background: #fff0cb; }
.group-2, .purple { color: #563a91; background: #efe7fc; }
.group-3 { color: #204c80; background: #e1edfc; }
.card-arrow, .topic-card h3 span { color: var(--accent); }
.card-meta, .card p { color: var(--muted); font-size: .9rem; }
.card-meta { margin-top: auto; }
.topic-card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.topic-card p { margin-top: 5px; }
.card-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 9px; font-size: 1.24rem; font-weight: 750; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 9px; margin-top: 24px; color: var(--muted); font-size: .88rem; }
.breadcrumb a { color: var(--accent); text-underline-offset: 3px; }
.topic-heading { margin-top: 24px; }
.topic-heading h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
.topic-heading h1 + p, .topic-intro { max-width: 66ch; margin-top: 10px; color: var(--muted); }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 9px; color: var(--muted); font-size: .9rem; }
.topic-meta :is(span, a) { padding: 2px 9px; border-radius: 5px; color: var(--accent-dark); background: var(--accent-soft); font-weight: 750; }
.practice-layout { margin-top: 22px; }
body:not(.print-view) .practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(224px, .36fr); align-items: start; gap: 20px; }
.worksheet-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 15px; }
body:not(.print-view) .worksheet-actions { display: grid; grid-column: 2; grid-row: 1; margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
body:not(.print-view) .worksheet-actions .button { justify-content: space-between; }
.action-heading { margin-bottom: 3px; }
.action-heading h2 { font-size: 1.12rem; }
.action-heading p, .paper-title span, .question-instruction { color: var(--muted); font-size: .9rem; }
.paper { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
body:not(.print-view) .worksheet-paper { grid-column: 1; grid-row: 1; }
.paper-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.paper-title h2 { font-size: 1.16rem; }
.paper-title span { white-space: nowrap; }
.question-instruction { margin-top: 11px; }
.questions { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 1.65rem; }
.questions li { padding: 3px 0 3px .25rem; overflow-wrap: anywhere; }
.questions li::marker { color: var(--accent); font-weight: 750; }
.name-line { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.response { display: block; width: 11em; margin-top: 9px; border-bottom: 1px solid #777; }
.class-switcher, .worksheet-faq, .related { margin-block: 29px; }
.class-switcher h2, .worksheet-faq h2, .related h2 { font-size: 1.45rem; }
.class-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.class-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent-dark); text-decoration: none; font-size: .91rem; font-weight: 700; }
.class-links a:hover { border-color: var(--accent); }
.class-links [aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.faq-list { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.faq-list > div { padding: 13px 17px; scroll-margin-top: 1rem; }
.faq-list > div + div { border-top: 1px solid var(--line); }
.faq-list > div:target { background: var(--accent-soft); }
.faq-list h3 { font-size: 1rem; }
.faq-list p { max-width: 75ch; margin-top: 5px; color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: 12px 24px; align-items: center; margin-top: 36px; padding-block: 19px 25px; border-top: 1px solid var(--line); }
.footer .brand-icon { width: 30px; height: 30px; }
.footer nav { flex-wrap: wrap; }
.footer nav a { text-decoration: none; }

.manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; margin-block: 24px; }
.manage-grid h2 { font-size: 1.6rem; }
.draft-form { display: grid; gap: 14px; margin-top: 18px; }
.draft-form label { display: grid; gap: 4px; font-weight: 700; }
.draft-form label span, .empty-state, .saved-worksheet p { color: var(--muted); font-weight: 400; }
.draft-form input, .draft-form select, .draft-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #a7aec0; border-radius: 8px; color: var(--ink); background: white; font: inherit; font-weight: 400; }
.draft-form textarea { resize: vertical; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-worksheet { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.saved-worksheet .manage-actions, .empty-state, .form-error { margin-top: 10px; }
.form-error { color: #942324; }

@media (max-width: 850px) {
    .daily-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .topbar, .container, .footer { width: calc(100% - 32px); }
    .topbar { min-height: 62px; gap: 8px; }
    .topbar nav, .footer nav { gap: 12px; font-size: .85rem; }
    .brand { gap: 6px; font-size: 1rem; }
    .brand-icon { width: 30px; height: 30px; }
    .section-heading, .footer { flex-wrap: wrap; }
    .section-heading { align-items: start; }
    .cards:not(.daily-cards), .manage-grid { grid-template-columns: 1fr; }
    .card { padding: 13px; }
    .daily-cards { gap: 9px; }
    .class-card h3 { font-size: 1rem; }
    .class-card .card-meta { font-size: .81rem; }
    body:not(.print-view) .practice-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    body:not(.print-view) .worksheet-actions, body:not(.print-view) .worksheet-paper { grid-column: auto; grid-row: auto; }
    .paper { padding: 15px; }
}
@media (max-width: 355px) {
    .topbar { flex-wrap: wrap; padding-top: 8px; }
}
@page { size: A4; margin: 15mm; }
@media print {
    :root { font-size: 11pt; }
    body { background: white; color: black; }
    .screen-only { display: none !important; }
    .container { width: 100%; }
    .topic-heading { margin-top: 0; }
    .topic-heading h1 { font-size: 24pt; }
    .topic-meta span { padding: 0; color: black; background: none; }
    body:not(.print-view) .practice-layout { display: block; }
    .practice-layout { margin-top: 15px; }
    .paper { padding: 0; border: 0; background: white; }
    .questions { gap: 5px; }
    .questions li { break-inside: avoid; }
    .questions li::marker { color: black; }
}


.class-library { margin-top: 20px; }
.subject-index { padding-top: 18px; border-top: 1px solid var(--line); }
.money-library { margin-bottom: 0; }
.subject-library:last-of-type { margin-bottom: 34px; }
.topic-card > .class-label { margin-bottom: 9px; }
.topic-card h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1.12rem; }
.topic-card h2 span { color: var(--accent); }
.class-links [aria-current="location"] { border-color: var(--accent); background: var(--accent-soft); }
.login-panel { width: min(100%, 450px); margin: 40px auto; }
.login-panel h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); }
.login-panel .button { justify-self: start; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.section-heading h1 + p { margin-top: 7px; color: var(--muted); }
.subject-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 850px) { .subject-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) { .cards.subject-cards { grid-template-columns: 1fr; } }

.admin-main { padding-bottom: 38px; }
.admin-topbar { flex-wrap: wrap; padding-block: 7px; }
.admin-topbar .admin-nav { gap: 8px 14px; }
.admin-topbar nav { flex-wrap: wrap; gap: 6px 16px; }
.settings-form, .editor-layout { display: grid; gap: 16px; margin-top: 21px; }
.settings-form { max-width: 880px; }
.publishing-plan { list-style: none; padding: 0; margin: 8px 0 0; }
.publishing-plan li { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; padding: 6px 0; border-top: 1px solid var(--line); }
.settings-form > .button, .draft-form > .button { justify-self: start; }
.admin-panel h2 { font-size: 1.35rem; }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-note, .editor-links small { color: var(--muted); font-size: .89rem; }
.admin-panel h2 + .field-note, .editor-heading + .field-note { margin-top: 9px; }
.draft-form .check-control { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.draft-form .check-control input { width: auto; }
.settings-fieldset { margin: 0; padding: 10px 13px 13px; border: 1px solid var(--line); border-radius: 8px; }
.settings-fieldset legend { font-weight: 700; }
.class-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.admin-notice { margin-top: 12px; padding: 10px 13px; border-radius: 8px; color: #185345; background: #e1f4ea; }
.editor-layout { grid-template-columns: minmax(225px, .45fr) minmax(0, 1fr); align-items: start; }
.editor-links { list-style: none; margin: 13px 0 0; padding: 0; }
.editor-links a { display: block; padding: 8px 9px; border-bottom: 1px solid var(--line); text-decoration: none; }
.editor-links a:hover, .editor-links [aria-current] { background: var(--accent-soft); }
.editor-links small { display: block; }
.editor-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 720px) { .editor-layout, .admin-fields { grid-template-columns: 1fr; } .class-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.worksheet-example { margin-top: 16px; }
.worksheet-example summary { cursor: pointer; font-weight: 750; }
.worksheet-example p { margin-block: 10px; color: var(--muted); }
.worksheet-example table { width: min(100%, 620px); border-collapse: collapse; font-size: .92rem; }
.worksheet-example th, .worksheet-example td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.worksheet-example tfoot { font-weight: 750; }

.schedule-grid { display: grid; gap: 9px; }
.schedule-class { border: 1px solid var(--line); border-radius: 9px; }
.schedule-class > summary { cursor: pointer; padding: 11px 13px; font-weight: 750; }
.schedule-class > summary span { float: right; color: var(--muted); font-size: .86rem; font-weight: 600; }
.schedule-subject { min-width: 0; margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.schedule-subject legend { font-weight: 750; }
.schedule-days { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 9px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.learning-guide { margin-block: 26px; }
.learning-guide h2 { font-size: 1.45rem; }
.learning-guide p { max-width: 75ch; margin-top: 9px; color: var(--muted); }
.learning-path { display: grid; gap: 5px; padding-left: 22px; margin-bottom: 0; }
.learning-guide a { color: var(--accent); text-underline-offset: 3px; }

.brand { min-width: 0; max-width: 100%; white-space: normal; }
.brand-icon { flex: none; }
.brand-name { overflow-wrap: anywhere; }
.footer-identity { display: grid; min-width: 0; gap: 7px; }
.copyright { color: var(--muted); font-size: .85rem; }
@media (max-width: 680px) { .topbar { flex-wrap: wrap; } }

.question-section { margin-top: 18px; color: var(--accent-dark); font-size: 1rem; }
.response-extended { width: min(100%, 34rem); height: 19px; margin-top: 14px; border-top: 1px solid #888; }
.worked-example table { max-width: 100%; }
.trace-track { position: relative; height: 73px; max-width: 29rem; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; color: #48526c; }
.trace-track span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); line-height: 1; }
.trace-track .trace-start { font-size: 1.25em; color: #27324e; }
.letter-practice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-width: 25rem; margin-top: 8px; }
.letter-practice > span { display: grid; place-items: center; height: 54px; border: 1px solid #b8c0d2; border-radius: 6px; }
.trace-letter { color: #657089; font: 750 2.4rem/1 "Segoe UI", sans-serif; }
.alphabet-trace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 8px 0 14px; }
.alphabet-trace-card { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 5px; align-items: center; padding: 5px; border: 1px solid #b8c0d2; border-radius: 7px; text-align: center; break-inside: avoid; }
.alphabet-letter { color: #7b34a2; font: 750 1.65rem/1 "Segoe UI", sans-serif; }
.alphabet-trace-card:nth-child(3n + 2) .alphabet-letter { color: #0b7185; }
.alphabet-trace-card:nth-child(3n) .alphabet-letter { color: #b33c25; }
.alphabet-trace-card .trace-letter { font-size: 1.65rem; }
.alphabet-copy { height: 1.8rem; border: 1px dashed #7b8498; border-radius: 4px; }
@media screen and (max-width: 560px) { .alphabet-trace-grid { grid-template-columns: 1fr; } }
@media print { .alphabet-trace-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }
@supports (-webkit-text-stroke: 1px black) { .trace-letter { color: transparent; -webkit-text-stroke: 1px #4f5a74; } }
.letter-blank { border-style: dashed !important; }
.shape-match, .count-pictures, .count-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.shape-tile { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #abb5ca; border-radius: 6px; font: 1.65rem/1 "Segoe UI Symbol", "Segoe UI", sans-serif; }
.shape-target { border: 2px solid var(--accent); background: var(--accent-soft); }
.shape-arrow { margin-inline: 1px; }
.shape-outline { width: 26px; height: 16px; border: 2px solid currentColor; }
.shape-outline-oval { border-radius: 50%; }
.colour-swatch { width: 24px; height: 24px; border: 1px solid #343a49; border-radius: 3px; background: var(--swatch); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.visual-response { max-width: 55%; margin: 0 0 0 5px; align-self: end; }
.count-pictures { color: #354267; font: 1.55rem/1.25 "Segoe UI Symbol", "Segoe UI", sans-serif; }
.count-options span { display: grid; place-items: center; min-width: 33px; height: 31px; border: 1px solid #abb5ca; border-radius: 50%; font-weight: 700; }
.number-trace-grid { display: grid; gap: 6px; margin-top: 10px; }
.number-trace-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; break-inside: avoid; }
.number-trace-row > * {
    display: grid;
    place-items: center;
    height: 3.2rem;
    border: 1px solid #abb5ca;
    border-radius: 6px;
    font: 750 clamp(1.4rem, 6vw, 2.15rem)/1 "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
}
.number-trace-row strong {
    background: #e4efff;
    color: #254878;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.number-trace-row:nth-child(3n + 2) strong { background: #ffefc5; color: #71440a; }
.number-trace-row:nth-child(3n) strong { background: #dbf3e6; color: #1f5740; }
.number-trace-row .number-trace-blank { border-style: dashed; }
@media print {
    .number-trace-row > * { height: 13mm; font-size: 24pt; }
    .question-section { break-after: avoid; color: black; }
    .worked-example { padding: 9px 12px; border: 1px solid #b6b6b6; break-inside: avoid; }
    .worked-example summary { list-style: none; }
    .worked-example p { margin-block: 5px; }
    .trace-track { height: 58px; }
    .letter-practice > span { height: 46px; }
    .shape-target { border-color: #444; }
    .count-pictures { color: black; }
}


.nursery-total { margin-bottom: 10px; color: var(--muted); }
.nursery-filters:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; }
.nursery-filters button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent-dark); font: inherit; cursor: pointer; }
.nursery-filters button[aria-pressed="true"] { border-color: var(--accent-dark); background: var(--accent-dark); color: white; }
.nursery-filter-status { margin-top: 8px; color: var(--muted); }
.nursery-subject-group { margin-top: 24px; }
.nursery-subject-group h2 { margin-bottom: 8px; font-size: 1.25rem; }
.ten-frame { display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 195px); margin-top: 8px; border-top: 1px solid #8690a5; border-left: 1px solid #8690a5; }
.ten-frame span { display: grid; place-items: center; height: 30px; border-right: 1px solid #8690a5; border-bottom: 1px solid #8690a5; }
.nursery-draw-box { min-height: 52px; max-width: 26rem; margin-top: 8px; border: 1px dashed #8690a5; border-radius: 5px; }


.home-page { background: #fffaf3; color: #221c38; }
.home-page .site-header { border-color: #e9e3ee; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: stretch; gap: 36px; margin-top: 26px; padding: 22px 24px 22px 32px; border: 1px solid #f1dbeb; border-radius: 24px; background: linear-gradient(110deg,#fff0db 0%,#fff3f5 52%,#f2eaff 100%); }
.home-hero-copy { align-self: center; padding-block: 20px; }
.home-range { margin-bottom: 17px; color: #5b4b83; font-weight: 750; letter-spacing: .035em; }
.home-hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.5rem); font-weight: 780; line-height: 1; letter-spacing: -.048em; }
.home-hero h1 span { display: block; color: #5742ac; }
.home-hero-intro { max-width: 48ch; margin-top: 24px; color: #574f67; font-size: 1.05rem; }
.home-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 24px; }
.home-primary { gap: 14px; border-color: #38267a; border-radius: 10px; background: #38267a; color: #fff; }
.home-primary:hover { border-color: #503ba0; background: #503ba0; }
.home-text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #4c368d; font-size: .92rem; font-weight: 750; text-decoration: none; }
.home-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-preview { display: grid; place-items: center; min-width: 0; min-height: 365px; padding: 28px; overflow: hidden; border: 1px solid #ddd1f7; border-radius: 22px; background-color: #dac8fc; background-image: radial-gradient(#b695ed 1.3px, transparent 1.3px); background-size: 16px 16px; text-decoration: none; }
.home-preview-sheet { position: relative; width: min(100%, 315px); padding: 20px 23px 16px; border: 1px solid #ded4f0; border-radius: 9px; background: #fff; box-shadow: 8px 8px #c5b5ed, 14px 14px #dfd2fa; transform: rotate(-4deg); }
.home-preview:hover .home-sheet-link { text-decoration: underline; }
.home-preview-sheet strong { display: block; margin-block: 6px 2px; font-size: 1.48rem; line-height: 1.18; letter-spacing: -.04em; }
.home-preview-sheet p { color: #574f67; font-size: .79rem; }
.home-sheet-top, .home-sheet-link { display: flex; justify-content: space-between; gap: 8px; color: #554096; font-size: .73rem; font-weight: 800; }
.home-sheet-top span:last-child { padding-inline: 7px; border-radius: 3px; background: #f2ebff; }
.home-sheet-name { display: flex; align-items: baseline; gap: 7px; margin-block: 12px 9px; color: #574f67; font-size: .75rem; }
.home-sheet-name span { width: 68%; border-bottom: 1px solid #bbb4c7; }
.home-match-row { display: grid; grid-template-columns: 24px 15px repeat(3, 24px); align-items: center; gap: 6px; padding-block: 4px; }
.home-match-row b, .home-match-row i { height: 22px; border: 1px solid #211d3955; border-radius: 4px; }
.home-match-row b { outline: 1px solid #3f2d75; outline-offset: 2px; }
.home-match-row span { color: #574f67; text-align: center; }
.match-red { background: #d32636; }
.match-blue { background: #175ac5; }
.match-yellow { background: #ffdb32; }
.match-green { background: #228249; }
.match-orange { background: #f18521; }
.match-purple { background: #7c3db1; }
.home-sheet-link { margin-top: 11px; padding-top: 8px; border-top: 1px solid #e6dfed; font-size: .83rem; }
.home-section { margin-top: 42px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 18px; margin-bottom: 10px; }
.home-section-heading h2, .home-guide-new h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.045em; }
.home-class-grid, .home-subject-grid, .home-feature-grid { display: grid; gap: 12px; }
.home-class-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.home-subject-grid, .home-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-class-card, .home-subject-card, .home-feature-card { border: 1px solid #e5dfea; border-radius: 13px; text-decoration: none; }
.home-class-card, .home-subject-card { display: flex; min-width: 0; justify-content: space-between; align-items: start; gap: 10px; background: #fff; }
.home-class-card { min-height: 75px; padding: 12px 14px; }
.home-class-early { border-color: #dacef4; background: #efe4ff; }
.home-class-early:nth-child(2) { border-color: #f1d19a; background: #ffe7b8; }
.home-class-early:nth-child(3) { border-color: #b9ddd3; background: #d7f3e9; }
.home-class-early:nth-child(4) { border-color: #f4c8d6; background: #ffdee8; }
.home-class-card h3, .home-subject-card h3, .home-feature-card h3 { font-size: 1.08rem; }
.home-class-card p, .home-subject-card p { margin-top: 4px; color: #5e566e; font-size: .85rem; }
.home-class-card > span, .home-card-arrow, .home-feature-card h3 span { color: #5742ac; }
.home-subject-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; padding: 14px; }
.home-subject-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 8px; font-size: .99rem; font-weight: 800; }
.home-subject-icon:lang(hi) { font-size: 1.25rem; }
.home-feature-card { display: block; padding: 16px; color: #29203d; }
.home-feature-card h3 { display: flex; justify-content: space-between; gap: 8px; margin-block: 6px; }
.home-feature-card p { font-size: .88rem; }
.home-feature-card .home-feature-grade { font-size: .78rem; font-weight: 750; }
.home-class-card:hover, .home-subject-card:hover, .home-feature-card:hover { border-color: #8b76bd; box-shadow: 0 3px 14px #38267a12; }
.home-guide-new { max-width: 72ch; }
.home-guide-new p { margin-top: 9px; color: #574f67; }
.home-page .footer { margin-top: 45px; }

@media (max-width: 900px) {
    .home-hero { gap: 24px; }
    .home-class-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .home-hero { grid-template-columns: 1fr; gap: 17px; margin-top: 14px; padding: 15px 16px; border-radius: 16px; }
    .home-hero-copy { padding-block: 7px; }
    .home-range { margin-bottom: 9px; font-size: .88rem; }
    .home-hero-intro { margin-top: 13px; font-size: .98rem; }
    .home-hero-actions { gap: 8px 15px; margin-top: 13px; }
    .home-preview { display: none; }
    .home-section { margin-top: 26px; }
    .home-class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .home-subject-grid { grid-template-columns: 1fr; }
}

.main-nav { flex-wrap: wrap; justify-content: flex-end; }
.main-nav [aria-current="page"] { color: var(--accent-dark); text-decoration: underline; }
.info-panel { max-width: 54rem; margin-top: 18px; }
.info-panel.cards { max-width: none; }
.info-copy h2 { margin-top: 20px; font-size: 1.25rem; }
.info-copy h2:first-child { margin-top: 0; }
.info-copy p { margin-top: 5px; }
.info-panel .contact-honeypot { display: none; }
.info-panel form > .button { justify-self: start; }
.contact-messages { display: grid; gap: 12px; margin-block: 18px; max-width: 54rem; }
.contact-message-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 10px; }
.universal-paper p + p { margin-top: 10px; }
.universal-frames, .universal-story { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.universal-frames h2, .universal-story h2 { font-size: 1rem; }
.universal-log { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9rem; }
.universal-log th, .universal-log td { border: 1px solid #828ca4; padding: 4px; }
.universal-log td { height: 38px; }
.picture-symbol { width: 22px; height: 22px; border: 1px solid #383248; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.picture-circle { border-radius: 50%; }
.picture-triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.picture-small { width: 13px; height: 13px; }
.picture-big { width: 29px; height: 29px; }
@media (max-width: 760px) {
    .site-header .topbar:has(.main-nav) { flex-wrap: wrap; padding-top: 7px; }
    .topbar .main-nav { justify-content: flex-start; gap: 0 15px; }
    .topbar .main-nav a { min-height: 36px; }
}
@media print {
    .universal-paper { margin-top: 12px; }
    .universal-paper .nursery-draw-box { min-height: 70px; }
}
.picture-answer { border-style: dashed; }
.practice-guide-question { margin-top: 18px; }

.blog-article { max-width: 54rem; }
.blog-copy { line-height: 1.65; }
.blog-copy p + p { margin-top: 12px; }
.blog-copy a, .class-blog-link a { color: var(--accent); text-underline-offset: 3px; }
.blog-copy details { margin-block: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.blog-copy summary { cursor: pointer; font-weight: 700; }
.class-blog-link { margin-block: 14px; }

[data-palette] { --card-tint: #f3ebff; --card-edge: #d9c5f5; --card-ink: #573184; }
[data-palette="maths"] { --card-tint: #e0f6e9; --card-edge: #aadcc1; --card-ink: #176247; }
[data-palette="english"] { --card-tint: #e5f0ff; --card-edge: #bbd4f5; --card-ink: #214b8c; }
[data-palette="hindi"] { --card-tint: #fff1d1; --card-edge: #eccb7c; --card-ink: #805013; }
[data-palette="evs"] { --card-tint: #f0f6d7; --card-edge: #cbdc90; --card-ink: #4e641d; }
[data-palette="science"], [data-palette="evs-science"] { --card-tint: #def5f5; --card-edge: #a5dcdc; --card-ink: #1b626a; }

.home-class-card:not(.home-class-early):nth-child(3n + 1) { background: #fff0d7; border-color: #ebd3a9; }
.home-class-card:not(.home-class-early):nth-child(3n + 2) { background: #e6f0ff; border-color: #c2d6f6; }
.home-class-card:not(.home-class-early):nth-child(3n) { background: #f0eaff; border-color: #dcccf4; }

.home-subject-card[data-palette], .home-new-card[data-palette] {
    background: var(--card-tint);
    border-color: var(--card-edge);
}
.home-subject-card[data-palette] .home-subject-icon {
    background: var(--card-edge);
    color: var(--card-ink);
}
.library-heading {
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid var(--card-edge);
    border-radius: 18px;
    background: linear-gradient(105deg, var(--card-tint), #fff);
}
.library-heading h1 { color: var(--card-ink); }
.library-card {
    border-top: 3px solid var(--card-edge);
    background: linear-gradient(155deg, var(--card-tint), #fff 68%);
}
.library-card .class-label { background: var(--card-tint); color: var(--card-ink); }
.home-subject-card[data-palette]:hover, .home-new-card[data-palette]:hover,
.home-class-card:not(.home-class-early):hover, .library-card:hover {
    border-color: var(--card-ink, var(--accent));
}
.home-hero:has(.home-hero-copy:only-child) { grid-template-columns: minmax(0, 1fr); }
