/* Calm, readable layout — works without JavaScript */

:root {
  --bg: #fdfbf7;
  --text: #2a241c;
  --muted: #5c5348;
  --accent: #46664a;
  --accent-hover: #3a533d;
  --card: #ffffff;
  --border: #ebe0d0;
  --error: #b42318;
  --nudge-bg: #fff8e6;
  --nudge-border: #e8d4a8;
  --focus: #7a9a7d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a241c;
    --text: #f7f1e8;
    --muted: #c8d8c9;
    --accent: #a3bda5;
    --accent-hover: #c8d8c9;
    --card: #243028;
    --border: #314434;
    --error: #f87171;
    --nudge-bg: #2d2618;
    --nudge-border: #5c4a3a;
    --focus: #c8d8c9;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, white);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 95%, black);
  }
}

.site-header .inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-sayings-home {
  font-weight: 600;
  margin-inline-end: 0.25rem;
  border-inline-end: 1px solid var(--border);
  padding-inline-end: 0.75rem;
}

.site-header a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
}

.site-header a:hover {
  background: var(--border);
  color: var(--text);
}

.btn-nav {
  background: var(--accent);
  color: #fff !important;
}

.btn-nav:hover {
  background: var(--accent-hover) !important;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .inner {
  max-width: 42rem;
  margin: 0 auto;
}

h1 {
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0.75rem 0;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  font-size: 1.1rem;
  max-width: 36rem;
}

.hero {
  padding: 2rem 0 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: var(--card);
}

.btn:hover {
  background: var(--border);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.section {
  margin-top: 2rem;
}

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

@media (min-width: 40rem) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
}

.day-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.passage {
  font-family: Georgia, serif;
  font-weight: 600;
  margin: 0;
}

.passage.large {
  font-size: 1.35rem;
}

.card-text {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta {
  margin: 3rem 0;
  padding: 2rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  text-align: center;
}

.cta h2 {
  margin-top: 0;
  color: #fff;
}

.cta .btn.primary {
  background: #fff;
  color: var(--accent-hover);
  border: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-width: 22rem;
}

.stack label {
  font-weight: 600;
  font-size: 0.9rem;
}

.stack input[type="email"],
.stack input[type="password"],
.stack textarea {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
}

.stack button,
.settings-form button,
.inline-form button {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

.stack button:hover,
.settings-form button:hover {
  background: var(--accent-hover);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -0.25rem 0 0;
}

.error {
  color: var(--error);
  font-size: 0.95rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--nudge-bg);
  border: 1px solid var(--nudge-border);
  margin-bottom: 1rem;
}

.banner.success {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 1.5rem;
}

.banner.success h2 {
  margin: 0.25rem 0;
}

.nudge {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--nudge-bg);
  border: 1px solid var(--nudge-border);
  font-size: 0.9rem;
}

.progress-wrap {
  height: 0.65rem;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.reading-block .reading {
  margin-top: 0.75rem;
}

.reflection {
  color: var(--muted);
}

.inline-form {
  margin-top: 1rem;
}

.share-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.share-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-row .share-hint {
  margin-top: 0;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 34rem;
}

.check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.95rem;
  cursor: pointer;
}

.radio-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--card);
  cursor: pointer;
}

.radio-card small {
  color: var(--muted);
}

.radio-card input[type="radio"] {
  margin-top: 0.2rem;
}

.day-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
}

@media (min-width: 30rem) {
  .day-grid {
    grid-template-columns: repeat(10, 1fr);
  }
}

.day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--border);
  color: var(--text);
}

.day-cell.done {
  background: var(--accent);
  color: #fff;
}

.day-cell.next:not(.done) {
  background: #97ad9a;
  color: #1f2b22;
}

.day-cell.next.done {
  filter: brightness(1.08);
}

.day-cell.selected {
  /* Use box-shadows instead of outline for Safari consistency. */
  box-shadow: 0 0 0 2px var(--focus), 0 0 0 5px rgba(122, 154, 125, 0.32);
}

.day-cell.next-blink {
  animation: next-day-pulse 1.8s ease-in-out infinite;
  -webkit-animation: next-day-pulse 1.8s ease-in-out infinite;
}

@keyframes next-day-pulse {
  0%,
  100% {
    opacity: 1;
    background-color: #97ad9a;
    color: #1f2b22;
  }
  50% {
    opacity: 1;
    background-color: #6f8f72;
    color: #ffffff;
  }
}

@-webkit-keyframes next-day-pulse {
  0%,
  100% {
    opacity: 1;
    background-color: #97ad9a;
    color: #1f2b22;
  }
  50% {
    opacity: 1;
    background-color: #6f8f72;
    color: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .day-cell.next-blink {
    animation: none;
  }
}

.day-cell:hover {
  opacity: 0.9;
}
