/*
  The public site's one stylesheet (app/site).

  Served from /assets under a Content-Security-Policy that admits styles from
  here only: templates carry no style="" and no <style>. No web fonts — the
  system stack, which has every script of the site. Colours are tokens,
  redefined for the dark scheme. Sides are logical (start, end), so Hebrew
  and Arabic pages, dir="rtl", mirror.
*/

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --ink: #1b1a18;
  --ink-2: #55534e;
  --line: #e6e3dc;
  --accent: #3d6b4f;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --ink: #eeece6;
    --ink-2: #b2afa7;
    --line: #2e2d2a;
    --accent: #8cc3a0;
  }
}

* { box-sizing: border-box; }

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

a { color: var(--accent); text-underline-offset: 0.15em; }

.top, main, .foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* The mark (templates/mark.svg, inline so it takes the scheme's colours). */
.brand { display: block; }
.mark { display: block; height: 56px; width: auto; }
.mark-s { fill: var(--accent); }
.mark-word { fill: var(--ink); }
.mark-my { fill: var(--ink-2); }

/* Eight languages: on a phone they take two lines. */
.lang { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; color: var(--ink-2); }
.lang [aria-current] { font-weight: 600; color: var(--ink); }

main { padding-bottom: 48px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0.6em 0 0.4em; letter-spacing: -0.01em; }
/* Spacing would pull Arabic's joined letters apart. */
:lang(ar) h1 { letter-spacing: normal; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 1.6em 0 0.4em; }
h3 { font-size: 1.1rem; margin: 1.3em 0 0.3em; }
h4 { font-size: 1rem; margin: 1.2em 0 0.3em; }

.hero { padding: 24px 0 8px; }
.tagline { font-size: 1.3rem; line-height: 1.4; margin: 0 0 0.6em; }
.lede { color: var(--ink-2); }

/* The link to the app's page in the App Store: the site's one button.
   Filled with the accent, its words in the page's background colour — a pair
   that reads in both schemes. */
.store {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.store:hover { text-decoration: underline; }
.store:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.links ul { padding-inline-start: 1.2em; }

.doc { overflow-wrap: anywhere; }
.doc blockquote {
  margin: 1em 0;
  padding: 2px 16px;
  border-inline-start: 3px solid var(--line);
  color: var(--ink-2);
}
.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  margin: 1em 0;
}
.doc th, .doc td {
  text-align: start;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 8rem;
}
.doc code { font-size: 0.92em; }
.meta { color: var(--ink-2); font-size: 15px; margin-top: 2em; }

.contacts dt { font-weight: 600; margin-top: 0.8em; }
.contacts dd { margin: 0; }

/* A product, for the app's "Share" links: words only, no picture. */
.product { padding-top: 16px; }
.product h1 { margin-top: 0.1em; }
.product-brand { margin: 0; color: var(--ink-2); font-weight: 600; }
.product-category { margin-top: 0; color: var(--ink-2); }

.foot {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--ink-2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
