:root {
  color-scheme: light;
  --paper: #f8f8f3;
  --surface: #fffefb;
  --ink: #18392e;
  --muted: #58695f;
  --line: #e1e7dd;
  --forest: #153d30;
  --light-green: #e8f0df;
  --serif: Georgia, 'Times New Roman', serif;
  font: 15px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid #548745; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 9; background: white; padding: 10px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; background: #fdfdf8; border-right: 1px solid var(--line); padding: 27px 19px; display: flex; flex-direction: column; z-index: 3; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; font-weight: bold; line-height: 1.1; margin: 0 5px 42px; white-space: nowrap; }
.brand-mark { display: block; flex: none; border: 1px solid var(--line); border-radius: 12px; height: 43px; width: 43px; object-fit: contain; }
.brand small { display: block; margin-top: 6px; font: 650 9px system-ui,sans-serif; letter-spacing: .18em; color: var(--muted); }
.nav-caption { margin: 26px 10px 9px; color: var(--muted); font-size: 10px; font-weight: 730; letter-spacing: .16em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 9px 10px; border-radius: 9px; color: #40584b; font-size: 13px; font-weight: 570; }
.nav-link + .nav-link { margin-top: 3px; }
.nav-link:hover, .nav-link[aria-current] { background: var(--light-green); color: var(--ink); }
.nav-link[aria-current] { font-weight: 750; }
.nav-link svg { width: 17px; height: 17px; }
.offline { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 7px 1px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.offline i { width: 7px; height: 7px; background: #649149; border-radius: 50%; }
.workspace { margin-left: 238px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 78px; padding: 15px clamp(24px,4vw,62px); display: flex; gap: 24px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fdfdf8; }
.trail { font-size: 13px; font-weight: 600; }
.trail span { margin: 0 7px; color: var(--muted); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 13px; width: min(100%, 365px); background: #f4f6ef; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); min-height: 43px; }
.search:focus-within { border-color: #59854c; box-shadow: 0 0 0 2px #cce0bc; }
.search svg { width: 17px; height: 17px; }
.search input { width: 100%; border: 0; padding: 8px 0; background: none; outline: 0; font-size: 13px; }
.search input::placeholder { color: #596d60; }
kbd { font: 12px system-ui,sans-serif; border: 1px solid #d9e2d5; border-radius: 4px; padding: 1px 6px; }
main { width: min(100%, 1300px); margin: 0 auto; padding: 32px clamp(24px,4vw,62px) 42px; flex: 1; }
main:focus { outline: none; }
.intro { margin-bottom: 22px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(34px,4vw,58px); line-height: 1.04; letter-spacing: -.045em; }
h2 { font-size: clamp(24px,3vw,32px); line-height: 1.15; letter-spacing: -.025em; }
.intro p, .page-head p { margin-top: 9px; color: var(--muted); }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 257px; padding: 29px 34px 30px; border-radius: 19px; color: #fffbed; background: radial-gradient(ellipse at 84% 49%, #386044, transparent 61%), #163d30; }
.hero > :not(.hero-art) { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .17em; font-weight: 760; text-transform: uppercase; }
.hero .eyebrow { color: #e1ecbb; }
.eyebrow svg { width: 15px; height: 15px; }
.hero h2 { margin-top: 11px; max-width: 76%; font-size: clamp(30px,4.1vw,55px); line-height: 1.03; letter-spacing: -.04em; }
.hero p { margin: 10px 0 18px; font: italic 16px/1.4 var(--serif); color: #e6edda; max-width: 71%; }
.hero-art { pointer-events: none; position: absolute; width: 43%; right: 0; top: 0; bottom: 0; color: #d7e3a8; opacity: .57; mask-image: linear-gradient(90deg,transparent 0%, black 30%); }
.staff { width: 118%; height: 114px; position: absolute; right: -10%; top: 33%; background: repeating-linear-gradient(to bottom,transparent 0 19px,#b1c59b66 20px 21px); transform: rotate(-10deg); }
.hero-art .note { position: absolute; font: 125px/1 var(--serif); right: 15%; top: 21%; transform: rotate(-11deg); }
.hero-art .note-small { font-size: 58px; right: 67%; top: 54%; opacity: .63; }
.hero-art .spark { position: absolute; top: 18%; right: 55%; font-size: 20px; }
.hero-art .ring { position: absolute; right: 5%; top: -24%; width: 270px; height: 365px; border: 1px solid #b1c59b50; border-radius: 50%; transform: rotate(35deg); }
.action, .quiet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; min-height: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 650; }
.action svg, .quiet svg { width: 16px; height: 16px; }
.action:hover, .quiet:hover { background: var(--light-green); }
.hero .action { background: #e1edbd; border-color: transparent; color: #1c3b2f; }
.hero .action:hover { background: #f1f6da; }
.section { margin-top: 29px; }
.section h2 { margin-bottom: 13px; }
.books { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.vc { --accent: #2d6343; --tint: #e5efdf; }
.cel { --accent: #895611; --tint: #f8eddb; }
.ng { --accent: #176860; --tint: #e1efea; }
.book-card { display: flex; flex-direction: column; min-height: 154px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.book-card:hover, .hymn-row:hover { border-color: #a6b99f; background: #fcfff7; }
.book-card h3 { margin: 12px 0 5px; font-size: clamp(18px,2vw,23px); line-height: 1.15; }
.book-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); margin-top: auto; }
.book-meta svg { width: 16px; height: 16px; color: var(--accent); }
.badge { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--tint, var(--light-green)); color: var(--accent, var(--ink)); font-weight: 740; font-size: 13px; }
.page-head { margin-bottom: 21px; }
.filters, .reader-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.filters select { max-width: 100%; }
.list { display: grid; gap: 7px; }
.hymn-row { display: flex; align-items: center; gap: 13px; padding: 10px 13px; min-height: 66px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.hymn-row strong { display: block; font-size: 14px; }
.hymn-row small { color: var(--muted); display: block; }
.hymn-row > svg { margin-left: auto; color: var(--accent); width: 16px; height: 16px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
.pager span, .empty { color: var(--muted); }
button:disabled { opacity: .52; cursor: default; }
.reader { max-width: 760px; margin: auto; }
.reader-head { padding: 25px 0 17px; border-bottom: 1px solid var(--line); }
.reader-head h1 { margin-top: 9px; }
.reader-head .eyebrow { color: var(--accent); }
.reader-head p { margin-top: 12px; color: var(--muted); }
.reader-actions { margin-bottom: 0; }
.quiet[aria-pressed="true"] { background: var(--tint, var(--light-green)); border-color: var(--accent, #759168); }
.lyrics { padding: 22px 0; }
.stanza { margin-bottom: 18px; padding: 8px 15px; }
.stanza p { font: var(--lyric-size, 22px)/1.55 var(--serif); overflow-wrap: anywhere; white-space: pre-wrap; }
.stanza .eyebrow { margin-bottom: 6px; color: var(--accent); }
.chorus { background: var(--tint); border-radius: 0 10px 10px 0; border-left: 3px solid var(--accent); padding: 13px 15px; }
.chorus p { font-style: italic; }
.reader-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 17px; }
.footer { margin: 0 clamp(24px,4vw,62px); border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 810px) {
  .sidebar { position: static; width: auto; border: 0; padding: 13px 16px 8px; background: #fdfdf8; }
  .brand { margin: 0 0 8px; font-size: 20px; }
  .brand-mark { width: 37px; height: 37px; }
  #navigation { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-caption, .offline, .trail, kbd { display: none; }
  .nav-link, .nav-link + .nav-link { margin: 0; padding: 5px 7px; gap: 5px; min-height: 34px; font-size: 12px; }
  .nav-link svg { width: 14px; height: 14px; }
  .workspace { margin: 0; min-height: 0; }
  .topbar { padding: 7px 16px 12px; min-height: 0; }
  .topbar:has(.search[hidden]) { display: none; }
  .search { width: 100%; }
  main { padding: 22px 16px 34px; }
  .footer { margin: 0 16px; }
}
@media (max-width: 540px) {
  .books { grid-template-columns: 1fr; gap: 8px; }
  .book-card { min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 12px; padding: 11px; }
  .book-card .badge { grid-row: span 2; align-self: center; }
  .book-card h3 { margin: 0; }
  .hero { min-height: 230px; padding: 23px 19px; }
  .hero h2 { max-width: 92%; }
  .hero p { max-width: 83%; }
  .hero-art { width: 58%; opacity: .31; }
}
.hero p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.translations { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.footer a { text-decoration: underline; text-underline-offset: .18em; }
.report-dialog { width: min(30rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; color: inherit; background: var(--surface); }
.report-dialog::backdrop { background: rgb(12 32 24 / 65%); }
.report-dialog form { display: grid; gap: .6rem; }
.report-dialog h2, .report-dialog p { margin: 0; }
.report-hint { color: var(--muted); font-size: 13px; }
.report-dialog label { font-weight: 600; }
.report-dialog select, .report-dialog textarea { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; padding: .6rem; }
.report-dialog textarea { resize: vertical; }
.report-status:empty, #report-confirmation:empty { display: none; }
.report-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.report-submit { background: var(--ink); color: white; }
.report-submit:hover { background: var(--forest); color: white; }
.report-inbox { max-width: 54rem; min-height: 100vh; margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem); }
.report-inbox h1 { margin: 1rem 0; }
.report-item { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.report-item h2, .report-item p { margin: .35rem 0; }
.report-item a { text-decoration: underline; text-underline-offset: .15em; }
.report-details { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Calendar themes in the America/Panama time zone. */
.season-label, .season-art { display: none; }
[data-season="patria"] {
  --forest: #11294d;
  --light-green: #e7edf9;
}
[data-season="navidad"] {
  --forest: #14392f;
  --light-green: #eaf0e3;
}
[data-season="patria"] .hero {
  background: radial-gradient(ellipse at 94% 40%, #2a4573, transparent 58%), linear-gradient(125deg, #102546, #1b2e55);
}
[data-season="navidad"] .hero {
  background: radial-gradient(ellipse at 88% 40%, #2c6147, transparent 58%), linear-gradient(125deg, #112b26, #183d30);
}
[data-season="patria"] .hero .eyebrow { color: #e0eaff; }
[data-season="navidad"] .hero .eyebrow { color: #fae2ae; }
[data-season="patria"] .hero .action { background: #f4f6ff; color: #162e54; }
[data-season="navidad"] .hero .action { background: #f7db9e; color: #243628; }
[data-season="patria"] .hero .action:hover { background: #dce6fa; }
[data-season="navidad"] .hero .action:hover { background: #ffe9b8; }
[data-season="patria"] .hero-art, [data-season="navidad"] .hero-art { display: none; }
[data-season="patria"] .patria-label, [data-season="navidad"] .christmas-label {
  display: inline-block;
  margin-bottom: 16px;
  border: 1px solid var(--season-border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--season-text);
  background: var(--season-label-bg);
}
.patria-label { --season-text: #fff; --season-border: #889cc2; --season-label-bg: #27436b; }
.christmas-label { --season-text: #ffe7b7; --season-border: #c2975b; --season-label-bg: #31523e; }
[data-season="patria"] .patria-art, [data-season="navidad"] .christmas-art {
  display: block;
  position: absolute;
  inset: 0 0 0 auto;
  width: min(39%, 330px);
  pointer-events: none;
  z-index: 0;
}
.patria-art::before, .patria-art::after {
  content: "";
  position: absolute;
  width: 160%;
  height: 17%;
  transform: rotate(-23deg);
  right: -20%;
  top: 60%;
}
.patria-art::before { background: #40629f; }
.patria-art::after { top: 71%; background: #a22c47; }
.panama-flag {
  position: absolute;
  right: 15%;
  top: 50%;
  width: min(74%, 220px);
  aspect-ratio: 3 / 2;
  transform: translateY(-50%) rotate(-9deg);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  border-radius: .35rem;
  overflow: hidden;
  background: #fffdf9;
  box-shadow: 0 .8rem 2.4rem #08132480;
}
.panama-flag span {
  display: grid;
  place-items: center;
  font: clamp(1rem, 3.5vw, 2.8rem)/1 system-ui, sans-serif;
}
.panama-flag span:first-child { color: #174b98; }
.panama-flag span:nth-child(2) { background: #ce203b; }
.panama-flag span:nth-child(3) { background: #174b98; }
.panama-flag span:last-child { color: #ce203b; }
.ornament {
  position: absolute;
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: inset -8px -10px 18px #1b15143f, 0 15px 25px #101e1855;
}
.ornament::before, .ornament::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #e1b771;
}
.ornament::before { width: 1px; height: 170px; bottom: 100%; }
.ornament::after { width: 22%; height: 10%; bottom: 98%; border-radius: 3px 3px 0 0; }
.ornament.red {
  width: 43%;
  right: 33%;
  top: 31%;
  background: radial-gradient(circle at 34% 28%, #f19375, #a53244 52%, #642538);
}
.ornament.gold {
  width: 32%;
  right: 10%;
  top: 19%;
  background: radial-gradient(circle at 34% 28%, #fff4ca, #d6a756 53%, #895927);
}
.christmas-spark { position: absolute; top: 16%; left: 9%; color: #ffe4a8; font-size: 2rem; }
.christmas-spark.small { top: 67%; left: 80%; font-size: 1.25rem; }
[data-season="patria"] .hero h2, [data-season="navidad"] .hero h2 { max-width: 67%; }
[data-season="patria"] .hero p, [data-season="navidad"] .hero p { max-width: 62%; }

@media (max-width: 540px) {
  [data-season="patria"] .patria-art, [data-season="navidad"] .christmas-art { width: 32%; }
  [data-season="patria"] .hero h2, [data-season="navidad"] .hero h2 { max-width: 80%; }
  [data-season="patria"] .hero p, [data-season="navidad"] .hero p { max-width: 72%; }
  .panama-flag { right: 12%; top: auto; bottom: 15%; transform: rotate(-9deg); }
  .patria-art::before, .patria-art::after { right: -58%; }
  .ornament.red { top: 57%; right: 28%; }
  .ornament.gold { top: 48%; right: 9%; }
  .ornament::before { height: 230px; opacity: .35; }
  .christmas-spark { top: 51%; font-size: .9rem; }
  .christmas-spark.small { top: 75%; font-size: .8rem; }
}
