/* Theme page */
.tp-hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
}
p.pill {
  display: inline-flex;
  margin: 0 0 24px;
}

/* Hero board */
.jb {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  color: var(--on-navy-2);
  background: var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.jb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.jb-head strong {
  font-weight: 500;
  color: #fff;
}
.jb-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  background: var(--navy-2);
  border-radius: 10px;
}
.jb-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: #fff;
  border-radius: 8px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
}
[data-state='any'] .jb-thumb {
  transform: none;
}
.jb-switch button {
  position: relative;
  min-height: 32px;
  padding: 0 14px;
  font: 500 0.85rem/1 var(--sans);
  color: var(--on-navy-2);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 0;
  transition: color 0.3s;
}
.jb-switch button[aria-pressed='true'] {
  color: var(--navy);
}
.jb-rows {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jb-rows::before {
  content: '';
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 16px;
  width: 1px;
  background: var(--navy-line);
}
.jb-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 8px 0;
  border-top: 1px solid var(--navy-line);
}
.jb-row:first-child {
  border-top: 0;
}
.jb-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: var(--on-navy-2);
  background: var(--navy-2);
  border: 1px solid var(--navy-line);
  border-radius: 50%;
  transition:
    color 0.4s calc(var(--n, 0) * 60ms),
    background-color 0.4s calc(var(--n, 0) * 60ms),
    border-color 0.4s calc(var(--n, 0) * 60ms),
    box-shadow 0.4s calc(var(--n, 0) * 60ms);
}
.jb-dot .icon {
  width: 15px;
  height: 15px;
}
.jb-row.is-lit .jb-dot {
  color: var(--navy);
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 22px -4px var(--signal);
}
.jb-name {
  min-width: 0;
  font-size: 0.95rem;
  color: #fff;
}
.jb-name code {
  display: block;
  overflow: hidden;
  font: 400 0.72rem/1.5 var(--mono);
  color: var(--on-navy-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jb-value {
  display: grid;
  justify-items: end;
  min-width: 96px;
  text-align: right;
}
.jb-value b {
  font: 500 1.02rem/1.25 var(--mono);
  color: var(--on-navy-2);
  transition: color 0.3s;
}
.jb-row.is-lit .jb-value b {
  color: #fff;
}
.jb-value small {
  font-size: 0.72rem;
  color: var(--on-navy-2);
}
.jb-row.is-flip .jb-value {
  animation: jb-flip 0.55s var(--ease) calc(var(--n, 0) * 60ms) both;
}
@keyframes jb-flip {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.jb-foot {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--on-navy-2);
}

/* Story with real screens */
.tp-real .stage-window {
  height: auto;
  aspect-ratio: 1600 / 1000;
}
.tp-real .scene {
  padding: 0;
  gap: 0;
  background: var(--surface);
}
.tp-real .scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  mask-image: linear-gradient(#000 88%, transparent);
}

/* Real screens in tabs */
.sh-stage {
  display: grid;
}
.sh-panel {
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  margin: 0;
}
.js .sh-panel {
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}
.js .sh-panel.is-on {
  visibility: visible;
  opacity: 1;
}
html:not(.js) .sh-panel {
  grid-area: auto;
  margin-bottom: 32px;
}
.sh-frame {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.sh-frame img {
  display: block;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(#000 88%, transparent);
}
.js .sh-panel .sh-frame {
  transform: translateY(14px) scale(0.99);
  transition: transform 0.7s var(--ease);
}
.js .sh-panel.is-on .sh-frame {
  transform: none;
}
.sh-panel figcaption {
  display: grid;
  gap: 10px;
  align-content: center;
  color: var(--body);
}
.sh-panel figcaption strong {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}
html:not(.js) .sh .screens-tabs {
  display: none;
}
.sh-phones {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 250px) minmax(0, 250px);
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(48px, 7vw, 88px);
}
.sh-phones-copy {
  display: grid;
  gap: 10px;
  max-width: 420px;
}
.sh-phones-copy h3,
.sh-phones-copy p {
  margin: 0;
}
.sh-phones-copy small {
  color: var(--muted);
}
.sh-phone {
  overflow: hidden;
  background: var(--surface);
  border: 6px solid var(--navy);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
}
.sh-phone img {
  display: block;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(#000 88%, transparent);
}

/* Recommended setup on the home page */
.tp-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 clamp(36px, 5vw, 60px);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--text);
}
.tp-pillars li {
  padding: 22px clamp(18px, 2.4vw, 32px) 4px;
  border-left: 1px solid var(--line);
}
.tp-pillars li:first-child {
  padding-left: 0;
  border-left: 0;
}
.tp-pillars h3 {
  margin: 18px 0 8px;
  font-size: 1.32rem;
}
.tp-pillars p {
  margin: 0;
}
.tp-reco-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}
.tp-reco-foot small {
  color: var(--muted);
}
.tp-chip {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 10px;
  transition: background-color 0.25s;
}
.tp-chip:hover {
  text-decoration: none;
  background: #dddbfa;
}
.tp-chip .icon {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}
.tp-chip:hover .icon {
  transform: translateX(3px);
}
.tp-chip-mark {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  animation: tp-mark 2.4s ease-in-out infinite;
}
@keyframes tp-mark {
  50% {
    box-shadow: 0 0 0 5px rgb(79 70 229 / 18%);
  }
}
.tp-chip--note {
  margin-top: 24px;
}
.js .hero-copy > .tp-chip {
  animation: soft-rise 0.8s var(--ease) both;
  animation-delay: calc(var(--enter, 0s) + 0.74s);
}
.nav-reco {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 5px;
}
.on-dark .nav-reco {
  color: var(--navy);
  background: var(--signal);
}
@media (prefers-reduced-motion: reduce) {
  .tp-chip-mark {
    animation: none;
  }
}

/* Connected demo */
.cn {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 0 clamp(0px, 1vw, 12px);
  align-items: center;
}
.cn-app {
  position: relative;
  z-index: 1;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cn-app-name,
.cn-buyer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  color: var(--text);
}
.cn-app-name {
  padding-bottom: 14px;
  margin-bottom: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.cn-label {
  margin: 16px 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.cn-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cn-levels button {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 56px;
  padding: 6px 4px;
  font: 500 0.88rem/1.2 var(--sans);
  color: var(--text);
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition:
    color 0.25s,
    background-color 0.25s,
    border-color 0.25s,
    transform 0.25s var(--ease);
}
.cn-levels button:hover {
  border-color: var(--brand);
}
.cn-levels button:active {
  transform: scale(0.97);
}
.cn-levels button small {
  font: 400 0.72rem/1 var(--mono);
  color: var(--muted);
}
.cn-levels button[aria-pressed='true'] {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.cn-levels button[aria-pressed='true'] small {
  color: #dcdbff;
}
.cn-outputs {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cn-outputs li {
  display: grid;
  grid-template-columns: clamp(28px, 7vw, 96px) minmax(0, 1fr);
  align-items: center;
}
.cn-wire {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}
.cn-wire i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 44%;
  background: linear-gradient(90deg, transparent, var(--brand));
  transform: translateX(-110%);
}
.is-run .cn-wire i {
  animation: cn-run 0.6s var(--ease) calc(var(--n) * 70ms) both;
}
@keyframes cn-run {
  to {
    transform: translateX(240%);
  }
}
.cn-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 16px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.is-run .cn-card {
  animation: cn-hit 0.7s var(--ease) calc(var(--n) * 70ms + 0.28s) both;
}
@keyframes cn-hit {
  0% {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    transform: translateX(5px);
  }
  100% {
    border-color: var(--line);
    box-shadow: 0 0 0 0 transparent;
    transform: none;
  }
}
.cn-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}
.cn-icon .icon {
  width: 17px;
  height: 17px;
}
.cn-card-label {
  min-width: 0;
  font-size: 0.92rem;
  color: var(--body);
}
.cn-card strong {
  font: 500 1rem/1.3 var(--mono);
  color: var(--text);
  text-align: right;
}
.cn-note {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Comparison */
.cp {
  border-top: 1px solid var(--text);
}
.cp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 0.7fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.cp-row > span {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 10px 16px;
  color: var(--text);
}
.cp-row--head > span {
  min-height: 48px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.cp-row > .cp-ours {
  background: var(--brand-soft);
}
.cp-row--head > .cp-ours {
  color: var(--brand-ink);
}
.cp-yes {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
}
.cp-yes .icon {
  width: 14px;
  height: 14px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.cp-no {
  color: var(--muted);
}
.cp-text {
  font-size: 0.92rem;
}

/* Why */
.tp-why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--text);
}
.tp-why li {
  padding: 26px clamp(18px, 2.4vw, 32px) 8px;
  border-left: 1px solid var(--line);
}
.tp-why li:first-child {
  padding-left: 0;
  border-left: 0;
}
.tp-why-n {
  font: 400 0.82rem/1 var(--mono);
  color: var(--brand-ink);
}
.tp-why h3 {
  margin: 34px 0 10px;
  font-size: 1.32rem;
}
.tp-why p {
  margin: 0;
}

@media (max-width: 1020px) {
  .sh-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-content: start;
  }
  .sh-panel figcaption strong {
    font-size: 1.15rem;
  }
}
@media (max-width: 860px) {
  .tp-pillars {
    grid-template-columns: minmax(0, 1fr);
  }
  .tp-pillars li,
  .tp-pillars li:first-child {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .tp-pillars li:first-child {
    border-top: 0;
  }
  .sh-phones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sh-phones-copy {
    grid-column: 1 / -1;
  }
  .sh-phone {
    border-width: 4px;
    border-radius: 22px;
  }
  .cn {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .cn-outputs li {
    grid-template-columns: minmax(0, 1fr);
  }
  .cn-wire {
    display: none;
  }
  .is-run .cn-card {
    animation-delay: calc(var(--n) * 70ms);
  }
  .tp-why {
    grid-template-columns: minmax(0, 1fr);
  }
  .tp-why li,
  .tp-why li:first-child {
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .tp-why li:first-child {
    border-top: 0;
  }
  .tp-why h3 {
    margin-top: 14px;
  }
}
@media (max-width: 620px) {
  .cn-card {
    grid-template-columns: 36px minmax(0, 1fr);
    row-gap: 2px;
  }
  .cn-icon {
    grid-row: span 2;
  }
  .cn-card strong {
    grid-column: 2;
    text-align: left;
  }
  .cp-row--head {
    display: none;
  }
  .cp-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 14px 0;
  }
  .cp-row > span:first-child {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 0 0 10px;
    font-weight: 500;
  }
  .cp-row > span:not(:first-child) {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    min-height: 62px;
    padding: 8px 12px;
    border-radius: 8px;
  }
  .cp-row > span:not(:first-child)::before {
    content: attr(data-label);
    font-size: 0.74rem;
    color: var(--muted);
  }
  .jb-value {
    min-width: 78px;
  }
  .jb-name code {
    display: none;
  }
}

/* Getting the theme: included with the subscription, single store, agency (src/theme-sale.ts) */
.tp-get {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.tp-get-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tp-get-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.tp-get-card--included {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.tp-get-price {
  margin: 8px 0 0;
  font: 600 2rem/1.1 var(--mono);
  color: var(--text);
}
.tp-get-points {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
  flex: 1;
}
.tp-get-points li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--body);
}
.tp-get-points .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--ok);
}
@media (max-width: 900px) {
  .tp-get {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Account and thank-you pages */
#account {
  display: grid;
  gap: 20px;
}
#account [hidden] {
  display: none;
}
#account h2 {
  margin: 0;
  font-size: 1.2rem;
}
.error {
  color: #b42318;
}
#account .form .small {
  margin: 0;
}
.account-hint {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.code-help {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.code-help h3 {
  margin: 0;
  font-size: 1rem;
}
.code-help ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  list-style: disc;
}
.code-help li {
  display: list-item;
}
.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.license {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.license h3 {
  margin: 8px 0 0;
  font-size: 1rem;
}
.stores-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.stores-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.done {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
}
.done .icon {
  width: 34px;
  height: 34px;
}
