:root{
  --bg: #f6fbff;
  --text: #0b1220;
  --muted: #4a5568;
  --line: rgba(15, 23, 42, 0.12);
  --brand: #1d4ed8;
  --brand2: #0ea5e9;
  --shadow: 0 16px 40px rgba(2, 6, 23, 0.10);
  --radius: 18px;
}

html, body { height: 100%; }
body{
  background:
    radial-gradient(1100px 500px at 20% -10%, rgba(14,165,233,0.18), transparent 60%),
    radial-gradient(900px 420px at 95% 5%, rgba(29,78,216,0.14), transparent 55%),
    linear-gradient(180deg, var(--bg), #ffffff 40%);
  color: var(--text);
}

.skip-link{
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{
  left: 12px; top: 12px; width: auto; height: auto; padding: 10px 12px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 10px; z-index: 1000;
}

.site-header{
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.70);
  border-bottom: 1px solid var(--line);
}
.navbar .navbar-brand{ font-weight: 700; letter-spacing: 0.2px; }
.brand-mark{
  width: 14px; height: 14px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  box-shadow: 0 0 0 6px rgba(14,165,233,0.12);
}
.brand-text{ font-size: 1rem; }

.hero{ padding: 3.2rem 0 1.8rem; }
.hero-shell{
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-inner{ padding: 2.2rem; }
.hero-kicker{
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: .75rem;
}
.hero-title{
  font-size: clamp(1.9rem, 3.5vw, 3.0rem);
  line-height: 1.1;
  margin: 0 0 .8rem;
}
.hero-meta{ color: var(--muted); font-size: 1rem; margin: 0; }

.hero-media{ height: 100%; min-height: 240px; }
.img-cover{ width: 100%; height: 100%; object-fit: cover; display: block; }

.section{ padding: 1.6rem 0 2.2rem; }
.section-title{ font-size: 1.25rem; font-weight: 700; margin: 0 0 .9rem; }

.hr-soft{
  border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,23,42,0.18), transparent);
  margin: 1.2rem 0;
}

.listing{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.72);
}
@media (max-width: 992px){ .listing{ grid-template-columns: 1fr; } }
.listing-title{ font-size: 1.1rem; font-weight: 700; margin: 0 0 .35rem; }
.listing-meta{
  font-size: .92rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin-bottom: .6rem;
}
.pill{
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .82rem;
  color: var(--muted);
  background: rgba(255,255,255,0.60);
}
.listing a{ color: inherit; text-decoration: none; }
.listing a:hover{ color: var(--brand); text-decoration: underline; }

.media-frame{
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.10);
  background: #eaf2ff;
}

.page-head{ padding: 2rem 0 1rem; }
.breadcrumbs{ font-size: .92rem; color: var(--muted); }
.breadcrumbs a{ color: inherit; text-decoration: none; }
.breadcrumbs a:hover{ color: var(--brand); text-decoration: underline; }

.article-shell{
  background: rgba(255,255,255,0.74);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}
.article-body{ padding: 1.6rem 1.8rem; }
.article-title{
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 .6rem;
}
.article-meta{
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .7rem;
  margin: 0 0 1.1rem;
}
.article-body h2, .article-body h3, .article-body p{ margin: 0 0 1rem; }
.article-body h2{ font-size: 1.25rem; font-weight: 700; }
.article-body h3{ font-size: 1.08rem; font-weight: 700; color: #111827; }
.article-body p{ color: #1f2937; line-height: 1.65; }

/* Hide empty skeleton blocks (they only contain comments) */
.article-body h2:empty,
.article-body h3:empty,
.article-body p:empty{ display: none; }

.site-footer{
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.70);
}
.footer-title{ font-weight: 800; }
.footer-heading{ font-weight: 700; margin-bottom: .4rem; }
.footer-meta{ color: var(--muted); }
.footer-links{ list-style: none; padding: 0; margin: .3rem 0 0; }
.footer-links li{ margin: .25rem 0; }
.footer-links a{ color: inherit; text-decoration: none; }
.footer-links a:hover{ color: var(--brand); text-decoration: underline; }

/* Loan Guides listing: keep thumbnails compact even when excerpts are present */
.guide-list .listing{
  grid-template-columns: 1.2fr minmax(240px, 360px);
  align-items: start;
}

.guide-list .media-frame{
  aspect-ratio: 16 / 9;
  max-height: 220px;
}

.guide-list .media-frame picture,
.guide-list .media-frame img{
  width: 100%;
  height: 100%;
}
/* Loan Guides listing: stack on small screens (prevents ultra-narrow text column) */
@media (max-width: 576px){
  .guide-list .listing{
    display: flex;
    flex-direction: column;
  }

  .guide-list .media-frame{
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 140px; /* make smaller if you want */
    margin-top: 12px;
  }

  .guide-list .media-frame picture,
  .guide-list .media-frame img{
    width: 100%;
    height: 100%;
  }
}
