/* Витрина Universum. Палитра — как в приложении (android/.../values/colors.xml): нейтральные серый
   и белый, синий только как акцент; оранжевый — ДЗ, красный — КР и «нет в лекциях», зелёный — готово.
   Без скриптов и внешних шрифтов: CSP сервера пускает только свои стили. */

:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --stroke: #E3E5E8;
  --line: #D9DCE0;
  --text: #1A1C1E;
  --muted: #5C6066;
  --accent: #0056BE;
  --accent-2: #2F6FDB;
  --accent-soft: #E3ECFB;
  --on-accent: #FFFFFF;
  --hw: #934400;
  --red: #BA1A1A;
  --green: #006C53;
  --yellow: #B37A00;
  --tg-me: #E3ECFB;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .14);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --card: #1E1F22;
    --stroke: #2A2C30;
    --line: #34373C;
    --text: #E3E4E6;
    --muted: #A9ADB3;
    --accent: #AFC6FF;
    --accent-2: #2F6FDB;
    --accent-soft: #0D2F57;
    --on-accent: #FFFFFF;
    --hw: #FFB68B;
    --red: #FFB4AB;
    --green: #6EDAB6;
    --yellow: #E8B85A;
    --tg-me: #0D2F57;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
b { font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }

/* --- шапка --- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.top-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font-weight: 600; font-size: 21px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand-dot { display: inline-block; width: 7px; height: 7px; margin-left: 3px; border-radius: 2px; background: var(--accent-2); }
.top-nav { display: flex; gap: 24px; margin-left: auto; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top-nav a:hover { color: var(--text); }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 12px; border: 1px solid transparent;
  background: var(--accent-2); color: #FFFFFF;
  font-weight: 500; font-size: 16px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #2560C6; }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); }

/* --- первый экран --- */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
h1 { font-size: clamp(36px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.03em; max-width: 16ch; }
.lead { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 36em; }
.small-lead { font-size: 17px; margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* --- лист конспекта за телефоном --- */
.hero-visual { position: relative; justify-self: end; padding-left: 232px; }
.hero-visual .phone { position: relative; }
.sheet { position: absolute; left: 0; top: 64px; width: 272px; padding: 20px 68px 24px 20px; --field: 56px;
  border: 1px solid var(--stroke); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 13px; line-height: 20px; color: var(--text); }
.sheet .note-meta { font-size: 12px; line-height: 20px; }
.sheet-title { font-size: 17px; font-weight: 600; line-height: 20px; margin-top: 8px; }
.sheet-h { font-weight: 600; margin-top: 20px; }
.sheet p { color: var(--muted); }
.sheet .math { color: var(--text); }

/* Подпись сайта — тетрадная клетка и красные поля справа, только на «бумаге» конспекта. */
.paper {
  --cell: 20px;
  --field: 28px;
  --grid: color-mix(in srgb, var(--accent-2) 9%, transparent);
  background-color: var(--card);
  background-image:
    linear-gradient(to left, transparent calc(var(--field) - 1px), color-mix(in srgb, var(--red) 45%, transparent) calc(var(--field) - 1px) var(--field), transparent var(--field)),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, var(--cell) var(--cell), var(--cell) var(--cell);
  background-position: 0 0, -1px -1px, -1px -1px;
}

/* --- телефон с интерфейсом приложения --- */
.phone {
  justify-self: center;
  width: 316px; padding: 10px;
  border-radius: 40px; background: #0E0F10;
  box-shadow: var(--shadow);
}
.phone-screen {
  border-radius: 30px; overflow: hidden;
  background: #F3F4F6; color: #1A1C1E;
  padding: 16px 12px 0; font-size: 14px; line-height: 1.4;
  display: flex; flex-direction: column; gap: 8px;
}
@media (prefers-color-scheme: dark) {
  .phone { background: #000; outline: 1px solid #2A2C30; }
  .phone-screen { background: #121314; color: #E3E4E6; }
}
.app-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 8px; font-weight: 600; font-size: 18px; }
.ui-card { background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px 14px; }
.phone-screen .ui-card { background: #FFFFFF; border-color: #E3E5E8; }
@media (prefers-color-scheme: dark) { .phone-screen .ui-card { background: #1E1F22; border-color: #2A2C30; } }
.ui-card.soft { background: var(--accent-soft); border-color: transparent; }
.phone-screen .ui-card.soft { background: #E3ECFB; }
@media (prefers-color-scheme: dark) { .phone-screen .ui-card.soft { background: #0D2F57; } }
.ui-card.now { border-left: 4px solid var(--accent-2); }
.ui-label { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: none; }
.ui-label.accent { color: var(--accent-2); }
.ui-label.gap, .ui-sub.gap { margin-top: 10px; }
.ui-title { font-weight: 600; font-size: 16px; margin-top: 2px; }
.ui-title.small-title { font-size: 14px; }
.ui-sub { color: var(--muted); font-size: 13px; }
.ui-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent-2) 16%, transparent); margin-top: 8px; overflow: hidden; }
.ui-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent-2); }
.w35 { width: 35%; } .w60 { width: 60%; } .w82 { width: 82%; }
.ui-row { display: flex; gap: 12px; align-items: flex-start; padding: 6px 8px; }
.ui-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; padding-top: 1px; min-width: 38px; }
.ui-task { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.ui-task .box { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hw); flex: none; }
.ui-task.test { color: var(--red); font-weight: 600; }
.ui-task.test .box { border-color: var(--red); }
.tabbar { display: flex; justify-content: space-between; margin: 6px -12px 0; padding: 12px 14px 16px;
  border-top: 1px solid var(--stroke); font-size: 11px; color: var(--muted); }
.tabbar .on { color: var(--accent-2); font-weight: 600; }
.ui-card.list { padding: 4px 14px; }
.ticket { padding: 8px 0 8px 20px; position: relative; border-bottom: 1px solid var(--stroke); font-weight: 500; }
.ticket:last-child { border-bottom: 0; }
.dot { position: absolute; left: 0; top: 14px; width: 10px; height: 10px; border-radius: 50%; }
.dot.inline { position: static; display: inline-block; width: 8px; height: 8px; margin: 0 4px 0 0; vertical-align: 1px; }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.ticket .muted { font-weight: 400; }

/* --- общие секции --- */
section { padding: 88px 0; }
.note-section { padding-top: 32px; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; max-width: 20ch; }

/* --- боли --- */
.pains { background: var(--card); border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.pain-list { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.pain { padding: 24px 0; border-top: 1px solid var(--line); }
.pain dt { font-weight: 600; font-size: 20px; letter-spacing: 0; }
.pain dd { margin: 8px 0 0; color: var(--muted); }

/* --- шаги --- */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 20px; }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 32px; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); }
.step-n { display: block; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 24px; font-weight: 600; margin-top: 8px; }
.step p { margin-top: 8px; color: var(--muted); }
.chat { background: var(--bg); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.step .chat { align-self: stretch; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--tg-me); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--stroke); border-bottom-left-radius: 4px; }
.msg.file { display: flex; gap: 12px; align-items: center; }
.file-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--red); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.msg-line { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--stroke); font-size: 14px; }
.kb { display: flex; gap: 6px; margin-top: 6px; }
.kb:first-of-type { margin-top: 10px; }
.key { flex: 1; text-align: center; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--accent-2) 10%, transparent); color: var(--accent); }
.key.on { background: color-mix(in srgb, var(--accent-2) 22%, transparent); }
.key.go { background: #2E9E5B; color: #FFFFFF; }

/* --- конспект --- */
.note-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }
.note { background-color: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 32px 56px 32px 32px;
  box-shadow: var(--shadow); font-size: 16px; }
.note-meta { font-size: 13px; color: var(--muted); }
.note h3 { font-size: 26px; font-weight: 600; margin-top: 8px; }
.note h4 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; letter-spacing: 0; }
.note p { color: var(--text); }
.concept { color: var(--accent); text-decoration: underline; text-decoration-style: dotted; }
.math { font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.08em; white-space: nowrap; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; font-size: .9em; }
.frac .num { border-bottom: 1px solid currentColor; padding: 0 3px; }
.frac .den { padding: 0 3px; }
.formula { margin: 16px 0; padding: 16px; text-align: center; background: var(--bg); border-radius: 10px; font-size: 18px; }
.callout { margin-top: 20px; padding: 12px 16px; border-left: 3px solid var(--hw);
  background: color-mix(in srgb, var(--hw) 8%, transparent); border-radius: 0 10px 10px 0; font-size: 15px; }
.callout p { color: var(--muted); margin-top: 2px; }

/* --- подготовка --- */
.prep { background: var(--card); border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.prep-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.feature-list { margin: 32px 0 0; display: grid; gap: 24px; }
.feature-list dt { font-weight: 600; font-size: 18px; }
.feature-list dd { margin: 4px 0 0; color: var(--muted); }
.phone-flat { box-shadow: none; outline: 1px solid var(--stroke); }

/* --- мелочи --- */
.more-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.more-item { background: var(--bg); padding: 24px 24px 28px; }
.more-item h3 { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.more-item p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* --- старостам --- */
.starosta { background: var(--card); border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.starosta-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.chat-tall { gap: 12px; padding: 24px; }
.chat-gap { align-self: center; font-size: 12px; color: var(--muted); padding: 4px 0; }

/* --- тарифы --- */
.plan-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 32px; }
.plan h3 { font-size: 24px; font-weight: 600; }
.plan-pro { border: 2px solid var(--accent-2); }

/* --- вопросы --- */
.faq details { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { margin-top: 28px; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative;
  font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 44em; }

/* --- подвал --- */
.foot { border-top: 1px solid var(--stroke); padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 24px; }

/* --- узкие экраны --- */
@media (max-width: 900px) {
  .hero { padding: 44px 0 64px; }
  .hero-grid, .note-grid, .prep-grid, .starosta-grid, .step { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { padding-left: 0; justify-self: center; }
  .sheet { display: none; }
  .pain-list { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .top-nav { display: none; }
  .top-row { justify-content: space-between; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .more-grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; }
  .step, .plan { padding: 24px 20px; }
  .chat, .chat-tall { padding: 12px; }
  .msg { max-width: 100%; }
  .msg.bot { align-self: stretch; }
  .key { padding: 8px 4px; }
  .foot-links a { padding: 8px 0; }
  .note { padding: 24px 44px 24px 20px; }
  .phone { width: 100%; max-width: 316px; }
  .lead { font-size: 17px; }
}
