/* Page components shared by index.html, schedule.html and gost.html */
/* Layout: stacked rounded panels on a notebook page. Hero: schedule picker + a tilted schedule card with desk items around it.
   Second panel: an A4 sheet that gets formatted to ГОСТ in front of the visitor. */
main.wrap { display: grid; gap: 20px; margin-top: 20px; }
section { padding: 0; }
.sec-head { position: relative; max-width: 640px; margin: 36px 0 24px 8px; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 46px); }
.sec-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* First screen: centred promise with desk items floating around it */
.intro { position: relative; min-height: min(84vh, 780px); display: grid; place-items: center; padding: clamp(48px, 8vh, 96px) 0; isolation: isolate; }
.intro-text { position: relative; z-index: 2; max-width: 880px; text-align: center; display: grid; justify-items: center; }
.intro h1 { font-size: clamp(42px, 7vw, 92px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; color: var(--blue); }
.intro .mark { position: relative; white-space: nowrap; }
/* hand-drawn dashed arc under the word, drawn in on load */
.intro .mark::after {
  content: ""; position: absolute; left: -6%; right: -6%; bottom: -0.2em; height: 0.3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath d='M4 19 Q100 1 196 19' fill='none' stroke='%23ff7a2f' stroke-width='4' stroke-linecap='round' stroke-dasharray='13 11' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0); animation: draw-arc 0.9s 0.7s var(--ease-out) forwards;
}
@keyframes draw-arc { to { clip-path: inset(0 0 0 0); } }
.intro .lead { margin-top: 34px; font-size: clamp(18px, 1.9vw, 25px); line-height: 1.4; color: var(--ink); opacity: 0.8; max-width: 34ch; }
.btn-try {
  margin-top: 40px; padding: 22px 46px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 700; letter-spacing: -0.015em;
  color: var(--ink); background: var(--surface); border: 0; border-radius: calc(var(--r-pill) * 2.4);
  box-shadow: 0 0 0 1px var(--line), 0 22px 50px -14px var(--orange), 0 0 70px -6px color-mix(in srgb, var(--orange) 45%, transparent);
}
.btn-try:hover { box-shadow: 0 0 0 1px var(--line), 0 26px 56px -14px var(--orange), 0 0 90px -4px color-mix(in srgb, var(--orange) 55%, transparent); }
.intro-soon { margin-top: 22px; font-size: 15px; color: var(--muted); }
.intro-soon a { color: var(--blue); font-weight: 600; }
/* one orchestrated entrance for the promise */
.js .intro-text > * { animation: rise 0.8s var(--ease-out) both; }
.js .intro-text > :nth-child(2) { animation-delay: 0.12s; }
.js .intro-text > :nth-child(3) { animation-delay: 0.24s; }
.js .intro-text > :nth-child(4) { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* reaches the screen edges (the body gutter is 16px) and clips props that hang past them */
.intro-deco { position: absolute; inset: 0 -16px; z-index: 1; pointer-events: none; overflow: hidden; }
/* float uses the translate property so it adds to the parallax/rotation transform */
.float { animation: float var(--dur, 7s) ease-in-out infinite alternate; }
@keyframes float { from { translate: 0 -10px; } to { translate: 0 12px; } }
/* 3D props pre-rendered from props.js (tools/render-props.html), square images with transparent edges */
.i-3d { height: auto; filter: drop-shadow(0 18px 22px rgba(26, 29, 41, 0.22)); }
.i-phone { width: 230px; left: 3%; top: 2%; --rot: -14deg; --dur: 6.5s; }
.i-stamp { width: 130px; left: 7%; top: 46%; --rot: -14deg; color: var(--red); opacity: 0.75; --dur: 8s; }
.i-headphones { width: 250px; right: 3%; top: 2%; --rot: 10deg; --dur: 7.5s; }
.i-photo { margin: 0; padding: 9px 9px 26px; background: #fff; border-radius: 6px; box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.45); }
.i-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.i-photo-left { width: 230px; left: 4%; bottom: 4%; --rot: -9deg; --dur: 9s; }
.i-photo-right { width: 270px; right: 4%; bottom: 8%; --rot: 7deg; --dur: 8.5s; }
.i-note { right: 3%; top: 36%; width: 150px; padding: 16px 14px; --rot: 6deg; --dur: 6s; font: 600 23px/1.05 var(--font-hand); color: #3a2f12; background: #ffe58a; border-radius: 2px 2px calc(16px * var(--round)) 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 14px 24px -12px rgba(0, 0, 0, 0.35); }
.i-blur { filter: blur(5px); opacity: 0.55; }
.i-blur-1 { width: 170px; left: 28%; bottom: 0; --rot: -12deg; --dur: 10s; }
.i-blur-2 { width: 90px; right: 27%; top: 6%; --rot: 24deg; --dur: 9s; }
[data-motion="off"] .float, [data-motion="off"] .intro .mark::after, [data-motion="off"].js .intro-text > * { animation: none; clip-path: none; }
@media (prefers-reduced-motion: reduce) { .float, .intro .mark::after, .js .intro-text > * { animation: none; clip-path: none; } }
@media (max-width: 1100px) {
  .i-stamp, .i-note, .i-blur { display: none; }
  .i-phone { width: 180px; left: -2%; top: 0; }
  .i-headphones { width: 190px; right: -3%; top: 0; }
  .i-photo-left { width: 170px; left: -2%; bottom: 0; }
  .i-photo-right { width: 190px; right: -2%; bottom: 2%; }
}
@media (max-width: 700px) {
  .intro { min-height: 0; padding: 92px 0 150px; }
  .i-phone { width: 120px; left: -4%; top: 0; }
  .i-headphones { width: 130px; right: -6%; top: 0; }
  .i-photo-left { width: 130px; left: 2%; bottom: 0; }
  .i-photo-right { width: 140px; right: 2%; bottom: 6px; }
}

/* Schedule panel */
.sched { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 60px); overflow: hidden; isolation: isolate; }
.sched :is(h1, h2) { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.sched .lead { margin-top: 20px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 44ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.meta { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* The schedule card sits on the desk: slightly turned, a clip on top, a note stuck to the corner, ruler and pencil underneath */
.desk { position: relative; padding: 22px 6px 34px; }
.desk .sch-card { position: relative; z-index: 2; transform: rotate(1.6deg); box-shadow: var(--shadow-lift); background: var(--bg); transition: transform 0.6s var(--ease-out); }
.desk:hover .sch-card { transform: rotate(0.4deg); }
/* --py is set by the parallax script, --rot per item */
.deco { position: absolute; pointer-events: none; will-change: transform; transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg)); }
.deco svg { display: block; width: 100%; height: auto; }
.deco.ruler { z-index: 1; width: 104%; left: -6%; top: 84%; --rot: -6deg; }
.deco.pencil { z-index: 1; width: 58%; right: -30%; top: 30%; --rot: 72deg; }
.deco.clip { z-index: 3; width: 30px; left: 12%; top: -4px; --rot: -6deg; }
.desk .sch-head { padding-top: 30px; }
.deco.note {
  z-index: 3; left: -13%; bottom: -46px; width: 170px; padding: 18px 16px 16px; --rot: -7deg;
  font: 600 24px/1.05 var(--font-hand); color: #3a2f12; background: #ffe58a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 14px 24px -12px rgba(0, 0, 0, 0.35);
  border-radius: 2px 2px calc(18px * var(--round)) 2px;
}
.deco.note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; transform: translateX(-50%) rotate(3deg); background: color-mix(in srgb, #fff 55%, transparent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.deco.stamp-round { right: -170px; top: -10px; width: 124px; --rot: 12deg; color: var(--red); opacity: 0.6; }

/* Demo sheet. 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; }
.seg { display: flex; padding: 4px; background: var(--bg); border-radius: var(--r-pill); }
.demo .seg { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; }
.seg button { font: 500 14px var(--font-body); color: var(--muted); background: transparent; border: 0; padding: 7px 18px; border-radius: var(--r-pill); cursor: pointer; transition: background 0.25s, color 0.25s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.sheet {
  position: relative; width: min(350px, 74%); margin: 0 auto; aspect-ratio: 210 / 297;
  background: #fff; color: #1b1b1b; border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(19, 29, 40, 0.06), 0 30px 60px -28px rgba(19, 29, 40, 0.45);
  container-type: inline-size;
  transform: rotate(-2deg); transition: transform 1s var(--ease-out);
}
.demo.s4 .sheet { transform: rotate(0); }
.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-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 var(--red); 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: 700 3.2cqw var(--font-body); color: #d63a2c;
  border: 2px solid #d63a2c; border-radius: 6px; padding: 0.3em 0.7em; background: #fff;
  opacity: 0; transform: rotate(8deg) scale(1.8); transition: opacity 0.3s, transform 0.5s var(--ease-pop);
}
.demo.s4 .stamp { opacity: 1; transform: rotate(8deg) scale(1); }

/* 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-size: 14px; font-weight: 500; background: var(--surface); color: var(--ink);
  padding: 8px 14px 8px 8px; border-radius: var(--r-pill); box-shadow: var(--shadow);
  opacity: 0; transform: scale(0.7) rotate(var(--rot, 0deg)); transition: opacity 0.3s, transform 0.55s var(--ease-pop);
}
.chips li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 700; }
.chips li:nth-child(1) { top: 10%; left: 0; --rot: -4deg; }
.chips li:nth-child(2) { top: 27%; right: 0; --rot: 3deg; }
.chips li:nth-child(3) { top: 44%; left: 2%; --rot: 2deg; transition-delay: 0.25s; }
.chips li:nth-child(4) { top: 62%; right: 2%; --rot: -3deg; }
.chips li:nth-child(5) { top: 82%; left: 6%; --rot: -2deg; }
.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: scale(1) rotate(var(--rot, 0deg)); }

/* Formatting panel: text on the left, the sheet demo on the right */
.gost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(28px, 5vw, 60px); overflow: hidden; }
.gost :is(h1, h2) { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.gost .lead { margin-top: 20px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 46ch; }

/* Schedule pickers */
.pickers { display: grid; gap: 12px; margin-top: 28px; }
.pickers label { display: grid; gap: 8px; }
.pickers input:disabled { opacity: 0.5; cursor: not-allowed; }
.pickers input:not(:placeholder-shown):invalid { border-color: var(--red); }
.pickers input.ready { animation: ready 0.9s var(--ease-out); }
@keyframes ready { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.demo-note { margin-top: 20px; font-size: 14px; color: var(--muted); padding: 12px 16px; border-radius: var(--r-sm); background: var(--bg); }

.sch-card { background: var(--bg); border-radius: var(--r-lg); padding: clamp(14px, 2vw, 22px); display: flex; flex-direction: column; gap: 14px; min-height: 540px; min-width: 0; }
.sch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 6px 0; }
.sch-head b { display: block; font-size: 20px; letter-spacing: -0.015em; }
.sch-head span { font-size: 14px; color: var(--muted); }
.sch-card .seg { background: var(--surface); }
.sch-card .seg button { font: 500 14px var(--font-body); color: var(--muted); background: transparent; border: 0; padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer; transition: background 0.25s, color 0.25s; }
.sch-card .seg button[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }

.sch-days { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface); 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-md); background: transparent; color: var(--ink); font-family: var(--font-body); cursor: pointer; transition: color 0.3s; }
.sch-days button span { font-size: 13px; color: var(--muted); transition: color 0.3s; }
.sch-days button b { font-size: 18px; font-weight: 700; }
.sch-days button.today b::after { content: ""; display: block; width: 5px; height: 5px; margin: 2px auto 0; border-radius: 50%; background: var(--red); }
.sch-days button[aria-selected="true"], .sch-days button[aria-selected="true"] span { color: var(--on-blue); }
.sch-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: var(--r-md); background: var(--blue); transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out); }

.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.desk .sch-list { position: relative; max-height: 470px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; margin: -2px; }
.lesson { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); animation: lesson-in 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }
.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(24px); } }
@keyframes lesson-in-prev { from { opacity: 0; transform: translateX(-24px); } }
.l-time { display: grid; align-content: start; }
.l-time b { font-size: 16px; }
.l-time span { font-size: 13px; color: var(--muted); }
.l-body { min-width: 0; }
.l-body h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 6px 0 2px; }
.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-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); }
.l-type.lec { background: var(--blue-soft); color: var(--blue); }
.l-type.prac { background: var(--ok-bg); color: var(--ok); }
.l-type.lab { background: var(--bad-bg); color: var(--red); }
.l-type.exam, .l-type.credit { background: var(--tint-lilac); color: var(--violet); }
.l-type.consult, .l-type.sub { background: var(--bg); color: var(--muted); }
.l-type.sem { background: var(--ok-bg); color: var(--ok); }
.l-type.off { background: var(--bad-bg); color: var(--red); }
.lesson.cancelled h4 { text-decoration: line-through; color: var(--muted); }
.lesson.cancelled { opacity: 0.7; }
.l-type.swap { background: var(--tint-peach); color: #b4530f; }
.sch-error { padding: 32px 20px; justify-items: center; }
.sch-loading span { background: linear-gradient(90deg, var(--surface) 30%, var(--bg) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
[data-motion="off"] .sch-loading span { animation: none; }
@media (prefers-reduced-motion: reduce) { .sch-loading span { animation: none; } }
.sch-src { font-size: 13px; color: var(--muted); padding: 0 6px; }
.sch-src a { color: var(--blue); }
.lesson.now { box-shadow: inset 0 0 0 2px var(--blue); }
.lesson.past { opacity: 0.55; }
.l-status { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--blue); }
.lesson.next .l-status { color: var(--muted); }
.l-bar { margin-top: 6px; height: 5px; border-radius: 99px; background: var(--blue-soft); overflow: hidden; }
.l-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width 1s var(--ease-out); }
.sch-empty { display: grid; gap: 10px; padding: 28px 20px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); 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); opacity: 0.7; }
.sch-empty span:nth-child(3) { opacity: 0.45; }
.sch-empty span:nth-child(4) { opacity: 0.25; }
.sch-off { padding: 48px 20px; }
.sch-paused { padding: 40px 24px; gap: 8px; }
.sch-paused b { color: var(--ink); }

/* Functions bento */
.bento { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.card { border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; min-width: 0; background: var(--surface); }
.card h3 { font-size: clamp(22px, 2.2vw, 28px); }
.card p { color: var(--muted); font-size: 16px; max-width: 46ch; }
.card.main { grid-row: span 2; background: var(--grad); color: #fff; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.card.main h3 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.035em; }
.card.main p { color: inherit; opacity: 0.8; font-size: 18px; }
.tag { align-self: flex-start; justify-self: start; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); }
.tag.soon { background: var(--bg); color: var(--muted); }
.card.main .tag { background: color-mix(in srgb, #fff 18%, transparent); color: #fff; }
.checks-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.checks-list li { font-size: 15px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, #fff 35%, transparent); }

/* Steps: a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
/* cards lie on the page a little crooked and straighten on hover; --tilt is kept separate from the reveal transform */
.steps li { rotate: var(--tilt, 0deg); transition: rotate 0.5s var(--ease-pop), opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.steps li:nth-child(1) { --tilt: -1.5deg; }
.steps li:nth-child(2) { --tilt: 1deg; --tint: var(--tint-lilac); }
.steps li:nth-child(3) { --tilt: -0.8deg; --tint: var(--tint-mint); }
.steps li:hover { --tilt: 0deg; }
.steps li::before { content: counter(s); width: 52px; height: 52px; border-radius: 50%; background: var(--tint, var(--tint-blue)); color: var(--blue); font-size: 24px; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.steps b { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.steps span { color: var(--muted); }

.report { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding: clamp(24px, 4vw, 48px); margin-top: 20px; }
.report h3 { font-size: clamp(24px, 2.6vw, 32px); }
.report > div > p { margin-top: 12px; color: var(--muted); }
.score { display: flex; align-items: baseline; gap: 10px; margin-top: 24px; }
.score b { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; color: var(--blue); line-height: 1; }
.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: 14px 18px; border-radius: var(--r-md); background: var(--bg); align-items: center; }
.rows .k { font-weight: 600; }
.rows .v { grid-column: 1; font-size: 14px; color: var(--muted); }
.pill { grid-row: 1 / span 2; grid-column: 2; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--red); }

/* Survey */
.survey { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 5vw, 64px); background: var(--grad); color: #fff; margin-top: 20px; }
.survey h2 { font-size: clamp(30px, 4vw, 46px); }
.survey-text p { margin-top: 16px; font-size: 18px; opacity: 0.85; max-width: 38ch; }
#survey-form { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; font-weight: 500; font-size: 15px; padding: 9px 16px; border-radius: var(--r-pill); background: var(--bg); cursor: pointer; transition: background 0.2s, color 0.2s; user-select: none; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label:has(input:checked) { background: var(--grad); color: #fff; }
.choice label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
input[type="file"] { font: 400 14px var(--font-body); color: var(--muted); width: 100%; padding: 10px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); }
input[type="file"]::file-selector-button { font: 600 14px var(--font-body); margin-right: 12px; padding: 9px 16px; border-radius: var(--r-pill); border: 0; background: var(--blue-soft); color: var(--blue); cursor: pointer; }
#survey-submit { justify-self: start; }


/* Colour glow behind the schedule card */
.desk::before { content: ""; position: absolute; inset: -6% -10% -4% -6%; z-index: 0; pointer-events: none; background: radial-gradient(closest-side at 65% 35%, color-mix(in srgb, var(--blue) 28%, transparent), transparent), radial-gradient(closest-side at 30% 75%, color-mix(in srgb, var(--violet) 26%, transparent), transparent); filter: blur(8px); }

/* Carousel: half-screen slides on pastel tints, swipe or arrows; autoplay progress is drawn into the active dot by the script */
.carousel { margin-top: 20px; }
.car-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 36px 8px 24px; }
.car-head h2 { font-size: clamp(30px, 4.2vw, 46px); }
.car-head p { margin-top: 12px; color: var(--muted); font-size: 18px; max-width: 52ch; }
.car-nav { display: flex; gap: 8px; flex: none; }
.car-nav button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.25s var(--ease-out), background 0.2s, color 0.2s; }
.car-nav button:hover { background: var(--blue); color: var(--on-blue); transform: translateY(-2px); }
.car-nav svg { width: 22px; height: 22px; }
.car-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 1080px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 8px; border-radius: var(--r-lg); }
.car-track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: center; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); height: clamp(420px, 56vh, 600px); border-radius: var(--r-lg); overflow: hidden; background: var(--tint, var(--tint-blue)); }
.slide-text { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(24px, 4vw, 52px); }
.slide-text h3 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.slide-text p { color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); max-width: 40ch; }
.slide-text .btn { align-self: flex-start; margin-top: 8px; }
.slide-icon { width: 56px; height: 56px; border-radius: calc(18px * var(--round)); display: grid; place-items: center; background: var(--surface); color: var(--blue); box-shadow: var(--shadow); transform: rotate(-6deg); }
.slide-icon svg { width: 28px; height: 28px; }
.slide figure { position: relative; margin: 0; padding: 20px 20px 20px 0; min-height: 0; }
.slide img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-lg) - 8px); display: block; }
.slide .badge { position: absolute; left: -18px; bottom: 44px; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-lift); font-weight: 600; font-size: 15px; transform: rotate(-4deg); }
.slide .badge i { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 14px; }
.slide.t-lilac { --tint: var(--tint-lilac); } .slide.t-mint { --tint: var(--tint-mint); } .slide.t-peach { --tint: var(--tint-peach); }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.car-dots button { position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; overflow: hidden; transition: width 0.4s var(--ease-out), background 0.3s; }
.car-dots button[aria-current="true"] { width: 48px; background: color-mix(in srgb, var(--blue) 22%, var(--line)); }
.car-dots .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); border-radius: inherit; }

/* Universities ribbon */
.unis { margin-top: 20px; padding: 22px 0; overflow: hidden; }
.unis > p { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 16px; padding: 0 16px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
.mq-group { display: flex; gap: 14px; }
.uni-chip { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: var(--r-pill); background: var(--bg); white-space: nowrap; font-weight: 600; }
.uni-chip b { width: 36px; height: 36px; border-radius: calc(12px * var(--round)); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.uni-chip small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
/* the motion-off rules in base.css shorten animations; infinite ones must stop instead */
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { overflow-x: auto; } }
[data-motion="off"] .marquee-track { animation: none; }
[data-motion="off"] .marquee { overflow-x: auto; }

/* Icon tiles on feature cards */
.card-icon { width: 52px; height: 52px; border-radius: calc(16px * var(--round)); display: grid; place-items: center; background: var(--tint, var(--tint-blue)); color: var(--blue); }
.card-icon svg { width: 26px; height: 26px; }
.card.main .card-icon { background: color-mix(in srgb, #fff 20%, transparent); color: #fff; }

/* Polaroid photo in the survey panel */
.polaroid { margin: 32px 0 0; width: min(300px, 80%); padding: 10px 10px 14px; background: #fff; border-radius: 6px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.45); transform: rotate(-4deg); transition: transform 0.5s var(--ease-pop); }
.polaroid:hover { transform: rotate(-1deg) scale(1.02); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.polaroid figcaption { margin-top: 8px; text-align: center; font: 600 22px/1.1 var(--font-hand); color: #3a3f4b; }

/* Footer */
.site-footer { margin-top: 20px; padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 24px; }
.site-footer p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 36ch; }
.site-footer h4 { font-size: 15px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-footer ul a { color: var(--muted); text-decoration: none; }
.site-footer ul a:hover { color: var(--blue); }
.site-footer .credits { grid-column: 1 / -1; max-width: none; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.site-footer .credits a, .site-footer .legal a { color: inherit; }
.site-footer .legal { grid-column: 1 / -1; max-width: none; margin-top: 0; font-size: 13px; }

/* Tariffs page */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 900px; }
.plan p.price { font-size: clamp(36px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; color: inherit; opacity: 1; }
.plan .price small { font-size: 17px; font-weight: 600; opacity: 0.75; }
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.plan .btn { align-self: flex-start; margin-top: auto; }
.card.main.plan { grid-row: auto; justify-content: flex-start; gap: 14px; }
.card.main.plan .btn { background: #fff; color: #1f2430; border-color: #fff; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* Legal pages: offer and privacy policy */
.doc { max-width: 820px; padding: clamp(24px, 5vw, 56px); margin-top: 24px; }
.doc h1 { font-size: clamp(28px, 3.6vw, 40px); }
.doc h2 { font-size: 21px; margin: 32px 0 10px; }
.doc > :first-child { margin-top: 0; }
.doc p, .doc li { line-height: 1.6; }
.doc p + p, .doc ul, .doc ol { margin-top: 10px; }
.doc .muted { color: var(--muted); }

/* Sign in, sign up and other account pages (templates/allauth, templates/account) */
.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; }

@media (max-width: 1000px) { .deco.stamp-round { display: none; } }
@media (max-width: 900px) {
  .sched, .report, .survey, .bento, .gost { grid-template-columns: minmax(0, 1fr); }
  .sch-card { min-height: 0; }
  .desk .sch-list { max-height: none; overflow: visible; }
  .desk { padding-inline: 0; }
  .deco.note { left: auto; right: -2%; bottom: -10px; width: 150px; font-size: 21px; }
  .card.main { grid-row: auto; }
  .slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: 220px auto; height: auto; }
  .slide figure { order: -1; padding: 14px 14px 0; }
  .slide .badge { left: 24px; bottom: -14px; }
  .slide-text { padding-top: 44px; }
  .site-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer > div:first-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .demo { max-width: 420px; }
}
@media (max-width: 520px) {
  .chips { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
  .chips li { position: static; font-size: 13px; }
  .sheet { width: 80%; }
  .deco.pencil, .deco.stamp-round { display: none; }
}

/* Big statement: words light up as it scrolls through the screen (site.js) */
.lit { max-width: 20ch; margin: clamp(80px, 16vh, 180px) auto; text-align: center; font-size: clamp(32px, 5vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; text-wrap: balance; }
.lit span { color: color-mix(in srgb, var(--ink) 16%, transparent); transition: color 0.35s; }
.lit span.on { color: var(--ink); }

/* 3D scroll story (scene.js): a tall section with a pinned full-width canvas, captions swap as the story moves */
/* full-width scene and hero props bleed past the edges; never let them widen the page */
html { overflow-x: clip; }
.scene { position: relative; height: 420vh; width: 100vw; margin-left: calc(50% - 50vw); }
.scene-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the page colour fades in behind the captions so they stay readable over the paper */
.scene-sticky::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--bg) 18%, color-mix(in srgb, var(--bg) 70%, transparent) 36%, transparent 52%); }
.scene-steps, .scene-note { z-index: 1; }
.scene-steps { position: absolute; left: max(16px, calc(50vw - 560px)); top: 50%; transform: translateY(-50%); width: min(440px, 38vw); list-style: none; margin: 0; padding: 0; display: grid; }
.scene-step { grid-area: 1 / 1; opacity: 0; transform: translateY(28px); transition: opacity 0.5s, transform 0.7s var(--ease-out); }
.scene-step.on { opacity: 1; transform: none; }
.scene-step small { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); }
.scene-step h3 { font-size: clamp(30px, 4vw, 54px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.scene-step p { margin-top: 16px; font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 36ch; }
.scene-note { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 13px; color: var(--muted); white-space: nowrap; }
/* no WebGL: the captions as a plain list */
.scene.flat { height: auto; width: auto; margin-left: 0; }
.scene.flat .scene-sticky { position: static; height: auto; padding: 48px 8px; }
.scene.flat canvas, .scene.flat .scene-note { display: none; }
.scene.flat .scene-steps { position: static; transform: none; width: auto; gap: 40px; }
.scene.flat .scene-step { grid-area: auto; opacity: 1; transform: none; }
/* animations off: one screen with the finished work */
[data-motion="off"] .scene { height: 100vh; }
@media (prefers-reduced-motion: reduce) { .scene { height: 100vh; } }
@media (max-width: 760px) {
  .scene-steps { left: 16px; right: 16px; width: auto; top: auto; bottom: 48px; transform: none; }
  .scene-sticky::after { background: linear-gradient(0deg, var(--bg) 22%, color-mix(in srgb, var(--bg) 70%, transparent) 38%, transparent 55%); }
  .scene-step h3 { font-size: 28px; }
  .scene-step p { font-size: 15px; margin-top: 8px; }
  .scene-step small { margin-bottom: 8px; }
}

/* Carousel slides turn towards the pointer (site.js sets --rx/--ry) */
[data-tilt] { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease-out); }
