/* ScreenFolio site
 * Layout: one centered column (max 1200px) with a 20px gutter that grows on wide
 * screens; two-column sections collapse to one below 860px.
 */
:root {
  /* Colour: white ground, near-black green ink, the app icon's green as the one accent. */
  --bg: #ffffff;
  --ink: #0d1a13;
  --ink-soft: #33413a;
  --muted: #4e5b54;
  --placeholder: #66736b;        /* 4.8:1 on white */
  --tint: #eef3f0;
  --tint-hover: #e2ebe5;
  --line: rgba(13, 26, 19, 0.12);
  --line-strong: rgba(13, 26, 19, 0.35);
  --green: #15803d;              /* 5.0:1 on white; use --green-deep on --tint */
  --green-deep: #0f5e2d;
  --green-bright: #22a55a;
  --mark: rgba(21, 128, 61, 0.18);
  --night: #0d1a13;
  --night-muted: #b9c6bf;

  /* Elevation */
  --shadow-md: 0 10px 28px rgba(13, 26, 19, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 26, 19, 0.10);
  --shadow-lift: 0 18px 40px rgba(13, 26, 19, 0.16);

  /* Type: one grotesk for display and body, a mono for small machine-ish labels. */
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-label: 14px;   /* mono labels */
  --fs-small: 15px;
  --fs-body: 17px;    /* secondary paragraphs */
  --fs-lead: clamp(17px, 1.5vw, 20px);
  --fs-h3: 20px;

  /* Shape: 8 / 14 / 28, plus pills. */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 28px;

  --gutter: clamp(20px, 6vw, 120px);
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.short-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.short-page > main { flex: 1; }

img { max-width: 100%; height: auto; }

a { color: var(--green); }
a:hover { color: var(--green-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, .button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li, dd { text-wrap: pretty; }
/* Long words and unbroken strings never push the page wider than the screen. */
h1, h2, h3, p, li, dt, dd, label { overflow-wrap: break-word; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--green); color: #ffffff; font-size: 16px; font-weight: 600; text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}
.button:hover { background: var(--green-deep); color: #ffffff; }
.download-label-mobile { display: none; }
.is-handheld .download-label-desktop { display: none; }
.is-handheld .download-label-mobile { display: inline; }
.button:has(.download-label-mobile) { max-width: 100%; white-space: normal; text-align: center; padding-block: 10px; }
@media (max-width: 720px) {
  .download-label-desktop { display: none; }
  .download-label-mobile { display: inline; }
}

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; gap: 28px; min-height: 80px; font-size: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; flex: none; }
.brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--muted); text-decoration: none; }
.nav a.link:hover { color: var(--ink); }
.nav .button { font-size: 16px; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; padding: 10px 4px; font-weight: 600; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.mobile-nav-panel { position: absolute; top: calc(100% + 14px); right: 0; z-index: 101; width: min(280px, calc(100vw - 40px)); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow-md); }
.mobile-nav-panel > a:not(.button) { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--ink); text-decoration: none; }
.mobile-nav-panel > a:not(.button):hover { background: var(--tint); border-radius: var(--radius-sm); }
.mobile-nav-panel .button { display: flex; margin-top: 8px; }
@media (max-width: 980px) {
  .nav a.link, .nav > .button { display: none; }
  .mobile-nav { display: block; }
}
@media (max-width: 420px) {
  .nav { gap: 12px; min-height: 68px; }
  .nav .button { min-height: 40px; padding: 0 14px; font-size: 16px; }
  .brand span { font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(32px, 6vw, 64px); }
.hero h1 {
  max-width: 1000px; margin-inline: auto;
  font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; line-height: 1.0; letter-spacing: -0.03em;
}
.hero .lede { max-width: 640px; margin: 22px auto 0; font-size: var(--fs-lead); color: var(--muted); }

.hero-cta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-cta .meta { margin: 0; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(96px, 11vw, 150px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(40px, 7vw, 96px); row-gap: 28px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split.center { align-items: center; }
.h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.eyebrow { font: var(--fs-label) var(--font-mono); color: var(--green); }
.body-lg { font-size: var(--fs-lead); color: var(--muted); margin: 0; }
.stack { display: flex; flex-direction: column; gap: 22px; }

.band { margin-top: clamp(96px, 11vw, 160px); background: var(--tint); padding-block: clamp(56px, 8vw, 110px); }
.band .body-lg { color: var(--ink-soft); }
/* Green text on the tint needs the deeper green for 4.5:1. */
.band a, .band .eyebrow, .latest a { color: var(--green-deep); }

#privacy { padding-block: clamp(56px, 6vw, 88px); }
.privacy-content { display: flex; flex-direction: column; gap: clamp(36px, 5vw, 64px); }
.privacy-heading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(40px, 7vw, 96px); align-items: start; }
.privacy-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); font-size: var(--fs-body); }
.privacy-facts > div { padding-top: 18px; border-top: 1px solid var(--line); }
.privacy-facts dt { font-weight: 700; }
.privacy-facts dd { margin: 6px 0 0; color: var(--ink-soft); }
@media (max-width: 860px) {
  .privacy-heading { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .privacy-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .privacy-facts { grid-template-columns: minmax(0, 1fr); }
  .privacy-facts { gap: 24px; }
}

.rows { display: flex; flex-direction: column; }
.rows > div { padding: 26px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: var(--fs-h3); font-weight: 700; }
.rows p { margin: 0; font-size: var(--fs-body); color: var(--muted); }

.faq { margin: 0; display: flex; flex-direction: column; }
.faq > div { padding: 24px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq > div:last-child { border-bottom: 1px solid var(--line); }
.faq dt { font-size: var(--fs-h3); font-weight: 700; }
.faq dd { min-width: 0; margin: 0; font-size: var(--fs-body); color: var(--muted); }
.faq-section { padding-top: clamp(72px, 8vw, 112px); }
.faq-section > .h2 { margin-bottom: 24px; }
.faq-more { margin: 20px 0 0; font-size: var(--fs-body); }
.faq-section + .wrap .cta { margin-top: clamp(64px, 8vw, 112px); }
@media (max-width: 800px) {
  .faq > div { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
}

.cta {
  margin-top: clamp(96px, 11vw, 150px); border-radius: var(--radius-lg); color: #ffffff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(34, 165, 90, 0.22), rgba(34, 165, 90, 0) 55%), var(--night);
  padding: clamp(40px, 6vw, 90px) clamp(24px, 5.5vw, 80px);
  display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap;
}
.cta img { width: 88px; height: 88px; flex: none; }
.cta .text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cta .meta { margin: 0; color: var(--night-muted); font-size: var(--fs-body); }
.cta .button:focus-visible { outline-color: var(--green-bright); }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 120px; padding-block: 32px; font-size: 18px; color: var(--muted); }
.footer img { width: 28px; height: 28px; }
.footer-identity { display: flex; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-left: auto; }
.footer a { color: var(--muted); }
.footer-links a { display: flex; align-items: center; min-height: 48px; font-size: 20px; font-weight: 500; text-underline-offset: 3px; }

/* ---------- Text pages (privacy, release notes) ---------- */
.doc { padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 40px; }
.doc h1 { font-size: clamp(40px, 5vw, 56px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.doc .date { margin: 0; font: var(--fs-label) var(--font-mono); color: var(--muted); }
.doc .breadcrumb { font-size: 17px; font-weight: 600; line-height: 1.4; }
.doc .breadcrumb a { text-underline-offset: 3px; }
.doc .intro { margin: 0; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); }
.doc section { display: flex; flex-direction: column; gap: 12px; }
.doc h2 { font-size: 24px; font-weight: 700; }
.doc p { margin: 0; }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }

.latest { padding: 28px; border-radius: var(--radius); background: var(--tint); display: flex; flex-direction: column; gap: 14px; }
.latest .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.latest h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.latest .when { font: var(--fs-label) var(--font-mono); color: var(--muted); }
.latest h3 { font-size: 15px; font-weight: 700; margin-top: 4px; }
.latest p { margin: 0; }
.releases { display: flex; flex-direction: column; gap: 20px; }
.versions { list-style: none; margin: 0; padding: 0; }
.versions a {
  min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.versions a span { font-size: 15px; font-weight: 500; color: var(--green-deep); }
.versions li:last-child a { border-bottom: 1px solid var(--line); }
.doc-head { display: flex; flex-direction: column; gap: 14px; max-width: 900px; }
.help-index { gap: 32px; }
.help-index .doc-head { gap: 10px; }
.doc .versions { padding: 0; gap: 0; display: block; }
.doc .guide-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0; list-style: none; }
.guide-links li { min-width: 0; }
.guide-links a { display: flex; flex-direction: column; gap: 12px; min-height: 190px; height: 100%; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.guide-links a:hover { border-color: var(--line-strong); background: var(--tint); }
.guide-links span { font-size: var(--fs-body); color: var(--muted); }
.guide-links .guide-action { margin-top: auto; color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.download-instructions { max-width: 900px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--tint); font-size: var(--fs-lead); }
.download-for-mac { display: none; }
.is-desktop .download-for-mac { display: block; }
.is-desktop .download-for-later { display: none; }
.download-for-mac .button { margin-top: 20px; }
.copy-site-link { margin-top: 20px; border: 0; font-family: inherit; cursor: pointer; }
.copy-site-link[hidden] { display: none; }
.copy-link-status { margin-top: 12px !important; font-size: var(--fs-body); overflow-wrap: anywhere; }
.copy-link-status:empty { display: none; }
.privacy-layout > section { display: grid; grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); padding-top: 24px; border-top: 1px solid var(--line); align-content: start; }
.privacy-layout > section > h2 { grid-column: 1; grid-row: 1; }
.privacy-layout > section > :not(h2) { grid-column: 2; min-width: 0; }
.privacy-layout > .privacy-data-flows { display: flex; }
.privacy-data-flows > p { max-width: 900px; }
.privacy-flows { width: 100%; margin: 8px 0 0; }
.privacy-flows > div { display: grid; grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); padding-block: 18px; border-top: 1px solid var(--line); }
.privacy-flows dt { font-weight: 700; }
.privacy-flows dd { min-width: 0; margin: 0; }
/* Release notes read as one chronological document, with metadata beside each entry. */
.release-layout { max-width: 1000px; gap: 48px; }
.release-layout .doc-head { max-width: 740px; }
.release-layout .releases { display: flex; flex-direction: column; gap: 0; }
.release-layout .latest { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px 48px; padding: 36px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.release-layout .latest .head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.release-layout .latest h2 { font-size: 30px; line-height: 1.15; }
.release-layout .latest.featured h2 { color: var(--green-deep); }
.release-layout .latest .when { font: 16px/1.5 var(--font-sans); }
.release-layout .release-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; font-size: 18px; line-height: 1.65; }
.release-layout .release-body h3 { margin: 12px 0 0; font-size: 18px; line-height: 1.4; }
.release-layout .release-body h3:first-child { margin-top: 0; }
.release-layout .release-body ul { gap: 10px; padding-left: 22px; }
@media (max-width: 720px) {
  .release-layout { gap: 32px; }
  .release-layout .latest { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 28px; }
  .release-layout .latest .head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
}
@media (max-width: 800px) {
  .doc .guide-links { grid-template-columns: minmax(0, 1fr); }
  .privacy-layout > section { display: flex; }
  .privacy-flows > div { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
}

/* ---------- Reduced motion: every state change is instant. ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Real app captures: preserve the entire UI, with a full-size link for detail. */
.product-shot { margin: 36px 0 0; min-width: 0; }
.screenshot-link { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); background: var(--tint); }
.screenshot-link img { display: block; width: 100%; }
.product-shot figcaption { margin-top: 18px; color: var(--muted); font-size: var(--fs-small); text-align: center; }
.product-shot figcaption span { white-space: nowrap; }
.hero > .product-shot { margin-top: 48px; }
.search-hero-shot .screenshot-link,
.similar-detail-shot .screenshot-link { padding: 2.3%; background: linear-gradient(135deg, #cadb7b, #a8c349); }
.search-hero-shot .screenshot-link img,
.similar-detail-shot .screenshot-link img { height: auto; border-radius: 12px; box-shadow: 0 8px 24px rgb(30 45 10 / 24%); }
.assistant-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 860px) {
  .assistant-shots { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .assistant-shots .product-shot { max-width: 600px; width: 100%; margin-inline: auto; }
}

/* Let the browser handle sticky positioning, including mobile overscroll. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
html:has(.site-header) { scroll-padding-top: 104px; }
@media (max-width: 420px) {
  html:has(.site-header) { scroll-padding-top: 88px; }
}

.library-sources-art { display: block; width: min(100%, 440px); height: auto; margin-top: 12px; }

@media (max-width: 720px) {
  .footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; width: 100%; margin-left: 0; }
}

.assistant-guide { gap: clamp(36px, 4vw, 56px); }
.assistant-guide .intro { max-width: 760px; }
.assistant-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.assistant-setup { min-width: 0; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: #f8faf9; }
.assistant-setup h2 { display: flex; align-items: center; gap: 16px; }
.assistant-setup h2 img { flex: none; width: 40px; height: 40px; }
.assistant-setup ol { margin: 12px 0 0; padding-left: 24px; display: grid; gap: 16px; }
.assistant-guide-bottom { display: flex; flex-direction: column; gap: 20px; }
.assistant-guide-details { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); padding-block: 32px; border-block: 1px solid var(--line); }
.assistant-guide-details section { min-width: 0; }
.assistant-guide-details ul { padding-left: 24px; }
.assistant-help summary { cursor: pointer; font-weight: 700; padding-block: 8px; }
.assistant-help summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.assistant-troubleshooting { max-width: 1100px; margin: 16px 0 0; }
.assistant-troubleshooting > div { display: grid; grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr); gap: 28px; padding-block: 14px; border-top: 1px solid var(--line); }
.assistant-troubleshooting dt { font-weight: 700; }
.assistant-troubleshooting dd { min-width: 0; margin: 0; font-size: var(--fs-body); color: var(--muted); }
.assistant-help-contact { margin-top: 18px !important; font-size: var(--fs-body); color: var(--muted); }
@media (max-width: 800px) {
  .assistant-setup-grid, .assistant-guide-details { grid-template-columns: minmax(0, 1fr); }
  .assistant-guide-details { gap: 36px; }
  .assistant-troubleshooting > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 520px) {
  .assistant-setup { padding: 20px; }
  .assistant-setup h2 { gap: 12px; }
  .assistant-setup h2 img { width: 32px; height: 32px; }
}

.search-guide-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); row-gap: clamp(36px, 4vw, 56px); }
.search-guide-sections > section { min-width: 0; padding-top: 24px; border-top: 1px solid var(--line); align-content: start; }
.search-guide-more { border-top: 1px solid var(--line); padding-top: 20px; }
.search-guide-more summary { cursor: pointer; font-weight: 700; padding-block: 8px; }
.search-guide-more summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.search-guide-more-content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 24px; }
.search-guide-more-content h3 { font-size: var(--fs-h3); }
@media (max-width: 800px) {
  .search-guide-sections, .search-guide-more-content { grid-template-columns: minmax(0, 1fr); }
}

.assistant-shots .screenshot-link { box-shadow: 0 0 0 1px var(--line-strong); background: transparent; border-radius: 3.5% / 3.98%; }

/* Preserve the complete assistant connection dialogs. */
.assistant-shots .screenshot-link { aspect-ratio: 1000 / 880; }
.assistant-shots .screenshot-link img { max-height: none; }
