:root{--ink:#24362e;--muted:#667566;--green:#244e3f;--line:#dce2d7;--paper:#fffef9}*{box-sizing:border-box}body{margin:0;background:#f4f5ed;color:var(--ink);font:18px/1.65 Arial,sans-serif}a{color:inherit}button,input{font:inherit}button,.button{cursor:pointer;display:inline-block;border:1px solid var(--line);border-radius:9px;background:var(--paper);padding:11px 18px;color:var(--ink);text-decoration:none}button:hover,.button:hover{border-color:#718b76}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #bca76a;outline-offset:4px}.primary{background:var(--green);color:white;border-color:var(--green)}header{min-height:100px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px max(28px,calc((100vw - 1280px)/2))}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;font:28px Georgia,serif}.brand-icon{width:48px;height:52px;border-radius:12px 12px 18px 12px;background:var(--green);color:white;display:grid;place-content:center;font-size:28px}.brand small{display:block;font:11px Arial,sans-serif;letter-spacing:2px;margin-top:7px}.header-actions{display:flex;gap:18px;align-items:center;font-size:16px}.header-actions a{text-decoration:none}.header-actions a:hover{text-decoration:underline}main{max-width:1280px;margin:auto;padding:0 28px}.hero{display:flex;align-items:center;justify-content:space-between;gap:50px;padding:64px 0 42px}.eyebrow{font-size:13px;letter-spacing:2px;font-weight:bold;color:#637d65}h1{font:58px/1.12 Georgia,serif;letter-spacing:-1px;margin:20px 0}h1 em{font-weight:normal;color:#627a5b}.hero p{max-width:600px;font-size:19px;color:var(--muted)}.hero-note{max-width:290px;border-left:1px solid #cbd5c5;padding:15px 0 15px 28px;color:var(--muted);font-size:17px}.hero-note strong{display:block;font:34px Georgia,serif;color:var(--green);margin-bottom:10px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:10px 0 24px}.section-head h2{font:28px Georgia,serif;margin:0}.section-head p{font-size:16px;color:var(--muted);margin:0}.subject-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.subject-card{position:relative;display:flex;flex-direction:column;min-height:340px;background:var(--paper);border:1px solid var(--line);border-radius:17px;padding:28px;text-decoration:none;transition:transform .16s,border-color .16s}.subject-card:hover{transform:translateY(-4px);border-color:#8a9f86}.subject-icon{width:62px;height:62px;display:grid;place-content:center;border-radius:15px;font:32px Georgia,serif;margin-bottom:28px}.english .subject-icon{background:#e8edf7;color:#3e557b}.math .subject-icon{background:#f3eadb;color:#82682f}.chinese .subject-icon{background:#f5e4df;color:#9b5447}.science .subject-icon{background:#e5eddf;color:#41603c}.subject-card h3{font:28px Georgia,serif;margin:0 0 12px}.subject-card p{font-size:16px;color:var(--muted);margin:0 0 22px}.card-link{display:flex;justify-content:space-between;align-items:center;margin-top:auto;font-size:16px;font-weight:bold}.badge{font:12px Arial,sans-serif;color:#667666;background:#edf1e7;padding:6px 9px;border-radius:20px;position:absolute;top:30px;right:22px}.subject-card.math .badge{background:#f4eddf;color:#7b632f}.subject-card.unavailable .badge{background:#f1f1eb;color:#758071}.progress-panel{margin:32px 0 0;padding:25px 28px;background:#eaf0e3;border:1px solid #d7e1ce;border-radius:13px;display:flex;justify-content:space-between;align-items:center;gap:25px}.progress-panel h2{font:24px Georgia,serif;margin:0 0 7px}.progress-panel p{font-size:16px;margin:0;color:var(--muted)}.progress-panel .button{white-space:nowrap}.progress-counts{display:flex;gap:28px;font-size:16px}.progress-counts strong{font:32px Georgia,serif;display:block;color:var(--green)}footer{display:flex;gap:20px;justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:56px;padding:25px 0;font-size:14px;color:var(--muted)}dialog{width:min(480px,calc(100vw - 32px));max-height:90vh;border:1px solid var(--line);border-radius:15px;padding:28px;background:var(--paper);color:var(--ink)}dialog::backdrop{background:#1d3029aa}dialog h2{font:30px Georgia,serif;margin:0 0 14px}dialog p{font-size:16px;color:var(--muted)}dialog label{display:block;font-size:16px;margin:17px 0}dialog input{width:100%;display:block;padding:12px;margin-top:7px;border:1px solid #bdcbbf;border-radius:8px;background:white}.form-actions{display:flex;gap:12px;margin-top:20px}#login-error{color:#9d342b;font-size:16px}.subject-empty{max-width:760px;padding:64px 0;min-height:55vh}.subject-empty p{color:var(--muted)}[hidden]{display:none!important}@media(max-width:1050px){.subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-note{max-width:240px}h1{font-size:50px}.subject-card{min-height:300px}}@media(max-width:640px){header{padding:18px 20px;gap:14px;flex-wrap:wrap}.brand{font-size:24px}.brand small{font-size:10px}.brand-icon{height:45px;width:42px}.header-actions{width:100%;justify-content:space-between;font-size:16px}.header-actions button{font-size:16px;padding:9px 12px}main{padding:0 20px}.hero{display:block;padding:35px 0 25px}h1{font-size:42px}.hero p{font-size:18px}.hero-note{max-width:none;padding:0;border:0;font-size:16px;margin-top:26px}.hero-note strong{font-size:26px;display:inline;margin-right:10px}.section-head{display:block;margin:18px 0}.section-head h2{font-size:27px;margin-bottom:5px}.subject-grid{gap:14px}.subject-card{padding:20px 16px;min-height:300px}.subject-icon{width:48px;height:48px;font-size:27px;margin-bottom:26px}.subject-card h3{font-size:24px;overflow-wrap:anywhere}.subject-card p{font-size:16px}.badge{position:static;align-self:flex-start;order:-1;font-size:11px;margin-bottom:14px}.subject-icon{margin-bottom:18px}.card-link{font-size:15px}.progress-panel{display:block;padding:22px}.progress-panel .button{margin-top:18px}.progress-counts{margin-top:15px}footer{margin-top:36px;font-size:13px}.subject-empty{padding:38px 0}.subject-empty h1{font-size:38px}}

@media(max-width:425px){.subject-card.math h3{font-size:21px;overflow-wrap:normal}}

/* PL wordmark and subject-name colour labels. */
.brand-icon{font:700 21px Arial,sans-serif;letter-spacing:-1px}.subject-icon{display:none}.subject-card .subject-label{display:inline-block;align-self:flex-start;font:26px Georgia,serif;padding:11px 15px;border-radius:12px;margin:0 0 18px;line-height:1.2;white-space:nowrap}.english .subject-label{background:#e8edf7;color:#3e557b}.math .subject-label{background:#f3eadb;color:#82682f}.chinese .subject-label{background:#f5e4df;color:#9b5447}.science .subject-label{background:#e5eddf;color:#41603c}.subject-card .badge{position:static;align-self:flex-start;order:0;margin:0 0 20px}.subject-card{min-height:300px;padding:24px}.teacher-access{border-top:1px solid var(--line);padding-top:16px;font-size:15px}@media(max-width:640px){.subject-grid{grid-template-columns:1fr}.subject-card{min-height:220px;padding:23px}.subject-card .subject-label{font-size:27px;margin-bottom:15px}.subject-card p{margin-bottom:20px}.subject-card .badge{margin-bottom:15px}.hero-note{display:none}.brand-icon{font-size:20px}.header-actions{width:auto;justify-content:flex-end}.hero{padding-top:30px}.brand small{font-size:9px}.brand{font-size:22px}}

/* Shared course-card contract: identical hierarchy and dimensions. */
.hero{padding:38px 0 24px}.hero h1{font-size:44px;margin:8px 0}.subject-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:245px;align-items:stretch}.subject-card{min-height:0;height:245px;padding:26px;gap:0}.course-grade{display:block;font:13px/1.5 Arial,sans-serif;letter-spacing:1px;text-transform:uppercase;color:var(--muted);margin-bottom:20px}.subject-card h3{font:28px/1.25 Georgia,serif;margin:0 0 12px;min-height:35px}.subject-card p{font:15px/1.5 Arial,sans-serif;margin:0;min-height:24px}.subject-card .card-link{margin-top:auto}.section-head{margin-bottom:18px}.progress-counts{flex-wrap:wrap}@media(max-width:1000px){.subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.subject-grid{grid-template-columns:1fr;grid-auto-rows:220px}.subject-card{height:220px;min-height:0;padding:24px}.hero h1{font-size:35px}.hero{padding:26px 0 18px}.header-actions{width:auto}}
.subject-card h3{min-height:64px;height:64px}
