/* Vespers is said at dusk. He wakes at 18:00 and goes out into the night, so the thing he
   opens in that hour is dark, warm and quiet. Calm is a property of the punctuation, per
   CHARACTER.md section 2, and it is a property of this too: no red, no badges, no counters,
   nothing that flashes. There is deliberately no CSS in this file for a streak, a flame, a
   chain, a score or a percentage, because none of those may ever exist in the UI. */

:root {
  --ink: #0d0b0a;
  --ink-2: #16130f;
  --line: #2b2621;
  --text: #e9e2d6;
  --muted: #9a9086;
  --ember: #c8763c;
  --got: #7d9b6a;
  --half: #b8944a;
  --missed: #a86a5c;
  --pad: 1.25rem;
  font-size: 17px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", system-ui, sans-serif;
  line-height: 1.5;
  overscroll-behavior-y: contain;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           calc(env(safe-area-inset-bottom) + 1rem) env(safe-area-inset-left);
  min-height: 100svh;
}

main, .screen { max-width: 34rem; margin: 0 auto; padding: var(--pad); }

header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 0.5rem 0 1.5rem;
}
.day { display: flex; flex-direction: column; }
.day span:first-child { font-size: 1.35rem; letter-spacing: -0.01em; }

h1 { font-size: 1.6rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
h2 { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em;
     text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.6rem; }
h2:first-child { margin-top: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.kind { color: var(--ember); font-size: 0.9rem; margin: 0 0 1.5rem; }

/* cards ------------------------------------------------------------------ */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.card .title { font-size: 1.05rem; line-height: 1.35; }
.card .sub { color: var(--muted); font-size: 0.82rem; }

/* buttons ---------------------------------------------------------------- */

button {
  font: inherit; border-radius: 0.75rem; border: 1px solid transparent;
  padding: 0.85rem 1.1rem; cursor: pointer; min-height: 48px;
}
.primary { background: var(--ember); color: #17110c; border: none; font-weight: 600; }
.primary:active { filter: brightness(0.9); }
.ghost { background: none; color: var(--muted); border: 1px solid var(--line); }
.wide { width: 100%; margin-top: 1.25rem; }

input, textarea {
  font: inherit; width: 100%; background: var(--ink-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.85rem;
  margin-bottom: 0.75rem;
}

/* the lesson ------------------------------------------------------------- */

.prose {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.08rem; line-height: 1.65;
}
.prose h2 {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem; letter-spacing: 0.14em; color: var(--ember);
  margin: 2rem 0 0.5rem;
}
.prose p { margin: 0 0 1rem; }

.sticky {
  position: sticky; bottom: 0; padding: 1rem 0 0.25rem;
  background: linear-gradient(to top, var(--ink) 60%, transparent);
}
.sticky .primary { width: 100%; }

/* producing -------------------------------------------------------------- */

.ask { font-size: 1.15rem; line-height: 1.45; margin: 0 0 0.5rem; }

.recorder { display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
            margin-top: 2.5rem; }

/* Voice is the button under his thumb. Typing is one tap further, never blocked. */
.record {
  width: 8.5rem; height: 8.5rem; border-radius: 50%;
  background: var(--ember); color: #17110c; border: none;
  font-size: 1.05rem; font-weight: 600;
}
.record.on { background: var(--missed); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.timer { font-variant-numeric: tabular-nums; color: var(--muted); margin: 0; }

/* the mark --------------------------------------------------------------- */

.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.marks li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.5rem;
}
.marks .name { color: var(--muted); font-size: 0.9rem; }
.marks .val { font-weight: 600; }
.val.got { color: var(--got); }
.val.half { color: var(--half); }
.val.missed { color: var(--missed); }
.val.not_marked { color: var(--muted); font-weight: 400; }

.correction {
  font-family: ui-serif, Georgia, serif; font-size: 1.1rem; line-height: 1.55;
  border-left: 2px solid var(--ember); padding-left: 1rem; margin: 1.5rem 0;
}

/* the record ------------------------------------------------------------- */

.log { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.log li { border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; font-size: 0.9rem; }
.log .when { color: var(--muted); font-size: 0.8rem; }

[hidden] { display: none !important; }
