/* 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: #1d1d1f;
  --soft: #515154;
  --faint: #86868b;
  --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: #f5f5f7;
    --soft: #a1a1a6;
    --faint: #86868b;
    --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 {
  /* San Francisco on Apple devices (no web fonts, so no third-party requests) */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, .lede, .deal-big { font-family: -apple-system-headline, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue-ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 700px; }
h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.kicker {
  display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--red); margin-bottom: 6px;
}
.intro { color: var(--soft); max-width: 820px; margin-top: 12px; font-size: 1.1rem; line-height: 1.42; }
section { padding: 64px 0; }
section.band { background: var(--band); }

/* ---------- Top bar (stays put) ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; }
.bar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.bar-brand img { width: 28px; height: 28px; border-radius: 7px; }
.bar-links { display: flex; align-items: center; gap: 4px; }
.bar-links a { color: var(--soft); text-decoration: none; font-size: .88rem; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.bar-links a:hover, .bar-links a[aria-current="page"] { color: var(--ink); background: var(--band); }
.bar-links .bar-store { background: var(--ink); color: var(--bg); font-weight: 600; margin-left: 6px; padding: 6px 14px; }
.bar-links .bar-store:hover { background: var(--ink); color: var(--bg); opacity: .85; }
@media (max-width: 420px) {
  .bar-links a { padding: 6px 7px; font-size: .84rem; }
  .bar-links .bar-store { padding: 6px 11px; margin-left: 2px; }
}

/* ---------- Top ---------- */
.top { padding: 40px 0 28px; }
html { scroll-padding-top: 64px; }
.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: 3rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.brand h1 { display: flex; flex-direction: column; align-items: center; }
.brand .sub { display: block; text-align: center; font-size: .95rem; color: var(--faint); font-weight: 500; margin-top: 4px; letter-spacing: 0; }
.lede { font-size: 1.75rem; line-height: 1.18; font-weight: 700; margin-top: 26px; letter-spacing: -0.028em; }
.lede-2 { display: block; margin-top: .35em; }
.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; }

/* ---------- Before / after ---------- */
.flip { max-width: 350px; margin: 0 auto; text-align: center; }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 2px solid var(--navy-b); outline-offset: 4px; border-radius: 12px; }
.slide { flex: 0 0 100%; scroll-snap-align: center; padding: 6px 10px 18px; box-sizing: border-box; }
.flip-pics { display: grid; }
.flip-pics img {
  grid-area: 1 / 1; display: block; width: 100%; height: auto; background: #fff;
  border: 9px solid #1b1d24; border-left-width: 6px; border-radius: 6px 34px 34px 6px;
  box-shadow: 0 8px 16px rgba(20, 26, 46, .18); transition: opacity .45s ease;
}
.flip[data-state="after"] .pic-before, .flip[data-state="before"] .pic-after { opacity: 0; }
.slide-cap { margin-top: 12px; font-size: .92rem; color: var(--soft); min-height: 4.4em; text-wrap: balance; }
.slide-cap b { display: block; color: var(--ink); font-size: 1rem; }
.flip[data-state="after"] .cap-before, .flip[data-state="before"] .cap-after { display: none; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 2px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--rule); cursor: pointer; }
.dots button[aria-selected="true"] { background: var(--navy-b); width: 20px; border-radius: 4px; }
.flip-ctl { display: inline-grid; grid-template-columns: 1fr 1fr; margin: 0 0 12px; 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-ctl em, .steps h3 em { font-style: italic; }
/* the bar's icon starts hidden on the home page and appears as the big one shrinks into it */
.shrinking .bar-brand { opacity: 0; }
.shrinking .brand { position: relative; z-index: 11; }
.shrinking .brand img, .shrinking .brand .name { position: relative; display: inline-block; transform-origin: 0 0; will-change: transform; }

.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); margin-top: 10px; }

/* ---------- 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 420px; 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: clamp(1.3rem, 5.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.deal-family { color: var(--green) !important; font-weight: 600; margin-top: 6px !important; }
.deal p + p { color: var(--soft); margin-top: 12px; font-size: .95rem; }

.more { padding: 36px 0; text-align: center; }
.more p { color: var(--soft); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; }
.button { display: inline-block; background: var(--navy-b); color: var(--glyph-ink, #fff); text-decoration: none; font-weight: 600; padding: 10px 20px; border-radius: 999px; }

/* ---------- 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: 12px 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.6rem; font-weight: 700; letter-spacing: -0.035em; 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 .faq { margin-top: 6px; }
.doc .faq details p { margin: 0; }
.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.45rem; }
  h2 { font-size: 1.85rem; }
  .extras div { grid-template-columns: 1fr; gap: 4px; }
  .shots { gap: 12px; }
  .shots img { border-width: 5px; border-left-width: 4px; border-radius: 4px 20px 20px 4px; }
}
