/*
 * Клео Школа — the lessons, each a long read.
 *
 * It sits on the landing's own stylesheet (header, footer, buttons, tokens)
 * and adds an editorial voice on top: Playfair Display for headlines and
 * asides, Inter for everything you read in full. The illustrations are
 * flat plates with a real alpha channel (the paper is cut out), so they sit
 * on the page's own ground and no picture shows a rectangle or flashes white
 * while a reveal animation composites it in its own layer.
 * The lessons are scoped by the sv- prefix, the school's menu by shk-: the
 * landing's stylesheet already has .sk (its demo skeleton), so not that.
 */

@font-face {
  font-family: "Playfair Vendored";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/playfair-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Vendored";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/playfair-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Playfair Vendored";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/playfair-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Vendored";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/playfair-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Playfair Vendored";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/playfair-cyrillic-400i.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Vendored";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/playfair-latin-400i.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

.sv {
  --serif: "Playfair Vendored", "Playfair Display", Georgia, "Times New Roman", serif;
  --wash: #f3efe6;
  --indigo: #3c3f8c;
  --violet-wash: #e9e5fb;
  /* The app's own chat: the user's message on this beige, code in this mono. */
  --bubble: #ebe7dd;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --plus: #2f8a3e;
  --minus: #c4314b;
  --err: #c2410c;
  --col: 40rem;
  --wide: 64rem;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

/* ---- reading progress -------------------------------------------------- */

.sv-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 50;
  pointer-events: none;
}

.sv-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---- the rail of rule numbers, wide screens only ------------------------ */

.sv-rail {
  display: none;
}

@media (min-width: 78rem) {
  .sv-rail {
    position: fixed;
    top: 50%;
    right: clamp(1rem, 2.5vw, 2.5rem);
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .sv-rail.is-on {
    opacity: 1;
  }

  .sv-rail a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    font: 600 0.72rem/1 "Inter Vendored", Inter, sans-serif;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    text-decoration: none;
    padding: 0.25rem 0;
  }

  .sv-rail a::after {
    content: "";
    width: 1rem;
    height: 1px;
    background: currentColor;
    transition: width 0.3s var(--ease), background-color 0.3s;
  }

  .sv-rail a:hover,
  .sv-rail a.is-here {
    color: var(--accent);
  }

  .sv-rail a.is-here::after {
    width: 2.25rem;
    height: 2px;
  }

  .sv-rail a.is-done:not(.is-here) {
    color: var(--ink-2);
  }
}

/* ---- the column ------------------------------------------------------- */

.sv-main {
  padding: 0 clamp(16px, 4vw, 3rem);
  overflow-x: clip;
}

.sv [hidden] {
  display: none !important;
}

.sv-main > *,
.sv-rule > * {
  max-width: var(--col);
  margin-left: auto;
  margin-right: auto;
}

.sv-main > .sv-rule,
.sv-main > .sv-plate--hero,
.sv-main > .sv-toc,
.sv-rule > .sv-demo,
.sv-rule > .sv-split,
.sv-rule > .sv-frame,
.sv-rule > .sv-tower,
.sv-main > .sv-sheet {
  max-width: var(--wide);
}

/* ---- the school's menu -------------------------------------------------- */
/*
 * Written into every lesson from the list in web/shkola_test.go. On a wide
 * screen it is a column on the left that stays in view; narrower, it folds
 * into one bar under the header, opened by a checkbox so it needs no script.
 * The rail of rule numbers is on the right; where it shows, the column
 * beside the menu keeps clear of it (below).
 */

.shk-menu {
  margin: 0.75rem clamp(16px, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--rule);
}

.shk-open {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shk-bar {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  cursor: pointer;
  user-select: none;
}

.shk-bar::after {
  content: "";
  align-self: center;
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border: solid var(--ink-2);
  border-width: 0 2px 2px 0;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.shk-open:checked + .shk-bar::after {
  transform: translateY(15%) rotate(-135deg);
}

.shk-open:focus-visible + .shk-bar {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shk-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  white-space: nowrap;
}

.shk-bar-here {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.shk-list {
  display: none;
  padding-bottom: 1.25rem;
}

.shk-open:checked ~ .shk-list {
  display: block;
}

.shk-brand--side {
  display: none;
}

.shk-group {
  margin: 1rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.shk-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shk-list li a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.85rem;
  border-left: 2px solid var(--rule-weak);
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
}

.shk-list li a:hover {
  color: var(--accent-deep);
  border-left-color: var(--rule);
}

.shk-list li a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--accent);
}

.shk-install {
  display: inline-flex;
  margin-top: 1.5rem;
  white-space: nowrap;
  padding: 0.7rem 1.15rem;
  font-size: 0.9rem;
}

/* The column only from 72rem: narrower, the menu would take the room the rule
 * numbers hang into, left of each rule, and the column would clip them. */
@media (min-width: 72rem) {
  .shk {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    align-items: start;
  }

  .shk-menu {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 2rem clamp(16px, 3vw, 2.5rem);
    border-bottom: 0;
  }

  .shk-open,
  .shk-bar {
    display: none;
  }

  .shk-list {
    display: block;
    padding: 0;
  }

  .shk-brand--side {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
  }
}

/* Where the rail shows, the menu has taken the room the column used to
 * centre its wide demos in, and they would run under the rail's numbers. The
 * column keeps clear of it: the rail's inset, plus its widest link (a
 * number, the gap and the current rule's line) and some air. */
@media (min-width: 78rem) {
  .sv-rail ~ .shk .sv-main {
    padding-right: calc(clamp(1rem, 2.5vw, 2.5rem) + 5rem);
  }
}

/* ---- opening ---------------------------------------------------------- */

.sv-hero {
  max-width: 52rem !important;
  text-align: center;
  padding-top: clamp(3.5rem, 9vw, 7rem);
}

.sv-hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 10.5vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.sv-dek {
  max-width: 30ch;
  margin: 1.75rem auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-2);
  text-wrap: balance;
}

/* ---- watercolour plates ------------------------------------------------ */

.sv-plate {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0;
}

.sv-plate img,
.sv-focus-pic img,
.sv-tower-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.sv-plate figcaption,
.sv-tower figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 46ch;
}

.sv-plate figcaption b,
.sv-tower figcaption b {
  color: var(--ink-2);
  font-weight: 600;
}

.sv-plate--hero figcaption {
  margin-top: -0.5rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---- prose ------------------------------------------------------------ */

.sv-prose p {
  margin: 0 0 1.1rem;
  font-size: 1.12rem;
  line-height: 1.68;
  color: #2a2926;
}

.sv-intro {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.sv-drop::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 4.6em;
  line-height: 0.8;
  margin: 0.08em 0.1em 0 0;
  color: var(--accent);
}

.sv-aside {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.42rem !important;
  line-height: 1.4 !important;
  color: var(--indigo) !important;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  margin: 1.75rem 0 !important;
}

/* ---- contents --------------------------------------------------------- */

.sv-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding: 1.5rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 46rem) {
  .sv-toc {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.sv-toc-label {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sv-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc calc(var(--start, 1) - 1);
}

.sv-toc ol[start="5"] { --start: 5; }
.sv-toc ol[start="7"] { --start: 7; }
.sv-toc ol[start="9"] { --start: 9; }

.sv-toc li {
  counter-increment: toc;
  display: flex;
  gap: 0.65rem;
  padding: 0.3rem 0;
  line-height: 1.35;
}

.sv-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--serif);
  font-weight: 700;
  color: var(--accent);
  min-width: 1.4rem;
}

.sv-toc a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s;
}

.sv-toc a:hover {
  color: var(--accent-deep);
  background-size: 100% 1px;
}

/* A part with no numbered rules lists its sections in a <ul>, each marked
   with a dash where a rule would have its number. */
.sv-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-toc ul li {
  counter-increment: none;
}

.sv-toc ul li::before {
  content: "—";
}

/* ---- parts ------------------------------------------------------------ */

.sv-part {
  text-align: center;
  margin-top: clamp(5rem, 12vw, 9rem) !important;
  margin-bottom: clamp(1rem, 3vw, 2rem) !important;
}

.sv-part p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.sv-part h2 {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.sv-part::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin: 1.5rem auto 0;
  background: var(--accent);
}

/* ---- a rule ----------------------------------------------------------- */

.sv-rule {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: 2rem;
}

.sv-rule-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sv-num {
  flex: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.75rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  letter-spacing: -0.02em;
}

.sv-rule-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

@media (min-width: 62rem) {
  .sv-rule-head {
    position: relative;
  }

  .sv-num {
    position: absolute;
    right: calc(100% + 1.5rem);
    top: 0.1em;
  }
}

/* Text beside a picture, from a tablet up. */
.sv-split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .sv-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .sv-split .sv-prose {
    padding-left: clamp(0rem, 6vw, 5rem);
  }

  .sv-split--flip .sv-prose {
    order: 0;
  }
}

.sv-split .sv-plate {
  margin-top: 0;
}

/* ---- the frame of a demo ---------------------------------------------- */

.sv-demo {
  position: relative;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(20, 20, 19, 0.03), 0 18px 40px -28px rgba(20, 20, 19, 0.35);
}

.sv-demo-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule-weak);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.sv-demo-label span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.sv-demo-foot {
  margin: 1.1rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.sv-demo-foot b {
  color: var(--ink);
}

/* segmented control */
.sv-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  background: var(--wash);
  border-radius: 999px;
}

.sv-seg button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.sv-seg button:hover {
  color: var(--ink);
}

.sv-seg button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--accent-deep);
  box-shadow: 0 1px 3px rgba(20, 20, 19, 0.14);
}

.sv-seg--wide {
  border-radius: 14px;
}

.sv-seg--wide button {
  border-radius: 10px;
  text-align: left;
}

button:focus-visible,
[tabindex]:focus-visible,
.sv-toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sv-link {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ---- 01: two beginnings ------------------------------------------------ */

.sv-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 13.5rem;
}

.sv-msg {
  margin: 0;
  max-width: 34rem;
  padding: 0.8rem 1.05rem;
  font-size: 0.98rem;
  line-height: 1.6;
  border-radius: 16px;
}

.sv-msg p,
.sv-msg ol {
  margin: 0;
}

.sv-msg ol {
  padding-left: 1.3rem;
  margin: 0.35rem 0;
}

.sv-msg--me {
  align-self: flex-end;
  background: var(--bubble);
  color: var(--ink);
  border-radius: 12px;
}

.sv-msg--agent {
  align-self: flex-start;
  max-width: 40rem;
  padding: 0.15rem 0;
  background: none;
  border-radius: 0;
}

.sv-chat.is-in .sv-msg {
  animation: sv-rise 0.5s var(--ease) both;
}

.sv-chat.is-in .sv-msg--agent {
  animation-delay: 0.35s;
}

@keyframes sv-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.sv-guess {
  position: relative;
  color: inherit;
  background: linear-gradient(transparent 58%, rgba(62, 27, 218, 0.2) 58%);
  padding: 0 0.05em;
  border-radius: 2px;
  cursor: help;
  transition: background-color 0.2s;
}

.sv-chat.is-in .sv-guess {
  background-size: 0 100%;
  background-repeat: no-repeat;
  animation: sv-mark 0.5s var(--ease) both;
  animation-delay: calc(0.85s + var(--i, 0) * 0.16s);
}

@keyframes sv-mark {
  to { background-size: 100% 100%; }
}

.sv-guess::after {
  content: "Догадка: вы этого не говорили";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translate(-50%, 4px);
  white-space: nowrap;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 2;
}

.sv-guess:hover::after,
.sv-guess:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sv-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.sv-dots {
  display: inline-flex;
  gap: 0.3rem;
}

.sv-dots i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.sv-tally[data-mode="talk"] .sv-dots i {
  background: transparent;
  transform: scale(0.8);
}

.sv-tally b {
  color: var(--ink);
}

/* ---- 02: the typewriter ------------------------------------------------ */

.sv-typer {
  margin-top: 1.5rem;
}

.sv-typer-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.sv-typer-line {
  margin: 0 !important;
  min-height: 1.6em;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  color: var(--ink) !important;
}

.sv-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: sv-blink 1s steps(1) infinite;
}

@keyframes sv-blink {
  50% { opacity: 0; }
}

/* ---- 03: focus --------------------------------------------------------- */

.sv-focus {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 52rem) {
  .sv-focus {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.25rem;
    align-items: start;
  }
}

.sv-focus-pic {
  position: relative;
  overflow: hidden;
}

.sv-focus-pic img {
  filter: blur(var(--blur, 14px)) saturate(var(--sat, 0.4));
  opacity: var(--op, 0.55);
  transform: scale(1.03);
  transition: filter 0.9s var(--ease), opacity 0.9s var(--ease);
}

.sv-focus-meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sv-focus-meter b {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: 0;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.sv-focus-meter::after {
  content: none;
}

.sv-focus-pic::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 0.4rem;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--fill, 20%) 100% no-repeat, var(--rule-weak);
  transition: background-size 0.9s var(--ease);
}

.sv-request {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--bubble);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sv-request p {
  margin: 0;
}

.sv-request p + p {
  margin-top: 0.45rem;
}

.sv-request p:not(.sv-request-base) {
  animation: sv-rise 0.45s var(--ease) both;
}

.sv-request .sv-file {
  background: var(--paper);
}

.sv-file {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.3rem 0.35rem 0 0;
  padding: 0.12rem 0.55rem 0.12rem 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--wash);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.sv-file::before {
  content: "";
  width: 0.62rem;
  height: 0.8rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
  clip-path: polygon(0 0, 65% 0, 100% 30%, 100% 100%, 0 100%);
}

.sv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sv-chips button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1.5px dashed var(--accent);
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.sv-chips button:hover {
  background: var(--violet-wash);
}

.sv-chips button[aria-pressed="true"] {
  border-style: solid;
  background: var(--accent);
  color: #fff;
}

/* ---- 04: words against a sample ---------------------------------------- */

.sv-versus {
  display: grid;
  gap: 1rem;
}

@media (min-width: 46rem) {
  .sv-versus {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.sv-vs {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem;
  border-radius: 10px;
  background: var(--wash);
}

.sv-vs--show {
  background: var(--violet-wash);
}

.sv-vs-title {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}

.sv-vs-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.sv-vs--show .sv-vs-text {
  color: var(--ink);
}

.sv-vs-attach {
  margin: 0.4rem 0 0;
}

.sv-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 1rem;
}

.sv-ticks i {
  width: 5px;
  height: 14px;
  border-radius: 1px;
  background: var(--ink-3);
  opacity: 0.55;
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 22ms);
}

.sv-vs--show .sv-ticks i {
  background: var(--accent);
  opacity: 0.85;
}

.sv-ticks i.sv-tick-file {
  width: 14px;
  background: var(--accent);
  opacity: 1;
  clip-path: polygon(0 0, 65% 0, 100% 30%, 100% 100%, 0 100%);
}

.is-seen .sv-ticks i {
  transform: scaleY(1);
}

.sv-vs-foot {
  margin: 0.6rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-2);
}

.sv-vs-foot b {
  color: var(--ink);
}

/* ---- 05: skeleton ------------------------------------------------------ */

.sv-frame {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .sv-frame {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

.sv-frame .sv-plate {
  margin-top: 0;
}

.sv-plate--tall img {
  max-height: 34rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.sv-plate--tall figcaption {
  margin-left: auto;
  margin-right: auto;
}

.sv-steps {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.sv-steps li {
  flex: 1;
}

.sv-steps button {
  width: 100%;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 0.5rem;
  border: 0;
  border-top: 3px solid var(--rule);
  background: none;
  color: var(--ink-3);
  text-align: left;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.sv-steps button b {
  font-family: var(--serif);
  margin-right: 0.25rem;
}

.sv-steps button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--ink);
}

.sv-steps button.is-past {
  border-color: rgba(62, 27, 218, 0.35);
  color: var(--ink-2);
}

.sv-doc {
  position: relative;
  padding: 1.4rem 1.5rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box;
  box-shadow: 6px 6px 0 -1px var(--wash), 6px 6px 0 0 var(--rule);
  min-height: 21rem;
}

.sv-doc-title {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
}

.sv-doc-sections {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-doc-sections li {
  position: relative;
  padding: 0.5rem 0 0.5rem 0.9rem;
  border-left: 2px solid var(--accent);
  margin-bottom: 0.5rem;
  transition: transform 0.6s var(--ease), opacity 0.4s, border-color 0.4s;
}

.sv-doc-sections span {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.sv-doc-sections i {
  display: block;
  height: 6px;
  margin-top: 0;
  border-radius: 3px;
  background: var(--rule-weak);
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s var(--ease), margin-top 0.5s var(--ease), opacity 0.5s;
}

.sv-doc-sections i:nth-of-type(2) { width: 92%; }
.sv-doc-sections i:nth-of-type(3) { width: 64%; }

.sv-doc[data-stage="3"] .sv-doc-sections i {
  max-height: 6px;
  margin-top: 7px;
  opacity: 1;
  background: linear-gradient(90deg, #d9d4ef, #ece9f7);
}

.sv-doc-sections li.is-new {
  display: none;
}

.sv-doc[data-stage="2"] .sv-doc-sections li.is-new,
.sv-doc[data-stage="3"] .sv-doc-sections li.is-new {
  display: block;
  animation: sv-rise 0.5s var(--ease) both;
  animation-delay: 0.45s;
}

.sv-doc[data-stage="2"] .sv-doc-sections li.is-new {
  border-left-style: dashed;
  background: var(--violet-wash);
}

.sv-doc-note {
  position: absolute;
  right: -0.5rem;
  top: 0.9rem;
  max-width: 15rem;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 12px 12px 3px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-6px) rotate(1.5deg);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.sv-doc[data-stage="2"] .sv-doc-note {
  opacity: 1;
  transform: rotate(1.5deg);
}

@media (max-width: 40rem) {
  .sv-doc-note {
    position: static;
    max-width: none;
    margin-top: 0.5rem;
    display: none;
  }

  .sv-doc[data-stage="2"] .sv-doc-note {
    display: block;
  }
}

/* ---- 06: the tower ---------------------------------------------------- */

.sv-tower {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0;
}

@media (min-width: 46rem) {
  .sv-tower {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
  }
}

.sv-tower-stage {
  position: relative;
  max-width: 19rem;
  width: 100%;
  margin: 0 auto;
}

.sv-tower-frames img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.sv-tower-frames img.is-on {
  opacity: 1;
}

.sv-tower-stage > img.is-under {
  opacity: 1;
}

.sv-tower-date {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}

.sv-tower-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --pct: 0%;
}

.sv-tower-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--pct) 100% no-repeat, var(--rule);
}

.sv-tower-range::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
}

.sv-tower-range::-moz-range-progress {
  height: 3px;
  background: var(--accent);
}

.sv-tower-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px rgba(20, 20, 19, 0.2);
}

.sv-tower-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.sv-tower-scale {
  position: relative;
  height: 2.1rem;
  margin: 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.sv-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.sv-play:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.sv-play span {
  font-size: 0.7rem;
  color: var(--accent);
}

.sv-tower figcaption {
  margin-top: 1.5rem;
  max-width: 36ch;
  font-size: 0.9rem;
}

/* ---- 06: what an error costs ------------------------------------------ */

.sv-cost {
  display: grid;
  gap: 1.5rem;
}

.sv-cost-row {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 46rem) {
  .sv-cost-row {
    grid-template-columns: 11rem minmax(0, 1fr) 7.5rem;
    align-items: center;
    gap: 1.25rem;
  }
}

.sv-cost-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
}

.sv-cost-name span {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.sv-cost-track {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sv-cost-track button {
  position: relative;
  flex: 1;
  height: 2.6rem;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #d9d6ea;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), transform 0.2s;
  transition-delay: calc(var(--d, 0) * 45ms);
}

.sv-cost-track button:hover {
  transform: translateY(-2px);
}

.sv-cost-track button.is-redo {
  background: repeating-linear-gradient(-45deg, rgba(194, 65, 12, 0.85) 0 4px, rgba(194, 65, 12, 0.35) 4px 8px);
}

.sv-cost-track button.is-err {
  background: var(--err);
}

.sv-cost-track button span {
  position: absolute;
  inset: auto 0 -1.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-3);
  text-align: center;
}

.sv-check {
  flex: none;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: var(--accent);
  border-radius: 1px;
}

.sv-check.is-ghost {
  visibility: hidden;
}

.sv-cost-sum {
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

@media (min-width: 46rem) {
  .sv-cost-sum {
    margin: 0;
  }
}

.sv-cost-sum b {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--err);
  margin-right: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.sv-cost-row[data-row="steps"] .sv-cost-sum b {
  color: var(--accent);
}

.sv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-weak);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sv-k {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

.sv-k--ok { background: #d9d6ea; }
.sv-k--err { background: var(--err); }
.sv-k--redo { background: repeating-linear-gradient(-45deg, rgba(194, 65, 12, 0.85) 0 3px, rgba(194, 65, 12, 0.35) 3px 6px); }
.sv-k--check { width: 9px; height: 9px; transform: rotate(45deg); background: var(--accent); }

/* ---- 07: proofreading -------------------------------------------------- */

.sv-proof {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .sv-proof {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.sv-memo {
  padding: 1.25rem 1.4rem;
  background: #fdfcf8;
  box-shadow: inset 3px 0 0 rgba(194, 65, 12, 0.18);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 1.02rem;
  line-height: 1.85;
}

.sv-memo p {
  margin: 0 0 0.6rem;
}

.sv-memo-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
}

.sv-spot {
  position: relative;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.sv-spot:hover {
  background: var(--violet-wash);
}

.sv-spot.is-ok {
  background: transparent;
  text-decoration: underline wavy rgba(60, 63, 140, 0.35);
  text-underline-offset: 0.25em;
}

/* the red pencil */
.sv-spot.is-found {
  background: transparent;
  color: var(--err);
}

.sv-spot.is-found::before {
  content: "";
  position: absolute;
  inset: -0.25em -0.45em;
  border: 2px solid var(--err);
  border-radius: 50% 45% 55% 48% / 60% 50% 55% 45%;
  transform: rotate(-2deg);
  animation: sv-circle 0.5s var(--ease) both;
  pointer-events: none;
}

.sv-spot.is-found::after {
  content: attr(data-n);
  position: absolute;
  top: -0.9em;
  right: -0.9em;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: var(--err);
  color: #fff;
  font: 700 0.7rem/1.3em "Inter Vendored", Inter, sans-serif;
  text-align: center;
}

@keyframes sv-circle {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.sv-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sv-notes li {
  position: relative;
  padding: 0.75rem 0.9rem 0.75rem 2.4rem;
  border-left: 2px solid var(--err);
  background: #fbf3ee;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: sv-rise 0.4s var(--ease) both;
}

.sv-notes li::before {
  content: attr(data-n);
  position: absolute;
  left: 0.75rem;
  top: 0.8rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--err);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
}

.sv-notes li b {
  display: block;
  color: var(--err);
}

.sv-proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
}

.sv-proof-count {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.sv-proof-count b {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--err);
}

.sv-proof-miss {
  margin: 0;
  font-size: 0.86rem;
  color: var(--indigo);
  font-style: italic;
}

.sv-proof-bar .sv-link {
  margin-left: auto;
}

.sv-proof.is-done + .sv-proof-bar .sv-proof-count::after {
  content: " — все на месте";
}

/* ---- 08: a precise fix -------------------------------------------------- */

.sv-draft {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fdfcf8;
}

.sv-map {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sv-map i {
  flex: var(--h, 1);
  border-radius: 3px;
  background: var(--rule-weak);
  transition: background-color 0.4s, flex 0.6s var(--ease);
}

.sv-map i.is-changed {
  background: var(--accent);
}

.sv-paras p {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.65;
  border-radius: 3px;
  transition: background-color 0.6s;
}

.sv-paras p:last-child {
  margin-bottom: 0;
}

.sv-paras p.is-changed {
  background: linear-gradient(transparent 0, transparent) , rgba(62, 27, 218, 0.07);
  box-shadow: -0.5rem 0 0 rgba(62, 27, 218, 0.07), 0.5rem 0 0 rgba(62, 27, 218, 0.07);
  animation: sv-fade 0.6s var(--ease) both;
}

.sv-paras p.is-changed:nth-child(2) { animation-delay: 0.12s; }
.sv-paras p.is-changed:nth-child(3) { animation-delay: 0.24s; }

@keyframes sv-fade {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: none; }
}

/* ---- cheat sheet -------------------------------------------------------- */

.sv-sheet {
  margin-top: clamp(5rem, 12vw, 8rem) !important;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
}

.sv-sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 254, 252, 0.18);
}

.sv-sheet h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3rem);
}

.sv-sheet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sheet;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2.5rem;
}

@media (min-width: 46rem) {
  .sv-sheet-list {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
  }
}

.sv-sheet-list li {
  counter-increment: sheet;
  position: relative;
  padding: 0.95rem 0 0.95rem 2.25rem;
  border-bottom: 1px solid rgba(255, 254, 252, 0.1);
  font-size: 0.97rem;
  line-height: 1.5;
  color: rgba(255, 254, 252, 0.72);
}

.sv-sheet-list li::before {
  content: counter(sheet, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--serif);
  font-weight: 700;
  color: #a99bff;
}

.sv-sheet-list b {
  color: var(--paper);
  font-weight: 600;
}

/* ---- the end ------------------------------------------------------------ */

.sv-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin-top: clamp(3rem, 7vw, 4.5rem) !important;
  text-align: center;
  color: var(--ink-2);
}

.sv-end p {
  margin: 0;
  max-width: 34ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
}

.sv-sources {
  margin-top: clamp(3.5rem, 8vw, 5rem) !important;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.sv-sources p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.sv-sources b {
  color: var(--ink-2);
}

/* ---- arrivals ------------------------------------------------------------ */

.sv-js .sv-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.sv-js .sv-reveal.is-seen {
  opacity: 1;
  transform: none;
}

.sv-js .sv-plate.sv-reveal img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s var(--ease);
}

.sv-js .sv-plate.sv-reveal.is-seen img {
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .sv-js .sv-reveal,
  .sv-js .sv-plate.sv-reveal img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }

  .sv *,
  .sv *::before,
  .sv *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

.sv-tower-scale i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 6px;
  background: var(--ink-3);
  opacity: 0.6;
}

.sv-tower-scale span {
  position: absolute;
  top: 0.65rem;
  transform: translateX(-50%);
}

.sv-tower-scale span:first-of-type {
  transform: none;
  margin-left: -10px;
}

.sv-notes-empty {
  border-left-color: var(--rule) !important;
  background: transparent !important;
  padding-left: 0.9rem !important;
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1rem !important;
}

.sv-notes-empty::before {
  content: none !important;
}

/* ---- phones ------------------------------------------------------------- */

@media (max-width: 40rem) {
  .sv-seg {
    display: flex;
    width: 100%;
    border-radius: 14px;
  }

  .sv-seg button {
    flex: 1 1 0;
    padding: 0.55rem 0.5rem;
    font-size: 0.84rem;
    border-radius: 10px;
  }

  .sv-seg--wide {
    flex-direction: column;
  }

  .sv-tower-stage {
    max-width: 11.5rem;
  }

  .sv-plate--tall img {
    max-height: 22rem;
  }

  .sv-cost-track button {
    height: 2.1rem;
  }

  .sv-prose p {
    font-size: 1.05rem;
  }

  .sv-aside {
    font-size: 1.25rem !important;
  }
}

/* ======================================================================== */
/* Lessons beyond the first: their shared pieces.                          */
/* ======================================================================== */

.sv-main > .sv-demo {
  max-width: var(--wide);
}

.sv-main > .sv-flow {
  max-width: none;
}

.sv-flow > * {
  max-width: var(--col);
  margin-left: auto;
  margin-right: auto;
}

.sv-flow > .sv-rule {
  max-width: var(--wide);
}

.sv-h1--long {
  font-size: clamp(2.2rem, 6.6vw, 4.8rem) !important;
}

/* ---- splitting a task --------------------------------------------------- */

.sv-tree {
  display: grid;
  gap: 1.25rem;
  min-height: 12rem;
}

@media (min-width: 52rem) {
  .sv-tree {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 2.25rem;
    align-items: start;
  }
}

.sv-tree-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: opacity 0.4s;
}

.sv-tree[data-level="0"] [data-col="1"],
.sv-tree[data-level="0"] [data-col="2"],
.sv-tree[data-level="1"] [data-col="2"] {
  opacity: 0.35;
}

.sv-tree-head {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sv-node {
  position: relative;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.35;
  animation: sv-rise 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.sv-node--root {
  padding: 1.1rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.25rem;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

.sv-tree:not([data-level="0"]) .sv-node--root {
  opacity: 0.55;
}

.sv-node--part {
  background: var(--violet-wash);
  color: var(--accent-deep);
  border-left: 3px solid var(--accent);
}

.sv-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.75rem;
  border-left: 1px dashed var(--rule);
}

.sv-group + .sv-group {
  margin-top: 0.45rem;
}

.sv-node--step {
  padding: 0.4rem 0.7rem 0.4rem 1.8rem;
  background: var(--wash);
  font-weight: 500;
  font-size: 0.88rem;
}

.sv-node--step::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: -0.3rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.sv-tree-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--rule);
}

.sv-tree-btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.92rem;
}

.sv-tree-count {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.sv-tree-count b {
  color: var(--accent-deep);
}

/* ---- the project switch ------------------------------------------------- */

.sv-projects {
  position: sticky;
  top: 0.75rem;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem !important;
  padding: 0.35rem;
  width: max-content;
  max-width: 100% !important;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 254, 252, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px -18px rgba(20, 20, 19, 0.45);
}

.sv-projects::-webkit-scrollbar {
  display: none;
}

.sv-projects-label {
  flex: none;
  padding: 0 0.5rem 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sv-projects button {
  flex: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s;
}

.sv-projects button:hover {
  color: var(--ink);
}

.sv-projects button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

/* ---- say and check -------------------------------------------------------- */

.sv-sc {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}


.sv-sc-label {
  margin: 0 0 0.45rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* The phrase sits in a small chat panel, as a sent message does in the app. */
.sv-sc-say {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}

.sv-sc-say .sv-sc-label {
  align-self: flex-start;
  color: var(--accent);
}

.sv-sc-text {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--bubble);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 94%;
}

.sv-sc-then {
  font-size: 0.94rem;
}

.sv-sc-text.is-swap {
  animation: sv-swap 0.45s var(--ease) both;
}

@keyframes sv-swap {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---- the error report ----------------------------------------------------- */

.sv-report {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .sv-report {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 2rem;
    align-items: start;
  }
}

.sv-report-intro {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
}

.sv-report-chat {
  min-height: 0;
}

.sv-report-chat .sv-msg--me p + p {
  margin-top: 0.35rem;
}

.sv-report-chat [data-part-line]:not([data-part-line="base"]) {
  animation: sv-rise 0.4s var(--ease) both;
}

.sv-dots--four i {
  background: transparent;
  transform: scale(0.85);
}

.sv-dots--four i.is-on {
  background: var(--accent);
  transform: none;
}

/* ---- guardrails --------------------------------------------------------- */

.sv-guards {
  margin-top: clamp(4.5rem, 10vw, 7rem) !important;
  border-top: 2px solid var(--ink);
}

.sv-guards h2 {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--err);
}

.sv-guards dl {
  margin: 0;
}

.sv-guards dl > div {
  display: grid;
  gap: 0.2rem 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 40rem) {
  .sv-guards dl > div {
    grid-template-columns: 12rem 1fr;
  }
}

.sv-guards dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
}

.sv-guards dd {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #2a2926;
}

/* ---- previous and next lesson ------------------------------------------ */

.sv-next {
  display: grid;
  gap: 1rem;
  margin-top: clamp(3rem, 7vw, 4.5rem) !important;
}

@media (min-width: 40rem) {
  .sv-next {
    grid-template-columns: 1fr 1fr;
  }
}

.sv-next a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.sv-next a span {
  font-family: "Inter Vendored", Inter, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.sv-next a:hover {
  border-color: var(--accent);
  background: var(--paper);
}

.sv-next a.sv-next--fwd {
  align-items: flex-end;
  text-align: right;
}

.sv-next a.sv-next--fwd:only-child {
  grid-column: 1 / -1;
}

/* ======================================================================== */
/* Pieces of the app itself, so a demo looks like the agent it is about.  */
/* ======================================================================== */

/* A chat panel, as the app draws one. */
.sv-app {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
}

.sv-app-title {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

/* «Оболочка  команда …» — a step the agent took. */
.sv-tool {
  display: flex;
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sv-tool b {
  flex: none;
  font-weight: 600;
  color: var(--ink);
}

.sv-tool span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
}

.sv-code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.05em 0.35em;
  border-radius: 4px;
  border: 1px solid #e4e0d6;
  background: #f4f2ec;
  color: #2c1fa0;
  overflow-wrap: anywhere;
}

/* «Шагов: 2 · 0:41» */

/* «Изменённый файл: 1  +19 −0» and the file under it. */
.sv-change {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.sv-plus,
.sv-minus {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 0.4rem;
}

.sv-plus { color: var(--plus); }
.sv-minus { color: var(--minus); }

.sv-filerow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--rule-weak);
  border-radius: 8px;
  font-size: 0.86rem;
}

.sv-filerow span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
}

.sv-filerow span:first-child b {
  font-weight: 500;
  color: var(--ink);
}

/* The message box at the bottom of the chat. */
.sv-composer {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  padding: 0.75rem 0.9rem 0.5rem;
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04);
}

.sv-composer-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.sv-composer-bar .sv-model::before {
  content: "✧ ";
  color: var(--ink-3);
}

.sv-composer-bar .sv-model::after {
  content: " ⌄";
  color: var(--ink-3);
}

.sv-send {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  line-height: 1;
}

/* ======================================================================== */
/* Работа с документами (dokumenty).                                       */
/* ======================================================================== */

@media (min-width: 46rem) {
  .sv-sheet-list--six {
    grid-template-rows: repeat(3, auto);
  }
}

/* Основы carries the limit's rules too: fourteen lines, seven a column. */
@media (min-width: 46rem) {
  .sv-sheet-list--seven {
    grid-template-rows: repeat(7, auto);
  }
}

/* Основы with the limit and skills first: sixteen lines, eight a column. */
@media (min-width: 46rem) {
  .sv-sheet-list--eight {
    grid-template-rows: repeat(8, auto);
  }
}

.sv-msg--agent ul {
  margin: 0.35rem 0;
  padding-left: 1.2rem;
}

.sv-msg--agent p + p,
.sv-msg--agent ul + p {
  margin-top: 0.45rem;
}

.sv-verbs {
  margin-bottom: 1rem;
}

.sv-verb-chat {
  min-height: 15rem;
}

/* ---- the source check -------------------------------------------------- */

.sv-source {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .sv-source {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }
}

.sv-sheetfile {
  padding: 0.9rem 0.6rem 0.5rem;
  overflow-x: auto;
}

.sv-sheetfile .sv-app-title {
  margin-left: 0.5rem;
}

.sv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.sv-table th {
  padding: 0.4rem 0.6rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}

.sv-table td {
  padding: 0.6rem 0.6rem;
  border-bottom: 1px solid var(--rule-weak);
  white-space: nowrap;
}

.sv-table td:nth-child(2),
.sv-table th:nth-child(2) {
  text-align: right;
}

.sv-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s;
}

.sv-table tbody tr:hover {
  background: #f6f4ee;
}

.sv-table tbody tr.is-open {
  background: var(--violet-wash);
}

.sv-table tbody tr td:first-child::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  vertical-align: 0.05em;
}

.sv-table tbody tr.is-ok td:first-child::before {
  border-color: var(--plus);
  background: var(--plus);
}

.sv-table tbody tr.is-bad td:first-child::before {
  border-color: var(--err);
  background: var(--err);
}

.sv-table tbody tr.is-bad td:nth-child(2) {
  color: var(--err);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.sv-table .sv-code {
  font-size: 0.78rem;
}

/* the invoice, as a sheet of paper */
.sv-invoice {
  min-height: 13rem;
}

.sv-invoice-empty {
  margin: 0;
  padding: 1.25rem;
  border: 1.5px dashed var(--rule);
  border-radius: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-3);
}

.sv-invoice-doc {
  padding: 1.15rem 1.25rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #fdfcf8;
  box-shadow: 4px 4px 0 -1px var(--wash), 4px 4px 0 0 var(--rule);
}

.sv-invoice-doc.is-in {
  animation: sv-rise 0.4s var(--ease) both;
}

.sv-invoice-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sv-invoice-from {
  margin: 0.2rem 0 0.9rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
}

.sv-invoice-sum {
  margin: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.sv-invoice-sum div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px dotted var(--rule);
  border-radius: 3px;
}

.sv-invoice-sum dt {
  color: var(--ink-2);
}

.sv-invoice-sum dd {
  margin: 0;
  font-weight: 600;
}

.sv-invoice-sum div.is-taken {
  background: rgba(62, 27, 218, 0.08);
  box-shadow: inset 2px 0 0 var(--accent);
}

.sv-invoice-verdict {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.sv-invoice-verdict.is-ok { color: var(--plus); }
.sv-invoice-verdict.is-bad { color: var(--err); }

/* ---- a pile of two hundred -------------------------------------------- */

.sv-batch {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
  max-width: 34rem;
}

@media (max-width: 40rem) {
  .sv-batch {
    gap: 2px;
  }

  .sv-table th:nth-child(3),
  .sv-table td:nth-child(3) {
    display: none;
  }
}

.sv-batch i {
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  background: var(--rule-weak);
  transition: background-color 0.25s;
}

.sv-batch i.is-check { background: var(--accent); }
.sv-batch i.is-ok { background: #b9b2ea; }
.sv-batch i.is-bad { background: var(--err); }

.sv-change--in {
  margin-top: 0.7rem;
}

.sv-filerow .sv-plus {
  flex: none;
}

.sv-work {
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
}

/* how much of the plan's limit a way of working spends — schematic */
.sv-meter {
  max-width: 34rem;
  margin-top: 1rem;
}

.sv-meter-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sv-meter-label span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.sv-meter-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--rule-weak);
  overflow: hidden;
}

.sv-meter-bar i {
  display: block;
  height: 100%;
  width: var(--spent, 0%);
  background: var(--accent);
  transition: width 0.3s linear, background-color 0.3s;
}

.sv-meter-bar i.is-out {
  background: var(--err);
}

/* ======================================================================== */
/* Основы, parts IV and V: the limit and what leaves the computer.         */
/* ======================================================================== */

.sv-guards--plain {
  margin-top: clamp(2rem, 5vw, 3rem) !important;
}

.sv-guards--plain h2 {
  color: var(--accent-deep);
}

/* ---- the cost of each message ----------------------------------------- */

.sv-costbars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 6px;
  height: 13rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.sv-costbar {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  height: 100%;
}

.sv-costbar i {
  display: block;
  width: 100%;
  transition: height 0.6s var(--ease);
}

.sv-cb-new { background: var(--accent); border-radius: 0 0 2px 2px; }
.sv-cb-memo { background: #8fd0a0; }
.sv-cb-old { background: #c9c3ee; border-radius: 2px 2px 0 0; }

.sv-costbar span {
  position: absolute;
  bottom: -1.35rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-3);
}

.sv-costbar.is-split::before {
  content: "новый разговор";
  position: absolute;
  bottom: calc(100% - 1.5rem);
  left: -3px;
  padding-left: 0.4rem;
  border-left: 1.5px dashed var(--ink-3);
  height: 11.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-2);
  transform: translateY(100%);
  pointer-events: none;
}

.sv-k--new { background: var(--accent); }
.sv-k--old { background: #c9c3ee; }
.sv-k--memo { background: #8fd0a0; }

/* ---- what leaves the computer ----------------------------------------- */

.sv-dataflow {
  display: grid;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 46rem) {
  .sv-dataflow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.sv-df-box {
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--wash);
}

.sv-df-box--far {
  background: var(--violet-wash);
}

.sv-df-title {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
}

.sv-df-box ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.sv-df-wire {
  position: relative;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
}

.sv-df-out,
.sv-df-in {
  margin: 0;
  color: var(--ink-2);
}

.sv-df-out {
  font-weight: 600;
  color: var(--accent-deep);
}

.sv-df-arrow {
  display: block;
  height: 2px;
  margin: 0.6rem 0.5rem;
  background: linear-gradient(90deg, var(--accent) 0 50%, transparent 50%) 0 0 / 12px 2px repeat-x;
  position: relative;
}

.sv-df-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -4px;
  border: 5px solid transparent;
  border-left: 8px solid var(--accent);
  border-right: 0;
}

@media (max-width: 45.99rem) {
  .sv-df-arrow {
    width: 2px;
    height: 2rem;
    margin: 0.5rem auto;
    background: linear-gradient(var(--accent) 0 50%, transparent 50%) 0 0 / 2px 12px repeat-y;
  }

  .sv-df-arrow::after {
    right: auto;
    left: -4px;
    top: auto;
    bottom: -2px;
    border: 5px solid transparent;
    border-top: 8px solid var(--accent);
    border-bottom: 0;
  }
}

/* ======================================================================== */
/* Profession pages: a comparison table inside an answer, the block of      */
/* sample files to try the first task on, and a plain section heading.     */
/* ======================================================================== */

.shk-scroll {
  margin: 0.6rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.shk-diff {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.4;
}

.shk-diff th {
  padding: 0.35rem 0.6rem 0.35rem 0;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}

.shk-diff td {
  padding: 0.5rem 0.6rem 0.5rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-weak);
}

.shk-diff td:first-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

/* In a table of what changed, the last column says what it costs you. */
.shk-diff--risk td:last-child {
  color: var(--minus);
}

.shk-try {
  margin-top: 1.75rem !important;
  padding: 1.25rem 1.4rem;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  background: var(--paper);
}

.shk-try p {
  margin: 0;
}

.shk-try p + p {
  margin-top: 0.6rem;
}

.shk-try-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.shk-try-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 0.4rem;
}

.shk-try-files .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
}

.shk-h2 {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.15;
}

.sv-guards dd a,
.sv-prose p a {
  color: var(--accent-deep);
  text-underline-offset: 0.2em;
}

/* A table in an answer scrolls inside the bubble on a phone, rather than
 * widening it past the chat and being clipped by the column. */
.sv-msg--agent:has(.shk-scroll) {
  align-self: stretch;
  min-width: 0;
}

/* ---- yurist: the tutorial's own pieces ----------------------------------- */

/* The starting block: the case in a paragraph, the four steps to the first
 * request, the download, and what is in the folder. */
.shk-try--start {
  margin-top: clamp(2rem, 5vw, 3rem) !important;
}

.shk-steps {
  margin: 0.9rem 0 0;
  padding-left: 1.4rem;
}

.shk-steps li {
  margin: 0.35rem 0;
}

.shk-steps a,
.shk-tree a {
  color: var(--accent-deep);
  text-underline-offset: 0.2em;
}

.shk-try .shk-try-files {
  margin-top: 0.9rem;
}

.shk-tree {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.shk-tree li {
  margin: 0.25rem 0;
}

.shk-tree b {
  font-weight: 600;
  color: var(--ink);
}

/* A file from the case folder, shown as the reader would see it in the panel. */
.shk-file {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  font-size: 0.95rem;
  line-height: 1.55;
}

.shk-file-label {
  margin: 0 0 0.6rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.shk-file-lead {
  margin: 0 0 0.5rem;
}

.shk-file ol {
  margin: 0;
  padding-left: 1.4rem;
}

.shk-file li {
  margin: 0.25rem 0;
}

/* The app itself at the end, outside the lesson's column so it can be as wide
 * as on the landing (.shot, styles.css). */
.shk-demo {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 0 var(--step);
}

.shk-demo .app-intro {
  margin-top: 0;
}
