/* Widen site: one stylesheet for all three pages. Light and dark follow the
   reader's system setting. */
:root {
  color-scheme: light dark;
  /* Puzzlement's brand colours, shared across Challis apps */
  --red: #700000;
  --green: #037036;
  --navy-b: #191970;
  --purple: #580470;
  --orange: #e07e1b;
  --teal: #065570;

  --bg: #ffffff;
  --band: #f6f6f8;
  --card: #ffffff;
  --ink: #1a1a2e;
  --soft: #4d5066;
  --faint: #8a8ca0;
  --rule: #e6e6ee;
  --blue: var(--navy-b);
  --blue-ink: var(--green);
  --navy: var(--navy-b);
  --shadow: 0 2px 12px rgba(20, 26, 46, .08);

  /* the Duo pictures */
  --d-body: #1b1d24;
  --d-screen: #ffffff;
  --d-gutter: #eceef3;
  --d-bar: #191970;
  --d-logo: #ffffff;
  --d-photo: #b9cfe0;
  --d-sun: #e07e1b;
  --d-hill: #037036;
  --d-ink: #2a2f40;
  --d-text: #b9bdc9;
  --d-strip: rgba(214, 218, 228, .5);
  --d-btn: #6b7081;
}
@media (prefers-color-scheme: dark) {
  :root {
    --red: #f24d40;
    --green: #3cc27a;
    --navy-b: #8c9eff;
    --purple: #c27af2;
    --orange: #f0a050;
    --teal: #4fb3d4;

    --bg: #10101c;
    --band: #181828;
    --card: #1f1f33;
    --ink: #eeeef6;
    --soft: #b6b7c9;
    --faint: #7f8096;
    --rule: #2b2b44;
    --shadow: 0 2px 14px rgba(0, 0, 0, .35);

    --glyph-ink: #10101c;
    --d-body: #000000;
    --d-screen: #1c1c1e;
    --d-gutter: #0a0a0b;
    --d-bar: #2a2a8c;
    --d-photo: #2c4258;
    --d-sun: #e07e1b;
    --d-hill: #037036;
    --d-ink: #e5e5ea;
    --d-text: #55565c;
    --d-strip: rgba(120, 122, 132, .34);
    --d-btn: #c7c7cc;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--blue-ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 700px; }
h2 { font-size: 1.75rem; letter-spacing: -0.015em; line-height: 1.25; }
.kicker {
  display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 6px;
}
.intro { color: var(--soft); max-width: 640px; margin-top: 10px; }
section { padding: 64px 0; }
section.band { background: var(--band); }

/* ---------- Top ---------- */
.top { padding: 56px 0 28px; }
.top .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 24px rgba(20, 26, 46, .25); }
.brand h1 { font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; }
.brand span { display: block; font-size: .95rem; color: var(--faint); font-weight: 500; margin-top: 4px; letter-spacing: 0; }
.lede { font-size: 1.45rem; line-height: 1.35; font-weight: 600; margin-top: 26px; letter-spacing: -0.01em; }
.lede + p { color: var(--soft); margin-top: 12px; font-size: 1.05rem; }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  padding: 12px 22px; border-radius: 12px; font-weight: 600;
}
.store small { display: block; font-weight: 400; font-size: .72rem; opacity: .75; line-height: 1.1; }
.store b { display: block; font-size: 1.05rem; line-height: 1.2; }
.store[aria-disabled="true"] { cursor: default; }
.cta .note { color: var(--faint); font-size: .9rem; }

.duo { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 24px rgba(20, 26, 46, .22)); }
.d-body { fill: var(--d-body); }
.d-screen { fill: var(--d-screen); }
.d-gutter { fill: var(--d-gutter); }
.d-bar { fill: var(--d-bar); }
.d-logo { fill: var(--d-logo); }
.d-photo { fill: var(--d-photo); }
.d-sun { fill: var(--d-sun); }
.d-hill { fill: var(--d-hill); }
.d-ink { fill: var(--d-ink); }
.d-text { fill: var(--d-text); }
.d-strip { fill: var(--d-strip); }
.d-cam { fill: #050505; }
.d-lens { fill: #1d2a4d; }
.d-btn { fill: var(--d-btn); opacity: .8; }

/* ---------- Comparison ---------- */
.flip { max-width: 360px; margin: 0 auto; text-align: center; }
.flip-pics { display: grid; }
.flip-pics > div { grid-area: 1 / 1; transition: opacity .5s ease; }
.flip[data-state="after"] .pic-before, .flip[data-state="before"] .pic-after { opacity: 0; }
.flip-ctl { display: inline-flex; margin-top: 16px; background: var(--band); border-radius: 999px; padding: 4px; }
.flip-ctl button {
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--soft);
  background: none; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
}
.flip-ctl button[aria-pressed="true"] { background: var(--navy-b); color: var(--glyph-ink, #fff); }
.flip figcaption { margin-top: 10px; font-size: .92rem; color: var(--soft); min-height: 2.9em; }
.flip[data-state="after"] .cap-before, .flip[data-state="before"] .cap-after { display: none; }
.d-note { fill: var(--red); stroke: var(--bg); stroke-width: 4; }
.d-note-n { fill: #fff; font: 700 22px -apple-system, BlinkMacSystemFont, sans-serif; }

/* ---------- Real screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 28px; margin-top: 30px; }
.shots figure { text-align: center; }
.shots img {
  display: block; width: 100%; height: auto; background: #fff;
  border: 9px solid #1b1d24; border-left-width: 6px;
  border-radius: 6px 34px 34px 6px;   /* the Duo's hinge side is square */
  box-shadow: 0 14px 30px rgba(20, 26, 46, .22);
}
.shots figcaption { margin-top: 12px; font-size: .9rem; color: var(--soft); }
.shots figcaption b { display: block; color: var(--ink); font-size: .98rem; }
.credit { text-align: center; color: var(--faint); font-size: .78rem; margin-top: 18px; }

/* ---------- A closer look ---------- */
.closer { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; }
.notes { list-style: none; counter-reset: n; margin-top: 22px; }
.notes li { counter-increment: n; position: relative; padding-left: 44px; margin-bottom: 16px; color: var(--soft); }
.notes li b { color: var(--ink); }
.notes li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff;
  font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.aside { color: var(--soft); border-left: 3px solid var(--teal); padding-left: 14px; margin-top: 8px; }

/* ---------- Extras ---------- */
.extras { margin-top: 30px; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.extras div { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.extras dt { font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.c-red { --accent: var(--red); } .c-green { --accent: var(--green); } .c-navy { --accent: var(--navy-b); }
.c-purple { --accent: var(--purple); } .c-orange { --accent: var(--orange); } .c-teal { --accent: var(--teal); }
.extras dd { color: var(--soft); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: s; margin-top: 26px; display: grid; gap: 20px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(s); position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--step, var(--navy-b)); color: var(--glyph-ink, #fff); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li:nth-child(1) { --step: var(--purple); } .steps li:nth-child(2) { --step: var(--navy-b); }
.steps li:nth-child(3) { --step: var(--green); }
.steps h3 { font-size: 1.02rem; margin-bottom: 4px; }
.steps p { font-size: .94rem; color: var(--soft); }
.path { font-weight: 600; color: var(--ink); }

.start { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: center; }
.deal { background: var(--card); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); border-left: 6px solid var(--green); }
.launch { display: inline-block; background: var(--orange); color: var(--glyph-ink, #fff); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.deal-big { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.deal p + p { color: var(--soft); margin-top: 12px; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 26px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; font-weight: 400; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--soft); padding: 0 0 16px; }

/* ---------- Text pages (privacy, support) ---------- */
.doc { padding: 40px 0 24px; }
.doc .back { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.doc .back img { width: 34px; height: 34px; border-radius: 8px; }
.doc h1 { font-size: 2.1rem; letter-spacing: -0.02em; margin-top: 30px; }
.doc .updated { color: var(--faint); font-size: .9rem; margin-top: 4px; }
.doc h2 { font-size: 1.15rem; margin: 30px 0 6px; letter-spacing: 0; }
.doc p, .doc li { color: var(--soft); margin-bottom: 10px; }
.doc ul { padding-left: 22px; }
.doc strong { color: var(--ink); }
.summary { background: var(--band); border-radius: 14px; padding: 18px 20px; margin-top: 24px; }
.summary p { margin: 0; color: var(--ink); }
.mailbox { display: inline-block; margin-top: 8px; font-size: 1.25rem; font-weight: 700; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--rule); padding: 34px 0 48px; color: var(--faint); font-size: .86rem; text-align: center; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 10px; }
footer .legal { max-width: 640px; margin: 10px auto 0; font-size: .78rem; }

/* ---------- Narrow screens ---------- */
@media (max-width: 880px) {
  .top .wrap { grid-template-columns: 1fr; }
  .closer, .start { grid-template-columns: 1fr; }
  .closer-pic { max-width: 300px; margin: 0 auto; }
}
@media (max-width: 560px) {
  section { padding: 48px 0; }
  .top { padding-top: 36px; }
  .brand h1 { font-size: 2.2rem; }
  .lede { font-size: 1.25rem; }
  h2 { font-size: 1.45rem; }
  .extras div { grid-template-columns: 1fr; gap: 4px; }
  .flip { max-width: 300px; }
  .shots { gap: 12px; }
  .shots img { border-width: 5px; border-left-width: 4px; border-radius: 4px 20px 20px 4px; }
}
