:root {
  color-scheme: light;
  --ink: #172033;
  --ink-soft: #3f4b63;
  --muted: #68738a;
  --canvas: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #fff9ef;
  --line: #dfe3e9;
  --line-strong: #c6cdd8;
  --navy: #183153;
  --navy-hover: #0f2544;
  --orange: #dc681c;
  --orange-dark: #a7430d;
  --orange-soft: #fff0df;
  --blue-soft: #edf4ff;
  --green: #22734d;
  --green-soft: #eaf8f0;
  --focus: #276ef1;
  --shadow: 0 18px 50px rgb(23 32 51 / 10%);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--orange-dark);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 40px), var(--page));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(198 205 216 / 72%);
  background: rgb(247 244 238 / 94%);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--orange-dark);
}

.language-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.language-control label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.language-control select {
  max-width: 150px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

main {
  overflow: clip;
}

.hero {
  padding: 76px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: clamp(44px, 7vw, 90px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero-copy,
.page-hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 21px);
}

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

.button,
button.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--navy);
  border-radius: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

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

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

.button-secondary {
  color: var(--navy);
  background: transparent;
}

.button-secondary:hover {
  background: var(--surface);
}

.button-small {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 14px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li,
.tag {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 65%);
  font-size: 13px;
  font-weight: 750;
}

.hero-media {
  position: relative;
}

.hero-media::before {
  position: absolute;
  inset: -28px -34px auto auto;
  width: 170px;
  height: 170px;
  border: 1px solid #f2c59f;
  border-radius: 50%;
  content: "";
}

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: auto;
}

.media-caption {
  margin: 0;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.section {
  padding: 76px 0;
}

.section-compact {
  padding: 54px 0;
}

.section-tinted {
  border-block: 1px solid #ecdcc8;
  background: var(--surface-soft);
}

.section-blue {
  background: var(--blue-soft);
}

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

.section-heading h2,
.content-section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading p,
.content-lead {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
}

.step-grid,
.feature-grid,
.trust-grid,
.store-grid,
.media-grid,
.status-grid {
  display: grid;
  gap: 20px;
}

.step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: quick-step;
}

.step-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  counter-increment: quick-step;
}

.step-card::before {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  content: counter(quick-step);
  font-weight: 850;
}

.step-card h3,
.feature-card h3,
.trust-card h3,
.store-card h3,
.settings-card h3,
.trouble-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.step-card p,
.feature-card p,
.trust-card p,
.store-card p,
.settings-card p,
.trouble-card p {
  margin: 0;
  color: var(--ink-soft);
}

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

.feature-card,
.trust-card,
.settings-card,
.trouble-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-mark {
  width: 10px;
  height: 10px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 15px 0 0 #efb078, 30px 0 0 #f9ddc3;
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-card {
  border-color: #bcdcc9;
  background: var(--green-soft);
}

.store-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-card {
  display: flex;
  min-height: 248px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.store-card .tag {
  width: fit-content;
  margin-bottom: 24px;
}

.store-card .button {
  width: fit-content;
  margin-top: auto;
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: clamp(30px, 5vw, 54px);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--navy);
}

.support-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.support-panel p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #dbe5f4;
}

.support-panel .button-primary {
  border-color: #fff;
  color: var(--navy);
  background: #fff;
}

.support-panel .button-secondary {
  border-color: #9cafc9;
  color: #fff;
}

.support-panel .button-secondary:hover {
  background: rgb(255 255 255 / 10%);
}

.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.guide-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: clamp(34px, 6vw, 76px);
  padding: 54px 0 86px;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 14px;
}

.toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.toc a {
  color: var(--ink-soft);
  font-size: 14px;
}

.guide-content {
  min-width: 0;
}

.content-section {
  padding: 14px 0 58px;
  scroll-margin-top: 96px;
}

.content-section + .content-section {
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.content-section h3 {
  margin: 30px 0 8px;
  font-size: 20px;
}

.content-section p,
.content-section li {
  color: var(--ink-soft);
}

.content-section ul,
.content-section ol:not(.step-grid) {
  padding-left: 22px;
}

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--orange-soft);
}

.callout strong {
  color: var(--ink);
}

.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 28px;
}

.media-button {
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  text-align: left;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(23 32 51 / 7%);
  cursor: zoom-in;
}

.media-button img {
  width: 100%;
  height: auto;
}

.media-button span {
  display: block;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.practice-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.practice-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.practice-panel h3 {
  margin-top: 0;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sample-table,
.permission-table {
  width: 100%;
  border-collapse: collapse;
}

.sample-table {
  min-width: 610px;
}

.sample-table th,
.sample-table td,
.permission-table th,
.permission-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.sample-table th,
.permission-table th {
  color: var(--ink);
  background: #f1f4f8;
  font-size: 13px;
}

.sample-table tr:last-child td,
.permission-table tr:last-child td {
  border-bottom: 0;
}

.copy-cell {
  width: 1%;
  white-space: nowrap;
}

.copy-row-button {
  padding: 6px 10px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.demo-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 5px;
}

.form-field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.copy-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--green);
  font-size: 14px;
  font-weight: 750;
}

.settings-grid,
.trouble-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.code-example,
kbd {
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--ink);
  background: #f4f6f8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.code-example {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

kbd {
  padding: 2px 6px;
  font-size: 0.9em;
}

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

.status-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.status-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 900;
}

.status-icon img {
  width: 30px;
  height: 30px;
}

.status-icon-muted img {
  filter: grayscale(1);
  opacity: 0.72;
}

.status-badge {
  color: #fff;
  background: #6b7280;
  font-size: 11px;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.faq-list details {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.faq-list summary {
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.faq-list p {
  margin: 10px 0 0;
}

.site-footer {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  background: #eeeae2;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
}

.footer-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
}

dialog {
  width: min(calc(100% - 32px), 1100px);
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(0 0 0 / 35%);
}

dialog::backdrop {
  background: rgb(12 20 35 / 78%);
}

.dialog-toolbar {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  justify-content: flex-end;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 22px;
  cursor: pointer;
}

.dialog-figure {
  margin: 0;
}

.dialog-figure img {
  width: 100%;
  height: auto;
}

.dialog-figure figcaption {
  padding: 14px 18px 18px;
  color: var(--ink-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 6px;
  }

  .language-control {
    margin-left: auto;
  }

  .hero-grid,
  .practice-shell {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 700px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--page));
  }

  .hero,
  .section {
    padding: 54px 0;
  }

  .hero-grid {
    gap: 38px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  .step-grid,
  .feature-grid,
  .trust-grid,
  .store-grid,
  .media-grid,
  .settings-grid,
  .trouble-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .support-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-nav {
    gap: 16px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .language-control label {
    display: none;
  }

  .language-control select {
    max-width: 122px;
  }

  .hero-actions,
  .section-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .step-card,
  .feature-card,
  .trust-card,
  .store-card,
  .settings-card,
  .trouble-card,
  .practice-panel {
    padding: 21px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
