:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-strong: #f0f3f6;
  --text: #18212f;
  --muted: #647084;
  --line: #d9e0e8;
  --blue: #1b66d2;
  --green: #167a4a;
  --red: #c53d33;
  --yellow: #b7791f;
  --shadow: 0 16px 40px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.top-nav a,
.language-button,
.button {
  border-radius: 8px;
  font-weight: 700;
}

.top-nav a {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-button {
  min-width: 48px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.language-button.is-active {
  background: var(--blue);
  color: #fff;
}

.hero,
.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 56px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.phone-preview {
  display: flex;
  justify-content: center;
}

.phone-shell {
  width: min(360px, 100%);
  padding: 18px;
  border: 8px solid #111824;
  border-radius: 34px;
  background: #eef2f7;
  box-shadow: var(--shadow);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px 14px;
  color: #111824;
  font-size: 12px;
  font-weight: 800;
}

.phone-section,
.phone-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.phone-section {
  padding: 14px;
}

.phone-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-strong);
}

.segmented span {
  min-width: 0;
  padding: 7px 4px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.segmented .is-selected {
  background: var(--green);
  color: #fff;
}

.phone-section p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.phone-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.phone-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  font-size: 13px;
}

.phone-grid span {
  color: var(--muted);
}

.phone-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.phone-buttons span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.phone-buttons span:first-child {
  background: var(--blue);
}

.phone-buttons span:last-child {
  background: var(--red);
}

.section {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow),
.split-section > div > p {
  color: var(--muted);
  font-size: 18px;
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 900;
}

.step-list p,
.definition-grid p,
.install-grid p,
.install-panel p,
.notice-card p,
.help-list p,
.checklist {
  margin: 0;
  color: var(--muted);
}

.notice-card {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #f1d18a;
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  background: #fff8e8;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.install-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 230px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.install-grid .step-number {
  margin-bottom: 2px;
}

.install-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compact-list li {
  background: var(--bg);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.mode-table {
  display: grid;
  gap: 8px;
}

.mode-table > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.mode-table > div:nth-child(2) {
  border-left-color: var(--yellow);
}

.mode-table > div:nth-child(3) {
  border-left-color: var(--red);
}

.mode-table span {
  color: var(--muted);
}

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

.definition-grid article {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.annotated-guide {
  display: grid;
  gap: 24px;
}

.annotated-card {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.annotated-shot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf0f5;
}

.annotated-shot img {
  display: block;
  width: min(100%, 330px);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(24, 33, 47, 0.16);
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(27, 102, 210, 0.38);
}

.pin::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(27, 102, 210, 0.35);
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}

.annotation-copy {
  display: grid;
  gap: 14px;
}

.annotation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.annotation-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.annotation-list strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.annotation-list span {
  color: var(--muted);
  font-size: 15px;
}

@keyframes pulse {
  from {
    opacity: 0.8;
    transform: scale(0.72);
  }
  to {
    opacity: 0;
    transform: scale(1.25);
  }
}

.checklist-section {
  background: var(--surface);
  width: 100%;
  max-width: none;
  padding-left: max(18px, calc((100vw - 1120px) / 2));
  padding-right: max(18px, calc((100vw - 1120px) / 2));
}

.checklist {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 0;
  list-style: none;
}

.checklist li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.checklist li::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 5px #dff3e8;
}

.help-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

summary {
  cursor: pointer;
  padding: 18px;
  font-weight: 800;
}

details p {
  padding: 0 18px 18px;
}

.site-footer {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .phone-preview {
    justify-content: flex-start;
  }

  .definition-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .install-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .install-panel {
    grid-template-columns: 1fr;
  }

  .annotated-card {
    grid-template-columns: 1fr;
  }

  .annotated-shot img {
    width: min(100%, 360px);
  }

  .checklist {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 10px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .language-button {
    min-width: 42px;
  }

  .hero,
  .section {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding: 40px 0;
  }

  .lead {
    font-size: 17px;
  }

  .definition-grid,
  .install-grid,
  .checklist {
    grid-template-columns: 1fr;
  }

  .install-grid article {
    min-height: 0;
  }

  .source-links .button {
    width: 100%;
  }

  .annotated-card {
    padding: 12px;
  }

  .pin {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .pin::after {
    width: 38px;
    height: 38px;
  }

  .mode-table > div,
  .step-list li {
    grid-template-columns: 1fr;
  }

  .phone-buttons {
    grid-template-columns: 1fr;
  }
}
