/*
  One stylesheet for every page on sayahdeen.com.

  The colours are the app's own, from src/constants/theme.ts: parchment and
  ink in light, lapis and bone in dark, a gold hairline between sections. No
  web font — the phone's own face is what the reader already trusts, and a
  font file is 300KB of nothing on a page this short.
*/
:root {
  --bg: #F3ECDC;
  --bg-raised: #FAF5E8;
  --text: #221B14;
  --text-2: #6B5A46;
  --rule: #DCCFB0;
  --gold: #8E6A21;
  --accent: #1B3A6B;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1A33;
    --bg-raised: #12264A;
    --text: #F2E9D5;
    --text-2: #A7BAD8;
    --rule: #22406E;
    --gold: #C9A253;
    --accent: #93B4E8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* The landing page: one column, centred, nothing below the fold. */
main.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  text-align: center;
}
.hero img { width: 96px; height: 96px; border-radius: 22px; display: block; }
.hero h1 { margin: 32px 0 0; font-size: 34px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.hero .lead { margin: 8px 0 0; font-size: 19px; line-height: 28px; color: var(--text-2); }
.hero hr { width: 40px; height: 1px; margin: 40px 0; border: 0; background: var(--gold); }
.hero .welcome { max-width: 22em; margin: 0; font-size: 17px; line-height: 28px; }
.hero .status { margin: 56px 0 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
.hero span { display: block; text-wrap: balance; }
.hero .welcome span + span, .hero .status span + span { margin-top: 12px; }
.hero nav { margin: 12px 0 0; font-size: 14px; line-height: 20px; }
.hero nav a + a { margin-left: 16px; }

/* A standalone link is a thing a thumb has to hit, so it gets a target
   rather than the height of its own text. Links inside a sentence keep the
   line's rhythm and are not padded. */
.hero nav a, .doc .back, .doc footer a { display: inline-block; padding: 12px 4px; }

/* A document: read left to right, at a measure the eye can track. */
main.doc {
  max-width: 34em;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.doc .back {
  margin: -12px 0 28px -4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
  text-decoration: none;
}
.doc .back:hover { color: var(--accent); }
.doc h1 { margin: 0; font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; }
.doc .dateline { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
.doc .summary {
  margin: 32px 0 0;
  padding: 20px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-size: 17px;
  line-height: 28px;
}
.doc .summary p { margin: 0; }
.doc .summary p + p { margin-top: 14px; }
.doc h2 {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.doc h3 { margin: 28px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.doc p { margin: 14px 0 0; font-size: 17px; line-height: 28px; }
.doc ul { margin: 14px 0 0; padding-left: 22px; }
.doc li { margin-top: 10px; font-size: 17px; line-height: 28px; }
.doc li:first-child { margin-top: 0; }
.doc .note { color: var(--text-2); font-size: 15px; line-height: 24px; }
.doc footer {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--gold);
  font-size: 14px;
  line-height: 22px;
  color: var(--text-2);
}

/* The four requests the app makes. A table on a phone becomes a list of
   cards, because four columns at 360 is four words per line. */
.doc .requests { margin: 20px 0 0; }
.doc .req {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.doc .req h3 { margin: 0; }
.doc .req p { margin: 6px 0 0; font-size: 15px; line-height: 24px; color: var(--text-2); }
.doc .req p strong { color: var(--text); font-weight: 600; }
