:root {
  --ink: #172337;
  --ink-soft: #34435c;
  --paper: #ffffff;
  --wash: #f4f7f4;
  --warm: #fff8e9;
  --line: #dfe5dc;
  --gold: #c9922e;
  --gold-soft: #f4e4c2;
  --blue: #1d5676;
  --blue-deep: #0e3147;
  --green: #4d6f3d;
  --muted: #6f7785;
  --shadow: 0 10px 24px rgba(20, 34, 52, 0.09);
  --shadow-soft: 0 6px 16px rgba(20, 34, 52, 0.06);
  --radius: 8px;
  --max-width: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #edf7fc 0, var(--wash) 34rem, #fff 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.62;
}
a { color: var(--blue); text-underline-offset: .16em; }
a:hover { color: var(--blue-deep); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  padding: .75rem 1rem;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-header {
  background: linear-gradient(180deg, #e9f4f9 0%, #eef7fb 64%, #fbf7ef 100%);
  box-shadow: var(--shadow);
}
.banner-shell {
  width: min(100% - 1rem, var(--max-width));
  margin: 0 auto;
  padding: .18rem 0 .12rem;
  display: flex;
  justify-content: center;
}
.banner-link {
  display: inline-block;
  border-radius: 4px;
  line-height: 0;
}
.banner-link img {
  width: min(650px, calc(100vw - 1.25rem));
  height: auto;
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem;
  padding: .5rem .75rem;
  background: rgba(14, 49, 71, .96);
}
.primary-nav a {
  border-radius: 6px;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  padding: .46rem .68rem;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav a.active {
  background: rgba(255,255,255,.2);
}
.primary-nav a.active {
  box-shadow: inset 0 -3px 0 var(--gold-soft);
}
.assembly-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: .55rem;
  padding: .65rem 1rem;
  background: var(--warm);
  border-bottom: 1px solid var(--line);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
.assembly-item {
  display: grid;
  align-content: center;
  min-width: 160px;
  padding: .48rem .76rem;
  border: 1px solid rgba(201, 146, 46, .28);
  border-radius: 7px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  line-height: 1.25;
  text-decoration: none;
}
.assembly-location { min-width: min(330px, 100%); }
.assembly-label {
  color: var(--blue-deep);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.assembly-value { color: var(--ink); font-weight: 720; }
.site-body {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 1.55rem;
  width: min(100% - 1.5rem, 1360px);
  margin: 0 auto;
  align-items: start;
}
.site-body main { min-width: 0; padding-top: .35rem; }
.site-scripture-rail {
  display: grid;
  gap: .55rem;
  margin-top: 2.05rem;
  position: sticky;
  top: 1rem;
}
.rail-card {
  padding: .68rem .74rem .72rem .82rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(255,255,255,.8);
  box-shadow: var(--shadow-soft);
}
.rail-card h2 {
  margin: 0 0 .34rem;
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .78rem;
  line-height: 1.18;
}
.rail-card ul {
  margin: 0;
  padding-left: 1rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .69rem;
  line-height: 1.3;
}
.rail-card li + li { margin-top: .22rem; }
.rail-card span { color: var(--blue-deep); font-weight: 700; }
.hero,
.page-title,
.content-wrap,
.feature-strip {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: center;
  gap: 1.65rem;
  padding: 2.15rem 0 1.65rem;
}
.hero-copy { max-width: 720px; }
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--green);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1,
.page-title h1 {
  margin: .15rem 0 .75rem;
  font-size: 2rem;
  line-height: 1.14;
}
.page-title { padding: 2.2rem 0 .85rem; }
.page-title h1 { font-size: 1.86rem; }
.lead,
.page-title p {
  max-width: 820px;
  color: var(--ink-soft);
  font-size: 1rem;
}
.button-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin-top: 1rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 0;
  border-radius: 7px;
  box-shadow: var(--shadow-soft);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 750;
  line-height: 1.2;
  padding: .7rem .95rem;
  text-decoration: none;
}
.button.primary { background: var(--blue); color: #fff; }
.button.secondary { background: var(--gold-soft); color: var(--ink); }
.button.small {
  padding: .36rem .62rem;
  box-shadow: none;
  font-size: .86rem;
  white-space: nowrap;
}
.service-card,
.info-card,
.link-card,
.collection-card,
.subnav-card,
.remember-panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.service-card {
  padding: 1.15rem;
  border-top: 4px solid var(--gold);
}
.service-card h2,
.info-card h2,
.collection-card h2,
.link-card h3,
.remember-panel h2 {
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.25;
}
.service-card p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: .65rem 0;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.service-card p:last-child { border-bottom: 0; padding-bottom: 0; }
.service-card strong { color: var(--blue-deep); }
.content-wrap { padding: 2rem 0; }
.no-top-pad { padding-top: .75rem; }
.section-heading { margin-bottom: .85rem; }
.section-heading h2,
.content-wrap h2,
.feature-strip h2,
.prose h2 {
  font-size: 1.18rem;
  line-height: 1.25;
}
.recent-lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
.recent-lesson-card h3 {
  margin: .15rem 0 .45rem;
}
.recent-lesson-card p {
  margin: .25rem 0;
}
.lesson-date {
  margin: 0 0 .3rem;
  color: var(--green);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .78rem;
  font-weight: 800;
}
.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: auto;
  padding-top: .8rem;
}
.section-link {
  margin: .95rem 0 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 750;
}
.link-card,
.collection-card,
.info-card {
  padding: 1rem;
}
.contact-grid,
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.contact-grid .info-card.prominent {
  border-top: 6px solid var(--gold);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-grid .info-card.prominent .button {
  align-self: flex-start;
}
.image-card {
  overflow: hidden;
  padding: .65rem;
}
.media-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.image-card img,
.media-card img,
.rounded-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.stacked-cards {
  align-content: start;
  display: grid;
  gap: 1.2rem;
}
.service-card.wide {
  width: 100%;
}
.scripture-highlight {
  background: #fffaf0;
  border-left: 4px solid var(--gold);
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.5;
  margin: 1rem 0 0;
  padding: .9rem 1.1rem;
}
.scripture-highlight cite {
  color: var(--blue-deep);
  font-style: italic;
  font-weight: 700;
  white-space: nowrap;
}
.about-section {
  margin-bottom: 1.05rem;
}
.about-section h2 {
  color: var(--blue-deep);
  margin: 0 0 .65rem;
}
.about-section h3 {
  color: var(--green);
  font-size: 1rem;
  margin: .85rem 0 .35rem;
}
.two-column-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.link-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-top: 3px solid transparent;
}
.link-card:hover,
.link-card:focus-within { border-top-color: var(--gold); box-shadow: var(--shadow); }
.card-grid,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .85rem;
}
.collection-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.speaker-directory {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
}
.speaker-directory > h2 {
  margin: 0 0 .75rem;
}
.speaker-directory .collection-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.speaker-directory .collection-card {
  align-items: flex-start;
  border-top: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 100%;
}
.speaker-directory .collection-card:hover,
.speaker-directory .collection-card:focus-within {
  border-top-color: var(--gold);
  box-shadow: var(--shadow);
}
.speaker-directory .collection-card p {
  color: var(--muted);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  margin: 0;
}
.feature-strip {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 1.25rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.feature-strip img,
.rounded-image {
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(20, 34, 52, .11);
}
.feature-strip > div { padding: .75rem 1rem; }
.subnav-card {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  padding: .72rem;
  margin: .5rem 0 1rem;
}
.subnav-card a {
  border-radius: 6px;
  color: var(--blue-deep);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 750;
  padding: .48rem .7rem;
  text-decoration: none;
}
.subnav-card a.active {
  background: var(--blue);
  color: #fff;
}
.prose {
  max-width: 960px;
}
.imported-content {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
}
.imported-content p:first-child { margin-top: 0; }
.imported-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: #fff;
}
.imported-content td,
.imported-content th {
  padding: .72rem .82rem;
  border: 1px solid var(--line);
  vertical-align: top;
}
.imported-content img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .92rem;
  font-weight: 700;
}
.filter-panel {
  display: grid;
  gap: .45rem;
  max-width: 640px;
  margin-bottom: 1rem;
}
.filter-panel label {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 750;
}
.filter-panel input {
  width: 100%;
  padding: .78rem 1rem;
  border: 1px solid #c9d1dc;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1rem;
}
.table-wrap {
  overflow-x: auto;
}
.resource-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .92rem;
}
.resource-table caption {
  padding: .9rem 1rem .7rem;
  color: var(--blue-deep);
  font-weight: 800;
  text-align: left;
}
.resource-table th,
.resource-table td {
  padding: .72rem .9rem;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.resource-table thead th {
  background: #f7f1e5;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}
.resource-table tbody tr:nth-child(even) { background: rgba(251,247,239,.56); }
.resource-table tbody tr:hover,
.resource-table tbody tr:focus-within { background: #fff4dc; }
.resource-link {
  color: var(--blue-deep);
  font-weight: 750;
}
.file-name {
  max-width: 22rem;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.pending-resource,
.muted {
  color: var(--muted);
  font-weight: 400;
}
.resource-message {
  color: var(--muted);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 700;
}
.col-action { text-align: left; white-space: nowrap; }
.sort-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}
.sort-button::after {
  content: "";
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .38;
}
.resource-table th[aria-sort="ascending"] .sort-button::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
  opacity: 1;
}
.resource-table th[aria-sort="descending"] .sort-button::after { opacity: 1; }
.sort-panel { display: none; }
.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(180deg, var(--blue-deep), #0a2536);
  color: #fff;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 1.25rem;
  width: min(100%, var(--max-width));
  margin: 0 auto;
}
.footer-grid section {
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,.22);
}
.site-footer h2 {
  margin: 0 0 .5rem;
  color: var(--gold-soft);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .82rem;
  text-transform: uppercase;
}
.footer-time {
  display: grid;
  gap: .05rem;
  margin: .45rem 0;
}
.footer-time span {
  color: rgba(255,255,255,.78);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .84rem;
}
.footer-time strong { color: #fff; }
.footer-address { display: inline-block; text-decoration: none; }
.footer-cta {
  display: inline-flex;
  margin-top: .25rem;
  padding: .5rem .68rem;
  border: 1px solid rgba(244,228,194,.42);
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}
.copyright {
  width: min(100%, var(--max-width));
  margin: 1.4rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  text-align: center;
}
@media (max-width: 1100px) {
  .site-body {
    display: flex;
    flex-direction: column;
    width: min(100% - 1rem, var(--max-width));
  }
  .site-body main { order: 1; }
  .site-scripture-rail {
    position: static;
    order: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0 .35rem;
  }
  .site-scripture-rail .rail-card ul { font-size: .72rem; }
}
@media (max-width: 900px) {
  .hero,
  .feature-strip,
  .contact-grid,
  .split-layout,
  .two-column-list { grid-template-columns: 1fr; }
  .recent-lesson-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid section {
    padding-left: 0;
    padding-top: .85rem;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .footer-grid section:first-child { padding-top: 0; border-top: 0; }
}
@media (max-width: 760px) {
  .banner-shell { padding: .08rem 0 .06rem; }
  .banner-link img { width: min(300px, calc(100vw - 1.5rem)); }
  .primary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .2rem;
    padding: .35rem .5rem;
  }
  .primary-nav a {
    min-width: 0;
    width: auto;
    padding: .42rem .38rem;
    font-size: .82rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: break-word;
  }
  .assembly-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .34rem;
    padding: .45rem .55rem;
  }
  .assembly-item {
    min-width: 0;
    width: 100%;
    justify-items: center;
    padding: .42rem .45rem;
    text-align: center;
  }
  .assembly-location { grid-column: 1 / -1; }
  .site-body {
    width: 100%;
    padding: 0 .5rem;
  }
  .hero { padding: 1.35rem 0 1.1rem; }
  .hero h1,
  .page-title h1 {
    font-size: 1.55rem;
    overflow-wrap: break-word;
  }
  .button-row,
  .hero-actions { display: grid; }
  .button-row .button,
  .hero-actions .button { width: 100%; }
  .service-card p { display: flex; }
  .site-scripture-rail { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sort-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .42rem;
    align-items: end;
    margin: .15rem 0 .75rem;
  }
  .sort-panel label {
    grid-column: 1 / -1;
    color: var(--ink);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-size: .86rem;
    font-weight: 750;
  }
  .sort-panel select,
  .sort-panel button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    font-size: .92rem;
  }
  .sort-panel select {
    min-width: 0;
    width: 100%;
    padding: .55rem .6rem;
    background: #fff;
  }
  .sort-panel button {
    padding: .55rem .7rem;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font-weight: 750;
    white-space: nowrap;
  }
  .resource-table { min-width: 0; }
  .resource-table thead { display: none; }
  .resource-table,
  .resource-table tbody,
  .resource-table tr,
  .resource-table td {
    display: block;
    width: 100%;
  }
  .resource-table tr { border-top: 1px solid var(--line); }
  .resource-table td {
    padding: .55rem 1rem;
    border-top: 0;
  }
  .resource-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
  }
}
@media print {
  .site-header,
  .site-footer,
  .filter-panel,
  .sort-panel,
  .subnav-card,
  .site-scripture-rail { display: none; }
  body { background: #fff; color: #000; }
  .site-body { display: block; width: auto; }
}
