/* Site-wide styles, moved out of website/base.html so browsers cache them
   (pre-production review P1). */
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/manrope-cyrillic-wght-normal.e58febde317b.woff2") format("woff2-variations");
  unicode-range: U+0400-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --header-offset: 76px;
  --color-accent: #F4C136;
  --color-accent-dark: #D79F12;
  --color-accent-soft: #FFE094;
  --color-bg: #F4EFE7;
  --color-bg-clean: #FFFDF8;
  --color-bg-light: #F8EFE0;
  --color-paper: #FFFFFF;
  --color-paper-warm: #F4E7D4;
  --color-border: #E7D7B6;
  --color-text: #1A1A1A;
  --color-text-muted: #6B7280;
  --color-technical: #384551;
  --color-technical-light: #EEF2F5;
  --shadow: 0 24px 60px rgba(56, 69, 81, 0.18);
  --surface-shadow: 0 16px 38px rgba(56, 69, 81, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--header-offset);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    "Manrope Variable", Manrope, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  /* Short pages keep the footer at the bottom edge instead of mid-screen. */
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* The Windows/macOS app cannot be installed on a phone, so download buttons only show on larger screens. */
@media (max-width: 820px) {
  .desktop-only {
    display: none !important;
  }
}

body > main,
body > .template-store {
  flex: 1 0 auto;
}

body.auth-modal-open {
  overflow-x: hidden;
  overflow-y: scroll;
}

a {
  color: inherit;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  padding-top: 12px;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.site-header > .nav {
  pointer-events: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1120px, calc(100% - 32px));
  height: 60px;
  margin: 0 auto;
  padding: 0 10px 0 24px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 10px 34px -12px rgba(122, 90, 10, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.brand-logo {
  display: block;
  width: 184px;
  height: auto;
  max-height: 34px;
  transition:
    transform 180ms ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand:hover .brand-logo {
  transform: translateY(-1px);
}

.brand:active {
  color: var(--color-accent-dark);
  transform: translateY(0) scale(0.98);
}

.brand:active .brand-logo {
  transform: translateY(0) scale(0.96);
}

.nav-links {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--color-text);
  font-size: 14.5px;
  font-weight: 600;
}

.nav-download {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
  padding: 0 20px;
  text-decoration: none;
  box-shadow: 0 6px 16px -6px rgba(215, 159, 18, 0.7);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu {
  position: relative;
  display: none;
  align-items: center;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-menu summary {
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-button:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 3px;
}

.mobile-menu-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
  transition:
    opacity 420ms ease,
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu[open] .mobile-menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu[open] .mobile-menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

.mobile-menu[open] .mobile-menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  gap: 4px;
  line-height: 1.5;
  border: 0;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: 0 22px 54px rgba(56, 69, 81, 0.18);
  padding: 10px;
  transform-origin: top right;
}

.mobile-menu-panel::before {
  display: none;
}

.mobile-menu[open] .mobile-menu-panel {
  animation: mobile-menu-panel-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mobile-menu[open] .mobile-menu-link {
  animation: mobile-menu-link-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mobile-menu[open] .mobile-menu-link:nth-child(2) {
  animation-delay: 55ms;
}

.mobile-menu[open] .mobile-menu-link:nth-child(3) {
  animation-delay: 110ms;
}

.mobile-menu[open] .mobile-menu-link:nth-child(4) {
  animation-delay: 165ms;
}

.mobile-menu[open] .mobile-menu-link:nth-child(5) {
  animation-delay: 220ms;
}

.mobile-menu.manual-mobile-menu[open] .mobile-menu-panel,
.mobile-menu.manual-mobile-menu[open] .mobile-menu-link {
  animation: none;
}

@keyframes mobile-menu-panel-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-18px) scale(0.9);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes mobile-menu-link-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 999px;
  color: var(--color-text);
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.mobile-menu-link:hover {
  background: var(--color-bg-light);
  box-shadow: 0 10px 22px rgba(56, 69, 81, 0.1);
  transform: translateY(-1px);
}

.mobile-menu-link:active {
  background: var(--color-accent-soft);
  box-shadow: 0 6px 14px rgba(56, 69, 81, 0.08);
  transform: translateY(0) scale(0.98);
}

.mobile-menu-link.primary {
  border: 0;
  background: var(--color-accent);
}

.mobile-menu-link.primary:active {
  background: var(--color-accent-dark);
}

.account-menu {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.account-trigger:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 3px;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-text);
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.account-avatar {
  overflow: hidden;
}

.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar.large {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  font-size: 22px;
}

.account-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(330px, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: 0 22px 54px rgba(56, 69, 81, 0.18);
  padding: 16px;
  transform-origin: top right;
}

.account-menu[open] .account-popover {
  animation: account-popover-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.account-menu[open] .account-summary,
.account-menu[open] .account-resources,
.account-menu[open] .account-menu-actions {
  animation: account-popover-content-in 840ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.account-menu[open] .account-resources {
  animation-delay: 160ms;
}

.account-menu[open] .account-menu-actions {
  animation-delay: 260ms;
}

.account-menu.manual-account-menu[open] .account-popover,
.account-menu.manual-account-menu[open] .account-summary,
.account-menu.manual-account-menu[open] .account-resources,
.account-menu.manual-account-menu[open] .account-menu-actions {
  animation: none;
}

@keyframes account-popover-in {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(-12px) scale(0.92);
  }

  65% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(2px) scale(1.01);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes account-popover-content-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-popover::before {
  display: none;
}

.account-summary {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
}

.account-identity strong,
.account-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span {
  color: var(--color-text-muted);
  font-size: 13px;
}

.account-resources {
  display: grid;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--color-bg-light);
  padding: 12px;
}

.account-resource-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.account-resource-row strong {
  color: var(--color-text);
  text-align: right;
}

.currency-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.currency-picker--menu {
  margin-top: 8px;
  border-radius: 14px;
  background: var(--color-bg-light);
  padding: 8px 8px 8px 12px;
}

.account-menu[open] .currency-picker--menu {
  animation: account-popover-content-in 840ms cubic-bezier(0.16, 1, 0.3, 1) 210ms both;
}

.account-menu.manual-account-menu[open] .currency-picker--menu {
  animation: none;
}

.currency-picker--header .currency-picker-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.currency-picker--mobile {
  margin: 2px 4px 6px;
  border-radius: 13px;
  background: var(--color-bg-clean);
  padding: 8px 8px 8px 16px;
  font-size: 15px;
}

.currency-picker-select {
  appearance: none;
  -webkit-appearance: none;
  /* Fixed height with zero vertical padding keeps the label optically centred. */
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--color-paper)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23776f63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 8px center / 11px;
  box-shadow: 0 1px 4px rgba(30, 28, 23, 0.08);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 26px;
  padding: 0 22px 0 9px;
}

.currency-picker--header .currency-picker-select {
  background-color: rgba(127, 121, 107, 0.1);
  box-shadow: none;
}

.currency-picker-select:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .nav-actions > .currency-picker--header {
    display: none;
  }
}

.account-menu-actions {
  display: grid;
  gap: 4px;
  padding-top: 10px;
}

.account-menu-actions form {
  margin: 0;
}

.menu-action {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.menu-action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--color-text-muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-action:hover {
  background: var(--color-bg-light);
  box-shadow: 0 10px 22px rgba(56, 69, 81, 0.1);
  transform: translateY(-1px);
}

.menu-action:active {
  background: var(--color-accent-soft);
  box-shadow: 0 6px 14px rgba(56, 69, 81, 0.08);
  transform: translateY(0) scale(0.98);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.link-button:hover {
  color: var(--color-text);
  transform: translateY(-1px);
}

.link-button:active {
  color: var(--color-accent-dark);
  transform: translateY(0) scale(0.98);
}

.nav-download:hover {
  box-shadow: 0 12px 22px -8px rgba(215, 159, 18, 0.8);
  transform: translateY(-1px);
}

.nav-download:active {
  background: var(--color-accent-dark);
  color: var(--color-text);
  box-shadow: 0 4px 10px -4px rgba(215, 159, 18, 0.6);
  transform: translateY(0) scale(0.98);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .nav,
  .container {
    width: min(1360px, calc(100% - 64px));
  }
}

.section {
  background: var(--color-bg-clean);
  padding: 64px 0;
}

main > .section:first-child {
  background: #FFFFFC;
  padding-top: 104px;
}

.hero-section {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: #FFFFFC;
}

main > .section.hero-section:first-child {
  background: #FFFFFC;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-section::before {
  inset: -2px;
  z-index: 0;
  background: url("img/block-1-bg.a39576d1ec35.png") right bottom / cover no-repeat;
  transform: scale(1.08);
  transform-origin: right bottom;
}

.hero-section::after {
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(255, 255, 252, 0.95) 0%, rgba(255, 255, 252, 0.78) 42%, rgba(255, 255, 252, 0.24) 76%, rgba(255, 255, 252, 0.08) 100%);
}

.hero-section-dark {
  background: var(--color-technical);
  color: #FFFFFF;
}

main > .section.hero-section.hero-section-dark:first-child {
  background: var(--color-technical);
}

.hero-section-dark::after {
  background: linear-gradient(90deg, rgba(26, 26, 26, 0.78) 0%, rgba(26, 26, 26, 0.52) 42%, rgba(26, 26, 26, 0.18) 76%, rgba(26, 26, 26, 0.06) 100%);
}

.hero-section-dark .eyebrow,
.hero-section-dark .lead,
.hero-section-dark .trust-item span {
  color: rgba(255, 255, 255, 0.78);
}

.hero-section-dark .eyebrow {
  background: rgba(26, 26, 26, 0.26);
}

.hero-section-dark .button.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  box-shadow: none;
}

.hero-section-dark .trust-item {
  background: rgba(26, 26, 26, 0.26);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.hero-section-dark .trust-icon {
  background: rgba(244, 193, 54, 0.18);
  color: var(--color-accent);
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section .split {
  grid-template-columns: minmax(0, 530px) minmax(0, 1fr);
  min-height: 620px;
}

.section.light {
  background: var(--color-bg-light);
  border: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--color-technical);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-accent);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

h1 {
  max-width: 780px;
  font-size: 60px;
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 20px;
}

.lead {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--color-text-muted);
  font-size: 18px;
  overflow-wrap: break-word;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 10px 22px rgba(215, 159, 18, 0.2);
  color: var(--color-text);
  font-weight: 800;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:focus,
.button:focus-visible {
  outline: 0;
}

.button:focus-visible {
  box-shadow: 0 0 0 4px rgba(244, 193, 54, 0.22), 0 10px 22px rgba(215, 159, 18, 0.2);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 8px 20px rgba(56, 69, 81, 0.09);
  color: var(--color-technical);
}

.button.small {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

.nav-actions .button.small {
  min-height: 40px;
  padding: 9px 18px;
  font-size: 16px;
}

.button.subtle {
  background: var(--color-accent);
  box-shadow: 0 10px 22px rgba(215, 159, 18, 0.2);
  color: var(--color-text);
}

.button.secondary:focus-visible {
  box-shadow: 0 0 0 4px rgba(244, 193, 54, 0.22), 0 8px 20px rgba(56, 69, 81, 0.09);
}

.button:hover {
  box-shadow: 0 14px 26px rgba(56, 69, 81, 0.16);
  transform: translateY(-1px);
}

.button:active {
  background: var(--color-accent-dark);
  box-shadow: 0 7px 16px rgba(215, 159, 18, 0.18);
  transform: translateY(0) scale(0.98);
}

.button.secondary:active {
  background: var(--color-accent-soft);
}

.button[disabled],
.button.disabled {
  background: var(--color-technical-light);
  box-shadow: none;
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.button[disabled]:hover,
.button.disabled:hover {
  box-shadow: none;
  transform: none;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.trust-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
}

.trust-icon,
.feature-icon,
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--color-bg-light);
  box-shadow: 0 8px 20px rgba(56, 69, 81, 0.08);
  color: var(--color-accent-dark);
  font-weight: 900;
}

.trust-icon {
  width: 36px;
  height: 36px;
}

.trust-item strong {
  display: block;
  font-size: 13px;
}

.trust-item span {
  display: block;
  color: var(--color-text-muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.card {
  border: 0;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: var(--surface-shadow);
  padding: 20px;
}

.feature-card {
  min-height: 176px;
  text-align: left;
}

.feature-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  background: var(--color-accent-soft);
}

.card p,
.muted {
  color: var(--color-text-muted);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-header p {
  max-width: 420px;
  margin: 0;
  color: var(--color-text-muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.module-card h3 {
  margin-top: 12px;
}

.module-window {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: 0 12px 26px rgba(56, 69, 81, 0.1);
}

.module-window-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 8px 10px;
}

.module-window-bar span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #D86B5D;
}

.module-window-bar span:nth-child(2) {
  background: var(--color-accent);
}

.module-window-bar span:nth-child(3) {
  background: #78B38A;
}

.module-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  min-height: 124px;
  background: var(--color-technical-light);
}

.module-sidebar {
  background: var(--color-technical);
  padding: 10px;
}

.module-sidebar div {
  height: 7px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.module-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}

.module-tile {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--color-paper);
  box-shadow: 0 6px 16px rgba(56, 69, 81, 0.08);
}

.module-tile.photo {
  background: var(--color-accent-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.step-card {
  position: relative;
  text-align: center;
}

.step-number {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
}

.pricing-testimonial {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card.highlight {
  box-shadow: 0 18px 42px rgba(215, 159, 18, 0.2);
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  background: var(--color-accent-soft);
  padding: 4px 9px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 800;
}

.testimonial {
  display: grid;
  align-content: center;
  min-height: 100%;
}

.avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--color-accent-soft), #D7DEE4);
  border: 0;
}

.stars {
  color: var(--color-accent-dark);
  font-weight: 900;
}

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: var(--color-bg-light);
  box-shadow: var(--surface-shadow);
  padding: 36px;
}

.book-mock {
  position: relative;
  min-height: 220px;
}

.book-cover {
  position: absolute;
  right: 24px;
  bottom: 0;
  width: 150px;
  height: 210px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(56, 69, 81, 0.86), rgba(26, 26, 26, 0.86)),
    var(--color-technical);
  box-shadow: 18px 18px 0 rgba(56, 69, 81, 0.14);
  color: #FFFFFF;
  padding: 22px;
  text-align: center;
}

.book-cover strong {
  display: block;
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.2;
}

.book-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(26, 26, 26, 0.18);
}

.price {
  margin: 16px 0 4px;
  color: var(--color-technical);
  font-size: 28px;
  font-weight: 900;
}

.data-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 249, 239, 0.64);
  padding: 8px 10px;
}

.form-page {
  max-width: 460px;
  padding: 104px 0 56px;
}

.form-panel {
  border: 0;
  border-radius: 22px;
  background: var(--color-paper);
  box-shadow: var(--surface-shadow);
  padding: 24px;
}

/* The page h1 (60px) is wider than this panel, and overflow-wrap then splits
   «Восстановление» mid-word. Sized so the longest word fits down to 320px. */
.form-panel h1 {
  font-size: clamp(24px, 7vw, 34px);
}

label {
  display: block;
  margin: 14px 0 6px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--color-bg-light);
  padding: 10px 12px;
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(244, 193, 54, 0.58);
  outline-offset: 2px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background-color: rgba(26, 26, 26, 0.52);
  opacity: 0;
  backdrop-filter: blur(0) saturate(100%);
  cursor: pointer;
  -webkit-backdrop-filter: blur(0) saturate(100%);
  padding: 0;
  transition:
    opacity 780ms ease,
    backdrop-filter 780ms ease,
    -webkit-backdrop-filter 780ms ease;
}

.auth-modal.is-open .auth-modal-backdrop {
  opacity: 1;
  backdrop-filter: blur(10px) saturate(108%);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
}

.auth-modal-card {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.24);
  opacity: 0;
  padding: 24px;
  filter: blur(14px);
  transform: translateY(44px) scale(0.78);
  transform-origin: center;
  transition:
    opacity 680ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 680ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal.is-open .auth-modal-card {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--color-bg-light);
  color: var(--color-text);
  cursor: pointer;
}

.auth-modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.auth-modal-brand {
  margin-bottom: 18px;
  line-height: 0;
}

.auth-modal-brand img {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
}

.auth-modal h2 {
  margin: 0 42px 16px 0;
  font-size: 28px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-radius: 999px;
  background: var(--color-bg-light);
  padding: 6px;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.auth-tab.is-active {
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 10px 24px rgba(215, 159, 18, 0.2);
}

.auth-panel {
  display: none;
  margin-top: 18px;
}

.auth-panel.is-active {
  display: block;
}

.auth-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.auth-field label {
  margin: 0;
}

.auth-error {
  margin: 0 0 14px;
  border-radius: 18px;
  background: rgba(163, 58, 42, 0.08);
  color: #8F2F22;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-notice {
  margin: 0 0 14px;
  border-radius: 18px;
  background: rgba(244, 193, 54, 0.18);
  color: var(--color-text);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-modal-actions .button {
  width: 100%;
}

.auth-modal .muted {
  margin: 12px 0 0;
}

.errorlist {
  margin: 8px 0;
  color: #A33A2A;
}

.messages {
  display: grid;
  gap: 8px;
  margin-top: 76px;
  padding-top: 16px;
}

.message {
  border: 0;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: var(--surface-shadow);
  padding: 12px 14px;
}

.footer {
  margin-top: auto;
  background: var(--color-bg-light);
  color: var(--color-text-muted);
  padding: 16px 0;
  font-size: 13px;
}

.footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--color-text);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 26px;
}

.footer-bar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
}

.auth-consent {
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.auth-consent a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Pages whose <main> is itself a .section (download, legal, checkout) start
   below the fixed header instead of under it. */
body > main.section {
  padding-top: calc(var(--header-offset) + 40px);
}

@media (max-width: 640px) {
  .footer-bar {
    gap: 0 18px;
    font-size: 12px;
  }

  .footer-bar nav {
    gap: 0 18px;
  }

  /* Finger-sized tap targets for the legal links. */
  .footer a {
    display: inline-block;
    padding: 10px 0;
  }
}

@media (max-width: 900px) {
  h1 {
    font-size: 38px;
  }

  .section {
    padding: 48px 0;
  }

  main > .section:first-child {
    padding-top: 88px;
  }

  main > .section.hero-section:first-child {
    background: #FFFFFC;
  }

  .hero-section::before {
    background-position: 66% bottom;
    transform: scale(1.12);
  }

  .hero-section::after {
    background: linear-gradient(180deg, rgba(255, 255, 252, 0.96) 0%, rgba(255, 255, 252, 0.86) 46%, rgba(255, 255, 252, 0.74) 100%);
  }

  .hero-section-dark::after {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.78) 0%, rgba(26, 26, 26, 0.55) 48%, rgba(26, 26, 26, 0.3) 100%);
  }

  .hero-section .split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .form-page {
    padding-top: 88px;
  }

  .split,
  .grid,
  .feature-grid,
  .module-grid,
  .steps,
  .pricing-testimonial,
  .pricing-mini-grid,
  .cta-band {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 165px;
    max-height: 31px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .section-header {
    display: grid;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions .button {
    width: 100%;
  }

  .account-menu {
    width: auto;
  }

  .account-trigger {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    justify-content: center;
  }

  .account-avatar:not(.large) {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .account-popover {
    position: absolute;
    width: min(330px, calc(100vw - 32px));
    margin-top: 0;
  }

  .account-popover::before {
    display: block;
  }

  .button {
    white-space: normal;
  }

  .eyebrow {
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.35;
  }

  .eyebrow::before {
    flex: 0 0 28px;
    margin-top: 7px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu[open] .account-popover,
  .account-menu[open] .account-summary,
  .account-menu[open] .account-resources,
  .account-menu[open] .account-menu-actions {
    animation: none;
  }
}

/* Sign in through Yandex / Google, under the email form in the auth modal. */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(24, 24, 27, 0.12);
}

.auth-social {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.auth-social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(24, 24, 27, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 16px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.auth-social-button:hover {
  background: #f6f5f2;
  border-color: rgba(24, 24, 27, 0.4);
}

.auth-social-button:focus-visible {
  outline: 3px solid rgba(244, 193, 54, 0.5);
  outline-offset: 2px;
}

.auth-social-icon {
  flex: none;
}
