:root {
  color-scheme: light;
  --ink: #1d2b25;
  --muted: #6e7871;
  --paper: #f6f7f2;
  --white: #fff;
  --green: #c4ee73;
  --green-dark: #8ebd3d;
  --line: #e6e9e1;
  --navy: #172a25;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.topbar {
  height: 78px; padding: 0 max(6.6vw, 24px); display: flex; align-items: center;
  justify-content: space-between; background: var(--paper);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 19px Manrope, sans-serif; letter-spacing: -.8px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--green); font-size: 19px; letter-spacing: -2px; }
.top-nav { display: flex; gap: 34px; margin-left: auto; margin-right: 36px; color: #647069; font-size: 13px; font-weight: 600; }
.top-nav a:hover, .hero-link:hover { color: var(--green-dark); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.account-button { padding: 10px 12px; border: 1px solid #dfe3d8; border-radius: 8px; background: transparent; color: #35463b; font-size: 11px; font-weight: 700; }
.account-button:hover { border-color: #9dc85a; background: #f0f7e6; }
.account-label { max-width: 130px; overflow: hidden; color: #68756c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.top-cta { padding: 11px 16px; border: 1px solid #dfe3d8; border-radius: 8px; font-size: 12px; font-weight: 700; }
.top-cta span { margin-left: 8px; }

.hero { position: relative; overflow: hidden; min-height: 398px; padding: 67px max(11.5vw, 28px) 57px; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.hero-copy { position: relative; z-index: 1; width: min(460px, 55%); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #a7bcaa; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
h1, h2, p { margin-top: 0; }
h1 { margin: 21px 0 15px; font: 700 clamp(42px, 5vw, 64px)/1.08 Manrope, sans-serif; letter-spacing: -3.2px; }
h1 span { color: var(--green); }
.hero-copy > p { max-width: 395px; margin-bottom: 22px; color: #bec9c0; font-size: 14px; line-height: 1.7; }
.hero-link { color: var(--green); font-size: 12px; font-weight: 700; transition: color .15s; }
.hero-link span { padding-left: 8px; }

.pricing-section { width: min(1010px, calc(100% - 48px)); margin-right: auto; margin-left: auto; }
.workspace { width: min(1010px, calc(100% - 48px)); margin: 66px auto 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 23px; }
.section-eyebrow { color: #7e8d7e; font-size: 9px; }
.section-heading h2 { margin: 10px 0 0; font: 800 29px Manrope; letter-spacing: -1.3px; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.pricing-section { margin-top: 0; margin-bottom: 74px; scroll-margin-top: 30px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pricing-card { padding: 24px; border: 1px solid #e5e9e1; border-radius: 12px; background: white; }
.pricing-card-featured { border-color: #b6d980; background: #fbfdf8; }
.pricing-kicker { margin-bottom: 11px; color: #668056; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.pricing-card h3 { margin: 0 0 10px; font: 800 29px Manrope; letter-spacing: -1px; }
.pricing-card h3 span { color: #78827a; font: 600 12px "DM Sans", sans-serif; letter-spacing: 0; }
.pricing-card > p:not(.pricing-kicker) { min-height: 40px; margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.pricing-card .primary-button, .pricing-card .secondary-button { display: block; width: 100%; margin-top: 9px; text-align: center; }
.secondary-button { padding: 11px 15px; border: 1px solid #dfe5d9; border-radius: 7px; background: white; color: #344a39; font-size: 11px; font-weight: 800; }
.secondary-button:hover { border-color: #9dc85a; background: #f7faef; }
.pricing-disclaimer { margin: 17px 0 12px; color: #6e7871; font-size: 11px; line-height: 1.7; }
.included-features { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.included-features li { padding: 7px 10px; border-radius: 18px; background: #edf3e6; color: #4a6042; font-size: 10px; font-weight: 700; }
.picker-card { padding: 24px 25px 19px; border: 1px solid #e8ebe4; border-radius: 13px; background: var(--white); box-shadow: 0 10px 30px #1c302208; }
.picker-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.field { display: block; min-width: 0; }
.field > span { display: block; margin: 0 0 9px; color: #a1aaa2; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.field > span b { padding-left: 5px; color: #34443b; font-size: 10px; letter-spacing: 0; }
.field select { width: 100%; height: 43px; padding: 0 31px 0 12px; border: 1px solid #e6e9e2; border-radius: 7px; outline: none; background: #fbfcf9; color: #29372f; font-size: 12px; font-weight: 700; }
.field select:focus { border-color: #9dc85a; box-shadow: 0 0 0 3px #c4ee7330; }
.picker-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; padding-top: 17px; border-top: 1px solid #eef0eb; }
.picker-note { display: flex; align-items: center; gap: 7px; color: #7c867f; font-size: 10px; }
.lock-icon { color: #85a94f; font-size: 12px; }
.primary-button { padding: 12px 16px; border: 0; border-radius: 7px; background: var(--green); color: #253321; font-size: 11px; font-weight: 800; transition: background .15s, transform .15s; }
.primary-button:not(:disabled):hover, .banner-button:hover { background: #b6e45d; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.primary-button span { margin-left: 13px; font-size: 15px; vertical-align: -1px; }

.notes-area { margin-top: 30px; scroll-margin-top: 25px; }
.notes-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.breadcrumbs { color: #849087; font-size: 10px; font-weight: 600; }
.breadcrumbs span { margin: 0 7px; color: #b5bdb4; }
.share-button { border: 0; background: none; color: #718071; font-size: 10px; font-weight: 700; }
.share-button:hover { color: #42682d; }
.paper-card { min-width: 0; overflow: hidden; border: 1px solid #e7eae3; border-radius: 13px; background: white; }
.paper-heading { padding: 31px 36px 26px; border-bottom: 1px solid #e3ebe3; background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%); }
.paper-kicker { color: #49745c; font-size: 10px; font-weight: 800; letter-spacing: 1.35px; }
.paper-heading h2 { margin: 9px 0 9px; color: #193d2d; font: 800 30px/1.25 Manrope; letter-spacing: -.8px; }
.paper-heading p { max-width: 720px; margin: 0; color: #485c50; font-size: 15px; line-height: 1.75; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.meta-chip { padding: 7px 11px; border-radius: 20px; background: #edf5ee; color: #42634d; font-size: 11px; font-weight: 700; }
.notes-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-width: 0; }
.contents { padding: 27px 19px; border-right: 1px solid #e3ebe3; background: #f5f8f4; }
.contents-title { margin: 0 0 14px; color: #61746a; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.contents a { display: block; padding: 9px 10px; border-radius: 6px; color: #40554a; font-size: 12px; line-height: 1.5; }
.contents a:hover { background: #e7f1e7; color: #245c40; }
.notes-body { min-width: 0; padding: 34px 38px 42px; }
.note-section { margin: 0 0 30px; scroll-margin-top: 24px; }
.note-section:last-child { margin-bottom: 0; }
.note-section h3 { margin: 0 0 15px; padding-bottom: 10px; border-bottom: 2px solid #dfeade; color: #1d4734; font: 800 22px/1.35 Manrope; letter-spacing: -.35px; }
.note-section h4 { margin: 23px 0 9px; color: #286347; font: 750 16px/1.4 Manrope; }
.note-section p, .note-section li { color: #35473d; font-size: 15px; line-height: 1.8; }
.note-section p { margin: 0 0 9px; }
.note-section ul, .note-section ol { margin: 10px 0 16px; padding-left: 21px; }
.note-section li { padding-left: 4px; margin-bottom: 7px; }
.note-section[id^="cs-8525-p1-"] pre { max-width: 100%; overflow-x: auto; padding: 14px; border-radius: 8px; background: #f3f7f2; font-size: 13px; line-height: 1.6; }
.topic-hook { margin: 13px 0 21px; padding: 14px 16px; border-left: 4px solid #4d8964; border-radius: 0 9px 9px 0; background: #edf5ef; color: #2e5941; font-size: 14px; line-height: 1.7; font-weight: 650; }
.topic-hook span { display: inline-block; margin-right: 9px; color: #377451; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.study-diagram { max-width: 100%; overflow-x: auto; margin: 21px 0 25px; padding: 19px; border: 1px solid #d9e4dc; border-radius: 14px; background: #fff; box-shadow: 0 7px 18px #204a3310; }
.study-diagram svg { display: block; width: 100%; min-width: 680px; height: auto; }
.study-diagram .sourced-diagram { display: block; width: 100%; height: auto; margin: 0 auto; background: #fff; }
.study-diagram .concept-diagram { display: block; width: 100%; min-width: 680px; height: auto; margin: 0 auto; }
.study-diagram figcaption { margin-top: 13px; color: #4d5e53; font-size: 12px; line-height: 1.7; }
.study-diagram figcaption strong { color: #315d43; }
.diagram-key, .diagram-credit { display: block; color: #68766d; font-size: 11px; line-height: 1.6; }
.diagram-key { margin-top: 9px; }
.diagram-credit { margin-top: 8px; overflow-wrap: anywhere; }
.diagram-credit a { color: #436e53; text-decoration: underline; text-underline-offset: 2px; }
.svg-heading { fill: #244b37; font: 800 18px "DM Sans", sans-serif; letter-spacing: .25px; }
.svg-label { fill: #2b4034; font: 650 16px "DM Sans", sans-serif; }
.svg-caption { fill: #4e6256; font: 550 14px "DM Sans", sans-serif; }
.key-box { margin: 17px 0; padding: 15px 17px; border-left: 4px solid #5b9669; border-radius: 0 8px 8px 0; background: #eff6ef; color: #354f3e; font-size: 14px; line-height: 1.8; }
.key-box strong { color: #224b34; }
.note-section > details { margin: 20px 0 24px; border: 1px solid #d5e5d7; border-radius: 12px; background: #f7fbf6; }
.note-section > details > summary { padding: 14px 17px; color: #285d41; font-size: 14px; font-weight: 800; line-height: 1.6; cursor: pointer; }
.note-section > details[open] > summary { border-bottom: 1px solid #dce8dd; }
.note-section > details > .exam-answer { margin: 12px; }
.draft-note { margin: 16px 0 0; border-left-color: #e5b34d; background: #fff9eb; color: #78643c; }
.draft-note strong { color: #685127; }
.draft-note a { color: #4d672f; font-weight: 700; text-decoration: underline; }
.table-wrap { overflow-x: auto; margin: 11px 0; }
.note-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.note-table th { padding: 10px; background: #eaf2eb; color: #31543c; font-weight: 800; }
.note-table td { padding: 10px; border-bottom: 1px solid #e6ede7; color: #405449; line-height: 1.6; vertical-align: top; }
.exam-question { margin: 18px 0; padding: 18px; border: 1px solid #dfe8de; border-radius: 12px; background: #fbfcf9; }
.exam-question-label { margin-bottom: 8px !important; color: #64804f !important; font-size: 10px !important; font-weight: 800; letter-spacing: .8px; }
.exam-question details { margin-top: 12px; }
.exam-question summary { color: #285d41; font-size: 13px; font-weight: 800; cursor: pointer; }
.exam-answer { margin-top: 12px; padding: 14px 16px; border-left: 3px solid #6c9a70; border-radius: 0 8px 8px 0; background: #eef5eb; }
.exam-answer p, .exam-answer li { margin-top: 0; color: #35473d; font-size: 14px; line-height: 1.75; }
.exam-answer p:last-child { margin-bottom: 0; }
.math-revision-card .note-section h3 { display: flex; align-items: center; gap: 10px; }
.math-revision-card .note-section h3::before { content: ""; width: 9px; height: 24px; flex: 0 0 9px; border-radius: 6px; background: linear-gradient(180deg, #72a27b, #b8d7bd); }
.math-lead { margin: 0 0 16px !important; padding: 13px 15px; border: 1px solid #dfece0; border-radius: 11px; background: #f5faf4; color: #355a40 !important; font-weight: 650; }
.math-diagram { margin: 16px 0 20px; padding: 12px 16px; }
.math-diagram img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.math-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 17px 0; }
.math-method-card { min-width: 0; padding: 16px; border: 1px solid #e0e9df; border-radius: 12px; background: linear-gradient(160deg, #fff 20%, #f7faf6); box-shadow: 0 4px 12px #204a3308; }
.math-method-label { display: inline-block; margin-bottom: 6px; color: #65835c; font-size: 9px; font-weight: 850; letter-spacing: 1px; }
.math-method-card h4, .math-worked h4 { margin: 0 0 7px; color: #244b37; font: 800 15px/1.4 Manrope; }
.math-method-card p, .math-worked p, .math-grade9-card p { margin: 0 0 8px; color: #45594c; font-size: 13px; line-height: 1.65; }
.math-method-card .math-steps, .math-worked .math-steps { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; counter-reset: math-step; }
.math-steps li { position: relative; min-height: 29px; margin: 0 !important; padding: 4px 0 4px 34px !important; color: #35473d !important; font-size: 12px !important; line-height: 1.6 !important; counter-increment: math-step; }
.math-steps li::before { position: absolute; top: 2px; left: 0; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #e6f0e5; color: #376146; content: counter(math-step); font-size: 10px; font-weight: 850; }
.math-equation { margin: 9px 0 0 !important; padding: 8px 10px; border-radius: 7px; background: #edf5ed; color: #28523a !important; font: 750 12px/1.55 "DM Sans", sans-serif !important; }
.math-worked { margin: 17px 0; padding: 17px 18px; border: 1px solid #d5e5d7; border-left: 4px solid #6c9a70; border-radius: 11px; background: #f8fbf7; }
.math-worked-prompt { color: #243f2e !important; font-weight: 700; }
.math-grade9-card { margin: 15px 0; padding: 15px 17px; border: 1px solid #ecdcb9; border-radius: 11px; background: #fffaf0; }
.math-grade9-card > strong { display: block; margin-bottom: 6px; color: #8a6532; font-size: 9px; letter-spacing: 1px; }
.math-grade9-card p { margin: 0; }
.math-revision-card #topic-outline ol,
.math-revision-card #key-definitions ul,
.math-revision-card #grade-extension ul,
.math-revision-card #practical-checklist ol,
.math-revision-card #equation-checklist ul,
.math-revision-card #common-mistakes ul,
.math-revision-card #exam-technique ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0 18px; padding: 0; list-style: none; }
.math-revision-card #topic-outline li,
.math-revision-card #key-definitions li,
.math-revision-card #grade-extension li,
.math-revision-card #practical-checklist li,
.math-revision-card #equation-checklist li,
.math-revision-card #common-mistakes li,
.math-revision-card #exam-technique li { margin: 0; padding: 11px 13px !important; border: 1px solid #e2ebe1; border-radius: 9px; background: #fbfdfb; color: #394e40; font-size: 12px !important; line-height: 1.65 !important; }
.math-revision-card #topic-outline li { border-left: 3px solid #81a889; font-weight: 700; }
.math-revision-card #key-definitions li strong { color: #28563a; }
.math-revision-card .exam-question { border-left: 4px solid #87a982; }
.math-revision-card .exam-question-label { color: #52754d !important; }
.literature-revision-card .note-section h3 { display: flex; align-items: center; gap: 10px; }
.literature-revision-card .note-section h3::before { content: ""; width: 9px; height: 24px; flex: 0 0 9px; border-radius: 6px; background: linear-gradient(180deg, #6e91c3, #bdcce1); }
.lit-thesis { margin: 0 0 16px !important; padding: 14px 16px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f5f8fc; color: #344c6b !important; font-weight: 650; }
.lit-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.lit-analysis-card { min-width: 0; padding: 16px; border: 1px solid #e0e7f0; border-radius: 12px; background: linear-gradient(155deg, #fff, #f8fafd); }
.lit-analysis-card h4 { margin: 0 0 10px; color: #345576; font: 800 15px/1.4 Manrope; }
.lit-analysis-card p, .lit-analysis-card li { color: #41546b; font-size: 13px; line-height: 1.7; }
.lit-structure-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lit-structure-step { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border-radius: 9px; background: #eff4f9; }
.lit-structure-step span { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 50%; background: #dce7f3; color: #395c82; font-size: 9px; font-weight: 850; }
.lit-structure-step p { margin: 2px 0 0; color: #40546b; font-size: 11px; line-height: 1.6; }
.lit-character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lit-character-card { padding: 11px 12px; border-left: 3px solid #8da7c3; border-radius: 0 8px 8px 0; background: #f5f8fb; }
.lit-character-card h5 { margin: 0 0 5px; color: #365677; font: 800 12px/1.4 Manrope; }
.lit-character-card p { margin: 0; color: #4a5b70; font-size: 11px; line-height: 1.6; }
.lit-theme-table { min-width: 760px; }
.lit-quote-table { min-width: 820px; }
.poetry-cluster-table { min-width: 1180px; }
.lit-theme-table th, .lit-quote-table th, .poetry-cluster-table th { background: #eaf0f7; color: #355372; }
.lit-quote-table td:nth-child(2) { min-width: 155px; color: #274364; }
.poetry-cluster-table th:first-child { min-width: 150px; }
.poetry-cluster-table td { min-width: 200px; font-size: 12px; }
.lit-context-card { margin: 15px 0; padding: 14px 16px; border-left: 4px solid #7d9bb8; border-radius: 0 9px 9px 0; background: #eef4fa; color: #3c5269; font-size: 13px; line-height: 1.75; }
.lit-context-card strong { color: #2f4d6c; }
.lit-grade9-card { margin: 15px 0; padding: 15px 17px; border: 1px solid #e6d9bb; border-radius: 11px; background: #fffaf0; }
.lit-grade9-card > strong { display: block; margin-bottom: 6px; color: #8a6532; font-size: 9px; letter-spacing: 1px; }
.lit-grade9-card p, .lit-grade9-card li { color: #5b4b35; font-size: 13px; line-height: 1.7; }
.lit-copyright-note { margin: 10px 0 !important; color: #687787 !important; font-size: 11px !important; }
.literature-revision-card #key-definitions ul,
.literature-revision-card #grade-extension ul,
.literature-revision-card #practical-checklist ol,
.literature-revision-card #common-mistakes ul,
.literature-revision-card #exam-technique ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0 18px; padding: 0; list-style: none; }
.literature-revision-card #key-definitions li,
.literature-revision-card #grade-extension li,
.literature-revision-card #practical-checklist li,
.literature-revision-card #common-mistakes li,
.literature-revision-card #exam-technique li { margin: 0; padding: 11px 13px !important; border: 1px solid #e2e8ef; border-radius: 9px; background: #fbfcfe; color: #41546b; font-size: 12px !important; line-height: 1.65 !important; }
.literature-revision-card #key-definitions li strong { color: #355778; }
.literature-revision-card .exam-question { border-left: 4px solid #7d9bb8; }
.literature-revision-card .exam-question-label { color: #4f7297 !important; }
.unavailable-card { padding: 35px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: center; }
.unavailable-icon { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 15px; background: #edf5df; color: #648642; font-size: 20px; }
.unavailable-card h2 { margin: 0 0 8px; font: 800 19px Manrope; }
.unavailable-card p { max-width: 470px; margin: auto; color: var(--muted); font-size: 12px; line-height: 1.7; }

.bottom-banner { width: min(1010px, calc(100% - 48px)); min-height: 118px; margin: 0 auto 70px; padding: 23px 28px; display: flex; align-items: center; gap: 16px; border-radius: 12px; background: #eaf3df; }
.banner-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; background: #d7edb4; color: #638c35; font-size: 18px; }
.bottom-banner h2 { margin: 0 0 5px; font: 800 15px Manrope; }
.bottom-banner p { margin: 0; color: #71806f; font-size: 11px; }
.banner-button { margin-left: auto; padding: 12px 15px; border: 0; border-radius: 7px; background: var(--green); color: #253321; font-size: 10px; font-weight: 800; transition: background .15s, transform .15s; }
.banner-button span { margin-left: 10px; font-size: 14px; }
footer { min-height: 90px; padding: 20px max(6.6vw, 24px); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e8ebe4; color: #89928a; font-size: 9px; }
.footer-brand { color: var(--ink); font-size: 15px; }
.footer-brand .brand-mark { width: 25px; height: 25px; border-radius: 8px; font-size: 15px; }
footer p { margin: 0; }

.chat-backdrop { position: fixed; z-index: 8; inset: 0; background: #10211d61; }
.chat-panel { position: fixed; z-index: 9; top: 0; right: 0; width: min(390px, 100%); height: 100dvh; display: flex; flex-direction: column; background: #fff; box-shadow: -15px 0 55px #14271a22; }
.chat-header { display: flex; align-items: center; gap: 11px; padding: 19px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: #e9f4d9; color: #628738; }
.chat-header strong, .chat-header span { display: block; }
.chat-header strong { font: 800 13px Manrope; }
.chat-header span { margin-top: 3px; color: #8a938c; font-size: 9px; }
.icon-button { margin-left: auto; width: 31px; height: 31px; border: 0; border-radius: 8px; background: #f3f5f1; color: #647066; font-size: 21px; }
.chat-context { padding: 9px 18px; background: #f7f9f4; color: #718168; font-size: 9px; font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; }
.message { width: fit-content; max-width: 91%; margin-bottom: 12px; padding: 11px 13px; border-radius: 11px; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.assistant-message { border: 1px solid #edf0e9; border-top-left-radius: 3px; background: #f8faf5; color: #4f5c52; }
.user-message { margin-left: auto; border-top-right-radius: 3px; background: #eaf4da; color: #35442e; }
.chat-form { display: flex; align-items: end; gap: 8px; margin: 0 15px; padding: 9px; border: 1px solid #e3e8de; border-radius: 10px; }
.chat-form:focus-within { border-color: #9ec962; }
.chat-form textarea { flex: 1; resize: none; border: 0; outline: 0; color: var(--ink); font-size: 11px; line-height: 1.5; }
.chat-form button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--green); color: #304126; font-size: 18px; font-weight: 800; }
.chat-form button:disabled { opacity: .55; cursor: wait; }
.chat-disclaimer { margin: 8px 18px 13px; color: #929a92; font-size: 8px; text-align: center; }
.auth-dialog { position: fixed; width: min(420px, calc(100% - 32px)); padding: 28px; border: 1px solid #e1e7dc; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px #10211d35; }
.auth-dialog::backdrop { background: #10211d75; }
.auth-dialog h2 { margin: 12px 0 7px; font: 800 24px Manrope; }
.auth-description { margin-bottom: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f2f5ef; color: #536258; font-size: 20px; }
.auth-form .field { margin: 13px 0; }
.auth-form .field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #e1e6dd; border-radius: 7px; background: #fbfcf9; color: #29372f; font-size: 12px; }
.auth-form .primary-button { width: 100%; margin-top: 7px; }
.auth-feedback { min-height: 18px; margin: 12px 0 4px; color: #60725e; font-size: 11px; line-height: 1.5; }
.auth-feedback.is-error { color: #9d493d; }
.auth-toggle { padding: 0; border: 0; background: transparent; color: #55763e; font-size: 11px; font-weight: 700; text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
[hidden] { display: none !important; }

.admin-main { width: min(1120px, calc(100% - 48px)); margin: 46px auto 70px; }
.admin-main > .section-heading h1 { margin: 10px 0 0; font-size: 38px; letter-spacing: -1.6px; }
.admin-account { color: #66736a; font-size: 11px; font-weight: 700; }
.admin-status { padding: 12px 15px; border: 1px solid #dfe9d7; border-radius: 8px; background: #f3f8ed; color: #44613b; font-size: 12px; line-height: 1.6; }
.admin-status.is-error { border-color: #ebd6cd; background: #fff5f1; color: #8c4236; }
.admin-panel { margin: 17px 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 26px #1c302208; }
.admin-panel h2 { margin: 0 0 14px; font: 800 18px Manrope, sans-serif; }
.admin-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 12px 0; }
.admin-form { margin-top: 18px; }
.admin-form .admin-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-panel .field { margin: 12px 0; }
.admin-panel .field input, .admin-panel .field select, .admin-panel .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #e1e6dd; border-radius: 7px;
  background: #fbfcf9; color: #29372f; font: 12px/1.6 "DM Sans", sans-serif;
}
.admin-panel .field input, .admin-panel .field select { min-height: 42px; }
.admin-panel .field textarea { resize: vertical; font-family: Consolas, monospace; font-size: 11px; }
.admin-panel .field input:focus, .admin-panel .field select:focus, .admin-panel .field textarea:focus { outline: 2px solid #c4ee73; outline-offset: 1px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.secondary-button { padding: 11px 14px; border: 1px solid #dfe6dc; border-radius: 7px; background: #f9fbf7; color: #385340; font-size: 11px; font-weight: 800; }
.secondary-button:hover { background: #eef5e9; }
.admin-actions button:disabled { opacity: .48; cursor: not-allowed; }
.admin-panel summary { color: #344a3c; cursor: pointer; font-size: 13px; }
.admin-editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.admin-editor-heading p { margin: -7px 0 10px; color: var(--muted); font-size: 11px; }
.admin-state { padding: 6px 9px; border-radius: 20px; background: #edf5ee; color: #42634d; font-size: 10px; font-weight: 800; white-space: nowrap; }
.admin-help { color: #78827a; font-size: 11px; line-height: 1.6; }
.admin-help code { padding: 2px 4px; border-radius: 3px; background: #f0f3ed; }
.student-preview { padding: 22px; border: 1px solid #e5eae2; border-radius: 9px; background: #fcfdfb; }
.student-preview h3 { margin: 0 0 12px; color: #1d4734; font: 800 20px Manrope, sans-serif; }
.student-preview h4 { margin: 18px 0 8px; color: #286347; font: 750 15px Manrope, sans-serif; }
.student-preview p, .student-preview li { color: #35473d; font-size: 13px; line-height: 1.7; }
.student-preview section { padding-bottom: 12px; border-bottom: 1px solid #e3ebe3; }
.student-preview .study-diagram img { display: block; max-width: 100%; }

@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 20px; }
  .top-nav { display: none; }
  .top-actions { margin-left: auto; }
  .account-label { display: none; }
  .top-cta { padding: 9px 11px; font-size: 10px; }
  .hero { min-height: auto; padding: 54px 27px 45px; }
  .hero-copy { width: 100%; }
  .hero-copy > p { max-width: 350px; }
  .pricing-section { width: calc(100% - 36px); }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 20px; }
  .workspace { width: calc(100% - 36px); margin: 48px auto 55px; }
  .section-heading { align-items: start; flex-direction: column; gap: 9px; }
  .picker-card { padding: 19px 16px 15px; }
  .picker-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .picker-footer { align-items: start; flex-direction: column; gap: 14px; }
  .primary-button { width: 100%; }
  .notes-layout { grid-template-columns: 1fr; }
  .notes-layout > * { min-width: 0; }
  .contents { padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .contents a { display: inline-block; margin: 2px; }
  .notes-body { padding: 23px 19px; }
  .math-method-grid { grid-template-columns: 1fr; }
  .math-revision-card #topic-outline ol,
  .math-revision-card #key-definitions ul,
  .math-revision-card #grade-extension ul,
  .math-revision-card #practical-checklist ol,
  .math-revision-card #equation-checklist ul,
  .math-revision-card #common-mistakes ul,
  .math-revision-card #exam-technique ul { grid-template-columns: 1fr; }
  .lit-analysis-grid, .lit-structure-flow, .lit-character-grid { grid-template-columns: 1fr; }
  .literature-revision-card #key-definitions ul,
  .literature-revision-card #grade-extension ul,
  .literature-revision-card #practical-checklist ol,
  .literature-revision-card #common-mistakes ul,
  .literature-revision-card #exam-technique ul { grid-template-columns: 1fr; }
  .study-diagram:not(.source-backed-diagram) figcaption::after { content: " Swipe horizontally to see the full diagram."; color: #758175; font-size: 10px; }
  .paper-heading { padding: 23px 19px 18px; }
  .bottom-banner { width: calc(100% - 36px); margin-bottom: 45px; padding: 19px; flex-wrap: wrap; }
  .banner-button { width: 100%; margin-left: 56px; }
  footer { padding: 19px 22px; flex-wrap: wrap; gap: 12px; }
  footer p { order: 3; width: 100%; }
  .admin-main { width: calc(100% - 32px); margin: 30px auto 48px; }
  .admin-panel { padding: 17px; }
  .admin-row, .admin-form .admin-row { grid-template-columns: 1fr; gap: 2px; }
  .admin-actions { align-items: stretch; flex-direction: column; }
  .admin-actions button { width: 100%; }
  .admin-editor-heading { flex-direction: column; }
  .admin-account { max-width: 42%; overflow-wrap: anywhere; text-align: right; }
}

@media (max-width: 400px) {
  h1 { font-size: 43px; }
  .top-cta { padding: 9px 11px; font-size: 10px; }
  .account-button { padding: 8px 9px; font-size: 9px; }
  .section-heading h2 { font-size: 26px; }
  .field select { font-size: 11px; }
}
.admin-notes-browser { width: 100%; height: 75vh; min-height: 600px; border: 1px solid #d6d9e3; border-radius: 12px; }
