:root {
  --blue: #2563eb;
  --orange: #f97316;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.head {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 19px;
  margin: 32px 0 8px;
  letter-spacing: -0.01em;
}

p, li { color: var(--text); }

.lead { color: var(--muted); font-size: 17px; margin: 0 0 24px; }

.meta { color: var(--muted); font-size: 14px; margin-top: 8px; }

a { color: var(--blue); }

.back {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 600;
  text-decoration: none;
}

.back::before { content: "← "; }

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.links a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}

.links a:hover { border-color: var(--blue); }

h3 {
  font-size: 16px;
  margin: 20px 0 6px;
  letter-spacing: -0.01em;
}

ul, ol { padding-left: 20px; }
li { margin-bottom: 6px; }

strong { font-weight: 600; }

dl { margin: 12px 0; }
dt { font-weight: 600; margin-top: 12px; }
dd { margin: 2px 0 0; color: var(--muted); }

table.legal {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

table.legal th,
table.legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.legal th {
  background: #f8fafc;
  font-weight: 600;
}

.note {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--orange);
  background: #fff7ed;
  border-radius: 8px;
  color: var(--muted);
}

.toc {
  margin: 16px 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.toc-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.toc ol { margin: 0; }
.toc li { margin-bottom: 4px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.contact {
  margin-top: 40px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

/* Download page */
.dl-hero { text-align: center; padding-top: 24px; }

.dl-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.dl-hero h1 { font-size: 34px; }

.dl-hero .lead { max-width: 440px; margin: 0 auto 28px; }

.dl-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.dl-badge { display: inline-block; line-height: 0; }

.dl-badge-apple img { height: 52px; width: auto; }

/* Google's official badge PNG includes built-in padding; offset it so both badges look the same size. */
.dl-badge-google img { height: 78px; width: auto; margin: -13px -13px; }

.dl-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 64px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.dl-steps li { margin: 0; }

.dl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
}

.dl-steps h3 { margin: 0 0 4px; font-size: 15px; }

.dl-steps p { margin: 0; color: var(--muted); font-size: 14px; }

.dl-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.dl-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 14px;
}

.dl-footer a { color: var(--muted); text-decoration: none; }

.dl-footer a:hover { color: var(--blue); }

@media (max-width: 560px) {
  .dl-steps { grid-template-columns: 1fr; }
}
