/* stringularity.app: the app's palette (decision 0017), always in the
   app's dark mode. System fonts only, so the site loads nothing from
   anywhere else. The -rgb triplets are the same colours, for washes. */
:root {
  --accent: #4fc8e8;
  --accent-rgb: 79 200 232;
  --teal: #5fe0c6;
  --teal-rgb: 95 224 198;
  --indigo: #8e8cff;
  --indigo-rgb: 142 140 255;
  --slate: #9aa6b8;
  --bg: #000000;
  --card: #1c1c1e;
  --text: #f2f2f7;
  --muted: #98989f;
  --line: rgba(235, 235, 245, 0.16);
  --on-fill: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header and footer */
header.site {
  padding: 20px 0 8px;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 15px;
}

nav.site a { text-decoration: none; }

footer.site {
  margin: 40px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

footer.site a { color: var(--muted); }

/* Apple's trademark credit, which its badge requires. */
footer.site .credit {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

/* Text pages */
main { padding-bottom: 8px; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 20px 0 8px;
}

h2 {
  font-size: 20px;
  margin: 28px 0 8px;
}

h3 {
  font-size: 17px;
  margin: 20px 0 4px;
}

p, li { overflow-wrap: anywhere; }

.lead {
  font-size: 19px;
  color: var(--muted);
}

.muted { color: var(--muted); }

.center { text-align: center; }

.updated {
  color: var(--muted);
  font-size: 15px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.hero img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  flex: none;
  /* The app's dark icon is black: a faint edge, as iOS draws it. */
  box-shadow: 0 0 0 1px var(--line);
}

.hero h1 { margin: 0; }

/* The App Store line under the hero (0134): "coming soon" until the app is
   out, then Apple's badge, unmodified, with its clear space of a quarter of
   its height. */
.store { margin: 20px 0 4px; }

.store p { margin: 0; }

.store .badge {
  display: inline-block;
  margin: 12px 12px 12px 0;
  line-height: 0;
}

.store .badge img {
  display: block;
  height: 48px;
  width: auto;
}

/* App Store screenshots: three across, a row to swipe on a phone. */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 559px) {
  .shots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-right: -16px;
    padding: 1px 16px 1px 1px;
  }

  .shots img {
    flex: 0 0 62%;
    width: 62%;
    scroll-snap-align: start;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

/* Like the app's tiles (FeatureTile, 0041, 0094): a wash of the colour
   over the card, a gradient outline, and the title semibold in the colour. */
.features li {
  --tint: var(--accent-rgb);
  border: 1.25px solid transparent;
  border-radius: 18px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgb(var(--tint) / 0.24), rgb(var(--tint) / 0.06)) padding-box,
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgb(var(--tint) / 0.5), rgb(var(--tint) / 0.18)) border-box,
    var(--card);
}

.features strong {
  display: block;
  font-weight: 600;
  color: rgb(var(--tint));
}

.features .tools { --tint: var(--teal-rgb); }
.features .theory { --tint: var(--indigo-rgb); }

/* What's next (0135): one card per stage, in the tiles' colours, each
   with its items as a name and a sentence. */
.roadmap {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.roadmap li {
  --tint: var(--accent-rgb);
  border: 1.25px solid transparent;
  border-radius: 18px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgb(var(--tint) / 0.24), rgb(var(--tint) / 0.06)) padding-box,
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgb(var(--tint) / 0.5), rgb(var(--tint) / 0.18)) border-box,
    var(--card);
}

.roadmap strong {
  display: block;
  font-weight: 600;
  color: rgb(var(--tint));
}

.roadmap p { margin: 6px 0 0; }

.roadmap b { font-weight: 600; }

.roadmap .testing { --tint: var(--teal-rgb); }
.roadmap .exploring { --tint: var(--indigo-rgb); }

/* What's New (0139): a release per row between hairlines, its version and
   date on the left and what changed on the right; one column on a phone. */
.releases {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}
.release {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 36px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.release:last-child { border-bottom: none; }
.release h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.release .when {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.release .soon { color: var(--teal); }
.release ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.release li + li { margin-top: 0.8em; }
.release b { font-weight: 600; }
@media (max-width: 559px) {
  .release {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 0;
  }
  .release .when { margin-top: 2px; }
}

/* The shared item */
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px 18px;
  margin: 14px 0;
}

.card h2 { margin: 2px 0 8px; font-size: 17px; }

.item-head { margin: 8px 0 4px; }

.item-head h1 { margin: 2px 0; }

.kind {
  margin: 0;
  color: var(--indigo);
  font-weight: 600;
  font-size: 15px;
}

.rows { margin: 0; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child { border-bottom: none; }

.row dt { color: var(--text); }

.row dd {
  margin: 0;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.tab {
  margin: 0;
  overflow-x: auto;
  font: 14px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre;
}

.notes { white-space: pre-wrap; margin: 0; }
.memos { margin: 0; padding-left: 1.4em; }
.memos li + li { margin-top: 0.4em; }

.sections {
  margin: 0;
  padding-left: 22px;
}

.sections li { padding: 6px 0; }

.section-name {
  display: block;
  font-weight: 600;
}

.message {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 18px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 8px;
}

.button {
  display: block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--card);
  color: var(--accent);
}

.button.primary {
  background: var(--accent);
  color: var(--on-fill);
}

.fine {
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 560px) {
  .actions { flex-direction: row; }
  .actions .button { flex: 1; }
}

/* The privacy policy: a numbered document in two columns with hairline
   rules, headings on the left and text on the right; one column on a
   phone. Its pages put "wide" on body so the header lines up. */
.wide .wrap { max-width: 960px; }

.policy-head {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}

.policy-head h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.policy .updated {
  margin: 0 0 22px;
  font-variant-numeric: tabular-nums;
}

.policy .lede {
  max-width: 36em;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}

.tldr,
.clause {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px 40px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.clause:last-child { border-bottom: none; }

.tldr h2,
.clause h2 {
  margin: 0;
  padding-top: 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.tldr h2 { color: var(--teal); }

.claims {
  margin: 0;
  padding: 0;
  list-style: none;
}

.claims li {
  padding-bottom: 14px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.claims li + li {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.claims li:last-child { padding-bottom: 0; }

.clause { scroll-margin-top: 16px; }

.clause .n {
  display: block;
  margin-bottom: 2px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.clause .body { max-width: 38em; }
.clause .body > :first-child { margin-top: 0; }
.clause .body > :last-child { margin-bottom: 0; }

.clause .body ul {
  padding: 0;
  list-style: none;
}

.clause .body li {
  position: relative;
  padding-left: 1.2em;
}

.clause .body li + li { margin-top: 0.45em; }

.clause .body li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.policy a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--accent-rgb) / 0.45);
}

@media (max-width: 719px) {
  .tldr,
  .clause {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 22px 0;
  }

  .tldr h2,
  .clause h2 { font-size: 17px; }

  .claims li { font-size: 19px; }

  .clause .n {
    display: inline;
    margin: 0 4px 0 0;
  }
}