:root {
  --blue: #2357d4;
  --blue-dark: #12327a;
  --green: #1f9d6b;
  --yellow: #f4c542;
  --coral: #ee6c4d;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe6f0;
  --soft: #f4f7fb;
  --white: #ffffff;
  --danger: #c93232;
  --shadow: 0 16px 40px rgba(20, 37, 71, 0.10);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: var(--white);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 0.72rem 1rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(35, 87, 212, 0.24);
}

.btn-secondary {
  background: #e7f8ef;
  color: #0d6846;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--blue-dark);
  background: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--blue-dark);
}

.btn-danger {
  background: #feecec;
  color: var(--danger);
}

.btn-small {
  min-height: 32px;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
}

.btn.big {
  min-height: 52px;
  padding-inline: 1.3rem;
}

.btn.full {
  width: 100%;
}

.muted-link {
  color: var(--muted);
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  color: #12633f;
  background: #e7f8ef;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 70px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 230, 240, 0.8);
  backdrop-filter: blur(14px);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 750;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  gap: clamp(28px, 5vw, 70px);
  min-height: calc(100vh - 84px);
  padding: clamp(40px, 7vw, 90px) clamp(18px, 5vw, 70px) clamp(28px, 5vw, 58px);
  align-items: center;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96), rgba(231, 248, 239, 0.86)),
    linear-gradient(180deg, #ffffff, #f3f7fb);
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(2.5rem, 5vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-game {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-game::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 50, 122, 0.05), rgba(18, 50, 122, 0.56));
}

.score-card,
.coin-card,
.mission-path {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(23, 32, 51, 0.18);
  backdrop-filter: blur(12px);
}

.score-card {
  left: 22px;
  right: 22px;
  bottom: 28px;
  padding: 18px;
}

.score-card span,
.coin-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.score-card strong {
  display: block;
  margin: 4px 0 12px;
  font-size: 1.15rem;
}

.coin-card {
  top: 24px;
  right: 24px;
  width: 146px;
  padding: 16px;
}

.coin-card strong {
  display: block;
  color: var(--green);
  font-size: 2rem;
}

.mission-path {
  left: 24px;
  top: 24px;
  display: flex;
  gap: 9px;
  padding: 12px;
}

.mission-path span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d7deea;
}

.mission-path .done {
  background: var(--green);
}

.mission-path .current {
  background: var(--yellow);
  outline: 4px solid rgba(244, 197, 66, 0.26);
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde7f2;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow));
}

.progress.wide {
  max-width: 480px;
}

.section,
.section-grid,
.objective-band {
  padding: clamp(50px, 7vw, 90px) clamp(18px, 5vw, 70px);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  background: var(--white);
}

.section h2,
.section-grid h2,
.objective-band h2 {
  margin: 10px 0 14px;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section p,
.section-grid p,
.objective-band p {
  color: var(--muted);
}

.section.soft {
  background: #eef6f8;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.timeline,
.impact-list,
.cards,
.topic-grid,
.materials-grid {
  display: grid;
  gap: 16px;
}

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline article,
.impact-list article,
.feature-card,
.plan-card,
.panel-card,
.empty-public,
.materials-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
  box-shadow: 0 10px 28px rgba(20, 37, 71, 0.06);
}

.feature-card strong,
.plan-card strong,
.timeline strong,
.impact-list strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.objective-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: linear-gradient(120deg, var(--blue-dark), #167958);
}

.objective-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
}

.topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-grid span {
  display: flex;
  align-items: center;
  min-height: 70px;
  border: 1px solid #cae2dc;
  border-left: 6px solid var(--green);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--white);
  font-weight: 850;
}

.empty-public {
  color: var(--muted);
  text-align: center;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--white);
}

.faq details + details {
  margin-top: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 850;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.4fr 0.5fr 0.5fr;
  gap: 28px;
  padding: 40px clamp(18px, 5vw, 70px);
  color: #dbe6f6;
  background: #111827;
}

.site-footer p,
.site-footer a,
.site-footer small {
  color: #b8c4d8;
}

.site-footer a,
.site-footer strong {
  display: block;
  margin-bottom: 8px;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(320px, 470px) minmax(360px, 1fr);
  min-height: 100vh;
  background: #f5f8fc;
}

.auth-screen.single {
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 62px);
  background: var(--white);
}

.auth-panel h1 {
  margin: 10px 0 6px;
  font-size: 2.4rem;
  line-height: 1;
}

.auth-panel p {
  color: var(--muted);
}

.auth-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(35, 87, 212, 0.82), rgba(31, 157, 107, 0.82)),
    url("../images/hero-finance-game.png") center/cover;
}

.auth-badges {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-self: end;
  margin-bottom: 80px;
}

.auth-badges span {
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 900;
}

.form-card,
.stack-form,
.question-form,
.inline-form,
.quiz-form {
  display: grid;
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius);
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  background: var(--white);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(35, 87, 212, 0.14);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 800;
}

.flash.success {
  color: #0d6846;
  background: #e6f8ef;
}

.flash.error {
  color: #9d2222;
  background: #fff0f0;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  background: #111827;
  color: var(--white);
}

.sidebar .brand {
  flex: 0 0 auto;
}

.sidebar .brand small {
  color: #9fb0cc;
}

.sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #42506a transparent;
  scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #42506a;
}

.sidebar-nav a,
.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0.48rem 0.64rem;
  color: #cbd6e7;
  font-size: 0.94rem;
  font-weight: 800;
}

.sidebar-nav a span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #42506a;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

.sidebar-nav a.active span {
  background: var(--yellow);
}

.logout-link {
  flex: 0 0 auto;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.08);
}

.panel-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 18px clamp(18px, 4vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.94);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  background: var(--white);
  font-weight: 900;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--white);
}

.user-pill span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #e7f8ef;
  color: #12633f;
  font-weight: 900;
}

.user-pill strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-area {
  padding: clamp(18px, 4vw, 36px);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(20, 37, 71, 0.06);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--blue-dark);
  font-size: 2rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.grid-two,
.grid-form-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.grid-form-list {
  grid-template-columns: minmax(280px, 0.36fr) minmax(0, 1fr);
  align-items: start;
}

.panel-card {
  min-width: 0;
  margin-bottom: 20px;
}

.panel-card h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-heading h2,
.card-heading p {
  margin: 0;
}

.card-heading p,
.card-heading span {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #475467;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

td small {
  display: block;
  color: var(--muted);
}

code {
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  color: #124064;
  background: #edf5ff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  display: inline;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 900;
  background: #eef2f7;
  color: #475467;
}

.status.active,
.status.published,
.status.completed {
  color: #0d6846;
  background: #e6f8ef;
}

.status.inactive,
.status.draft,
.status.locked {
  color: #8f3f12;
  background: #fff2df;
}

.empty-state {
  border: 1px dashed #b8c4d8;
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted);
  background: #f8fafc;
}

.empty-state strong {
  display: block;
  color: var(--ink);
}

.lesson-list,
.class-list,
.activity-feed,
.ranking-list,
.badge-grid,
.mission-cards,
.mission-list {
  display: grid;
  gap: 12px;
}

.lesson-list article,
.class-list article,
.activity-feed article,
.ranking-list article,
.mission-list > article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcff;
}

.lesson-list article,
.mission-head,
.ranking-list article {
  display: flex;
  gap: 12px;
  align-items: center;
}

.module-number,
.ranking-list article > span {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--blue);
  font-weight: 900;
}

.ranking-list article {
  justify-content: space-between;
}

.ranking-list article.me {
  border-color: #9ddfbe;
  background: #f0fbf5;
}

.ranking-list article b {
  white-space: nowrap;
  color: var(--green);
}

.ranking-list.large article {
  padding: 18px;
}

.ranking-list.attention article > span {
  background: var(--coral);
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 850;
}

.detail-list dd {
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  background: var(--white);
  font-weight: 850;
}

.tabs a.active {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
}

.inline-form {
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
}

.question-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.question-form .full {
  grid-column: 1 / -1;
}

.materials-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.materials-grid article span {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.materials-grid article strong {
  display: block;
  margin: 8px 0;
  font-size: 1.05rem;
}

.materials-grid details {
  margin-top: 12px;
}

.student-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid #bfdfd5;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  color: #0f2a22;
  background:
    linear-gradient(120deg, rgba(231, 248, 239, 0.96), rgba(255, 247, 212, 0.92)),
    var(--white);
}

.student-hero h2 {
  margin: 8px 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

.student-avatar {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 6px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--avatar-color);
  box-shadow: var(--shadow);
  font-size: 2.8rem;
  font-weight: 950;
}

.student-wallet {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 12px;
  min-width: 160px;
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
}

.student-wallet strong {
  color: var(--blue);
  font-size: 1.6rem;
}

.student-wallet span {
  align-self: center;
  color: var(--muted);
  font-weight: 850;
}

.student-metrics {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
}

.mission-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mission-cards article,
.badge-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
}

.mission-cards article span,
.mission-list article > span {
  color: var(--green);
  font-weight: 900;
}

.mission-cards article strong {
  display: block;
  min-height: 48px;
  margin: 6px 0 12px;
}

.mission-cards article.locked,
.mission-list > article.locked,
.badge-grid article.locked {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.mission-list > article {
  display: grid;
  gap: 14px;
}

.activity-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mission-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border: 1px solid #cbd8eb;
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  background: var(--white);
  font-weight: 900;
}

.mission-action small {
  color: var(--muted);
  font-weight: 800;
}

.mission-action.done {
  border-color: #8ad4af;
  background: #effaf5;
}

.mission-action.locked {
  color: #79859a;
  background: #f2f4f7;
}

.badge-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.badge-grid article {
  display: grid;
  gap: 8px;
}

.badge-grid article span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #5a3c00;
  background: var(--yellow);
  font-weight: 950;
}

.badge-grid article small,
.badge-grid article em {
  color: var(--muted);
  font-style: normal;
}

.badge-grid.all {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.badge-grid .earned {
  border-color: #8ad4af;
  background: #f5fff9;
}

.activity-play > p {
  color: var(--muted);
}

.quiz-form {
  gap: 18px;
}

.quiz-form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fbfcff;
}

.quiz-form fieldset.correct {
  border-color: #8ad4af;
  background: #f1fbf6;
}

.quiz-form fieldset.wrong {
  border-color: #f2b4a5;
  background: #fff6f3;
}

.quiz-form legend {
  padding: 0 6px;
  font-weight: 900;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--white);
}

.answer-option input {
  width: auto;
  margin-top: 6px;
}

.answer-feedback {
  margin-top: 12px;
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.certificate-panel {
  display: grid;
  place-items: center;
  gap: 20px;
}

.certificate-paper {
  width: min(780px, 100%);
  border: 10px solid #f2d481;
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 60px);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 255, 0.96)),
    var(--white);
  box-shadow: var(--shadow);
}

.certificate-paper span {
  color: var(--green);
  font-weight: 950;
  text-transform: uppercase;
}

.certificate-paper h2 {
  margin: 10px 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--blue-dark);
}

.certificate-paper strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.certificate-paper code {
  display: inline-flex;
  margin-top: 14px;
  font-size: 1rem;
}

.fincoin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: #b8e0cf;
  background: linear-gradient(120deg, #f3fff8, #fff8df);
}

.fincoin-banner h2 {
  margin: 8px 0;
  color: var(--blue-dark);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.fincoin-banner p {
  margin: 0;
  color: var(--muted);
}

.fincoin-group-grid,
.store-grid,
.print-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fincoin-group-grid article,
.fincoin-group-grid a,
.store-grid article,
.print-card-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(20, 37, 71, 0.05);
}

.fincoin-group-grid a.active {
  border-color: var(--green);
  background: #f1fbf6;
}

.fincoin-group-grid span,
.store-grid span,
.print-card-grid small {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.fincoin-group-grid b,
.store-grid b {
  color: var(--blue);
}

.rule-list {
  display: grid;
  gap: 10px;
}

.rule-list p {
  margin: 0;
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: #fffaf0;
}

.mini-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mini-form input,
.mini-form select {
  width: auto;
  min-width: 92px;
  padding: 0.5rem 0.6rem;
}

.material-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.material-list small {
  display: block;
  color: var(--muted);
}

.presentation-screen {
  min-height: calc(100vh - 160px);
}

.presentation-hero {
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 56px);
  margin-bottom: 20px;
  color: var(--white);
  background: linear-gradient(120deg, var(--blue-dark), var(--green));
}

.presentation-hero .eyebrow {
  color: #5a3c00;
  background: var(--yellow);
}

.presentation-hero h2 {
  margin: 12px 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 1;
}

.presentation-hero p {
  max-width: 900px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.25rem;
}

.presentation-note {
  color: var(--muted);
}

.certificate-validator {
  width: min(560px, 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media print {
  .sidebar,
  .topbar,
  .btn,
  .logout-link {
    display: none !important;
  }

  .app-shell,
  .panel-main {
    display: block;
  }

  .content-area {
    padding: 0;
  }

  .panel-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }

  .cards.three,
  .materials-grid,
  .badge-grid.all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .hero,
  .section-grid,
  .grid-two,
  .grid-form-list,
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-game {
    min-height: 430px;
  }

  .auth-art {
    min-height: 360px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(300px, 82vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar {
    align-items: flex-start;
  }

  .user-pill strong {
    display: none;
  }

  .student-hero {
    grid-template-columns: 1fr;
  }

  .student-wallet {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-game {
    min-height: 360px;
  }

  .coin-card {
    width: 126px;
  }

  .objective-band,
  .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards.three,
  .topic-grid,
  .metrics-grid,
  .student-metrics,
  .mission-cards,
  .fincoin-group-grid,
  .store-grid,
  .print-card-grid,
  .activity-buttons,
  .badge-grid,
  .badge-grid.all,
  .materials-grid,
  .question-form,
  .inline-form,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .content-area {
    padding: 16px;
  }

  .topbar {
    min-height: 72px;
    padding: 14px 16px;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }

  .panel-card,
  .metric-card {
    padding: 16px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions .btn,
  .actions form,
  .actions button {
    width: 100%;
  }
}
