
:root{
    --bg1:#0f172a;
    --bg2:#1e3a8a;
    --card:#ffffff;
    --text:#0f172a;
    --muted:#64748b;
    --blue:#2563eb;
    --green:#16a34a;
    --orange:#f97316;
    --danger:#dc2626;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, #38bdf8 0, transparent 35%),
        linear-gradient(135deg,var(--bg1),var(--bg2));
    color:var(--text);
    min-height:100vh;
}

.layout{
    width:min(1100px,92vw);
    margin:0 auto;
    padding:42px 0;
}

.narrow{
    width:min(860px,92vw);
}

.hero{
    background:rgba(255,255,255,0.95);
    border-radius:32px;
    padding:44px;
    box-shadow:0 25px 60px rgba(0,0,0,.25);
    margin-bottom:26px;
}

.badge,.chip{
    display:inline-block;
    background:#e0f2fe;
    color:#075985;
    padding:8px 13px;
    border-radius:999px;
    font-weight:700;
    font-size:14px;
}

h1{
    font-size:42px;
    line-height:1.05;
    margin:16px 0;
}

h2{margin-top:0}

.lead{
    font-size:20px;
    color:#334155;
    max-width:760px;
}

.button, button{
    display:inline-block;
    background:#111827;
    color:white;
    border:0;
    padding:14px 20px;
    border-radius:14px;
    text-decoration:none;
    font-weight:800;
    margin-top:16px;
    cursor:pointer;
}

.cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
}

.card,.teacher-note,.work-card,.result-card{
    background:rgba(255,255,255,0.96);
    border-radius:28px;
    padding:28px;
    box-shadow:0 22px 45px rgba(0,0,0,.22);
}

.card{
    border-top:8px solid #94a3b8;
}

.card.blue,.work-card.blue{border-top:8px solid var(--blue)}
.card.green,.work-card.green{border-top:8px solid var(--green)}
.card.orange,.work-card.orange{border-top:8px solid var(--orange)}

.numbers{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin:18px 0;
}

.numbers span{
    background:#f1f5f9;
    padding:10px 12px;
    border-radius:12px;
    font-weight:700;
}

.small{
    color:var(--muted);
    font-size:15px;
}

.teacher-note{
    margin-top:20px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    gap:20px;
    color:white;
    margin-bottom:14px;
}

.topbar span{
    display:block;
    color:#dbeafe;
}

.progress{
    background:rgba(255,255,255,.25);
    height:14px;
    border-radius:999px;
    overflow:hidden;
    margin-bottom:20px;
}

.progress div{
    height:100%;
    background:white;
    border-radius:999px;
}

.scenario,.hint,.already,.reflection,.grade-help{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:20px;
    padding:18px;
    margin:18px 0;
}

.hint{
    background:#fff7ed;
    border-color:#fed7aa;
}

.grid{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px 18px;
}

.answer-form{
    display:grid;
    gap:10px;
    margin-top:24px;
}

label{
    font-weight:800;
}

input{
    width:100%;
    padding:16px;
    border-radius:14px;
    border:2px solid #cbd5e1;
    font-size:22px;
}

.error{
    margin-top:18px;
    background:#fee2e2;
    border:1px solid #fecaca;
    color:#991b1b;
    padding:16px;
    border-radius:16px;
    font-weight:700;
}

.score{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
    margin:22px 0;
}

.score div{
    background:#f1f5f9;
    padding:18px;
    border-radius:18px;
}

.score span{
    display:block;
    color:var(--muted);
}

.score b{
    display:block;
    font-size:34px;
}

table{
    width:100%;
    border-collapse:collapse;
    background:white;
    overflow:hidden;
    border-radius:18px;
}

th,td{
    padding:12px;
    border-bottom:1px solid #e2e8f0;
    text-align:left;
}

th{
    background:#e0f2fe;
}

@media(max-width:800px){
    .cards,.score{
        grid-template-columns:1fr;
    }
    h1{font-size:32px}
    .hero{padding:28px}
}
