/* Happ Lite — conversion landing; tokens in palette-base.css / site-palette.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.hwzyp {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--hwzyp-font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--hwzyp-ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, var(--hwzyp-glow-a) 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, var(--hwzyp-glow-b) 0%, transparent 50%),
    var(--hwzyp-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--hwzyp-accent);
}

img {
  max-width: 100%;
  display: block;
}

.hwzyp-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--hwzyp-ink);
  color: #fff7ed;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hwzyp-ribbon button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  opacity: 0.7;
}

.hwzyp-wrap {
  width: min(100%, var(--hwzyp-max));
  margin-inline: auto;
  padding: 0 20px;
}

.hwzyp-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--hwzyp-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hwzyp-line);
}

.hwzyp-topbar-inner {
  width: min(100%, var(--hwzyp-max));
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.hwzyp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hwzyp-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.hwzyp-logo-name {
  font-size: 1.15rem;
}

.hwzyp-logo-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hwzyp-muted);
  letter-spacing: 0;
}

.hwzyp-nav {
  display: none;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  font-weight: 700;
  font-size: 0.92rem;
}

.hwzyp-nav-install {
  margin-left: auto;
  color: var(--hwzyp-ink);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.hwzyp-nav-install:hover {
  color: var(--hwzyp-accent);
}

.hwzyp-nav-install + .hwzyp-nav-analogs {
  margin-left: 6px;
  font-size: 0.72rem;
}

.hwzyp-nav-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hwzyp-nav-side .hwzyp-nav-install {
  margin-left: 0;
}

.hwzyp-nav a {
  color: var(--hwzyp-ink);
  text-decoration: none;
  white-space: nowrap;
}

.hwzyp-nav a:hover {
  color: var(--hwzyp-accent);
}

.hwzyp-nav a.hwzyp-nav-featured {
  color: var(--hwzyp-accent);
  font-weight: 700;
}

.hwzyp-nav a.hwzyp-nav-featured[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-figure--photo:has(img[src*="install-guide/apple-region"]) {
  max-width: 280px;
  margin-inline: 0;
}

.article-figure--photo:has(img[src*="install-guide/apple-region"]) img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--hwzyp-line, #e5e7eb);
}

@media (min-width: 860px) {
  .hwzyp-nav {
    display: flex;
  }

  .hwzyp-nav-install,
  .hwzyp-nav-side {
    display: none;
  }
}

.hwzyp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hwzyp-btn-primary {
  background: var(--hwzyp-accent);
  color: #fff7ed;
}

.hwzyp-btn-primary:hover {
  background: var(--hwzyp-accent-hover);
  color: #fff7ed;
}

.hwzyp-cta-short {
  display: none;
}

@media (max-width: 859px) {
  .hwzyp-cta-long {
    display: none;
  }

  .hwzyp-cta-short {
    display: inline;
  }

  .hwzyp-topbar-cta {
    min-height: 42px;
    padding: 8px 14px;
    flex-shrink: 0;
  }
}

.hwzyp-btn-ghost {
  background: var(--hwzyp-paper);
  color: var(--hwzyp-ink);
  border-color: var(--hwzyp-line);
}

.hwzyp-btn-ghost:hover {
  border-color: var(--hwzyp-accent);
  color: var(--hwzyp-accent);
}

.hwzyp-btn-dark {
  background: var(--hwzyp-ink);
  color: #fff7ed;
}

.hwzyp-btn-dark:hover {
  background: #292524;
  color: #fff7ed;
}

.hwzyp-hero {
  display: grid;
  gap: 36px;
  padding: 36px 0 12px;
}

@media (min-width: 900px) {
  .hwzyp-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding: 56px 0 28px;
  }
}

.hwzyp-kicker {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--hwzyp-accent-soft);
  color: var(--hwzyp-accent-hover);
  font-size: 0.82rem;
  font-weight: 800;
}

.hwzyp-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.hwzyp-lead {
  margin: 0 0 22px;
  max-width: min(42ch, 100%);
  color: var(--hwzyp-muted);
  font-size: 1.12rem;
}

.hwzyp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hwzyp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hwzyp-pills li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--hwzyp-muted);
}

.hwzyp-phone {
  justify-self: center;
  width: min(100%, 280px);
  background: var(--hwzyp-ink);
  border-radius: 36px;
  padding: 14px;
  box-shadow: var(--hwzyp-shadow);
}

.hwzyp-phone-screen {
  background: linear-gradient(180deg, var(--hwzyp-paper), var(--hwzyp-accent-soft));
  border-radius: 26px;
  min-height: 420px;
  padding: 22px 18px 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hwzyp-phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--hwzyp-muted);
}

.hwzyp-phone-app {
  margin: 28px 0 8px;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hwzyp-phone-dial {
  width: 148px;
  height: 148px;
  margin: 18px auto 16px;
  border-radius: 50%;
  border: 10px solid var(--hwzyp-accent);
  background: var(--hwzyp-paper);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 8px var(--hwzyp-accent-soft);
}

.hwzyp-phone-dial span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--hwzyp-accent);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--hwzyp-accent) 35%, transparent);
}

.hwzyp-phone-state {
  margin: 0;
  text-align: center;
  font-weight: 800;
}

.hwzyp-phone-hint {
  margin: 6px 0 0;
  text-align: center;
  color: var(--hwzyp-muted);
  font-size: 0.85rem;
}

.hwzyp-phone-bar {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
}

.hwzyp-phone-bar strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.92rem;
}

.hwzyp-phone-bar span:last-child {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--hwzyp-muted);
}

.hwzyp-phone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
}

.hwzyp-section {
  padding: 28px 0 12px;
}

.hwzyp-section-head {
  margin-bottom: 18px;
}

.hwzyp-section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

.hwzyp-section-head p {
  margin: 0;
  color: var(--hwzyp-muted);
  max-width: min(48ch, 100%);
}

.hwzyp-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}

.hwzyp-tabs::-webkit-scrollbar {
  display: none;
}

.hwzyp-tab {
  appearance: none;
  border: 1px solid var(--hwzyp-line);
  background: var(--hwzyp-paper);
  color: var(--hwzyp-ink);
  border-radius: 999px;
  min-height: 46px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.hwzyp-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hwzyp-tab.is-active {
  background: var(--hwzyp-ink);
  border-color: var(--hwzyp-ink);
  color: #fff7ed;
}

.hwzyp-panel {
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: var(--hwzyp-radius);
  padding: 22px 20px 24px;
  box-shadow: var(--hwzyp-shadow);
}

.hwzyp-panel h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.hwzyp-panel-lead {
  margin: 0 0 22px;
  color: var(--hwzyp-muted);
}

.hwzyp-steps {
  display: grid;
  gap: 14px;
}

@media (min-width: 860px) {
  .hwzyp-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.hwzyp-step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 10px;
  align-items: start;
  padding: 16px;
  background: var(--hwzyp-bg);
  border-radius: 16px;
  min-height: 100%;
}

.hwzyp-step-num {
  grid-column: 1;
  grid-row: 1;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hwzyp-accent);
  color: #fff7ed;
  font-weight: 800;
  align-self: center;
}

.hwzyp-step h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1.05rem;
  align-self: center;
  line-height: 1.25;
}

.hwzyp-step-body {
  grid-column: 1 / -1;
}

.hwzyp-step-body p,
.hwzyp-step-body ol {
  margin: 0 0 10px;
  color: var(--hwzyp-muted);
  font-size: 0.95rem;
}

.hwzyp-step-body ol {
  padding-left: 1.15rem;
}

.hwzyp-step-body p:last-child,
.hwzyp-step-body ol:last-child {
  margin-bottom: 0;
}

.hwzyp-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.hwzyp-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hwzyp-accent-soft);
  color: var(--hwzyp-accent-hover);
  font-size: 0.88rem;
  font-weight: 700;
}

.hwzyp-facts {
  display: grid;
  gap: 12px;
}

@media (min-width: 800px) {
  .hwzyp-facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hwzyp-fact {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 8px;
  padding: 18px 16px;
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: 18px;
}

.hwzyp-fact-icon {
  grid-column: 1;
  grid-row: 1;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hwzyp-ok-soft);
  color: var(--hwzyp-ok);
  font-weight: 800;
  align-self: center;
}

.hwzyp-fact strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: 1.05rem;
}

.hwzyp-fact p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--hwzyp-muted);
  font-size: 0.95rem;
}

.hwzyp-faq {
  display: grid;
  gap: 8px;
}

.hwzyp-faq details {
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: 16px;
  padding: 4px 16px;
}

.hwzyp-faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 14px 0;
  list-style: none;
}

.hwzyp-faq summary::-webkit-details-marker {
  display: none;
}

.hwzyp-faq p {
  margin: 0 0 14px;
  color: var(--hwzyp-muted);
}

.hwzyp-buy {
  margin: 28px 0 48px;
  padding: 28px 22px;
  background: var(--hwzyp-ink);
  color: #fff7ed;
  border-radius: 28px;
}

.hwzyp-buy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -0.03em;
}

.hwzyp-buy p {
  margin: 0 0 18px;
  max-width: 46ch;
  color: #d6d3d1;
}

.hwzyp-buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hwzyp-buy .hwzyp-btn-primary {
  background: #fff7ed;
  color: var(--hwzyp-ink);
}

.hwzyp-buy .hwzyp-btn-ghost {
  background: transparent;
  color: #fff7ed;
  border-color: #44403c;
}

.hwzyp-footer {
  padding: 12px 0 110px;
  color: var(--hwzyp-muted);
  font-size: 0.88rem;
}

.hwzyp-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--hwzyp-line);
}

.hwzyp-footer a {
  color: inherit;
}

.hwzyp-sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 40;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: 18px;
  box-shadow: var(--hwzyp-shadow);
}

.hwzyp-sticky.is-visible {
  display: grid;
}

.hwzyp-sticky.is-hidden {
  display: none;
}

.hwzyp-sticky .hwzyp-btn {
  min-height: 46px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

@media (min-width: 860px) {
  .hwzyp-sticky,
  .hwzyp-sticky.is-visible {
    display: none;
  }

  .hwzyp-footer {
    padding-bottom: 36px;
  }
}

/* Legal */
.hwzyp-legal {
  max-width: 68ch;
  padding: 36px 0 48px;
}

.hwzyp-legal h1 {
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.hwzyp-legal h2 {
  margin: 22px 0 8px;
  font-size: 1.15rem;
}

.hwzyp-legal p {
  color: var(--hwzyp-muted);
}

/* Buy: pay is step 1 — accent bar + first card outline */
body.hwzyp-layout-buy .hwzyp-topbar {
  border-top: 3px solid var(--hwzyp-accent);
}

body.hwzyp-layout-buy .hwzyp-step:first-child {
  outline: 2px solid var(--hwzyp-accent);
  outline-offset: -2px;
}

/* Plus: phone on the left */
body.hwzyp-layout-plus .hwzyp-hero {
  direction: rtl;
}

body.hwzyp-layout-plus .hwzyp-hero > * {
  direction: ltr;
}

/* Explainer: no phone, facts first, narrower type */
body.hwzyp-layout-explainer .hwzyp-phone {
  display: none;
}

body.hwzyp-layout-explainer .hwzyp-hero {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}

body.hwzyp-layout-explainer .hwzyp-lead,
body.hwzyp-layout-explainer .hwzyp-hero-actions,
body.hwzyp-layout-explainer .hwzyp-pills {
  margin-inline: auto;
  justify-content: center;
}

body.hwzyp-layout-explainer .hwzyp-wrap {
  width: min(100%, 880px);
}

/* Stack: all device panels visible, card jumps instead of tabs */
body.hwzyp-layout-stack .hwzyp-tabs {
  display: none;
}

body.hwzyp-layout-stack .hwzyp-panel {
  margin-bottom: 16px;
}

body.hwzyp-layout-stack .hwzyp-panel[hidden] {
  display: block !important;
}

.hwzyp-device-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
}

@media (min-width: 800px) {
  .hwzyp-device-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.hwzyp-device-jump {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 4px;
  align-items: center;
  padding: 12px;
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
}

.hwzyp-device-jump:hover {
  border-color: var(--hwzyp-accent);
}

.hwzyp-device-jump svg {
  width: 18px;
  height: 18px;
}

.hwzyp-device-jump span:last-child {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--hwzyp-muted);
}

body.hwzyp-layout-stack .hwzyp-steps {
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  body.hwzyp-layout-stack .hwzyp-steps {
    grid-template-columns: 1fr;
  }
}

body.hwzyp-layout-stack .hwzyp-step {
  border-left: 4px solid var(--hwzyp-accent);
}

/* Wiki: contents rail */
.hwzyp-docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px 28px;
  width: min(100%, var(--hwzyp-max));
  margin-inline: auto;
  padding: 12px 20px 48px;
}

.hwzyp-docs > * {
  min-width: 0;
}

@media (min-width: 960px) {
  body.hwzyp-layout-wiki .hwzyp-docs {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
  }
}

.hwzyp-toc {
  position: sticky;
  top: 76px;
  padding: 14px;
  background: var(--hwzyp-paper);
  border: 1px solid var(--hwzyp-line);
  border-radius: 16px;
  font-size: 0.88rem;
}

.hwzyp-toc strong {
  display: block;
  margin-bottom: 8px;
}

.hwzyp-toc a {
  display: block;
  padding: 6px 0;
  color: var(--hwzyp-ink);
  text-decoration: none;
  font-weight: 700;
}

.hwzyp-toc a:hover {
  color: var(--hwzyp-accent);
}

@media (max-width: 959px) {
  .hwzyp-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hwzyp-toc strong {
    width: 100%;
  }

  .hwzyp-toc a {
    padding: 6px 12px;
    border: 1px solid var(--hwzyp-line);
    border-radius: 999px;
  }
}

body.hwzyp-layout-wiki .hwzyp-topbar {
  background: var(--hwzyp-paper);
  backdrop-filter: none;
}

body.hwzyp-layout-wiki .hwzyp-hero {
  grid-template-columns: 1fr;
  padding-top: 20px;
}

body.hwzyp-layout-wiki .hwzyp-lead {
  max-width: min(58ch, 100%);
}

body.hwzyp-layout-wiki .hwzyp-phone {
  display: none;
}

body.hwzyp-layout-wiki .hwzyp-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

body.hwzyp-layout-wiki .hwzyp-panel {
  box-shadow: none;
}

.hwzyp-404 {
  padding: 64px 0;
  text-align: center;
}

/* —— Articles (Happ Lite) —— */
.hwzyp-art-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.hwzyp-art-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--hwzyp-line);
  border-radius: 12px;
  background: var(--hwzyp-paper);
  text-decoration: none;
  color: inherit;
}

.hwzyp-art-card:hover {
  border-color: var(--hwzyp-accent);
}

.hwzyp-art-card strong {
  font-size: 1rem;
  line-height: 1.35;
}

.hwzyp-art-card span {
  font-size: 0.9rem;
  color: var(--hwzyp-muted);
  line-height: 1.4;
}

.hwzyp-art-all {
  margin-top: 14px;
}

.hwzyp-doc {
  max-width: 760px;
  padding-top: 28px;
  padding-bottom: 48px;
}

.hwzyp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--hwzyp-muted);
  margin-bottom: 18px;
}

.hwzyp-breadcrumb a {
  color: inherit;
}

.hwzyp-doc-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.hwzyp-doc-head p {
  margin: 0 0 22px;
  color: var(--hwzyp-muted);
  max-width: 56ch;
}

.hwzyp-article h1 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.25;
}

.hwzyp-article-meta {
  margin: 0 0 18px;
  color: var(--hwzyp-muted);
  font-size: 0.92rem;
}

.hwzyp-article-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 16px;
}

.hwzyp-related {
  margin-top: 36px;
}

.hwzyp-related h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.article-section {
  margin: 1.35rem 0;
}

.article-section h2 {
  margin: 0 0 0.7rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.article-section p,
.hwzyp-article > p {
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.article-home-link {
  margin: 0.9rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--hwzyp-accent);
  background: color-mix(in srgb, var(--hwzyp-accent) 8%, transparent);
  border-radius: 0 8px 8px 0;
}

.article-figure {
  margin: 1rem 0 1.2rem;
}

.article-figure img {
  display: block;
  max-width: min(420px, 100%);
  height: auto;
}

.article-callout {
  margin: 0.9rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--hwzyp-line);
  background: var(--hwzyp-paper);
}

.article-callout--warn {
  border-color: color-mix(in srgb, #c45c26 45%, var(--hwzyp-line));
}

.article-callout--tip {
  border-color: color-mix(in srgb, var(--hwzyp-accent) 45%, var(--hwzyp-line));
}

.article-facts {
  display: grid;
  gap: 8px;
  margin: 0.9rem 0 1.1rem;
}

.article-fact {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 8px 12px;
  padding: 8px 10px;
  border: 1px solid var(--hwzyp-line);
  border-radius: 8px;
}

.article-table-wrap {
  overflow-x: auto;
  margin: 0.9rem 0 1.1rem;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.article-table th,
.article-table td {
  border: 1px solid var(--hwzyp-line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.article-mark {
  background: color-mix(in srgb, var(--hwzyp-accent) 22%, transparent);
  padding: 0 0.15em;
}

.article-kbd,
.article-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--hwzyp-line);
  background: var(--hwzyp-paper);
}

.article-section ol,
.article-section ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.2rem;
  line-height: 1.55;
}

/* Пошаговая установка Happ: карточки шагов и лента скриншотов */
.hwzyp-iguide-page {
  max-width: 820px;
  padding-top: 28px;
  padding-bottom: 56px;
}

.hwzyp-iguide-page h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hwzyp-iguide-page .hwzyp-lead {
  max-width: 40rem;
  margin-bottom: 8px;
}

.hwzyp-iguide-hint {
  margin: 0 0 8px;
  color: var(--hwzyp-muted);
  font-size: 0.92rem;
}

.hwzyp-pick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 8px;
}

@media (min-width: 720px) {
  .hwzyp-pick-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hwzyp-pick {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--hwzyp-line);
  border-radius: 16px;
  background: var(--hwzyp-paper);
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.hwzyp-pick svg {
  width: 22px;
  height: 22px;
  grid-row: 1;
  grid-column: 1;
}

.hwzyp-pick strong {
  grid-row: 1;
  grid-column: 2;
  font-size: 0.98rem;
  line-height: 1.2;
}

.hwzyp-pick span {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--hwzyp-muted);
}

.hwzyp-pick:hover,
.hwzyp-pick:focus-visible {
  border-color: var(--hwzyp-accent);
}

.hwzyp-pick.is-active,
.hwzyp-iguide-page:has(#android:target) a.hwzyp-pick[href="#android"],
.hwzyp-iguide-page:has(#huawei:target) a.hwzyp-pick[href="#huawei"],
.hwzyp-iguide-page:has(#iphone:target) a.hwzyp-pick[href="#iphone"],
.hwzyp-iguide-page:has(#windows:target) a.hwzyp-pick[href="#windows"],
.hwzyp-iguide-page:has(#mac:target) a.hwzyp-pick[href="#mac"],
.hwzyp-iguide-page:has(#android-tv:target) a.hwzyp-pick[href="#android-tv"],
.hwzyp-iguide-page:has(#apple-tv:target) a.hwzyp-pick[href="#apple-tv"] {
  border-color: var(--hwzyp-accent);
  box-shadow: inset 0 0 0 1px var(--hwzyp-accent);
}

.hwzyp-iguide-empty {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--hwzyp-accent) 8%, var(--hwzyp-paper));
  border: 1px dashed color-mix(in srgb, var(--hwzyp-accent) 45%, var(--hwzyp-line));
}

.hwzyp-iguide-page:has(.hwzyp-guide:target) .hwzyp-iguide-empty {
  display: none;
}

.hwzyp-guide {
  display: none;
  scroll-margin-top: 76px;
}

.hwzyp-guide:target {
  display: block;
}

.hwzyp-guide > h2 {
  margin: 18px 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.hwzyp-iguide {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.hwzyp-iguide-step {
  margin: 0;
  padding: 18px 16px 14px;
  border: 1px solid var(--hwzyp-line);
  border-radius: 22px;
  background: var(--hwzyp-paper);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--hwzyp-ink) 5%, transparent);
}

.hwzyp-iguide-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hwzyp-iguide-num {
  flex: none;
  width: 36px;
  height: 36px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--hwzyp-accent);
  color: #fff7ed;
  font-weight: 800;
  line-height: 1;
}

.hwzyp-iguide-copy {
  min-width: 0;
}

.hwzyp-iguide-copy h2,
.hwzyp-iguide-copy h3 {
  margin: 4px 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.hwzyp-iguide-copy p {
  margin: 0 0 8px;
}

.hwzyp-iguide-copy p:last-child {
  margin-bottom: 0;
}

.hwzyp-iguide-alt {
  color: var(--hwzyp-muted);
  font-size: 0.95rem;
}

.hwzyp-shots {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
}

.hwzyp-shot {
  flex: 0 0 148px;
  scroll-snap-align: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
  text-decoration: none;
}

.hwzyp-shot img {
  width: 148px;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--hwzyp-line);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--hwzyp-ink) 12%, transparent);
}

.hwzyp-shot span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--hwzyp-muted);
}

@media (min-width: 720px) {
  .hwzyp-iguide-step {
    padding: 20px 20px 16px;
  }

  .hwzyp-shot {
    flex-basis: 180px;
  }

  .hwzyp-shot img {
    width: 180px;
  }
}

.hwzyp-iguide-help,
.hwzyp-iguide-after {
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid var(--hwzyp-line);
  background: var(--hwzyp-paper);
}

.hwzyp-iguide-help {
  background: color-mix(in srgb, var(--hwzyp-accent) 8%, var(--hwzyp-paper));
}

.hwzyp-iguide-help h2,
.hwzyp-iguide-after h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.hwzyp-iguide-tip {
  margin: 4px 0 14px;
  padding: 14px 14px 6px;
  border-radius: 16px;
  background: var(--hwzyp-paper);
  border: 1px solid color-mix(in srgb, var(--hwzyp-accent) 35%, var(--hwzyp-line));
}

.hwzyp-iguide-tip h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.hwzyp-iguide-tip ol {
  margin: 0 0 10px;
  padding-left: 1.2rem;
}

.hwzyp-iguide-tip li {
  margin: 0 0 6px;
}

.hwzyp-iguide-tip p {
  margin: 0 0 10px;
}

.hwzyp-iguide-help ul,
.hwzyp-iguide-after ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.hwzyp-iguide-help li,
.hwzyp-iguide-after li {
  margin: 0 0 8px;
}

.hwzyp-iguide-help p,
.hwzyp-iguide-after p {
  margin: 0;
}

.hwzyp-iguide-help .hwzyp-iguide-tip p {
  margin: 0 0 10px;
}

.hwzyp-iguide-after .hwzyp-buy-actions {
  margin-top: 14px;
}

.hwzyp-lightbox {
  border: 0;
  padding: 12px;
  background: transparent;
  max-width: min(420px, 94vw);
  width: min(420px, 94vw);
}

.hwzyp-lightbox::backdrop {
  background: color-mix(in srgb, #111 74%, transparent);
}

.hwzyp-lightbox img {
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.hwzyp-lightbox p {
  margin: 10px 0 0;
  color: #fff7ed;
  text-align: center;
}

.hwzyp-lightbox-close {
  display: block;
  margin: 0 0 8px auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff7ed;
  color: var(--hwzyp-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hwzyp-analog-page {
  max-width: 980px;
}

.hwzyp-analog-notes {
  display: grid;
  gap: 10px;
  margin: 8px 0 8px;
  padding: 0;
  list-style: none;
}

.hwzyp-analog-notes li {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--hwzyp-accent) 8%, var(--hwzyp-paper));
}

.hwzyp-analog-group {
  margin-top: 28px;
}

.hwzyp-analog-group h2 {
  margin: 0 0 12px;
}

.hwzyp-analog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.hwzyp-analog-card {
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--hwzyp-line);
  border-radius: 22px;
  background: var(--hwzyp-paper);
}

.hwzyp-analog-card:target {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hwzyp-accent) 35%, transparent);
}

.hwzyp-analog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hwzyp-analog-head h3 {
  margin: 0;
  min-width: 0;
}

.hwzyp-analog-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: cover;
}

.hwzyp-analog-badge {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: #9a3412;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.hwzyp-analog-card p {
  margin: 10px 0 0;
}

.hwzyp-analog-os {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hwzyp-analog-os li {
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hwzyp-ink) 6%, var(--hwzyp-paper));
  font-size: 0.78rem;
  font-weight: 700;
}

.hwzyp-analog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hwzyp-analog-links .hwzyp-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.hwzyp-analog-end {
  margin-top: 28px;
  padding: 18px 16px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--hwzyp-accent) 10%, var(--hwzyp-paper));
}

.hwzyp-analog-end h2,
.hwzyp-analog-end p {
  margin-top: 0;
}

.hwzyp-analog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 800px) {
  .hwzyp-analog-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hwzyp-analog-grid {
    grid-template-columns: 1fr 1fr;
  }
}
