:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #1d232c; --muted: #5f6b7a; --line: #dde1e7;
  --physics: #1f6feb; --physics-soft: #e7f0ff; --maths: #8a3ffc; --maths-soft: #f1e9ff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --panel: #1c2027; --ink: #e6e9ee; --muted: #9aa5b4; --line: #303641;
    --physics: #6ea8ff; --physics-soft: #1d2b44; --maths: #b892ff; --maths-soft: #2a1f42;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: #111827; color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #14b8c4; color: #08262a; font-weight: 800; }
.brand-title { font-weight: 700; }
.brand-sub { font-size: 12px; color: #a9b4c4; }
.lang { display: flex; background: #1f2937; border-radius: 8px; padding: 3px; }
.lang button { border: 0; background: none; color: #cbd5e1; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.lang button[aria-pressed="true"] { background: #14b8c4; color: #08262a; }

.main { width: 100%; max-width: 920px; margin: 0 auto; padding: 56px 24px 32px; flex: 1; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 10px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 32px; max-width: 640px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  display: grid; gap: 6px; padding: 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12); }
.card.physics:hover, .card.physics:focus-visible { border-color: var(--physics); }
.card.maths:hover, .card.maths:focus-visible { border-color: var(--maths); }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 28px; margin-bottom: 6px; }
.physics .card-icon { background: var(--physics-soft); color: var(--physics); }
.maths .card-icon { background: var(--maths-soft); color: var(--maths); }
.card-subject { font-size: 24px; font-weight: 800; }
.card-unit { color: var(--muted); }
.card-stats { font-variant-numeric: tabular-nums; min-height: 1.5em; }
.card-go { margin-top: 10px; font-weight: 700; }
.physics .card-go { color: var(--physics); }
.maths .card-go { color: var(--maths); }

.features { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 8px; color: var(--muted); }
.features li::before { content: "✓"; color: #14b8c4; font-weight: 800; margin-right: 10px; }

.credit { max-width: 920px; width: 100%; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 12px; }

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .main { padding: 32px 16px 24px; }
  h1 { font-size: 27px; }
  .lead { font-size: 16px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .credit { padding: 16px; }
}
