:root {
  --study-accent: #0b1f3a;
  --study-accent-strong: #142f5a;
  --study-bg: #f5f5f7;
  --study-surface: #ffffff;
  --study-surface-soft: #f8f9fb;
  --study-text: #111114;
  --study-muted: #5f6671;
  --study-soft: #7d8390;
  --study-line: #e1e5ea;
  --study-line-strong: #d4dae2;
  --study-shadow: 0 18px 42px rgba(17, 17, 20, 0.06);
  --study-shadow-soft: 0 10px 26px rgba(17, 17, 20, 0.04);
  --study-radius-xl: 1.75rem;
  --study-radius-lg: 1.25rem;
  --study-radius-md: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--study-bg) 100%);
  color: var(--study-text);
  font-family:
    "Avenir Next",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

img,
iframe,
video,
audio {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.15rem auto 2.5rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--study-line);
  border-radius: var(--study-radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--study-shadow-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--study-accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__text {
  display: grid;
}

.brand__label {
  color: var(--study-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__sub {
  color: var(--study-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.4rem 0.82rem;
  border: 1px solid var(--study-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--study-muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: var(--study-accent);
  background: #eef3fb;
  color: var(--study-accent);
}

.site-nav a.external {
  border-color: rgba(255, 107, 57, 0.22);
  color: #c7542d;
}

.page-content {
  margin-top: 1rem;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  border: 1px solid var(--study-line);
  border-radius: var(--study-radius-xl);
  background: var(--study-surface);
  box-shadow: var(--study-shadow);
}

.page-content--study-home {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.kicker {
  margin: 0 0 0.7rem;
  color: var(--study-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.hero--simple {
  grid-template-columns: minmax(0, 1fr);
}

.hero--single {
  grid-template-columns: minmax(0, 1fr);
}

.hero--single .hero-copy {
  max-width: 48rem;
}

.page-content--study-home .hero,
.page-content--study-home .split {
  margin: 0;
}

.hero-copy,
.hero-note,
.panel,
.card,
.table-wrap {
  border: 1px solid var(--study-line);
  border-radius: var(--study-radius-lg);
  background: var(--study-surface);
  box-shadow: var(--study-shadow-soft);
}

.hero-copy,
.hero-note,
.panel,
.card {
  padding: 1.2rem 1.25rem;
}

.hero-copy h1,
.section-title {
  margin: 0;
  color: var(--study-text);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  max-width: 10ch;
}

.hero--simple .hero-copy h1,
.page-content--theme-path .hero-copy h1 {
  max-width: 100%;
}

.hero-subtitle {
  color: var(--study-accent);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-copy p,
.hero-note p,
.intro,
.panel p,
.card p {
  margin: 0.75rem 0 0;
  color: var(--study-muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.button--primary {
  background: var(--study-accent);
  color: #ffffff;
}

.button--secondary {
  border-color: var(--study-line-strong);
  background: #ffffff;
  color: var(--study-accent);
}

.study-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--study-accent);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.study-inline-link::after {
  content: ">";
  font-size: 0.82em;
}

.hero-note {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}

.hero-note h2 {
  margin: 0;
  color: var(--study-accent);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-note--recent-sermons {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.recent-sermons__header p {
  margin-top: 0.55rem;
}

.recent-sermons__list {
  display: grid;
  gap: 0.7rem;
}

.recent-sermons__list--grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.recent-sermons__list--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.recent-sermon-item {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--study-line);
  border-radius: 0.9rem;
  background: #ffffff;
}

.recent-sermon-item h3 {
  margin: 0;
  color: var(--study-text);
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.recent-sermon-item__summary {
  margin: 0;
  color: var(--study-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.recent-sermon-item__date {
  margin: 0;
  color: var(--study-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.recent-sermons__footer {
  margin-top: 0.2rem;
}

.theme-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.7rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--study-line);
  border-radius: 999px;
  background: var(--study-surface-soft);
  color: var(--study-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-sermon-item__meta,
.recent-sermon-item__actions {
  display: block;
}

.recent-sermon-item__actions {
  margin-top: 0.15rem;
}

.recent-sermon-item__actions .study-inline-link,
.recent-sermon-item > .study-inline-link {
  width: fit-content;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.28rem 0.72rem;
  border: 1px solid var(--study-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--study-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.section-title {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  margin: 1.2rem 0 0;
}

.section-block + .section-block,
.page-content--study-home .split,
.page-content--study-home .panel--cta {
  margin-top: 0;
}

.section-block--latest {
  padding: 1.15rem;
  border: 1px solid var(--study-line);
  border-radius: var(--study-radius-lg);
  background: #ffffff;
}

.section-block--advanced {
  padding-top: 0.25rem;
}

.section-heading {
  max-width: 34rem;
}

.search-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.search-wrap label {
  color: var(--study-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-wrap--hero {
  margin-top: 1.1rem;
}

.search-wrap--hero label {
  width: 100%;
}

.search-wrap input {
  width: min(26rem, 100%);
  min-height: 3rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--study-line);
  border-radius: 1rem;
  background: #ffffff;
  color: var(--study-text);
}

.search-wrap input:focus {
  outline: 3px solid rgba(11, 31, 58, 0.16);
  outline-offset: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid--compact {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.study-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.study-link-list--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card h3,
.study-link-item h3,
.panel h3 {
  margin: 0;
  color: var(--study-text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card p,
.study-link-item p,
.panel ul,
.panel ol,
.panel blockquote {
  margin-top: 0.7rem;
}

.study-link-item {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-height: 100%;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--study-line);
  border-radius: var(--study-radius-lg);
  background: #ffffff;
}

.study-link-item--path {
  border-color: var(--study-line-strong);
}

.study-link-item__body {
  display: grid;
  gap: 0.65rem;
}

.study-link-item__body p {
  margin: 0;
}

.card--link {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.card--link .mini-link {
  margin-top: auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.75fr);
  gap: 1rem;
  margin-top: 1rem;
}

.split > aside {
  display: grid;
  gap: 1rem;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--study-accent);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.callout {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #ffffff;
  color: var(--study-muted);
}

.feature-list {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--study-text);
}

.feature-list li + li {
  margin-top: 0.4rem;
}

.panel-links {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
}

.panel-links li + li {
  margin-top: 0.45rem;
}

.panel-links a {
  color: var(--study-accent);
  font-weight: 700;
  text-decoration: none;
}

.study-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.15rem;
  margin-top: 0.75rem;
}

.study-tools-row--stacked {
  display: block;
}

.stacked-link-list,
.study-tools-row ul {
  margin: 0;
  padding-left: 1.1rem;
}

.stacked-link-list li + li,
.study-tools-row ul li + li {
  margin-top: 0.45rem;
}

.stacked-link-list .study-inline-link {
  display: inline-flex;
}

.guided-study-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 1rem;
}

.guided-study-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel--start {
  min-width: 0;
}

.panel--cta {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}

.panel ul,
.panel ol {
  padding-left: 1.15rem;
}

.panel li + li {
  margin-top: 0.35rem;
}

.markdown-body p:first-child,
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body p,
.markdown-body li {
  color: var(--study-text);
  line-height: 1.8;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.6rem 0 0.7rem;
  color: var(--study-text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.markdown-body blockquote {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border-left: 3px solid var(--study-accent);
  border-radius: 0 1rem 1rem 0;
  background: var(--study-surface-soft);
  color: var(--study-muted);
}

.markdown-body code,
.intro code,
.panel code,
.card code {
  padding: 0.14rem 0.34rem;
  border-radius: 0.45rem;
  background: var(--study-surface-soft);
  color: var(--study-accent);
  font-size: 0.94em;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--study-line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--study-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-embed,
.media-embed {
  margin-top: 1rem;
}

.video-embed iframe,
.pdf-embed iframe,
.media-embed img,
.video-file-embed video {
  width: 100%;
  min-height: 22rem;
  border: 0;
  border-radius: 1rem;
  background: #111114;
}

.audio-embed audio {
  width: 100%;
}

.page-footer {
  margin-top: 1rem;
  padding: 0 0.35rem;
  color: var(--study-soft);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .split,
  .guided-study-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--three,
  .recent-sermons__list--grid,
  .recent-sermons__list--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-link-list,
  .study-link-list--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100%, calc(100% - 1rem));
    margin-top: 0.6rem;
  }

  .page-content,
  .hero-copy,
  .hero-note,
  .panel,
  .card {
    padding: 1rem;
  }

  .button {
    width: 100%;
  }

  .card-grid--three,
  .recent-sermons__list--grid,
  .recent-sermons__list--compact {
    grid-template-columns: 1fr;
  }

  .study-link-list,
  .study-link-list--triple {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(1.9rem, 10vw, 3rem);
  }

  .video-embed iframe,
  .pdf-embed iframe,
  .media-embed img,
  .video-file-embed video {
    min-height: 16rem;
  }
}
