/* Стартовая «МГТУ ИНФА», светлая. Лист с сеткой, тёмно-синие чернила, оранжевый — только главное действие. */
:root {
  --paper: #f4f6fa;
  --surface: #ffffff;
  --ink: #0c1630;
  --ink-2: #4a5570;
  --ink-3: #6b7590;
  --rule: rgba(12, 22, 48, .12);
  --rule-2: rgba(12, 22, 48, .2);
  --grid: rgba(12, 22, 48, .05);
  --orange: #ff8a1f;
  --orange-hi: #ff9d45;
  --orange-ink: #b34d00;
  --bad: #c62828;
  --ok: #15803d;
  --r-lg: 20px;
  --r-md: 14px;
  --shadow: 0 1px 0 rgba(12, 22, 48, .04), 0 1px 3px rgba(12, 22, 48, .06), 0 24px 48px -24px rgba(12, 22, 48, .22);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body {
  background-color: var(--paper); color: var(--ink); overflow-x: hidden;
  font: 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center top;
}
a { color: inherit; }
code { font: 600 .92em "Manrope", sans-serif; background: rgba(12, 22, 48, .06); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-family: "Unbounded", "Manrope", sans-serif; font-weight: 500; letter-spacing: -.025em; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 16px/1 "Manrope", sans-serif; text-decoration: none; color: var(--ink); background: var(--orange); white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(150, 60, 0, .22), 0 1px 2px rgba(150, 60, 0, .2), 0 10px 24px -10px rgba(255, 122, 20, .7);
  transition: background-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.btn:hover { background: var(--orange-hi); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .rk-go:focus-visible, .top-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule-2); }
.btn-ghost:hover { background: rgba(12, 22, 48, .04); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 250, .82); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font: 600 16px/1 "Unbounded", sans-serif; letter-spacing: -.01em; }
.brand img, .kicker img { display: block; border-radius: 50%; background: #07101b; box-shadow: 0 0 0 1px rgba(12, 22, 48, .12), 0 4px 12px -4px rgba(12, 22, 48, .4); }
.top-nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; font-weight: 500; }
.top-nav a { text-decoration: none; color: var(--ink-2); }
.top-nav a:hover { color: var(--ink); }

/* первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding-top: clamp(48px, 9vh, 96px); padding-bottom: clamp(56px, 10vh, 112px); }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--ink-2); }
h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.06; max-width: 13ch; text-wrap: balance; }
.lead { margin: 24px 0 36px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* живое превью задачи */
.demo { position: relative; padding: 40px 0 24px 0; }
.sheet { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.task { position: relative; z-index: 1; padding: 22px 24px 20px; max-width: 460px; margin-left: auto; margin-right: 32px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.chip { font-size: 13px; font-weight: 600; color: var(--ink-2); background: rgba(12, 22, 48, .05); padding: 5px 10px; border-radius: 8px; }
.timer { font: 600 15px/1 "Unbounded", sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.task-n { margin: 18px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.task-st { margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; }
.num { white-space: nowrap; font-weight: 600; }
.answer { display: flex; align-items: center; gap: 10px; }
.ans-l { font-weight: 700; }
.ans-in { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; font: 600 16px "Manrope", sans-serif; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--rule-2); transition: border-color .15s ease, box-shadow .15s ease; }
.ans-in::placeholder { color: var(--ink-3); font-weight: 500; }
.ans-in:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 31, .18); }
.fmt { min-height: 20px; margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.fmt.ok { color: var(--ink-2); }
.fmt.bad { color: var(--bad); }
.demo-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.link-btn { appearance: none; border: 0; background: none; padding: 6px 2px; font: 600 14px "Manrope", sans-serif; color: var(--ink-2);
  cursor: pointer; border-bottom: 1.5px dashed var(--rule-2); }
.link-btn:hover { color: var(--ink); border-bottom-color: var(--ink); }
.link-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: default; }
.ans-u { color: var(--ink-2); font-weight: 600; }

.review { position: relative; z-index: 2; width: min(400px, 88%); margin: -14px 0 0 0; padding: 16px 18px; transform: rotate(-1.5deg); }
.review[hidden] { display: none; }
.bad { color: var(--bad); }
.review .formula { flex-wrap: wrap; font-weight: 500; }
.rev-go { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--orange); }
.rev-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.ok { color: var(--ok); }
.muted { color: var(--ink-3); }
.formula { margin: 10px 0 8px; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.frac { display: inline-flex; flex-direction: column; text-align: center; font-size: 15px; line-height: 1.25; }
.frac span:first-child { border-bottom: 1.5px solid var(--ink); padding: 0 4px 2px; }
.frac span:last-child { padding-top: 2px; }
.mistake { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.mistake b { color: var(--orange-ink); font-weight: 700; }

/* размерная линия над карточкой — как на чертеже */
.dim { position: absolute; top: 6px; right: 32px; width: min(460px, calc(100% - 32px)); height: 18px; color: var(--ink-3);
  border-left: 1px solid var(--rule-2); border-right: 1px solid var(--rule-2); }
.dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--rule-2); }
.dim span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--paper); padding: 0 10px;
  font-size: 12px; font-weight: 500; white-space: nowrap; }

/* блоки */
.block { padding-top: 32px; padding-bottom: 80px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--rule-2); }
h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.block-head p { margin: 0; color: var(--ink-2); max-width: 52ch; }

.rk-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
/* разделы по предметам */
.rk-list.grouped { display: grid; grid-template-columns: 1fr; gap: 36px; }
.subj-group[hidden] { display: none; }
.subj-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 14px; }
.subj-h h3 { margin: 0; font: 500 20px/1.2 "Unbounded", sans-serif; letter-spacing: -.015em; }
.subj-h a { font-size: 14px; font-weight: 700; color: var(--orange-ink); text-decoration: none; white-space: nowrap; }
.subj-h a:hover { text-decoration: underline; text-underline-offset: 3px; }
.subj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.subj { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 24px; padding-bottom: 4px; scrollbar-width: none; }
.subj::-webkit-scrollbar { display: none; }
.subj button { flex: none; appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  font: 600 14px "Manrope", sans-serif; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.subj button span { font-size: 12px; color: var(--ink-3); }
.subj button:hover { border-color: var(--rule-2); }
.subj button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.subj button.on span { color: rgba(255, 255, 255, .7); }
.subj button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.rk { position: relative; display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); box-shadow: var(--shadow); transition: border-color .18s ease, transform .18s ease; }
.rk:hover { border-color: var(--rule-2); transform: translateY(-2px); }
.rk-subj { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--orange-ink); }
.rk h3 { font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.rk-desc { margin: 10px 0 20px; color: var(--ink-2); flex: 1; }
.rk-meta { display: flex; gap: 8px; margin: 0 0 20px; }
.rk-when { display: flex; align-items: center; gap: 8px; margin: -8px 0 16px; font-size: 14px; font-weight: 600; color: var(--orange-ink); }
.rk-when i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 31, .18); }
.resume { margin: 0 0 20px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--orange); }
.resume[hidden] { display: none; }
.resume-hi { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--orange-ink); }
.resume-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.resume-row b { display: block; font-size: 17px; }
.resume-row span { color: var(--ink-2); font-size: 14px; }
.rk-meta span { font-size: 13px; font-weight: 600; color: var(--ink-2); background: rgba(12, 22, 48, .05); padding: 5px 10px; border-radius: 8px; }
.rk-go { align-self: flex-start; font-weight: 700; color: var(--ink); text-decoration: none; padding-bottom: 2px;
  border-bottom: 2px solid var(--orange); }
.rk-go::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }  /* вся карточка — ссылка */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 64px 24px 24px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--rule); }
.steps li::before { content: counter(s); position: absolute; top: 20px; left: 24px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; font: 600 13px/1 "Unbounded", sans-serif; color: var(--ink); border: 1.5px solid var(--ink); }
.steps h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-2); }

.soon { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.soon li { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--rule-2); }
.soon-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); position: relative; }
.soon-ic::after { content: ""; position: absolute; inset: 9px; background: var(--ink-2);
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.soon-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.want { flex: none; appearance: none; min-height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 700 13px "Manrope", sans-serif; color: var(--ink); background: transparent; border: 1.5px solid var(--rule-2);
  transition: border-color .15s ease, background-color .15s ease, transform .12s ease; }
.want:hover { border-color: var(--ink); }
.want:active { transform: scale(.96); }
.want.on { cursor: default; color: var(--ok); border-color: transparent; background: rgba(21, 128, 61, .1); }
.want:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.soon b { font-weight: 700; }
.soon span { color: var(--ink-2); font-size: 15px; }

/* подвал */
.foot { border-top: 1px solid var(--rule); background: var(--surface); }
.foot-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-top: 36px; padding-bottom: 44px; }
.foot-note { margin: 14px 0 0; max-width: 46ch; color: var(--ink-3); font-size: 14px; }
.foot-note + .foot-note { margin-top: 8px; font-size: 13px; }
.foot-note a { color: var(--ink-2); }
.foot-nav { display: flex; gap: 24px; font-weight: 600; }
.foot-nav a { text-decoration: none; color: var(--ink-2); }
.foot-nav a:hover { color: var(--ink); }
.foot-nav .pill span { display: none; }

/* загрузка: превью «встаёт на лист» один раз */
@media (prefers-reduced-motion: no-preference) {
  .task { animation: rise .7s cubic-bezier(.2, .8, .2, 1) .1s backwards; }
  .review.pop { animation: rise-r .45s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes rise-r { from { opacity: 0; transform: translateY(16px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .rk { transition: none; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .demo { max-width: 520px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-nav { display: none; }
  .top-in { justify-content: space-between; }
  .hero { padding-top: 36px; padding-bottom: 40px; }
  .cta .btn { flex: 1 1 100%; }
  .task { margin-right: 0; padding: 18px; }
  .dim { right: 0; width: 100%; }
  .review { width: 94%; }
  .rk-list { grid-template-columns: 1fr; }
  .soon { grid-template-columns: 1fr; }
  .block { padding-bottom: 56px; }
  .steps li { padding: 60px 18px 20px; }
  .steps li::before { left: 18px; }
}
@media (max-width: 360px) {
  h1 { font-size: 30px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .btn-sm { padding: 0 14px; font-size: 13px; }
  .soon li { flex-wrap: wrap; }
}
.rk.rk-soon{background:#eef0f4;border-color:rgba(12,22,48,.12);box-shadow:none}.rk-soon h3,.rk-soon .rk-desc,.rk-soon .rk-meta{color:#5a6580}.rk-unavailable{display:inline-flex;align-items:center;min-height:44px;padding:9px 18px;border:1px solid #c7ccd8;border-radius:999px;color:#5a6580;background:#e2e6ed;font-weight:700;cursor:default}

@media(max-width:640px){.top-in{gap:10px}.top-in>.btn-sm{padding:0 12px;font-size:13px;flex-shrink:0}}
