[x-cloak] { display: none !important; }

:root {
  --navy: #17305a;
  --brand: #e5333f;
  --chip-bg: #e8eefc;
  --chip-fg: #3a63d6;
}

body { background: #fff; }
.site-header .logo { letter-spacing: -0.02em; }
.site-footer { background: var(--navy); color: #cfd9ee; margin-top: 3rem; }

.chip {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-fg);
  font: 700 .75rem/1 Montserrat, sans-serif; letter-spacing: .08em; text-transform: uppercase;
}

.card {
  background: #fff; border: 1px solid #e8edf5; border-radius: 1.25rem; padding: 1.5rem;
  box-shadow: 0 6px 24px -12px rgba(23, 48, 90, .15);
}

.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.75rem; border-radius: .9rem; font: 600 1rem Montserrat, sans-serif;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: #e63946; color: #fff; box-shadow: 0 10px 22px -10px rgba(230, 57, 70, .7); }
.btn-primary:hover { background: #d62f3c; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.progress { height: .5rem; background: #eef2f8; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--navy), var(--brand)); border-radius: 999px; transition: width .3s; }

.tab {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid #dbe3f0; color: var(--navy); font-size: .875rem; font-weight: 500; background: #fff;
}
.tab:hover { border-color: var(--navy); }
.tab-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-count { font-size: .75rem; opacity: .7; }

.num {
  flex: none; width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--chip-bg); color: var(--chip-fg); font: 700 .8rem Montserrat, sans-serif;
}

/* цвета уровней 1-5 (0 - не оценено) */
.lvl-0 { --c: #cbd5e1; }
.lvl-1 { --c: #e5333f; }
.lvl-2 { --c: #f08a24; }
.lvl-3 { --c: #e6b800; }
.lvl-4 { --c: #4aa564; }
.lvl-5 { --c: #17305a; }

.score-dot {
  flex: none; width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--c, #cbd5e1); color: #fff; font: 700 .9rem Montserrat, sans-serif;
}
.score-dot.small { width: 1.6rem; height: 1.6rem; font-size: .75rem; }
.score-dot.lvl-3 { color: #3b3000; }

.rate {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  padding: .7rem .25rem; border-radius: .9rem; border: 2px solid #e1e8f3; background: #fff;
  color: var(--navy); transition: all .15s; min-height: 4.2rem;
}
.rate:hover { border-color: var(--navy); }
.rate-label { display: none; font-size: .65rem; line-height: 1.15; text-align: center; opacity: .8; }
@media (min-width: 640px) { .rate-label { display: block; } }
.rate-on { background: var(--c); border-color: var(--c); color: #fff; }
.rate-on.lvl-3 { color: #3b3000; }

.level-box { background: #f6f8fc; border-left: 4px solid var(--navy); border-radius: .75rem; padding: .85rem 1rem; }

.field {
  display: block; width: 100%; margin-top: .4rem; padding: .7rem .9rem; border-radius: .75rem;
  border: 1px solid #dbe3f0; font-size: .9rem; resize: vertical; outline: none;
}
.field:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 48, 90, .12); }

.btn-reset {
  padding: .45rem .9rem; border-radius: .7rem; border: 1.5px solid #e5333f; color: #e5333f;
  font: 600 .85rem Montserrat, sans-serif; background: #fff; transition: all .15s;
}
.btn-reset:hover { background: #e5333f; color: #fff; }

.lbl { display: block; font-size: .875rem; font-weight: 600; color: var(--navy); }
select.field { background: #fff; }

.ai-card {
  background: linear-gradient(135deg, #f4f7fd, #fff); border: 1px solid #dbe5f7; border-radius: 1.25rem; padding: 1.5rem;
}
.tip {
  position: relative; padding: .6rem .9rem .6rem 2.1rem; background: #fff; border: 1px solid #e8edf5;
  border-radius: .75rem; font-size: .92rem; color: #334155;
}
.tip::before { content: '→'; position: absolute; left: .8rem; color: var(--brand); font-weight: 700; }
.tip.good::before { content: '✓'; color: #2f8f4e; }
.course { background: #fff; border: 1px solid #dbe5f7; border-left: 4px solid var(--brand); border-radius: 1rem; padding: 1.1rem 1.25rem; }

.spinner {
  width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid #cdd8ee; border-top-color: var(--navy);
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
}
