body.article-mode {
  --background: #0e0d0c;
  --cream: #f8f0e2;
  --muted: #c7bdaa;
  --gold: #e7c58d;
  --article-width: 1080px;
  --article-paper: #181511;
  --article-rule: #40362a;
  --article-head: #100e0deF;
  background: radial-gradient(ellipse at 50% 0, #261d14 0, transparent 720px), var(--background);
}

.article-mode .header-inner {
  min-height: 72px;
  width: min(var(--article-width), calc(100% - 32px));
}

.article-mode .site-header {
  border-color: #392d22;
  backdrop-filter: blur(16px);
}

.article-mode .article-shell {
  padding-top: clamp(20px, 4vw, 44px);
}

.article-hero {
  overflow: hidden;
  border-color: #4c3d2b;
  border-radius: 18px;
  box-shadow: 0 25px 70px #0007, 0 1px 0 #e7c58d18 inset;
}

.article-mode .cover-art {
  min-height: clamp(360px, 56vw, 575px);
  padding: clamp(26px, 6.7vw, 72px);
  border-radius: 0;
  background: radial-gradient(ellipse at 75% 45%, #503624, transparent 65%), #15110e;
}

.cover-art:has(.cinema-cover-image) {
  grid-template-columns: minmax(0, 1fr);
}

.cover-art:has(.cinema-cover-image) .cover-bubbles {
  display: none;
}

.cinema-cover-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% center;
}

.cover-art:has(.cinema-cover-image)::before {
  background: linear-gradient(90deg, #100d0cf7 0%, #110d0cbf 34%, #110d0c36 58%, transparent 77%);
  mask-image: none;
}

.cover-art:has(.cinema-cover-image)::after {
  z-index: 0;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: linear-gradient(0deg, #0f0c0bcc, transparent 23%);
  box-shadow: inset 0 -1px #e7c58d44;
  opacity: 1;
  transform: none;
}

.article-mode .cover-type {
  width: fit-content;
  font-size: clamp(4.6rem, 10vw, 8.5rem);
  line-height: .83;
  letter-spacing: -.035em;
  text-shadow: 0 4px 25px #070504bd;
}

.article-mode .cover-type :is(strong, em) {
  transform: none;
}

.article-mode .cover-type em {
  color: #efc994;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.article-mode .cover-type small {
  margin-bottom: clamp(18px, 2.8vw, 32px);
  font-size: clamp(.71rem, 1.4vw, .9rem);
  letter-spacing: .24em;
}

.article-mode .cover-type p {
  margin-top: clamp(20px, 3vw, 30px);
  font-size: clamp(.69rem, 1.6vw, .94rem);
  letter-spacing: .14em;
  color: #f2ddbc;
}

html:lang(ru) .article-mode .cover-type {
  font-size: clamp(3.4rem, 8vw, 7rem);
  letter-spacing: -.055em;
}

.article-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: clamp(18px, 5vw, 64px);
  padding: clamp(23px, 4.6vw, 44px) var(--article-inset);
}

.article-intro > :is(.story-kicker, h1, .story-lead) {
  grid-column: 1;
}

.article-intro .hero-actions {
  grid-column: 2;
  grid-row: 2 / 4;
}

.article-intro h1 {
  margin-top: 0;
  font-size: clamp(2.05rem, 4.6vw, 3.3rem);
  line-height: 1.04;
  text-wrap: initial;
}

.article-intro p.story-lead:not(.story-kicker) {
  margin: 0;
  line-height: 1.6;
}

.article-mode .button-primary .button-icon {
  border: 0;
  border-radius: 50%;
  background: #3d2a1314;
}

.story-page {
  width: min(100%, 930px);
  margin-inline: auto;
}

.story-section {
  margin-top: clamp(52px, 7vw, 99px);
  padding-top: clamp(24px, 4.1vw, 44px);
  border-image: linear-gradient(90deg, #af8857a0, #483b2c 30%, #30271e 74%, #30271e24) 1;
}

.story-basics {
  margin-top: 0;
  padding-top: 0;
}

.story-section :is(.story-lead, .story-explanation) {
  max-width: 66ch;
}

.story-section:is(#start, #pair, #signal, #analysis, #result) .story-section-header::before {
  align-self: center;
  color: #e7bd87;
  text-shadow: 0 7px 24px #bd865c28;
}

.story-section-title {
  color: #fbf1e3;
  line-height: 1.04;
  text-wrap: balance;
}

.story-section-header .story-section-title {
  margin-bottom: 0;
}

.story-section-header {
  margin-bottom: clamp(14px, 2vw, 24px);
}

.story-section-header .story-kicker {
  margin-bottom: 6px;
}

.story-split {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(18px, 4.8vw, 56px);
  align-items: center;
}

.story-copy .story-lead strong {
  color: #f5e5cc;
}

.story-card,
.story-field {
  padding: clamp(15px, 2.9vw, 22px);
  border-color: #44392c;
  border-radius: 11px;
  background: #1a1713;
}

.story-nav {
  gap: 8px;
}

.story-nav a {
  padding: 11px 13px;
  min-height: 66px;
  border-radius: 8px;
  background: #1a1713;
}

.story-nav-number {
  color: #ebc995;
  font-size: .76rem;
}

.story-controls {
  display: flex;
  justify-content: flex-start;
  margin-top: clamp(19px, 3.5vw, 31px);
}

.story-controls .story-next {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: fit-content;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 13px 10px 15px;
  border: 1px solid #73583a;
  border-radius: 7px;
  background: #201911;
  color: #efd0a3;
  box-shadow: none;
  font: 700 .9rem/1.3 var(--text);
  text-align: start;
  text-decoration: none;
}

.story-controls .story-next:hover {
  border-color: #b28a54;
  background: #2d2217;
  color: #ffe3bc;
  box-shadow: none;
}

.story-controls .story-next .button-icon {
  width: 18px;
  height: 18px;
  border: 0;
  color: var(--gold);
}

.story-shot {
  border-color: #483a2b;
  border-radius: 12px;
  background: #181511;
  box-shadow: 0 13px 44px #0004;
}

.story-shot-label {
  min-height: 39px;
  padding: 9px clamp(12px, 2.5vw, 20px);
  color: #eed0a2;
  border-color: #3c3226;
  background: #211b14;
}

.story-shot .story-shot-body.story-raster {
  padding: 0;
  background: #111721;
}

.story-raster-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.story-raster-link:focus-visible {
  outline-offset: -4px;
  z-index: 1;
}

.story-image-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 8px clamp(12px, 2.5vw, 20px);
  border-top: 1px solid #3c3226;
  color: #e8c897;
  background: #1d1813;
  font: 650 .83rem/1.2 var(--text);
}

.story-raster-link:hover .story-image-action {
  color: #ffe4b8;
  background: #282017;
}

.story-raster img {
  display: block;
  width: 100%;
  height: auto;
}

.story-chat-menu {
  margin-inline-start: auto;
  color: #afbdd0;
  font-size: 1.18rem;
  line-height: 1;
}

.reference-trainer {
  --trainer-line: #493a2a;
  border-radius: 13px;
  background: #1a1612;
  box-shadow: 0 22px 58px #0004;
}

.reference-tabs {
  background: #1f1b16;
}

.reference-tab[aria-selected="true"] {
  border-bottom-color: #e6bc82;
  background: #332619;
  color: #ffe4b5;
}

.reference-phone-wrap {
  background: radial-gradient(ellipse at 53% 43%, #3e2c203d, transparent 68%), #14120f;
}

.reference-phone-photo {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#broker .reference-phone-photo .story-image-action {
  width: fit-content;
  min-height: 44px;
  margin: 8px auto 0;
  padding: 8px 12px;
  border: 1px solid #493a2a;
  border-radius: 7px;
  background: #1d1813;
}

.reference-phone-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.reference-panel {
  padding: clamp(22px, 4vw, 40px);
  border-inline-start: 0;
  border-inline-end: 1px solid var(--trainer-line);
}

.reference-field-closeup {
  display: none;
}

.reference-panel .reference-trainer-nav {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  padding: 14px 0 0;
  margin-top: 4px;
}

@media (min-width: 701px) {
  #broker .reference-trainer-grid {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    grid-template-areas: "device copy";
    background: #171411;
  }

  #broker .reference-phone-wrap {
    grid-area: device;
    height: auto;
    padding: clamp(16px, 2.5vw, 30px);
    background: transparent;
  }

  #broker .reference-phone-photo {
    width: min(100%, 390px);
  }

  #broker .reference-panel {
    grid-area: copy;
    align-self: center;
    gap: 17px;
    padding: clamp(28px, 5vw, 70px) clamp(24px, 4vw, 56px);
    border: 0;
    text-align: start;
  }

  #broker .reference-panel .story-kicker {
    justify-content: flex-start;
  }

  #broker .reference-panel h3 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
  }

  #broker .reference-panel > p:not(.story-kicker) {
    max-width: 36ch;
    line-height: 1.65;
  }

  #broker .reference-panel > strong {
    color: var(--gold);
    font-size: 1.15rem;
  }

  #broker .reference-trainer-nav {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 10px;
    margin-top: 8px;
  }
}

.phone-next-chapter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 43px;
  padding: 6px 9px;
  border: 1px solid #80623e;
  border-radius: 7px;
  color: #ffdfa9;
  background: #392a1d;
  font: 700 clamp(.76rem, 1.65vw, .9rem)/1.2 var(--text);
  text-decoration: none;
}

.phone-next-chapter:hover {
  border-color: #b8894b;
  background: #4d3825;
}

.phone-next-chapter .button-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.story-result-summary {
  border-color: #644e34;
  background: #201a14;
}

.story-price-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.story-price-comparison > div {
  min-width: 0;
  padding: 11px clamp(10px, 2.7vw, 17px);
  border: 1px solid #58432e;
  border-radius: 8px;
  background: #1a1510;
}

.story-price-comparison dt {
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.35;
}

.story-price-comparison dd {
  margin: 3px 0 0;
  color: #f5ddb7;
  font-size: clamp(1.12rem, 3vw, 1.5rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.story-cta {
  border-color: #5c4931;
  background: radial-gradient(ellipse at 50% 0, #312317 0, #1a1611 70%);
  box-shadow: 0 22px 56px #0004;
}

.story-cta > .story-kicker {
  justify-content: center;
}

.story-cta > .story-kicker::before {
  display: none;
}

.story-cta .resource-guide {
  margin-top: 0;
}

.story-cta .resource-card details {
  padding: 7px 0;
  border-bottom: 1px solid #493b2b;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .story-nav a,
  .story-controls .story-next,
  .reference-tab {
    transition: border-color 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
  }

  .story-raster-link img {
    transition: filter 200ms ease-out;
  }

  .story-raster-link:hover img {
    filter: brightness(1.1);
  }

  .article-intro .button-primary .button-icon {
    transition: transform 220ms ease-out;
  }

  .article-intro .button-primary:hover .button-icon {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cinema-cover-image {
    animation: cover-expansion 1.05s cubic-bezier(.18, .72, .28, 1) both;
  }

  .reference-phone-photo img {
    animation: phone-frame-in 220ms ease-out both;
  }
}

@keyframes cover-expansion {
  from { transform: scale(1.04); }
  to { transform: scale(1); }
}

@keyframes phone-frame-in {
  from { opacity: .68; }
  to { opacity: 1; }
}

@media (max-width: 700px) {
  .article-mode .header-inner {
    min-height: 60px;
  }

  .article-mode .cover-art {
    min-height: clamp(300px, 65vw, 450px);
    padding: clamp(19px, 5.8vw, 40px);
  }

  .article-mode .cover-type {
    font-size: clamp(3.5rem, 10vw, 5.6rem);
  }

  html:lang(ru) .article-mode .cover-type {
    font-size: clamp(2.85rem, 8.9vw, 5rem);
  }

  .article-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-intro .hero-actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 13px;
  }

  .story-section {
    scroll-margin-top: 78px;
  }

  .story-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  #broker .reference-trainer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #broker .reference-panel {
    border: 0;
    border-bottom: 1px solid var(--trainer-line);
  }

  .reference-field-closeup {
    position: relative;
    display: block;
    justify-self: center;
    width: min(100%, 250px);
    height: 54px;
    overflow: hidden;
    border-radius: 6px;
    background: #191e2a;
  }

  .reference-field-closeup img {
    position: absolute;
    max-width: none;
    width: 320px;
    height: auto;
    left: 50%;
    transform: translateX(-50%);
    top: -93px;
  }

  .reference-field-closeup:is([data-field="time"], [data-field="amount"]) {
    width: 169px;
    height: 76px;
  }

  .reference-field-closeup:is([data-field="time"], [data-field="amount"]) img {
    width: 430px;
    top: -544px;
  }

  .reference-field-closeup[data-field="time"] img {
    left: 85px;
    transform: translateX(-130px);
  }

  .reference-field-closeup[data-field="amount"] img {
    left: 85px;
    transform: translateX(-300px);
  }

  .reference-field-closeup[data-field="direction"] {
    width: 151px;
    height: 47px;
  }

  .reference-field-closeup[data-field="direction"] img {
    width: 380px;
    top: -538px;
    left: 75px;
    transform: translateX(-267px);
  }
}

@media (max-width: 430px) {
  .article-mode .header-inner {
    width: calc(100% - 24px);
  }

  .article-mode .cover-art {
    min-height: 284px;
    align-items: end;
    padding-bottom: 23px;
  }

  .cinema-cover-image {
    object-position: 66% 42%;
  }

  .cover-art:has(.cinema-cover-image)::before {
    background: linear-gradient(90deg, #130e0ee8, #150e0c8f 52%, #150e0c08 87%);
  }

  .cover-art:has(.cinema-cover-image)::after {
    background: linear-gradient(0deg, #100c0bc7, transparent 42%);
  }

  .article-mode .cover-type {
    font-size: clamp(3rem, 12vw, 3.65rem);
  }

  html:lang(ru) .article-mode .cover-type {
    font-size: clamp(2.42rem, 10vw, 3.2rem);
  }

  .article-mode .cover-type small {
    margin-bottom: 13px;
  }

  .article-mode .cover-type p {
    margin-top: 16px;
    max-width: 26ch;
  }

  .article-intro .button-primary {
    width: fit-content;
    min-height: 48px;
  }

  .reference-tab {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    font-size: clamp(.61rem, 2.9vw, .77rem);
    letter-spacing: -.015em;
    overflow-wrap: normal;
  }
}
