* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fafbf8;
  color: #34483d;
  font: 16px system-ui, sans-serif;
}

main { max-width: 760px; margin: auto; padding: 20px; }

.church-banner {
  text-align: center;
  background: #dce5d9;
  padding: 32px 12px;
  border-radius: 12px;
}

h1 { margin: 10px 0; font-size: clamp(26px, 5vw, 42px); }
h2 { font-size: 1.35rem; }
.church-banner small { letter-spacing: 2px; }
.church-banner p { margin: 0; }

.date-controls, .backup-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
}

.date-controls { justify-content: center; }

button, input { font: inherit; }

button, input[type="date"] {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  border: 1px solid #829782;
  background: white;
  color: inherit;
  border-radius: 8px;
  padding: 8px 10px;
}

button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }

:focus-visible { outline: 2px solid #365649; outline-offset: 3px; }

article, .tools {
  background: white;
  border: 1px solid #d4ded3;
  border-radius: 12px;
  margin: 12px 0;
  padding: 16px 18px;
}

summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-weight: 650;
}

article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

article summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

article summary::-webkit-details-marker { display: none; }

article summary::before {
  content: '';
  flex: none;
  border-block: 6px solid transparent;
  border-left: 8px solid currentColor;
}

article details[open] > summary::before { transform: rotate(90deg); }

article summary small {
  display: block;
  font-size: 11px;
  color: #526956;
  letter-spacing: .05em;
  margin-bottom: 5px;
}

.read-label {
  display: flex;
  align-items: center;
  gap: .65em;
  min-height: 44px;
  min-width: 44px;
  width: fit-content;
  justify-content: center;
  cursor: pointer;
}

article details[open],
article details[open] + .read-label { grid-column: 1 / -1; }

article details[open] + .read-label { margin-top: .5em; }
article details:not([open]) + .read-label span { display: none; }

.read-label input { width: 1.15em; height: 1.15em; margin: 0; accent-color: #365649; }
.chapter { font-size: 1rem; }
.verse { font-size: 17px; line-height: 1.8; margin: .25em 0; }
.verse-number { font-size: .75em; font-weight: 650; color: #526956; }

p { line-height: 1.6; }
progress { width: 100%; accent-color: #78927d; }

:is(#daily, #annual) {
  --progress-green: #65846c;
  appearance: none;
  display: block;
  height: 18px;
  padding: 2px;
  border: 2px solid var(--progress-green);
  border-radius: 6px;
  background: #f3f6f0;
}

:is(#daily, #annual)::-webkit-progress-bar { background: transparent; }

:is(#daily, #annual)::-webkit-progress-value {
  border-radius: 2px;
  background: var(--progress-green);
}

:is(#daily, #annual)::-moz-progress-bar {
  border-radius: 2px;
  background: var(--progress-green);
}

a { color: #365649; }
.document-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer { text-align: center; font-size: 13px; margin: 28px 0; }
#date { text-align: center; }
#save-status, #app-error { color: #833b2c; }
#journey { margin-top: 24px; }
#total { margin-bottom: 2.5rem; }

dialog {
  max-width: min(420px, calc(100% - 32px));
  border: 1px solid #829782;
  border-radius: 12px;
  padding: 20px;
  color: inherit;
}

dialog::backdrop { background: rgb(24 35 28 / 50%); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 360px) {
  main { padding: 12px; }
  nav, .date-controls { gap: 4px; }
  .date-controls :is(input, button) { padding-inline: 6px; }
}
