:root {
  --paper: #f8f5f4;
  --ink: #32283e;
  --pine: #443248;
  --green: #644e67;
  --muted: #6b5f6e;
  --line: #dfd7dd;
  --brass: #a8654e;
  --vermilion: #8d4954;
  --plum: #4c365a;
  --peach: #f2b899;
  --lilac: #ded5e9;
}

body { background: var(--paper); }
main, .masthead-inner, .site-footer { width: min(1180px, calc(100% - clamp(36px, 8vw, 128px))); }
::selection { background: #ecc2ae; color: var(--ink); }
:is(button, a, summary, input, textarea, select):focus-visible { outline: 2px solid #8d4754; outline-offset: 3px; }

.masthead { border-bottom: 1px solid var(--line); background: #fdfaf8; }
.masthead .masthead-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 72px; }
.masthead .wordmark { justify-self: start; gap: 9px; color: var(--ink); font: 720 1.64rem/1.3 var(--font-ui); letter-spacing: -.05em; }
.wordmark [data-edition] { font: 600 .72rem/1.3 var(--font-ui); letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.publisher-mark {
  position: relative; overflow: hidden; isolation: isolate; display: inline-block; flex: none;
  width: 34px; height: 34px; border-radius: 50% 50% 43% 43%; background: var(--ink);
}
.publisher-mark i { position: absolute; top: 6px; left: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--peach); }
.publisher-mark::before, .publisher-mark::after {
  content: ""; position: absolute; width: 45px; height: 39px; border-radius: 50%; border: 1.5px solid #eed3cb;
}
.publisher-mark::before { transform: rotate(-25deg); top: 18px; left: -14px; }
.publisher-mark::after { transform: rotate(-26deg); top: 22px; left: -9px; }
.masthead-date { grid-column: 3; grid-row: 1; justify-self: end; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.masthead .site-nav { grid-row: 1; grid-column: 2; display: flex; align-self: center; align-items: center; gap: 4px; }
.masthead .site-nav[hidden] { display: none; }
.masthead .site-nav a {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 6px clamp(10px, 1.4vw, 20px);
  border-radius: 25px; text-decoration: none; color: #61556a; font-size: .91rem; letter-spacing: -.035em; line-height: 1.3;
}
.masthead .site-nav a:hover { color: var(--ink); background: #f1e9ee; }
.masthead .site-nav a[aria-current="page"] { color: #fff8f4; background: var(--ink); }
.masthead .site-nav a[aria-current="page"]::after { content: none; }
.nav-glyph { display: none; }
.site-footer { border-color: var(--line); padding-block: 20px 30px; }
.site-footer span { color: #55475a; }
.site-footer a { color: #5f5064; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.almanac { padding: clamp(20px, 3vw, 40px) 0 clamp(40px, 6vw, 74px); }
.almanac-spread { display: grid; grid-template-columns: minmax(0, 1.86fr) minmax(290px, 1fr); gap: clamp(14px, 1.7vw, 26px); }
.home-inquiry {
  min-width: 0; padding: clamp(20px, 3vw, 38px); border: 1px solid var(--line);
  border-radius: 22px; background: #fffcfa; color: var(--ink);
}
.home-profile-link { display: inline-flex; align-items: center; min-height: 26px; color: #674b65; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.home-inquiry h1 { margin: .3rem 0 0; font: 650 clamp(1.65rem, 2.9vw, 2.6rem)/1.35 var(--font-ui); letter-spacing: -.045em; }
.almanac-cover {
  position: relative; isolation: isolate; overflow: hidden; display: flex;
  min-height: clamp(320px, 29vw, 384px); align-items: center;
  background: #322637; border-radius: 22px; color: #fff7ef;
}
.cover-landscape { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 64% 50%; }
.almanac-cover::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #251a2bdd, #2b1c303d 63%, transparent 83%); }
.cover-text { padding: clamp(24px, 3.4vw, 48px); width: min(83%, 490px); }
.almanac-kicker { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: #f8ece8; margin: 0; }
.almanac-kicker span { color: #fac6a7; font-weight: 700; }
.almanac-kicker time { font-variant-numeric: tabular-nums; }
.cover-text :is(h1,h2) { display: flex; flex-wrap: wrap; gap: .05em .2em; align-items: baseline; margin: .27em 0 .1em; font: 580 clamp(3.25rem, 6.1vw, 5.35rem)/1.22 var(--font-ui); letter-spacing: -.05em; color: #fffaf5; }
.cover-text small { color: #f1c3ab; font: 480 clamp(1.05rem, 2vw, 1.48rem)/1.3 var(--font-ui); letter-spacing: 0; }
.cover-line {
  margin: 0; color: #fff7ef; font: 620 clamp(1.125rem, 1rem + .55vw, 1.375rem)/1.5 var(--font-reading);
  letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere;
}
.cover-action {
  display: inline-flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 46px; margin-top: clamp(20px, 2.5vw, 36px);
  padding: 10px 18px; text-decoration: none; background: #f5c4a8; color: #332434; border-radius: 25px; font-size: .89rem; font-weight: 700;
}
.cover-action:hover { background: #ffdac7; }
.cover-action span { font: 500 1.18rem/1 var(--font-ui); }
.almanac-calendar { display: flex; flex-direction: column; justify-content: center; padding: clamp(17px, 2.3vw, 30px); border-radius: 22px; border: 1px solid #e2d7e0; background: #efe7ef; }
.almanac-calendar h2, .shelf-index h2 { margin: 0; color: var(--ink); font: 650 clamp(1.4rem, 2vw, 1.87rem)/1.45 var(--font-ui); letter-spacing: -.045em; }
.almanac-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); margin: .85rem -.3rem 1.2rem; }
.almanac-week > :is(a,span) { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 65px; line-height: 1.28; text-decoration: none; border-radius: 24px; }
.almanac-week small, .week-pillar { color: #695c6d; font-size: .7rem; }
.almanac-week strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.almanac-week a:hover { background: #e1d4e3; }
.almanac-week [aria-current="date"] { background: var(--plum); color: #fff7ef; }
.almanac-week [aria-current="date"] :is(small,.week-pillar) { color: #f3d9cb; }
.almanac-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 17px; border-top: 1px solid #cfc1d2; margin: 0; padding-top: 16px; }
.almanac-strip dt { font-size: .74rem; color: #66576b; }
.almanac-strip dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; margin: 1px 0 0; font: 620 1.1rem/1.35 var(--font-ui); }
.almanac-strip small { color: #6a5a70; font: 500 .69rem/1.35 var(--font-ui); font-variant-numeric: tabular-nums; }
.shelf-index { margin-top: clamp(30px, 4.2vw, 60px); }
.shelf-index header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shelf-index header a { color: #63566b; text-underline-offset: 3px; font-size: .82rem; }
.index-volumes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.index-volume { display: grid; grid-template-columns: 30% minmax(0,1fr) auto; align-items: center; gap: clamp(10px,1.15vw,16px); padding: 10px clamp(11px,1.45vw,20px) 10px 10px; text-decoration: none; border-radius: 17px; border: 1px solid #e3dadf; background: #fffcfa; }
.index-volume::after { content: "↗"; color: #6c586f; align-self: start; margin-top: .45rem; font: 1.1rem/1 var(--font-ui); }
.index-volume:hover { border-color: #b8a2b7; }
.volume-art { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #e2d6e1; }
.volume-copy { display: grid; gap: 4px; }
.volume-copy strong { font: 650 clamp(1.1rem,1.6vw,1.5rem)/1.4 var(--font-ui); letter-spacing: -.055em; }
.volume-copy small { font-size: .81rem; color: var(--muted); line-height: 1.55; }

@media (min-width: 681px) {
  .almanac-personal .almanac-spread { grid-template-columns: minmax(0,1.18fr) minmax(0,1fr); }
  .almanac-personal .cover-text { width: 100%; }
  .almanac-personal .almanac-calendar {
    grid-column: 1/-1; display: grid; grid-template-columns: 1.25fr 1fr; gap: .5rem clamp(22px, 4vw, 50px);
    justify-content: normal;
  }
  .almanac-personal .almanac-week { grid-column: 1; margin-block: 0; }
  .almanac-personal .almanac-strip { grid-column: 2; grid-row: 1/3; align-content: center; padding: 0 0 0 clamp(18px, 3vw, 34px); border: 0; border-left: 1px solid #cfc1d2; }
}

@media (max-width: 850px) {
  .masthead .masthead-inner { grid-template-columns: auto 1fr; }
  .masthead-date { display: none; }
  .masthead .site-nav { justify-self: end; }
  .almanac-spread { grid-template-columns: minmax(0,1.4fr) minmax(266px,1fr); }
  .index-volumes { gap: 9px; }
  .index-volume { grid-template-columns: 28% 1fr; }
  .index-volume::after { display: none; }
}

@media (max-width: 680px) {
  main, .masthead-inner, .site-footer { width: calc(100% - 32px); }
  body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  body:has(.site-nav[hidden]) { padding-bottom: env(safe-area-inset-bottom); }
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .masthead .masthead-inner { min-height: 57px; display: flex; justify-content: space-between; }
  .masthead .wordmark { font-size: 1.44rem; gap: 8px; }
  .publisher-mark { width: 30px; height: 30px; }
  .masthead-date { display: block; font-size: .79rem; }
  .masthead .site-nav {
    z-index: 10; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; position: fixed;
    inset: auto 0 calc(9px + env(safe-area-inset-bottom)); margin: 0 auto; padding: 5px; width: min(420px,calc(100% - 28px));
    background: var(--ink); border: 1px solid #695770; border-radius: 24px; box-shadow: 0 5px 16px #281b3930;
  }
  .masthead .site-nav a { min-width: 0; min-height: 49px; gap: 3px; flex-direction: column; font-size: .75rem; color: #f8eff5; padding: 4px 0; border-radius: 18px; }
  .masthead .site-nav a:hover { background: #4e4057; }
  .masthead .site-nav a[aria-current="page"] { color: #352739; background: var(--peach); }
  .masthead .site-nav a:focus-visible { outline: 2px solid white; outline-offset: -3px; }
  .nav-glyph { display: block; font: 520 1.05rem/1.15 var(--font-ui); }
  .almanac { padding-top: 15px; }
  .almanac-spread { grid-template-columns: 1fr; gap: 14px; }
  .almanac-cover { min-height: clamp(225px,58vw,320px); border-radius: 18px; }
  .cover-text { width: 85%; padding: 21px; }
  .cover-text :is(h1,h2) { font-size: clamp(2.9rem,10vw,4rem); }
  .cover-action { min-height: 44px; margin-top: 17px; padding: 8px 14px; font-size: .85rem; }
  .almanac-calendar { padding: 15px 17px; border-radius: 17px; }
  .almanac-calendar h2 { font-size: 1.19rem; }
  .almanac-week { margin: 8px -.35rem 12px; }
  .almanac-week > :is(a,span) { min-height: 57px; }
  .almanac-strip { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding-top: 10px; }
  .almanac-strip dd { font-size: .93rem; }
  .almanac-strip small { display: none; }
  .shelf-index { margin-top: 26px; }
  .shelf-index header { margin-bottom: 10px; }
  .index-volumes { grid-template-columns: 1fr; }
  .index-volume { grid-template-columns: 68px 1fr auto; border-radius: 14px; gap: 16px; padding: 8px 16px 8px 8px; }
  .index-volume::after { display: block; align-self: center; margin: 0; }
  .volume-copy strong { font-size: 1.16rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .masthead .site-nav a, .cover-action, .almanac-week a { transition: background-color .16s, color .16s; }
  .index-volume { transition: border-color .16s, transform .16s; }
  .index-volume:hover { transform: translateY(-2px); }
}
.reading-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border-radius: 2rem;
  background: var(--plum);
  color: #fff8f4;
  font: 650 .92rem/1.4 var(--font-ui);
  text-decoration: none;
}
.reading-next:hover { background: #352640; }
