/* Blog posts, /blog/, /apps/ and the app pages. They build on the privacy page's .legal
   look and use only the colour tokens of styles.css and theme.css, so the light, dark and
   no-JavaScript dark themes all apply. Bump ?v= in tools/lib/render.mjs after editing. */
.legal {
  overflow-wrap: break-word;
}

.legal h3 {
  margin: 28px 0 8px;
  font: 600 20px/1.3 "Space Grotesk", sans-serif;
  letter-spacing: -.4px;
}

.legal li + li {
  margin-top: 6px;
}

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

.legal code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--note-surface);
  color: var(--note-text);
  font-size: .92em;
}

/* A long line in a code block scrolls inside the block, not the page. */
.legal pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--note-surface);
  color: var(--note-text);
}

.legal pre code {
  padding: 0;
  background: none;
}

/* Breadcrumb: a nav element, so undo the site's header nav rules. */
.legal .breadcrumb {
  display: block;
  position: static;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 400;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.legal .breadcrumb li + li {
  margin-top: 0;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--muted);
}

.legal .breadcrumb a {
  color: var(--link-text, #214cdb);
}

.legal .byline,
.legal .post-meta {
  margin: 0;
  font-size: 15px;
}

.legal .intro {
  font-size: 18px;
}

.legal .cover {
  display: block;
  width: 100%;
  margin: 28px 0 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* Steps from the front matter: numbered, with the access note and the screenshot. */
.steps {
  margin: 24px 0;
  padding-left: 28px;
}

.legal .steps > li {
  margin-top: 22px;
  color: var(--ink);
}

.steps > li::marker {
  color: var(--blue);
  font-weight: 700;
}

.legal .steps p {
  margin: 0 0 8px;
  color: var(--ink);
}

.steps img,
.screenshots img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 320px);
  /* Phone screenshots are tall: keep each one shorter than the screen. */
  max-height: min(70vh, 560px);
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* App screenshots: side by side where they fit, each like a step image. */
.legal .screenshots {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.legal .screenshots li {
  margin: 0;
}

/* The call to action: icon, Play title, cost and the badge or button. */
.app-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.app-icon {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.app-cta .app-icon {
  width: 64px;
  height: 64px;
}

.app-cta-text {
  flex: 1 1 160px;
  min-width: 0;
}

.legal .app-cta p {
  margin: 0;
}

.legal .app-cta .app-cta-title {
  color: var(--ink);
  font: 700 18px/1.35 "Space Grotesk", sans-serif;
}

.legal .cost {
  font-size: 15px;
}

.play-button {
  min-height: 48px;
}

.legal .play-badge {
  display: inline-block;
  line-height: 0;
}

.play-badge img {
  width: auto;
  height: 56px;
}

/* "More you can do with <app>": the app's other features, one card each, two columns
   where they fit. */
.legal .feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.legal .feature-list > li {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  line-height: 1.6;
}

.legal .feature-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font: 600 18px/1.35 "Space Grotesk", sans-serif;
}

.legal .feature-list a {
  font-weight: 700;
  white-space: nowrap;
}

/* Lists of posts and apps. */
.legal .post-list,
.legal .app-list {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.legal .post-list > li,
.legal .app-list > li {
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.legal .post-list h2,
.legal .post-list h3,
.legal .app-list h2 {
  margin: 0 0 6px;
  font: 600 21px/1.3 "Space Grotesk", sans-serif;
  letter-spacing: -.4px;
}

.legal .post-list h2 a,
.legal .post-list h3 a,
.legal .app-list h2 a {
  color: var(--ink);
  text-decoration: none;
}

.legal .post-list h2 a:hover,
.legal .post-list h3 a:hover,
.legal .app-list h2 a:hover {
  color: var(--link-text, #214cdb);
  text-decoration: underline;
}

.legal .post-list p,
.legal .app-list p {
  margin: 6px 0 0;
}

.app-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.app-item .app-icon {
  width: 64px;
  height: 64px;
}

.app-item-icon {
  flex: 0 0 auto;
  line-height: 0;
}

/* Each app in the list gets its own Google Play button next to its details link. */
.legal .app-list .app-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 14px;
}

.legal .app-item-more {
  font-weight: 600;
}

.app-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.app-heading .app-icon {
  width: 72px;
  height: 72px;
}

.legal .app-heading h1 {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
}

.draft-banner,
.legal .draft-tag {
  background: var(--error-surface);
  color: var(--error-text);
}

.draft-banner {
  margin: 0 0 24px;
  padding: 12px 18px;
  border-radius: 12px;
}

.legal .draft-banner p,
.legal .draft-banner li {
  color: var(--error-text);
}

.legal .draft-banner p {
  margin: 0;
}

.legal .draft-tag {
  padding: 1px 8px;
  border-radius: 99px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .legal {
    padding-top: 40px;
  }

  .legal h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }

  .app-cta {
    padding: 16px;
  }

  .play-button {
    width: 100%;
    justify-content: center;
  }

  .app-heading .app-icon {
    width: 56px;
    height: 56px;
  }
}

/* "Works offline" next to a feature name (owner, 2026-10-17). */
.legal .offline-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--success-surface);
  color: var(--success-text);
  font-size: 13px;
  font-weight: 700;
  vertical-align: 1px;
}
