:root {
  --ink: #173b57;
  --muted: #667788;
  --paper: #f6f8fb;
  --white: #ffffff;
  --blue: #2d78b7;
  --blue2: #dceefa;
  --teal: #178a8a;
  --green: #37a66a;
  --green-bg: #e8f7ef;
  --amber: #df9b24;
  --amber-bg: #fff5df;
  --red: #d95d5d;
  --red-bg: #fdecec;
  --purple: #7659b7;
  --shadow: 0 16px 40px rgba(23, 59, 87, 0.10);
  --radius: 22px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(16px, 4vw, 42px); background: rgba(255,255,255,.94); border-bottom: 1px solid #e7edf3; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 24px; font-weight: 900; }
.brand strong { display: block; font-size: 16px; }.brand small { display: block; color: var(--muted); margin-top: 2px; }
.top-actions { display: flex; gap: 8px; }
.ghost-btn, .back-btn { border: 0; background: #eef4f8; color: var(--ink); border-radius: 12px; padding: 10px 13px; font-weight: 750; }
.main { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 38px) 70px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #e7edf3; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: clamp(24px, 5vw, 48px); background: linear-gradient(135deg, #ffffff 0%, #edf7ff 100%); overflow: hidden; }
.eyebrow { display: block; color: var(--blue); font-weight: 850; letter-spacing: .08em; font-size: 12px; margin-bottom: 7px; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); line-height: 1.02; letter-spacing: -.04em; } h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.primary-btn, .secondary-btn { border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 850; }
.primary-btn { background: var(--ink); color: white; }.secondary-btn { background: white; color: var(--ink); box-shadow: inset 0 0 0 1px #cad7e2; }
.hero-badge { min-width: 180px; align-self: center; display: grid; place-items: center; padding: 24px; border-radius: 30px; background: var(--ink); color: #fff; font-size: 54px; transform: rotate(2deg); }
.hero-badge span { font-size: 16px; line-height: 1.15; font-weight: 850; text-align: center; margin-top: 8px; }
.today { margin-top: 22px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.today strong { font-size: 18px; }.today-items { display: flex; gap: 10px; flex-wrap: wrap; }.today-pill { padding: 8px 11px; background: #f0f5f8; border-radius: 999px; font-weight: 750; font-size: 13px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 36px 0 14px; }.legend { color: var(--muted); font-size: 12px; }.dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; margin: 0 4px 0 10px; }.green { background: var(--green); }.amber { background: var(--amber); }.red { background: var(--red); }
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }.subject-card { position: relative; padding: 24px; min-height: 250px; border: 0; text-align: left; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }.subject-card:hover { transform: translateY(-3px); box-shadow: 0 22px 48px rgba(23,59,87,.15); }
.subject-icon { font-size: 42px; }.subject-card h3 { font-size: 28px; margin: 12px 0 4px; }.subject-card p { margin: 0 0 18px; }.subject-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 13px; font-weight: 800; }.mini-track { height: 8px; border-radius: 99px; background: rgba(23,59,87,.09); overflow: hidden; margin-top: 16px; }.mini-fill { height: 100%; background: var(--green); border-radius: inherit; }
.subject-maths { background: linear-gradient(145deg,#fff,#eef8ff); }.subject-english { background: linear-gradient(145deg,#fff,#f3efff); }.subject-malti { background: linear-gradient(145deg,#fff,#fff3ec); }
.page-head { padding: 18px 0 8px; }.page-head .back-btn { margin-bottom: 24px; }.page-head h1 { font-size: clamp(36px, 5vw, 58px); }.page-head p { max-width: 720px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }.topic-card { border: 1px solid #e2e9ef; background: white; border-radius: 18px; padding: 19px; text-align: left; min-height: 180px; display: flex; flex-direction: column; transition: .18s ease; }.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }.topic-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #eef4f8; font-weight: 900; }.topic-card h3 { margin: 16px 0 5px; font-size: 19px; }.topic-card p { font-size: 13px; margin: 0; }.topic-status { margin-top: auto; padding-top: 15px; font-size: 12px; font-weight: 850; }.status-green { color: var(--green); }.status-amber { color: var(--amber); }.status-red { color: var(--red); }.status-new { color: var(--muted); }
.lesson-shell { max-width: 820px; margin: 0 auto; }.lesson-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-weight: 750; margin-bottom: 12px; }.progress-track { height: 9px; border-radius: 99px; background: #dfe7ee; overflow: hidden; margin-bottom: 18px; }.progress-fill { height: 100%; width: 0; background: var(--blue); transition: width .25s ease; }.lesson-card { padding: clamp(24px, 5vw, 42px); min-height: 480px; }.lesson-kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 12px; }.lesson-card h2 { font-size: clamp(28px,4vw,40px); margin: 10px 0 12px; }.example-box { background: #edf7ff; border-left: 5px solid var(--blue); border-radius: 15px; padding: 18px; margin: 20px 0; line-height: 1.6; }.tip-box { background: #fff6df; border-radius: 15px; padding: 16px; margin: 16px 0; color: #725111; }.question-text { font-size: clamp(22px,3vw,31px); font-weight: 850; line-height: 1.3; margin: 28px 0 20px; }.answer-input { width: 100%; border: 2px solid #cfdbe5; border-radius: 14px; padding: 15px 16px; font-size: 20px; outline: none; }.answer-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #e5f2fc; }.choices { display: grid; gap: 10px; }.choice-btn { border: 2px solid #dce5ed; background: #fff; border-radius: 14px; padding: 14px 16px; text-align: left; font-weight: 750; }.choice-btn:hover { border-color: var(--blue); background: #f4faff; }.choice-btn.selected { border-color: var(--blue); background: #eaf6ff; }.feedback { margin-top: 18px; border-radius: 14px; padding: 15px; font-weight: 750; }.feedback.good { background: var(--green-bg); color: #236d47; }.feedback.bad { background: var(--red-bg); color: #923e3e; }.lesson-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }.listen-btn { display: inline-flex; gap: 8px; align-items: center; border: 0; border-radius: 14px; background: var(--ink); color: white; padding: 12px 16px; font-weight: 850; }.writing-area { min-height: 220px; resize: vertical; }.word-count { color: var(--muted); font-weight: 750; margin-top: 8px; }
.summary { text-align: center; padding: 12px 0; }.summary .big-emoji { font-size: 70px; }.summary-score { font-size: 54px; font-weight: 950; letter-spacing: -.04em; margin: 8px 0; }.summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 24px 0; }.summary-stat { background: #f1f5f8; border-radius: 15px; padding: 14px; }.summary-stat strong { display: block; font-size: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 22px 0; }.stat-card { padding: 18px; }.stat-card span { color: var(--muted); font-size: 12px; font-weight: 800; }.stat-card strong { display: block; font-size: 32px; margin-top: 5px; }.parent-card { padding: 24px; }.parent-subject { border-top: 1px solid #e8edf2; padding: 18px 0; }.parent-subject:first-child { border-top: 0; }.parent-topic-row { display: grid; grid-template-columns: 1fr 120px 80px; gap: 12px; align-items: center; padding: 9px 0; font-size: 14px; }.parent-topic-row .bar { height: 8px; background: #e3eaf0; border-radius: 99px; overflow: hidden; }.parent-topic-row .bar > span { display: block; height: 100%; background: var(--green); }.danger-link { border: 0; background: transparent; color: var(--red); font-weight: 800; }
.source-note { margin-top: 26px; padding-top: 15px; border-top: 1px dashed #d6e0e8; color: var(--muted); font-size: 12px; }
@media (max-width: 860px){ .subject-grid,.topic-grid { grid-template-columns: 1fr 1fr; }.stats-grid{grid-template-columns:1fr 1fr}.hero-badge{display:none}.top-actions .ghost-btn:first-child{display:none}.parent-topic-row{grid-template-columns:1fr 90px}.parent-topic-row > :last-child{display:none}}
@media (max-width: 580px){ .main{padding-top:20px}.subject-grid,.topic-grid,.stats-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}.brand small{display:none}.ghost-btn{font-size:0;padding:10px}.ghost-btn::first-letter{font-size:18px}.today{align-items:flex-start;flex-direction:column}.hero{padding:24px}.hero-actions{flex-direction:column}.hero-actions button{width:100%}.lesson-card{padding:22px}.summary-grid{grid-template-columns:1fr}.parent-topic-row{grid-template-columns:1fr}.parent-topic-row .bar{display:none}}
