:root {
  --paper: #f3ede2;
  --ink: #25231f;
  --muted: #777066;
  --line: #d9d0c2;
  --terracotta: #a64f39;
  --terracotta-dark: #853b29;
  --panel: rgba(255, 252, 245, 0.52);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(190, 137, 98, 0.16), transparent 22rem),
    radial-gradient(circle at 88% 80%, rgba(166, 79, 57, 0.09), transparent 26rem),
    var(--paper);
  font-family: Georgia, "Times New Roman", serif;
}

.page-shell {
  width: min(100%, 1280px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem) clamp(1.4rem, 6vw, 7rem) 1.8rem;
  display: flex;
  flex-direction: column;
}

.topbar, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand {
  color: var(--ink);
  font: 600 1rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand span { color: var(--terracotta); }

.date, .footer { color: var(--muted); font-size: 0.66rem; }
.date { margin: 0; }

.ritual {
  width: min(100%, 850px);
  margin: auto;
  padding: clamp(2rem, 5vh, 4rem) 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--terracotta);
  font: 700 0.63rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-line { width: 1.8rem; height: 1px; background: currentColor; }

.kicker {
  margin: 1rem 0 1.45rem;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  font-style: italic;
}

.quote { margin: 0; }

.quote > p {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.65rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.quote footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 1.4rem;
  color: var(--muted);
  font: 0.72rem/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: 0.03em;
}

.quote cite { color: var(--ink); font-style: normal; font-weight: 700; }

.reflection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: clamp(2rem, 5vh, 3.4rem);
}

.reflection, .prompt {
  min-height: 7.2rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.prompt { border-left: 3px solid var(--terracotta); }
.section-label {
  margin: 0 0 0.55rem;
  color: var(--terracotta);
  font: 700 0.61rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.reflection > p:last-child, .prompt > p:last-child {
  margin: 0;
  font-size: clamp(0.92rem, 1.3vw, 1.04rem);
  line-height: 1.42;
}

.check-in {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: 700 0.7rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check-icon {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid var(--terracotta);
  color: transparent;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.check-icon svg { width: 1.15rem; height: 1.15rem; }
.check-in:hover .check-icon { transform: translateY(-1px); background: rgba(166, 79, 57, 0.12); }
.check-in.is-complete .check-icon { color: #fff; background: var(--terracotta); }
.check-in.is-complete { color: var(--terracotta-dark); }
.check-in:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 5px; }

.footer { padding-top: 0.8rem; border-top: 1px solid var(--line); }
.footer p { margin: 0; text-transform: none; letter-spacing: 0; font: italic 0.75rem/1.3 Georgia, "Times New Roman", serif; }
.footer-mark { color: var(--terracotta); font: 700 0.9rem/1 Georgia, "Times New Roman", serif; }

@media (max-width: 640px) {
  .page-shell { min-height: 100svh; padding: 1.4rem 1.3rem 1.2rem; }
  .ritual { margin: 0; padding: 3.8rem 0 2.6rem; }
  .quote > p { max-width: 16ch; font-size: clamp(2.25rem, 11vw, 3.4rem); }
  .reflection-grid { grid-template-columns: 1fr; gap: 0.65rem; margin-top: 2.5rem; }
  .reflection, .prompt { min-height: auto; padding: 1rem 1.1rem; }
  .footer { margin-top: auto; }
}

@media (min-width: 641px) and (max-height: 760px) {
  .page-shell { padding-top: 1.5rem; padding-bottom: 1.2rem; }
  .ritual { padding: 1.5rem 0; }
  .quote > p { font-size: clamp(2.6rem, 4.7vw, 3.7rem); }
  .reflection-grid { margin-top: 1.6rem; }
  .reflection, .prompt { min-height: 5.8rem; padding: 0.9rem 1.1rem; }
  .quote footer { margin-top: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
