:root {
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1d1d20;
  --line: #2a2a2e;
  --text: #f4f3ef;
  --muted: #a7a6a1;
  --accent: #ff6a4d;
  --accent-ink: #1a0a05;
  --radius: 28px;
  --wide: "Roboto Flex", system-ui, sans-serif;
  --round: "Bagel Fat One", "Roboto Flex", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--wide);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); border: 0; cursor: pointer; font-size: 16px;
  transition: transform .18s cubic-bezier(.2,.9,.3,1.4);
}
@media (hover: hover) { .pill:hover { transform: scale(1.04); } }
.top .pill { white-space: nowrap; }
.pill.ghost { background: var(--surface-2); color: var(--text); }

/* Hero */
.kicker {
  font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase;
  letter-spacing: .22em; font-size: 13px; color: var(--accent); font-weight: 700; margin: 0 0 14px;
}
.hero { padding: 64px 0 40px; display: grid; gap: 40px; grid-template-columns: 1.15fr .85fr; align-items: center; }
.hero h1 {
  font-family: var(--round); font-weight: 400; font-size: clamp(44px, 7.2vw, 88px);
  line-height: .98; letter-spacing: -.01em; margin: 0 0 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 34ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Phone mock: the browser bar, a found-media pill and the bottom bar, in CSS */
.device {
  aspect-ratio: 9 / 18.5; width: min(340px, 100%); justify-self: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 44px; padding: 14px;
  position: relative; overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(255,106,77,.35);
}
.device .bar { height: 42px; border-radius: 999px; background: var(--surface-2); display: flex; align-items: center; padding: 0 16px; color: var(--muted); font-size: 13px; }
.device .media {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; background: #000; border-radius: 999px; padding: 8px 18px 8px 8px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.device .media i { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: block; }
.device .nav { position: absolute; left: 14px; right: 14px; bottom: 18px; display: flex; gap: 8px; align-items: center; }
.device .nav span { flex: 1; height: 56px; border-radius: 999px; background: var(--surface-2); }
.device .nav b { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: block; }
.device .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.device .tiles div { aspect-ratio: 3/4; border-radius: 20px; background: linear-gradient(160deg, #2a2a2e, #18181a); }

/* Features */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--round); font-weight: 400; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.02; margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 14px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
/* Get the app: one card per release channel that has a link */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.channels[hidden] { display: none; }
.channel { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.channel .kicker { margin: 0; }
.channel p { flex: 1; }
.badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.badge svg { width: 22px; height: 22px; }

/* Download page */
.dl { padding: 48px 0 56px; }
.dl h1 { font-family: var(--round); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: 1; margin: 0 0 18px; }
.dl-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 720px; }
.dl-form input {
  flex: 1 1 260px; min-width: 0; padding: 14px 20px; border-radius: 999px; font: inherit; font-size: 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); outline: none;
}
.dl-form input:focus { border-color: var(--accent); }
.dl-form .pill:disabled { opacity: .6; cursor: progress; transform: none; }
.dl-status { margin: 18px 0 0; color: var(--muted); max-width: 60ch; }
.dl-status.error { color: var(--accent); }
.dl-status[hidden], .dl-result[hidden] { display: none; }
.dl-result { margin-top: 24px; display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; max-width: 860px; }
.dl-result:has(.dl-thumb[hidden]) { grid-template-columns: 1fr; }
.dl-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: var(--surface-2); }
.dl-thumb[hidden] { display: none; }
.dl-meta { min-width: 0; }
.dl-meta h2 { margin: 0 0 6px; font-size: 22px; overflow-wrap: anywhere; }
.dl-meta p { margin: 0 0 10px; color: var(--muted); }
.dl-preview { color: var(--text) !important; }
.dl-formats { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.dl-formats li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--surface-2);
}
.dl-formats .pill { padding: 10px 18px; font-size: 15px; }
.dl-muted { color: var(--muted); font-size: 14px; padding-right: 8px; }
@media (max-width: 640px) { .dl-result { grid-template-columns: 1fr; } }

/* Centered single-message pages (link fallback, 404) */
.center { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 32px 16px; }
.center .card { max-width: 460px; padding: 36px 28px; }
.center img { width: 72px; height: 72px; border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.center h1 { font-family: var(--round); font-weight: 400; font-size: 40px; line-height: 1.05; margin: 18px 0 10px; }
.center p { color: var(--muted); margin: 0 0 22px; }
.target { display: block; word-break: break-all; font-size: 14px; color: var(--text); background: var(--surface-2); padding: 12px 14px; border-radius: 16px; margin: -6px 0 22px; text-decoration: none; }
.target[hidden] { display: none; }
.stack { display: grid; gap: 10px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Screen sizes: wide (≥1440), tablet (≤860), phone (≤560), small phone (≤360), short landscape. */
@media (min-width: 1440px) {
  body { font-size: 18px; }
  .wrap { width: min(1240px, 100% - 64px); }
  .grid { gap: 20px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  /* The phone mock is decoration: never taller than about the screen. */
  .device { width: min(300px, 100%); }
  @supports (height: 1svh) { .device { width: min(300px, 100%, 44svh); } }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 44px 0; }
}
@media (max-width: 560px) {
  .top { padding: 14px 0; gap: 12px; }
  .brand { gap: 10px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .top .pill { padding: 11px 16px; font-size: 15px; }
  .hero { padding: 24px 0 32px; gap: 32px; }
  .lede { margin-bottom: 24px; }
  /* Stacked full-width buttons are easier to hit with a thumb. */
  .cta .pill, .dl-form .pill { flex: 1 1 100%; }
  .device { border-radius: 36px; }
  @supports (height: 1svh) { .device { width: min(260px, 100%, 44svh); } }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .section { padding: 36px 0; }
  .section h2 { margin-bottom: 20px; }
  .dl { padding: 28px 0 40px; }
  .dl-result { padding: 16px; gap: 16px; }
  .dl-formats li { border-radius: 20px; padding: 10px 10px 10px 16px; }
  .center .card { padding: 28px 20px; }
  .center h1 { font-size: 34px; }
  footer { flex-direction: column; gap: 4px; padding-bottom: 28px; }
}
@media (max-width: 360px) {
  body { font-size: 16px; }
  .brand { font-size: 15px; }
  .top .pill { padding: 11px 14px; font-size: 14px; }
  .dl-formats li { justify-content: flex-start; }
  .dl-formats .pill { flex: 1 1 100%; }
}
/* Phones turned sideways: no room for the mock next to the copy, and none below it. */
@media (max-height: 500px) and (orientation: landscape) {
  .device { display: none; }
  .hero { padding: 20px 0 28px; }
  .center { min-height: auto; }
}
@media (prefers-reduced-motion: reduce) { .pill { transition: none; } .pill:hover { transform: none; } }
