:root {
  --bg: #faf8f4;
  --bg-elev: #ffffff;
  --text: #1c1b19;
  --muted: #5f5b53;
  --line: #e7e2d8;
  --accent: #3d6b4f;
  --accent-soft: #e4efe7;
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 8px 24px rgba(28, 27, 25, .06);
  --radius: 18px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --bg-elev: #1d1c1a;
    --text: #f1eee8;
    --muted: #a7a197;
    --line: #2f2d29;
    --accent: #8cc4a0;
    --accent-soft: #1f2b23;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font-family: var(--serif); font-weight: 700; font-size: 16px;
}
.nav { display: flex; gap: 4px; flex-wrap: nowrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
@media (max-width: 520px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { padding: 96px 0 56px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.025em;
  font-size: clamp(40px, 7vw, 76px); line-height: 1.04; margin: 0; max-width: 19ch;
}

/* Apps */
.apps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); padding-bottom: 24px; scroll-margin-top: 80px; }
.app {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: flex; gap: 18px; align-items: flex-start;
}
.app-icon {
  flex: none; width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center;
  font-size: 28px; color: #fff;
}
.app h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.app .platform { margin: 2px 0 8px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.app p { margin: 0; color: var(--muted); }

/* An app card that opens the app's section below */
.app-link { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.app-link:hover { border-color: var(--accent); transform: translateY(-1px); }
img.app-icon { object-fit: cover; }

/* App sections, further down the home page */
.app-detail { padding: 72px 0 24px; border-top: 1px solid var(--line); margin-top: 48px; scroll-margin-top: 60px; }
.app-detail-head { display: flex; gap: 22px; align-items: center; margin-bottom: 28px; }
.app-icon-large { width: 88px; height: 88px; border-radius: 20px; }
.app-detail h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 5vw, 46px); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.app-detail .platform { margin: 4px 0 6px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.app-detail .tagline { margin: 0; color: var(--muted); font-size: 18px; }
.features { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.features li { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--muted); }
.features strong { display: block; color: var(--text); margin-bottom: 4px; }
.carousel { position: relative; max-width: 640px; margin: 0 0 28px; }
/* Portrait iPhone and iPad screenshots */
.carousel-portrait { max-width: 420px; }
.carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow);
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.slide img { display: block; width: 100%; height: auto; }
.carousel-btn {
  position: absolute; top: calc(50% - 22px); transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent); color: var(--text);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.carousel-btn:hover { border-color: var(--accent); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel-dots button {
  width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--line);
}
.carousel-dots button[aria-selected="true"] { background: var(--accent); }
.store { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 44px; width: auto; }
.store-note { color: var(--muted); font-size: 14px; }

/* A direct download, for apps that can't be in the Mac App Store */
.app p.download, .landing p.download, .doc p.download { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.download-button[aria-disabled="true"] { opacity: .5; cursor: default; }

/* A page of its own for one app (blot/), for ads to land on */
.landing { border-top: 0; margin-top: 0; padding-top: 56px; }
.landing .app-detail-body { margin-top: 32px; }
.landing h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 5vw, 46px); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.download-button {
  display: inline-block; background: var(--accent); color: var(--bg); border-radius: 999px;
  padding: 8px 18px; font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .15s;
}
.download-button:hover { opacity: .88; }
.download-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Legal pages */
.doc { max-width: 760px; padding: 56px 0 24px; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 5vw, 46px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 21px; margin: 40px 0 8px; letter-spacing: -.01em; scroll-margin-top: 80px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
.callout {
  background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 16px 18px; margin: 24px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.caps { text-transform: uppercase; font-size: 14px; letter-spacing: .01em; }
.toc { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 0 0 8px; font-size: 15px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2 220px; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
