/* stamati.me: a white page, dark grey ink, one column. No outside fonts. */
:root {
  --paper: #ffffff;
  --ink: #37352f;
  --muted: #6f6e69;
  --rule: #e3e2e0;
  --link: #1f3fae;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  /* A touch smaller on narrow phones, so a short spoken line stays on one line. */
  font-size: clamp(1.0625rem, 4.6vw, 1.1875rem);
  line-height: 1.6;
}
.wrap { max-width: 36rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s;
}
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top of the page. */
.top { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--rule); }
.top.slim { padding: 1.5rem 0 1.25rem; }
.top .mark {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.top .mark a { color: inherit; text-decoration: none; }
.top .mark a:hover { color: var(--ink); text-decoration: underline; }
.top .intro { margin: 0.85rem 0 0; font-size: 1.125rem; }

/* One post. */
article { padding-top: 2.5rem; }
article + article { margin-top: 3.5rem; border-top: 1px solid var(--rule); }
.date {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.title {
  margin: 0.35rem 0 0;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.title a { color: inherit; text-decoration: none; }
.title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* The picture taken that moment. It sits above the words. */
.photo { margin: 1.5rem 0 0; }
.photo img { display: block; width: 100%; height: auto; }

/* The recording. */
.player { display: flex; align-items: center; gap: 0.9rem; margin: 1.25rem 0 2rem; }
.player[hidden] { display: none; }
.player button {
  flex: none;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.player button:hover { background: var(--ink); color: var(--paper); }
.player button:disabled { opacity: 0.4; cursor: default; background: transparent; color: var(--ink); }
.player svg { width: 1.125rem; height: 1.125rem; display: block; }
.player .i-pause { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player .time {
  flex: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.player input[type="range"] {
  flex: 1; min-width: 0;
  height: 2.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.player input[type="range"]:disabled { opacity: 0.4; cursor: default; }
.player input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--ink) var(--p, 0%), var(--rule) var(--p, 0%));
}
.player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.8125rem; height: 0.8125rem;
  margin-top: -0.34rem;
  border-radius: 50%;
  background: var(--ink);
}
.player input[type="range"]::-moz-range-track { height: 2px; background: var(--rule); }
.player input[type="range"]::-moz-range-progress { height: 2px; background: var(--ink); }
.player input[type="range"]::-moz-range-thumb {
  width: 0.8125rem; height: 0.8125rem;
  border: 0; border-radius: 50%;
  background: var(--ink);
}
audio { display: block; width: 100%; margin: 1.25rem 0 2rem; }
audio:not([controls]) { display: none; }

/* The words. Each spoken line is its own line; a line that wraps is indented. */
.verse p { margin: 0 0 1.4em; }
.verse p:last-child { margin-bottom: 0; }
.verse .l { display: block; padding-left: 1.4em; text-indent: -1.4em; }

/* The sign-up box: the drawing on one side, the field on the other. */
.signup-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1.75rem;
  align-items: center;
  margin-top: 3.25rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--ink);
}
.signup-box .art { max-width: 7.5rem; }
.signup-box .art img { display: block; width: 100%; height: auto; }
.signup h2 { margin: 0; font-size: 1.3125rem; line-height: 1.25; font-weight: 700; }
.signup .blurb { margin: 0.3rem 0 0.9rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
.signup .row { display: flex; gap: 0.6rem; }
.signup input[type="email"] {
  flex: 1 1 auto; min-width: 0; width: 100%;
  min-height: 2.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit; font-size: 1.0625rem;
}
.signup input::placeholder { color: var(--muted); opacity: 1; }
.signup button {
  flex: none;
  min-height: 2.875rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font: inherit; font-size: 1.0625rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.signup button:hover { background: transparent; color: var(--ink); }
.signup button:disabled { opacity: 0.5; cursor: default; }
.signup .msg { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.875rem; }
.signup .msg:empty { display: none; }
.signup .done { margin: 0.4rem 0 0; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Bottom of the page. */
.foot {
  margin-top: 3.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Plain pages: privacy, added, removed. */
.page { padding-top: 2.5rem; }
.page h1 { margin: 0 0 1.25rem; font-size: 2rem; line-height: 1.2; font-weight: 400; }
.page h2 { margin: 2.25rem 0 0.5rem; font-size: 1.3125rem; line-height: 1.25; }
.page p { margin: 0 0 1em; }
.page .signup { margin-top: 1rem; }

@media (min-width: 34rem) {
  .signup-box { grid-template-columns: 9rem 1fr; padding: 1.75rem; }
  .signup-box .art { max-width: none; }
}
@media (min-width: 40rem) {
  body { font-size: 1.25rem; }
  .top { padding-top: 3.25rem; }
  .title, .page h1 { font-size: 2.375rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
