/* Page components: home, schedule, formatting demo, report, survey, tariffs, legal and account pages */

/* Home: free hero on the paper, a collage on the right */
.hero-free { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(20px, 4vw, 56px) 4px clamp(28px, 4vw, 48px); }
.hero-text .display { margin-top: 16px; }
.hero-text .lead { margin-top: 22px; }
.hero-art { position: relative; height: clamp(380px, 38vw, 520px); }
.art-sheet {
  position: absolute; left: 14%; top: 4%; width: 56%; aspect-ratio: 210 / 297; padding: 9% 7% 7% 11%; display: grid; align-content: start; gap: 7%;
  background: #fff; border: var(--bw) solid var(--edge); border-radius: 6px; box-shadow: 10px 10px 0 var(--shadow-c); rotate: -5deg;
}
.art-title { justify-self: center; width: 46%; height: 9px; margin-bottom: 6%; font-size: 0; background: #0a0a0a; border-radius: 2px; }
.art-sheet i { display: block; height: 6px; border-radius: 2px; background: #c9c3b6; }
.art-sheet i:nth-of-type(1), .art-sheet i:nth-of-type(5) { margin-left: 14%; }
.art-sheet i.short { width: 62%; }
.art-stamp {
  position: absolute; left: -12%; bottom: 26%; padding: 8px 14px; font: 600 clamp(13px, 1.2vw, 16px) var(--font-display);
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--edge); border-radius: var(--r-sm); rotate: -8deg; box-shadow: 3px 3px 0 var(--shadow-c);
}
.art-chip {
  position: absolute; z-index: 2; padding: 9px 14px; font: 600 clamp(12px, 1vw, 14px) var(--font-mono); white-space: nowrap;
  background: var(--surface); color: var(--ink); border: 2px solid var(--edge); border-radius: 99px; box-shadow: 3px 3px 0 var(--shadow-c);
  animation: float 6s ease-in-out infinite;
}
.art-chip.c1 { left: 0; top: 18%; rotate: -6deg; }
.art-chip.c2 { right: 0; top: 34%; rotate: 4deg; animation-delay: -2s; }
.art-chip.c3 { left: 4%; top: 58%; rotate: 3deg; animation-delay: -4s; }
.art-badge {
  position: absolute; z-index: 3; right: 4%; top: -2%; width: clamp(104px, 10vw, 136px); aspect-ratio: 1; display: grid; place-content: center; text-align: center;
  font: 700 12px/1.15 var(--font); background: var(--accent-3); color: var(--on-accent-3); border: var(--bw) solid var(--edge); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--shadow-c); rotate: 12deg;
}
.art-badge b { font: 600 clamp(34px, 3.4vw, 46px)/1 var(--font-display); }
.art-chat {
  position: absolute; z-index: 3; right: 2%; bottom: 2%; width: min(300px, 64%); padding: 14px; display: grid; gap: 8px;
  background: var(--accent-2); color: var(--on-accent-2); border: var(--bw) solid var(--edge); border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--shadow-c); rotate: -2deg;
}
.art-chat p { font-size: 13px; line-height: 1.35; padding: 8px 11px; border-radius: 12px 12px 12px 4px; background: rgb(255 255 255 / 0.18); }
.art-chat .art-q { justify-self: end; border-radius: 12px 12px 4px 12px; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); }
.art-star { position: absolute; left: 2%; bottom: 8%; font-size: clamp(48px, 5vw, 72px); line-height: 1; color: var(--accent-2); animation: spin 14s linear infinite; }
@keyframes float { 50% { translate: 0 -8px; } }
@keyframes spin { to { rotate: 360deg; } }

.hero { justify-content: space-between; gap: 40px; min-height: min(72vh, 640px); }
.hero .lead { margin-top: 22px; }
.stat { justify-content: flex-end; }
.stat .big, .pro .big { font-size: clamp(44px, 4.6vw, 76px); }
.stat span, .pro span { font-size: 17px; font-weight: 600; max-width: 26ch; }
.sample .rows { margin-top: auto; }
.sample .score { margin-top: 0; }
.sample .score b { font-size: 44px; }
.bento .tile :is(h2, h3) { font-size: clamp(22px, 2.1vw, 30px); max-width: 18ch; padding-right: 40px; }
.teaser .lesson { margin-top: auto; animation: none; }
.today-list { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 8px; }
.today-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 2px solid var(--line); font-size: 14px; }
.today-list li:first-child { border-color: var(--edge); background: var(--accent); color: var(--on-accent); }
.today-list li:first-child span { color: inherit; opacity: 0.75; }
.today-list b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.today-list span { color: var(--muted); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: auto 0 0; }
.unis-list .chip-list { margin-top: 0; }
.unis-list .chip-list li { padding: 0; border: 0; }
.unis-list a { display: flex; gap: 8px; align-items: baseline; padding: 8px 14px; text-decoration: none; border: 2px solid var(--edge); border-radius: 99px; background: var(--surface); }
.unis-list a:hover, .unis-list a[aria-current] { background: var(--accent); color: var(--on-accent); }
.unis-list a:hover small, .unis-list a[aria-current] small { color: inherit; }
.unis-list small { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.chip-list li { font-size: 14px; font-weight: 600; padding: 7px 13px; border-radius: 99px; border: 2px solid var(--edge); background: var(--surface); }
.chip-list li:nth-child(3n+1) { background: var(--accent); color: var(--on-accent); }
.pro { justify-content: space-between; }
.survey-teaser { justify-content: flex-end; }
.survey-teaser p { max-width: 52ch; }
.survey-teaser .btn { align-self: flex-start; margin-top: 8px; }
.tile.pink.survey-teaser :is(h2) { max-width: 22ch; font-size: clamp(26px, 3.4vw, 44px); }

/* Schedule page: pickers tile on the left, the week on the right */
.pickers { display: grid; gap: 12px; margin-top: 28px; }
.pickers label, .pickers .combo-field { display: grid; gap: 8px; }
.sch-steps { display: grid; gap: 12px; }
.sch-steps:empty { display: none; }
.pickers input:disabled { opacity: 0.5; cursor: not-allowed; }
.pickers input:not(:focus):not(:placeholder-shown):invalid { border-color: var(--bad); }
.pickers input.ready { animation: ready 0.9s var(--ease-out); }
@keyframes ready { 0% { box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 5px 5px 0 0 var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

.seg { display: flex; padding: 3px; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--r-md); }
.seg button { font: 700 14px var(--font); color: var(--muted); background: transparent; border: 0; padding: 7px 16px; border-radius: var(--r-sm); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.sch-card { gap: 14px; min-height: 560px; }
.sch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sch-head b { display: block; font: 600 20px var(--font-display); letter-spacing: -0.02em; }
.sch-head span { font-size: 14px; color: var(--muted); }

.sch-days { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-2); border: 2px solid var(--edge); border-radius: var(--r-md); }
.sch-days button { position: relative; z-index: 1; display: grid; gap: 2px; justify-items: center; padding: 8px 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font-family: var(--font); cursor: pointer; transition: color 0.3s; }
.sch-days button span { font: 600 12px var(--font-mono); text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.sch-days button b { font: 600 18px var(--font-display); }
.sch-days button.today b::after { content: ""; display: block; width: 6px; height: 6px; margin: 2px auto 0; border-radius: 50%; background: var(--accent-3); }
.sch-days button[aria-selected="true"], .sch-days button[aria-selected="true"] span { color: var(--on-accent); }
.sch-days button[aria-selected="true"].today b::after { background: var(--on-accent); }
.sch-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: var(--r-sm); background: var(--accent); border: 2px solid var(--edge); transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-out); }

.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.lesson { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--edge); animation: lesson-in 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.sch-list[data-dir="prev"] .lesson { animation-name: lesson-in-prev; }
.sch-list.no-anim .lesson { animation: none; }
@keyframes lesson-in { from { opacity: 0; transform: translateX(20px); } }
@keyframes lesson-in-prev { from { opacity: 0; transform: translateX(-20px); } }
.l-time { display: grid; align-content: start; font-family: var(--font-mono); }
.l-time b { font-size: 15px; }
.l-time span { font-size: 13px; color: var(--muted); }
.l-body { min-width: 0; }
.l-body .l-title { display: block; color: var(--ink); font-size: 16px; font-weight: 700; margin: 6px 0 2px; line-height: 1.25; }
.l-body p { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--muted); }
.l-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.l-type { display: inline-block; font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 99px; border: 1.5px solid currentColor; }
.l-type.lec { background: var(--accent-2-soft); color: var(--accent-2); }
.l-type.prac, .l-type.sem { background: var(--ok-bg); color: var(--ok); }
.l-type.lab, .l-type.off { background: var(--bad-bg); color: var(--bad); }
.l-type.exam, .l-type.credit { background: var(--accent); color: var(--on-accent); border-color: var(--edge); }
.l-type.consult, .l-type.sub { background: var(--surface); color: var(--muted); }
.l-type.swap { background: var(--warn-bg); color: var(--warn); }
.lesson.cancelled .l-title { text-decoration: line-through; color: var(--muted); }
.lesson.cancelled { opacity: 0.7; }
.lesson.now { box-shadow: 4px 4px 0 var(--shadow-c); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.lesson.past { opacity: 0.5; }
.l-status { margin-top: 10px; font-size: 13px; font-weight: 700; }
.lesson.next .l-status { color: var(--muted); }
.l-bar { margin-top: 6px; height: 8px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--edge); overflow: hidden; }
.l-bar i { display: block; height: 100%; background: var(--accent-2); transition: width 1s var(--ease-out); }
.sch-empty { display: grid; gap: 10px; padding: 28px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--edge); border-radius: var(--r-md); animation: lesson-in 0.4s var(--ease-out) both; }
.sch-empty span { height: 62px; border-radius: var(--r-md); background: var(--surface-2); opacity: 0.8; }
.sch-empty span:nth-child(3) { opacity: 0.5; }
.sch-empty span:nth-child(4) { opacity: 0.3; }
.sch-error { padding: 32px 20px; justify-items: center; }
.sch-loading span { background: linear-gradient(90deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.sch-off { padding: 48px 20px; }
.sch-src { font-size: 13px; color: var(--muted); }
.sch-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--muted); }
.sch-cal .btn { padding: 9px 16px; font-size: 14px; }

/* Formatting demo: an A4 sheet gets formatted to ГОСТ step by step (site.js).
   Paddings use % of width, so 30/10/20 mm on a 210 mm page = 14.29% / 4.76% / 9.52%. */
.demo { position: relative; justify-self: center; width: 100%; max-width: 500px; padding: 56px 0 8px; }
.demo .seg { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; }
.sheet {
  position: relative; width: min(350px, 74%); margin: 0 auto; aspect-ratio: 210 / 297;
  background: #fff; color: #1b1b1b; border-radius: 4px; overflow: hidden;
  border: var(--bw) solid var(--edge); box-shadow: 10px 10px 0 var(--shadow-c); rotate: -2deg;
  container-type: inline-size;
}
.page {
  height: 100%; padding: 7.14%; /* before: 15 mm on every side */
  font-family: Calibri, Carlito, Arial, sans-serif; font-size: 2cqw; line-height: 1.15;
  transition: padding 0.9s var(--ease-out), font-size 0.6s var(--ease-out), line-height 0.6s var(--ease-out);
}
.page h4 { font-family: inherit; font-size: 1em; font-weight: 400; letter-spacing: 0; margin-bottom: 0.6em; text-align: left; transition: margin 0.5s; }
.page p { margin: 0 0 0.7em; text-indent: 0; text-align: left; transition: text-indent 0.6s var(--ease-out), margin 0.6s var(--ease-out); }
.demo.s1 .page { padding: 9.52% 4.76% 9.52% 14.29%; }
.demo.s2 .page { font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 2.35cqw; line-height: 1.5; } /* 14 pt on A4 */
.demo.s3 .page p { margin: 0; text-indent: 5.95cqw; text-align: justify; } /* 1,25 cm */
.demo.s3 .page h4 { font-weight: 700; text-transform: uppercase; text-align: center; margin-bottom: 1.5em; }
.guides { position: absolute; left: 14.29%; right: 4.76%; top: 6.73%; bottom: 6.73%; border: 1px dashed #1f3bff; opacity: 0; transition: opacity 0.6s 0.4s; pointer-events: none; }
.demo.s1 .guides { opacity: 0.7; }
.pg { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); font: 2.35cqw "Times New Roman", Times, serif; opacity: 0; transition: opacity 0.5s; }
.demo.s4 .pg { opacity: 1; }
.stamp {
  position: absolute; right: 7%; top: 3.2%; font: 600 3.2cqw var(--font-display); color: #0a0a0a;
  background: #e6ff2e; border: 2px solid #0a0a0a; border-radius: 6px; padding: 0.35em 0.9em; rotate: 6deg;
  opacity: 0; transform: scale(1.6); transition: opacity 0.3s, transform 0.5s var(--ease-spring);
}
.demo.s4 .stamp { opacity: 1; transform: none; }
/* stickers around the sheet: one per rule that just got fixed */
.chips { list-style: none; margin: 0; padding: 0; position: absolute; inset: 56px 0 8px; pointer-events: none; }
.chips li {
  position: absolute; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 600 13px var(--font-mono); background: var(--surface); color: var(--ink); border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--shadow-c);
  padding: 7px 13px 7px 7px; border-radius: 99px;
  opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.45s var(--ease-spring);
}
.chips li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--edge); font-size: 13px; font-weight: 700; }
.chips li:nth-child(1) { top: 10%; left: 0; rotate: -4deg; }
.chips li:nth-child(2) { top: 27%; right: 0; rotate: 3deg; }
.chips li:nth-child(3) { top: 44%; left: 2%; transition-delay: 0.25s; rotate: 2deg; }
.chips li:nth-child(4) { top: 62%; right: 2%; rotate: -3deg; }
.chips li:nth-child(5) { top: 82%; left: 6%; rotate: 4deg; }
.demo.s1 .chips li:nth-child(1),
.demo.s2 .chips li:nth-child(2), .demo.s2 .chips li:nth-child(3),
.demo.s3 .chips li:nth-child(4),
.demo.s4 .chips li:nth-child(5) { opacity: 1; transform: none; }

/* Two-column tiles: formatting hero, schedule, report, survey */
.gost, .report, .survey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 56px); }
.gost h1, .sched h1 { font-size: clamp(30px, 3.6vw, 56px); overflow-wrap: anywhere; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.gost .lead, .sched .lead { margin-top: 20px; }
.meta { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* Steps: a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: var(--bw) solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--sh) var(--sh) 0 var(--shadow-c); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: "0" counter(s); font: 600 52px/1 var(--font-display); letter-spacing: -0.04em; margin-bottom: 18px; }
.steps li:first-child { background: var(--accent); color: var(--on-accent); }
.steps li:nth-child(2) { background: var(--accent-2); color: var(--on-accent-2); }
.steps li:first-child span, .steps li:nth-child(2) span { color: inherit; opacity: 0.8; }
.steps b { font: 600 19px var(--font-display); letter-spacing: -0.02em; }
.steps span { color: var(--muted); }

/* Report: score on the left, rows on the right */
.report { align-items: start; }
.report h1 { font-size: clamp(26px, 3.2vw, 42px); overflow-wrap: anywhere; }
.report h3 { font-size: clamp(24px, 2.6vw, 34px); }
.report > div > p { margin-top: 14px; color: var(--muted); }
.score { display: flex; align-items: baseline; gap: 12px; margin-top: 28px; }
.score b { font: 600 clamp(52px, 5.6vw, 80px)/1 var(--font-display); letter-spacing: -0.04em; }
.score span { color: var(--muted); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 13px 16px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--edge); align-items: center; }
.tile .rows > div { background: var(--surface-2); border-color: var(--line); }
.rows .k { font-weight: 700; }
.rows .v { grid-column: 1; font-size: 14px; color: var(--muted); }
.pill { grid-row: 1 / span 2; grid-column: 2; font: 700 12px var(--font-mono); text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); border: 1.5px solid currentColor; white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

/* Survey: inverted tile with the form on a light card */
.survey { background: var(--ink); color: var(--bg); align-items: start; }
.survey h2 { font-size: clamp(28px, 3.6vw, 52px); }
.survey-text p { margin-top: 16px; font-size: 18px; opacity: 0.8; max-width: 38ch; }
#survey-form { background: var(--surface); color: var(--ink); border: var(--bw) solid var(--edge); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; box-shadow: 6px 6px 0 var(--accent); }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; font-weight: 600; font-size: 15px; padding: 8px 15px; border-radius: 99px; background: var(--surface); border: 2px solid var(--edge); cursor: pointer; transition: background 0.15s, color 0.15s; user-select: none; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label:has(input:checked) { background: var(--accent); color: var(--on-accent); box-shadow: 2px 2px 0 var(--shadow-c); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--accent-2); outline-offset: 2px; }
#survey-form .btn { justify-self: start; }

/* Tariffs */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plans-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plans-4 .plan .price { font-size: clamp(36px, 3.2vw, 54px); }
.plans-4 .plan .price small { display: block; margin-top: 8px; }
@media (max-width: 1100px) { .plans-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan .old { font-size: 14px; opacity: 0.7; }
.plan li.no { opacity: 0.45; text-decoration: line-through; }
.compare { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 2px solid var(--line); text-align: center; }
.compare th { font-family: var(--font-display); font-size: 14px; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare-wrap { overflow-x: auto; }
.plan .price { font: 600 clamp(44px, 5vw, 72px)/1 var(--font-display); letter-spacing: -0.04em; }
.tile.ink .price { opacity: 1; }
.plan .price small { font: 600 16px var(--font); letter-spacing: 0; opacity: 0.75; }
.plan h3 { font-size: 24px; }
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.plan li::marker { content: "✦  "; color: var(--accent-2); }
.tile.ink .plan li::marker, .tile.ink li::marker { color: var(--accent); }
.plan .btn, .plan .pay-form { align-self: flex-start; margin-top: auto; }
.tile.ink .btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent-2); }
.tile.ink { box-shadow: var(--sh) var(--sh) 0 var(--accent-2); }
.tag { align-self: flex-start; font: 700 11px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); border: 2px solid var(--edge); }
.tile.ink .tag { background: var(--accent-3); color: var(--on-accent-3); border-color: var(--accent-3); rotate: -3deg; }

/* Legal pages, the check page's rule list, sign in and sign up */
.doc { max-width: 860px; padding: clamp(24px, 5vw, 56px); }
.doc h1 { font-size: clamp(28px, 3.6vw, 44px); }
.doc h2 { font-size: 21px; margin: 32px 0 10px; }
.doc > :first-child { margin-top: 0; }
.doc p, .doc li { line-height: 1.65; }
.doc p + p, .doc ul, .doc ol { margin-top: 10px; }
.doc .muted { color: var(--muted); }
.doc a:not(.btn) { text-decoration-color: var(--accent-2); }
.auth { max-width: 560px; }
.auth form { display: grid; gap: 18px; margin-top: 24px; }
.auth .form-group, .auth form p { display: grid; gap: 8px; }
.auth form .btn { justify-self: start; }
.auth .hint { color: var(--muted); font-size: 13px; }
.auth .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; line-height: 1.5; }
.auth .check input { width: auto; margin-top: 4px; flex: none; accent-color: var(--accent-2); }

@media (max-width: 900px) {
  .hero-free { grid-template-columns: minmax(0, 1fr); }
  .hero-art { height: 360px; max-width: 520px; width: 100%; justify-self: center; }
  .gost, .report, .survey, .plans { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .sch-card { min-height: 0; }
  .hero { min-height: 0; }
  .demo { max-width: 420px; }
}
@media (max-width: 520px) {
  .hero-free { padding-top: 8px; }
  .hero-art { height: 300px; }
  .art-chat { width: 72%; }
  .art-chip.c3 { display: none; }
  .chips { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
  .chips li { position: static; font-size: 12px; }
  .sheet { width: 80%; }
}

/* Tools: template, title page, sources */
.tool-form { display: grid; gap: 16px; }
.tool-form .btn { justify-self: start; }
.source-result { margin-top: 24px; padding: 20px; border-radius: var(--r-md); background: var(--surface-2); border: 2px solid var(--edge); display: grid; gap: 14px; }
.source-result p { color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; }
.source-result .btn { justify-self: start; }
.rows .was { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Notes to classes (schedule.js, today.js) */
.l-note { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent-3) 18%, var(--surface)); border: 1.5px solid var(--edge); color: var(--ink); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.l-note-btn { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--muted); font: 600 13px var(--font); text-decoration: underline; cursor: pointer; }
.l-note-btn:hover { color: var(--ink); }
.l-note-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.l-note-edit textarea { flex-basis: 100%; }
.l-note-edit .btn { padding: 8px 16px; font-size: 14px; }
.today-note { font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Cookie consent for Yandex.Metrica (base.html, site.js) */
.pro-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: var(--text); color: var(--bg); font: 700 10px var(--font); vertical-align: 2px; }
kbd { font: 600 12px var(--font); padding: 2px 7px; border-radius: 8px; background: var(--surface-2); }

/* Page title outside tiles: /make/, «Помощник», cabinet */
.page-head { padding: 28px 4px 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 68px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.page-head .label + h1 { margin-top: 12px; }
.page-head p:not(.label) { color: var(--muted); margin-top: 14px; font-size: 18px; max-width: 60ch; }
.tools-group { margin-top: 28px; }
.tools-group > h2 { font-size: 24px; margin: 0 4px 12px; }
.tool-tile { text-decoration: none; min-height: 220px; justify-content: flex-end; }
.tool-tile h2, .tool-tile h3 { font-size: clamp(22px, 2.2vw, 30px); }
.tool-tile p:last-child { opacity: 0.8; max-width: 44ch; }
.tool-tile .sticker { top: -14px; right: 64px; }

/* Text → .docx */
.hint-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent-2); }
.lookup { margin-top: 24px; display: grid; gap: 8px; }
.lookup > div { display: flex; gap: 10px; }
.lookup .btn { flex: none; }


/* Dropdown of a text field (static/combo.js): the schedule pickers */
.combo { position: relative; }
.combo input { padding-right: 44px; scroll-margin-top: 120px; } /* scrolled into view below the sticky header, label included */
.combo-clear { position: absolute; top: 50%; right: 8px; width: 30px; height: 30px; transform: translateY(-50%); border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.combo-clear:hover { background: var(--surface-2); color: var(--ink); }
.combo-list { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0; max-height: min(320px, 45vh); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--r-md);
  box-shadow: 5px 5px 0 var(--shadow-c); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.combo-list[hidden], .combo-list.empty { display: none; }
.combo-option { display: grid; gap: 2px; min-height: 44px; align-content: center; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; }
.combo-option:hover, .combo-option[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.combo-option:hover .combo-label, .combo-option[aria-selected="true"] .combo-label, .combo-option[aria-selected="true"] .combo-value { color: inherit; }
.combo-value { font-weight: 700; color: var(--ink); }
.combo-value mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--accent-2); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.combo-label { font-size: 13px; color: var(--muted); }
.combo-note { padding: 10px 12px; font-size: 14px; color: var(--muted); }

/* «Как исправить в Word» under a report row (checks/howto.py) */
.howto { margin-top: 6px; font-size: 14px; }
.howto summary { cursor: pointer; color: var(--ink); font-weight: 700; width: fit-content; }
.howto p { margin-top: 6px; color: var(--muted); line-height: 1.55; }
@media print { .howto { display: none; } }

/* Questions and answers (tariffs) */
.faq details { border-bottom: 2px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.faq summary::marker { color: var(--accent-2); }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Upload on the check page */
.dropzone { padding: 16px; border-radius: var(--r-md); border: 2px dashed var(--edge); transition: background 0.2s, border-color 0.2s; }
.dropzone.over { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); border-style: solid; }
.drop-hint { margin-top: 0; }
form[aria-busy="true"] .btn { opacity: 0.7; cursor: progress; }

/* Group space (groups/, templates/groups/) */
.group-head .cta { margin-top: 18px; }
.group-upcoming, .group-feed, .group-members { padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.group-upcoming h2, .group-feed h2, .group-members h2 { font-size: 24px; }
.group-new summary { list-style: none; justify-self: start; width: fit-content; }
.group-new summary::-webkit-details-marker { display: none; }
.group-new[open] summary { margin-bottom: 14px; }
.group-post { display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--edge); }
.group-post.is-hidden { opacity: 0.6; }
.group-post h3 { font-size: 17px; }
.group-text { overflow-wrap: anywhere; line-height: 1.55; }
.group-post-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.group-post-foot .meta { margin: 0; }
.group-actions { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.poll { display: grid; gap: 6px; }
.poll-option { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 2px solid var(--edge);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 600 15px var(--font); text-align: left; cursor: pointer; }
.poll-option.mine { box-shadow: 3px 3px 0 var(--accent-2); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 60%, transparent); transition: width 0.4s var(--ease-out); }
.poll-text, .poll-option b { position: relative; }
.group-members .rows > div:has(.group-actions) { grid-template-columns: minmax(0, 1fr) auto; }
.push-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Support chat (support/) */
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.support-layout .tile, .support-guest, .chat { padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.support-layout h2 { font-size: 22px; }
.chat { max-width: 760px; }
.chat-message { justify-self: start; max-width: 85%; display: grid; gap: 4px; padding: 11px 15px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); border: 2px solid var(--edge); }
.chat-message.staff { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--on-accent); }
.chat-message.staff .meta { color: inherit; opacity: 0.7; }
.chat-text { overflow-wrap: anywhere; line-height: 1.5; }
.chat-message .meta { margin: 0; font-size: 12px; font-family: var(--font-mono); }
.chat-reply { margin-top: 8px; }
@media (max-width: 860px) { .support-layout { grid-template-columns: minmax(0, 1fr); } }

/* Staff panel (staff/, templates/staff/) */
.staff-attention, .staff-funnel, .staff-list, .staff-card > .tile, .staff-processes { padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.staff-attention h2, .staff-funnel h2, .staff-card h2, main .tile > h2 { font-size: 22px; }
.staff-tile { display: grid; gap: 6px; align-content: start; }
.staff-tile b { font: 600 clamp(32px, 3.6vw, 48px)/1 var(--font-display); letter-spacing: -0.04em; }
.staff-tile span { color: var(--muted); font-size: 14px; }
.staff-tile.ink span { color: inherit; opacity: 0.8; }
.staff-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.staff-chart { margin: 0; padding: 20px; display: grid; gap: 10px; }
.staff-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.staff-chart figcaption b { font: 600 20px var(--font-display); white-space: nowrap; }
.staff-chart svg { width: 100%; height: 120px; display: block; overflow: visible; }
.staff-chart rect { fill: var(--accent-2); }
.staff-chart rect:hover { fill: var(--ink); }
.staff-chart-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.staff-chart-axis { display: flex; justify-content: space-between; gap: 8px; font: 500 12px var(--font-mono); color: var(--muted); }
.staff-chart-table summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.staff-chart-table table, .staff-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.staff-chart-table td, .staff-chart-table th, .staff-table td, .staff-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.staff-table th { color: var(--muted); font: 600 12px var(--font-mono); text-transform: uppercase; }
.staff-table tr.is-blocked td { color: var(--muted); }
.staff-table-wrap { overflow-x: auto; }
.staff-funnel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.staff-funnel li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--edge); overflow: hidden; }
.staff-funnel li > * { position: relative; }
.staff-funnel b { font: 600 20px var(--font-display); margin-left: auto; }
.staff-funnel-bar { position: absolute !important; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, var(--accent) 55%, transparent); }
.staff-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staff-filters > * { width: auto; flex: 0 1 auto; }
.staff-filters input[type=search] { flex: 1 1 260px; }
.staff-pages { display: flex; gap: 12px; align-items: center; justify-content: center; }
.staff-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.staff-card .score { flex-wrap: wrap; margin-top: 8px; }
.staff-card .score b { font-size: clamp(30px, 3.2vw, 44px); overflow-wrap: anywhere; }
.staff-email { overflow-wrap: anywhere; font-size: clamp(24px, 3.6vw, 42px) !important; }
.staff-grant { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.staff-grant label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.staff-grant input { width: 110px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.danger { color: var(--bad); }

/* «Помощник» (assistant/, static/assistant.js): the full page and the home-page question */
.ai-chat { display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; gap: 10px; min-height: 0; padding: 14px 16px; }
.ai-log { display: grid; align-content: start; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ai-log .chat-message { max-width: 92%; }
.ai-log .chat-message:not(.staff) { background: var(--surface); }
.ai-log .chat-message.staff { background: var(--accent-2); color: var(--on-accent-2); }
.ai-log .chat-text p + p, .ai-log .chat-text p + ul, .ai-log .chat-text ul + p { margin-top: 8px; }
.ai-log .chat-text ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.chat-message.typing .chat-text:empty::after { content: '…'; animation: ai-dots 1s steps(3) infinite; }
@keyframes ai-dots { 50% { opacity: 0.3; } }
.ai-link { display: inline-block; margin: 2px 0; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--edge); font-weight: 700; text-decoration: none; }
.ai-error { margin-top: 6px; color: var(--muted); font-size: 14px; }
.ai-rate { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: inherit; opacity: 0.85; }
.ai-rate button { padding: 4px 10px; border: 1.5px solid currentColor; border-radius: 999px; background: none; color: inherit; font: inherit; cursor: pointer; }
.ai-rate button:hover { background: var(--accent); color: var(--on-accent); border-color: var(--edge); }
.ai-offer { margin-top: 10px; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-suggest[hidden] { display: none; }
.ai-suggest button { padding: 8px 14px; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 14px var(--font); cursor: pointer; transition: background 0.15s, transform 0.12s; }
.ai-suggest button:hover { background: var(--accent); color: var(--on-accent); transform: rotate(-2deg); }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form textarea { flex: 1; min-height: 48px; max-height: 140px; resize: none; overflow-y: hidden; font-size: 16px; } /* 16px: no zoom on iPhone; assistant.js grows it */
.ai-foot { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.ai-clear { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.ai-page { padding: clamp(16px, 3vw, 28px); display: grid; gap: 12px; }
.ai-page .ai-chat { height: min(70vh, 720px); padding: 0; }
.ai-start { display: flex; gap: 10px; margin-top: 26px; max-width: 640px; }
.ai-start input { flex: 1; min-height: 56px; font-size: 17px; border-width: var(--bw); box-shadow: 4px 4px 0 var(--shadow-c); }
.ai-start input:focus { box-shadow: 4px 4px 0 var(--accent-2); }
.hero-free .ai-suggest, .hero .ai-suggest { margin-top: 14px; }
@media (max-width: 640px) {
  .ai-start { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-message.typing .chat-text:empty::after { animation: none; }
  .art-chip, .art-star { animation: none; }
}

/* Articles (pages/guides.py) */
.guide ol { padding-left: 22px; }
.guide h1 { margin-bottom: 16px; }
.guide .cta { margin-top: 28px; }
.guide-card { display: grid; gap: 8px; padding: clamp(20px, 3vw, 28px); text-decoration: none; }
.guide-card :is(h2, h3) { font-size: 20px; }
.guide-card p { color: var(--muted); }
