:root {
  color-scheme: light;
  --ink: #29241f;
  --wine: #6e2430;
  --muted: #645c52;
  --rule: #cfc3af;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #f6f1e7;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(calc(100% - 40px), 1040px); margin-inline: auto; }
a { color: var(--wine); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #8f5c21; outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -4rem; padding: .7rem; background: #fff; }
.skip:focus { top: .5rem; }
.masthead { border-bottom: 1px solid var(--rule); background: #fffaf1; }
.masthead .wrap, footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 16px; }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--ink); font: bold 1.13rem Georgia, serif; text-decoration: none; }
.brand span { display: grid; place-items: center; width: 32px; height: 36px; border-radius: 7px; background: var(--wine); color: #fff9ed; }
.section-link, nav, footer { font-size: .84rem; }
nav { display: flex; flex-wrap: wrap; gap: .65rem; margin: 28px 0 20px; color: var(--muted); }
h1, h2, .result-day { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.08; max-width: 19ch; margin: 0; }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.6; max-width: 64ch; margin: 15px 0 28px; }
.spread { display: grid; grid-template-columns: 1.15fr 1fr; align-items: start; gap: clamp(26px, 5vw, 60px); }
h2 { font-size: 1.55rem; margin: 0 0 12px; }
.sheet { padding: clamp(20px, 4vw, 34px); background: #fffcf5; border: 1px solid var(--rule); border-top: 3px solid var(--wine); border-radius: 4px 4px 16px 16px; }
#controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
input, button, .save { font-family: inherit; font-size: 1rem; }
input { min-width: 0; max-width: 100%; min-height: 48px; padding: 8px 12px; background: #fff; color: var(--ink); border: 1px solid #9d8e79; border-radius: 6px; }
button { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--wine); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.note, .reading p { color: var(--muted); line-height: 1.6; }
.note { font-size: .92rem; margin: 12px 0 0; }
.result { border-top: 1px solid var(--rule); padding-block: 14px; }
.result:first-child { margin-top: 20px; }
.result h3 { margin: 0 0 4px; font: 600 .9rem system-ui, sans-serif; color: var(--wine); }
.result-day { display: block; font-size: 1.38rem; margin: 0 0 4px; }
.result a { font-size: .88rem; }
.save { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; color: #fff; background: var(--wine); border-radius: 7px; text-decoration: none; }
.reading { padding-top: 6px; }
.reading p { margin: 0 0 14px; }
.reading h2:not(:first-child) { margin-top: 24px; }
.references { display: grid; justify-items: start; gap: 6px; font-size: .9rem; }
footer { margin-top: 36px; border-top: 1px solid var(--rule); padding-bottom: 28px; }
@media (max-width: 660px) {
  .wrap { width: min(calc(100% - 32px), 560px); }
  .section-link { display: none; }
  .spread { grid-template-columns: 1fr; }
  .lead { margin-bottom: 20px; }
}
