.xs {
  --task-red: #b34850;
  --xs-tint: color-mix(in srgb, var(--main) 10%, transparent);
  --xs-ring: color-mix(in srgb, var(--main) 30%, transparent);
  text-align: left;
}
:root[data-theme="dark"] .xs { --task-red: #df888e; }

.xs-wide { padding: 0 24px; }
.xs-shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 1s var(--ease-out); }
.xs-shot--dark { display: none; }
:root[data-theme="dark"] .xs-shot--light { display: none; }
:root[data-theme="dark"] .xs-shot--dark { display: block; }

.sample__head.xs-head { flex: none; width: 100%; max-width: none; margin: 0; padding: 26px 24px 22px; }
.xs-head__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: end; }
.xs-head__copy { min-width: 0; }
.xs-head .crumbs { margin: 0 0 16px; font-size: 12px; }
.xs-head .crumbs ol { justify-content: flex-start; }
.home .xs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.xs-meta__n { margin-right: 4px; color: var(--main); font-size: 12.5px; font-weight: 600; font-variant-numeric: lining-nums proportional-nums; }
.xs-chip, .xs-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.xs-chip { background: var(--bg-secondary); color: var(--secondary); }
.xs-tag { background: var(--xs-tint); color: var(--main); }
.home.xs-head h1 { max-width: none; margin: 0 0 12px; color: var(--text); font-size: clamp(32px, 3.6vw, 52px); font-weight: 500; line-height: 1.04; letter-spacing: -.045em; text-align: left; text-wrap: balance; }
.home.xs-head h1 span { display: block; margin-top: 6px; color: var(--secondary); font-size: .42em; font-weight: 400; letter-spacing: -.01em; }
.home.xs-head .lead { max-width: 64ch; margin: 0; color: var(--secondary); font-size: 15.5px; line-height: 1.65; text-align: left; }
.xs-glance { display: flex; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--home-surface); box-shadow: inset 0 1px 0 var(--glass-shine); }
.xs-glance div { min-width: 96px; padding: 12px 20px 14px; border-right: 1px solid var(--line); }
.xs-glance div:last-child { border-right: 0; }
.xs-glance dt { color: var(--secondary); font-size: 11.5px; }
.xs-glance dd { margin: 2px 0 0; color: var(--text); font-size: 30px; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: lining-nums proportional-nums; }
.xs-glance div:nth-child(2) dd { color: var(--task-red); }

.home.xs h2 { margin: 0; color: var(--text); font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1.1; letter-spacing: -.045em; text-wrap: balance; }
.xs .home-eyebrow { margin: 0 0 12px; }

.xs-tour { padding: clamp(64px, 7vw, 104px) 0; }
.xs-tour__head { max-width: 760px; margin-bottom: 32px; }
.home .xs-tour__hint { margin: 12px 0 0; color: var(--secondary); font-size: 15px; line-height: 1.6; }
.xs-chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: chapter; }
.home .xs-chapter { display: flex; flex-direction: column; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--home-surface); box-shadow: inset 0 1px 0 var(--glass-shine); counter-increment: chapter; transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.home .xs-chapter.is-active { border-color: color-mix(in srgb, var(--main) 45%, var(--line)); box-shadow: inset 0 1px 0 var(--glass-shine), 0 0 0 4px var(--xs-tint); }
.xs-chapter__n::before { content: counter(chapter, decimal-leading-zero); color: var(--main); font-size: 13px; font-weight: 600; font-variant-numeric: lining-nums proportional-nums; }
.home .xs-chapter h3 { margin: 10px 0 10px; color: var(--text); font-size: 18px; font-weight: 500; line-height: 1.35; letter-spacing: -.02em; }
.home .xs-chapter p { margin: 0 0 20px; color: var(--secondary); font-size: 14.5px; line-height: 1.75; text-wrap: pretty; }
.xs-try { align-self: flex-start; min-height: 40px; margin-top: auto; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-secondary); color: var(--link); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), color .25s var(--ease-out); }
.xs-try:hover { border-color: var(--border-hover); }
.xs-try[aria-pressed="true"] { border-color: transparent; background: var(--action-bg); color: var(--action-ink); }
.xs-try:focus-visible, .xs-reset__btn:focus-visible, .xs-other__card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--xs-ring); }
.home .xs-reset { margin: 16px 0 0; }
.xs-reset.is-hidden { display: none; }
.xs-reset__btn { min-height: 40px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.xs-passport { padding: clamp(64px, 7vw, 104px) 0; background: var(--bg-secondary); border-block: 1px solid var(--line); }
.home.xs-passport h2 { margin-bottom: 28px; }
.xs-dash { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.xs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.home .xs-facts li { display: block; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--home-surface); box-shadow: inset 0 1px 0 var(--glass-shine); color: var(--secondary); font-size: 14px; line-height: 1.5; }
.xs-facts b { color: var(--text); font-weight: 500; }
.xs-facts li > b:first-of-type { margin-right: 3px; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: lining-nums proportional-nums; }
.xs-fact__label { display: block; margin-bottom: 6px; color: var(--secondary); font-size: 11.5px; }
.xs-fact__sub { display: block; margin-top: 6px; font-size: 12.5px; }
.xs-fact__sub b { font-size: inherit; }
.xs-meter { display: block; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 3px; background: var(--bg-secondary); }
.xs-meter i { display: block; height: 100%; border-radius: inherit; background: var(--task-red); transform-origin: left center; }
.home .xs-more { max-width: 72ch; margin: 24px 0 0; color: var(--secondary); font-size: 15px; line-height: 1.7; }
.xs-more a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.xs-others { padding: clamp(64px, 7vw, 104px) 0 clamp(80px, 8vw, 120px); }
.xs-others__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.xs-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--link); font-size: 14px; text-underline-offset: 5px; }
.xs-other { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.home .xs-other__item { margin: 0; }
.xs-other__card { position: relative; display: grid; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--home-surface); box-shadow: inset 0 1px 0 var(--glass-shine); color: var(--text); text-decoration: none; transition: transform .4s var(--ease-out), border-color .3s var(--ease-out), box-shadow .4s var(--ease-out); }
.xs-other__card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--glass-shine), 0 24px 48px -30px #111c1559; }
.xs-other__card:hover .xs-shot { transform: scale(1.03); }
.xs-other__shot { display: block; aspect-ratio: 2148 / 900; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-secondary); }
.xs-other__body { display: grid; gap: 4px; padding: 16px 48px 18px 18px; }
.xs-other__body b { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.xs-other__body small { color: var(--secondary); font-size: 13.5px; line-height: 1.5; }
.xs-other__arrow { position: absolute; right: 18px; bottom: 18px; color: var(--main); font-size: 16px; transition: transform .3s var(--ease-out); }
.xs-other__card:hover .xs-other__arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: no-preference) {
  .motion .xs-facts li:not(.is-in) .xs-meter i { transform: scaleX(0); }
  .motion .xs-facts li.is-in .xs-meter i { transition: transform 1.2s var(--ease-out) calc(var(--reveal-delay, 0ms) + 300ms); }
}

@media print {
  .motion .xs-facts li .xs-meter i { transform: none !important; }
}

@media (min-width: 1700px) {
  .xs-facts { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .xs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xs-head__inner { grid-template-columns: minmax(0, 1fr); }
  .xs-glance { justify-self: start; }
  .xs-chapters { grid-template-columns: minmax(0, 1fr); }
  .xs-other { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820.8px) {
  .xs-other { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .xs-wide { padding: 0 16px; }
  .sample__head.xs-head { padding: 20px 16px 18px; }
  .xs-glance { width: 100%; }
  .xs-glance div { flex: 1; min-width: 0; padding: 10px 14px 12px; }
  .xs-glance dd { font-size: 24px; }
}
