:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --bg-soft: #eef3f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #172033;
  --muted: #607086;
  --border: #d9e1ea;
  --accent: #2067e3;
  --accent-strong: #154db4;
  --mint: #1d9a8a;
  --gold: #b36b09;
  --shadow: 0 18px 50px rgba(38, 57, 77, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0.72) 42%, var(--bg) 100%),
    radial-gradient(circle at 12% 8%, rgba(32, 103, 227, 0.11), transparent 32%),
    radial-gradient(circle at 88% 2%, rgba(29, 154, 138, 0.11), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent-strong);
}

main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(32, 103, 227, 0.18);
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
.button-link:hover {
  border-color: rgba(32, 103, 227, 0.42);
  color: var(--accent-strong);
  background: var(--surface);
}

header {
  margin-bottom: 30px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: 38px;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.document-hero {
  padding: 34px 0 24px;
  border-bottom: 1px solid var(--border);
}

.eyebrow,
.meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

h1 {
  margin: 0 0 14px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.document-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
}

h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

p,
li {
  font-size: 16px;
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0;
  padding-left: 22px;
}

li + li {
  margin-top: 8px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.phone-preview {
  width: min(100%, 360px);
  margin-left: auto;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 30px;
  padding: 16px;
  background: linear-gradient(150deg, #172033, #24384f);
  box-shadow: 0 24px 64px rgba(23, 32, 51, 0.22);
}

.phone-screen {
  overflow: hidden;
  min-height: 420px;
  border-radius: 22px;
  background: #f7fafc;
  color: #172033;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid #dbe5ee;
  background: #ffffff;
  font-weight: 750;
}

.phone-header img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.phone-card {
  margin: 18px;
  border: 1px solid #dbe5ee;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.phone-label {
  margin-bottom: 8px;
  color: #607086;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.phone-text {
  color: #28384b;
  font-size: 15px;
  line-height: 1.5;
}

.phone-result {
  border-left: 4px solid var(--mint);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px;
}

.chip {
  border-radius: 999px;
  padding: 7px 10px;
  background: #e9f1fb;
  color: #255078;
  font-size: 12px;
  font-weight: 750;
}

.section {
  margin-top: 34px;
}

.panel,
.card,
.note-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.panel {
  padding: 26px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  padding: 20px;
}

.card p:last-child,
.panel p:last-child,
.note-box p:last-child {
  margin-bottom: 0;
}

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

.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-raised);
}

.stat strong {
  display: block;
  color: var(--accent-strong);
  font-size: 22px;
  line-height: 1.1;
}

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

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

.legal-content,
.support-content {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.82);
}

.legal-content h2,
.support-content h2 {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.legal-content h2:first-child,
.support-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.side-panel {
  position: sticky;
  top: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
}

.side-panel a {
  display: block;
  margin-top: 10px;
  font-weight: 650;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.note-box {
  padding: 18px;
  border-left: 4px solid var(--gold);
}

footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 42px;
  padding-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 28px, 1080px);
    padding-top: 18px;
  }

  .topbar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
    width: 100%;
  }

  nav a,
  .button-link {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 14px;
  }

  .phone-preview {
    width: 100%;
    margin: 0;
  }

  .phone-screen {
    min-height: 340px;
  }

  .stat-row,
  .support-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .legal-content,
  .support-content {
    padding: 22px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151d;
    --bg-soft: #151d27;
    --surface: #17202b;
    --surface-raised: #1b2633;
    --text: #f4f7fb;
    --muted: #aebbc9;
    --border: #2b3a4b;
    --accent: #83b7ff;
    --accent-strong: #b5d4ff;
    --mint: #6dd6c8;
    --gold: #f0b35a;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  }

  body {
    background:
      linear-gradient(180deg, rgba(16, 21, 29, 0.94), rgba(16, 21, 29, 0.78) 42%, var(--bg) 100%),
      radial-gradient(circle at 12% 8%, rgba(131, 183, 255, 0.12), transparent 32%),
      radial-gradient(circle at 88% 2%, rgba(109, 214, 200, 0.10), transparent 28%),
      var(--bg);
  }

  nav a,
  .button-link,
  .hero,
  .legal-content,
  .support-content {
    background: rgba(23, 32, 43, 0.78);
  }

  .primary-action {
    background: #2d78ee;
    color: #ffffff;
  }
}
