/* Splt's ink on paper, shared by every page of the site and the balance link page.
   Every value comes from the app: Ink, PersonPalette, Depth and Typeface (docs/design.md). */

/* The app's serif is New York, which Apple devices have as ui-serif. Everywhere else it is
   Source Serif 4, split so a browser only fetches Greek and Cyrillic when a page shows them. */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-024F, U+0259, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Ext.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0250-02AF, U+0370-03FF, U+0400-052F, U+1F00-1FFF;
}

:root {
  color-scheme: light dark;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Source Serif 4", Georgia, serif;

  /* Ink */
  --paper: #F3F0EA;
  --sheet: #FFFEFB;
  --text: #1A1917;
  --secondary: #66635B;
  --tertiary: #9A968C;
  --hairline: #E2DED5;
  --owed: #1F6B4A;
  --owe: #B83A1E;

  /* Depth: stacked card stock under one light */
  --card-radius: 24px;
  --control-radius: 14px;
  --thumbnail-radius: 8px;
  --shadow: 0 0 0 .5px rgba(42, 33, 24, .05), 0 1px 2px rgba(42, 33, 24, .06), 0 6px 14px -4px rgba(42, 33, 24, .12);
  --toplight: inset 0 1px 0 #fff;
  --letterpress: rgba(255, 255, 255, .85);
  --press: rgba(26, 25, 23, .05);

  /* PersonPalette, light fills carry white text */
  --on: #FFFFFF;
  --p0: #B5432F; --p1: #A85510; --p2: #8A660C; --p3: #62722A;
  --p4: #3B7A4B; --p5: #1F7668; --p6: #1F7488; --p7: #2F66A8;
  --p8: #4B55A0; --p9: #6F4FA3; --p10: #96437F; --p11: #AF3F62;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131210;
    --sheet: #23211D;
    --text: #EFEDE6;
    --secondary: #A3A097;
    --tertiary: #6E6B63;
    --hairline: #2E2C28;
    --owed: #6FBF96;
    --owe: #EE7B5C;
    --shadow: 0 1px 1px rgba(0, 0, 0, .5);
    --toplight: inset 0 1px 0 rgba(255, 255, 255, .07);
    --letterpress: rgba(255, 255, 255, .05);
    --press: rgba(239, 237, 230, .06);
    --on: #0E0E12;
    --p0: #E58E7A; --p1: #E3A26A; --p2: #D9BC6A; --p3: #B4C676;
    --p4: #8CC99A; --p5: #6FC7B5; --p6: #74C1D3; --p7: #8DB3E5;
    --p8: #A3A9E8; --p9: #BDA3E6; --p10: #DD9CCB; --p11: #E895AE;
  }
}

@media (prefers-contrast: more) {
  :root { --shadow: 0 0 0 1px var(--hairline); --toplight: none; --letterpress: transparent; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -.2px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* The app's mark: two discs, as on the icon */
.mark { display: flex; }
.mark i { display: block; width: 13px; height: 13px; border-radius: 50%; }
.mark i:first-child { background: #D9694F; }
.mark i:last-child { background: #3D8C86; margin-left: -4px; opacity: .9; }
