/* The pad, look A ("the yellow pad"): docs/design/pad-spec.md, "Settled so far".
   Flat muted yellow, one faded margin line near the left edge, Atkinson Hyperlegible,
   follows the iPhone's light/dark setting. Nothing here moves: no transitions, no animations. */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: block;
  src: url(/fonts/atkinson-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: block;
  src: url(/fonts/atkinson-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: block;
  src: url(/fonts/atkinson-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: block;
  src: url(/fonts/atkinson-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #F2E6B3;   /* the pad's own yellow, as a colour, never a texture */
  --ink: #2F2A1F;      /* 11.4:1 on the ground */
  --date: #75663B;     /* 4.5:1: quiet but readable (her decision, 8 Oct) */
  --rule: #B5654E;     /* the faded margin line */
  --caret: #2F2A1F;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #1F1C14; --ink: #EFE3B4; --date: #938660; --rule: #9A5442; --caret: #EFE3B4; color-scheme: dark; }
}
@media (prefers-contrast: more) {
  :root { --date: #6E5F36; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --date: #A8996B; }
}

/* The iPhone's text size setting (Dynamic Type) reaches a web page only through this keyword. */
html { font: -apple-system-body; -webkit-text-size-adjust: 100%; background: var(--ground); }
/* On a Mac (a mouse, no touch) the system body size starts at 13px; give it the iPhone's 17px. */
@media (hover: hover) and (pointer: fine) { html { font-size: 17px; } }
* { box-sizing: border-box; }
* { transition: none !important; animation: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", -apple-system, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

main { position: relative; min-height: 100vh; min-height: 100dvh; }

/* The margin line: the app's marks live left of it, her words right of it. */
main::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(env(safe-area-inset-left, 0px) + 1.6rem);
  width: 1.5px;
  background: var(--rule);
  opacity: .5;
  pointer-events: none;
}

.pad {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(env(safe-area-inset-top, 0px) + 1.25rem);
  padding-right: calc(env(safe-area-inset-right, 0px) + 1.25rem);
  padding-left: calc(env(safe-area-inset-left, 0px) + 2.5rem);
  /* Room below her last line: one tap there brings the keyboard up at the end. */
  padding-bottom: 45vh;
  font-size: 1.12rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  outline: none;
  caret-color: var(--caret);
  -webkit-user-modify: read-write-plaintext-only;
}

/* One entry per sitting, set apart by space alone. */
.entry { display: block; min-height: 1.55em; }
.entry + .entry { margin-top: 1.35em; }

/* The date, once a day, small and plain, top right. The app's mark, never part of her words. */
.day {
  display: block;
  margin: 1.9em 0 .35em;
  text-align: right;
  font-size: .68rem;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--date);
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}
.day:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
