/* United Loans — blog (hub, topic listing, article).
   Loaded after united-site.css and united-sections.css. Every class is prefixed b-.
   Structure follows trypennie.com/blog; colours, type and components are United's. */

.b-shell { width: min(1480px, calc(100% - 80px)); margin-inline: auto; }
.b-h2 { font-size: clamp(34px, 3.4vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.b-link { color: var(--blue); font-weight: 700; }
.b-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Search field (hub hero and listing) ---------- */
.b-search { position: relative; display: flex; align-items: center; }
.b-search > .u-i { position: absolute; left: 22px; width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.b-search input {
  width: 100%; height: 64px; padding: 0 72px 0 58px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 18px;
}
.b-search input::placeholder { color: #7a8b9c; }
.b-search input:focus-visible, .b-select select:focus-visible { outline: 3px solid #258ebc; outline-offset: 3px; }
.b-search button {
  position: absolute; right: 8px; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 10px;
  background: var(--green); color: var(--navy); transition: background .18s;
}
.b-search button:hover { background: var(--green-hover); }
.b-search input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- Hub hero ---------- */
.b-hero {
  padding: clamp(64px, 7vw, 112px) 0 clamp(64px, 7vw, 104px);
  background: radial-gradient(60% 90% at 50% 0%, #2a6297 0%, transparent 70%), var(--u-dark-bg);
  color: #fff; text-align: center;
}
.b-hero h1 { max-width: 15ch; margin-inline: auto; font-size: clamp(46px, 5.3vw, 82px); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.b-hero h1 span { color: var(--sky); }
.b-hero .u-lead { max-width: 560px; margin: 24px auto 0; color: #c2d4e6; }
.b-hero .b-search { max-width: 660px; margin: 40px auto 0; }
.b-hero .b-search input { border-color: transparent; }
.b-quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; font-size: 15px; }
.b-quick > span { margin-right: 6px; color: #c2d4e6; font-weight: 700; }
.b-pill {
  padding: 10px 18px; border: 1px solid #ffffff40; border-radius: 999px;
  color: #fff; font-weight: 700; line-height: 1.2; transition: background .18s, border-color .18s, color .18s;
}
.b-pill:hover { background: #fff; border-color: #fff; color: var(--navy); }

/* ---------- Hub: topic cards (reuses the homepage product card) ---------- */
.b-topics { padding: clamp(40px, 4vw, 64px) 0 var(--u-pad); background: linear-gradient(180deg, #eef2f5 0%, #e3eaf1 100%); }
.b-topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.b-topic { min-height: clamp(280px, 22vw, 360px); }
.b-topic h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.035em; }
.b-topic small { margin-top: 12px; color: var(--muted); font-size: 14px; font-weight: 700; }
.b-topic img { width: 62%; }

/* ---------- Hub: most asked questions ---------- */
.b-asked-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 110px); align-items: start; }
.b-asked-copy { position: sticky; top: 150px; }
.b-asked-copy p { max-width: 380px; margin: 20px 0 30px; color: var(--muted); }
.b-asked-list { list-style: none; margin: 0; padding: 0; counter-reset: asked; }
.b-asked-list li {
  counter-increment: asked; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 12px;
  padding: 30px 0; border-bottom: 1px solid #122c4829;
}
.b-asked-list li:first-child { padding-top: 0; }
.b-asked-list li::before {
  content: counter(asked); grid-row: span 2;
  color: var(--blue); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.03em;
}
.b-asked-list h3 { font-size: 23px; line-height: 1.25; letter-spacing: -.02em; }
.b-asked-list p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* ---------- Offer banner (all three pages) ---------- */
.b-offer { padding: clamp(64px, 7vw, 104px) 0; background: var(--u-dark-bg); color: #fff; }
.b-offer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.b-offer .u-lead { max-width: 460px; margin: 20px 0 32px; color: #c2d4e6; }
.b-offer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-radius: var(--u-radius); overflow: hidden; }
.b-offer li { display: flex; align-items: center; gap: 18px; padding: 26px 30px; background: #ffffff14; font-size: clamp(19px, 1.6vw, 24px); font-weight: 700; letter-spacing: -.02em; }
.b-offer li .u-i { width: 24px; height: 24px; color: var(--green); stroke-width: 2.4; }

/* ---------- Listing page ---------- */
.b-list-head { padding: clamp(48px, 5vw, 80px) 0 32px; }
.b-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 15px; font-weight: 700; }
.b-crumbs a { color: var(--blue); }
.b-crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.b-list-head h1 { font-size: clamp(40px, 4vw, 60px); line-height: 1.08; letter-spacing: -.035em; }
.b-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 16px; margin-top: 32px; }
.b-select { position: relative; display: block; }
.b-select span { position: absolute; top: 11px; left: 22px; color: var(--blue); font-size: 12px; font-weight: 700; pointer-events: none; }
.b-select select {
  width: 100%; height: 64px; padding: 20px 52px 0 22px; appearance: none;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
.b-select .u-i { position: absolute; right: 20px; top: 22px; pointer-events: none; }

.b-list { padding: 0 0 var(--u-pad); }
.b-count { margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.b-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.b-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: end;
  padding: 28px 32px; border-radius: var(--u-radius); background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1px #122c4812; transition: box-shadow .2s;
}
.b-row:hover { box-shadow: inset 0 0 0 1px #122c4840; }
.b-row > * { grid-column: 1; }
.b-row h3 { font-size: 23px; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.b-row p { grid-column: 1; max-width: 760px; margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.b-row .u-round { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.b-row:hover .u-round { background: var(--navy); border-color: var(--navy); color: #fff; }
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.b-meta b { color: var(--blue); }
.b-meta i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }
.b-tag { padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 700; }
.b-more { display: flex; justify-content: center; margin-top: 32px; }
.b-empty { padding: 56px 32px; border-radius: var(--u-radius); background: #fff; text-align: center; }
.b-empty h2 { font-size: 27px; letter-spacing: -.03em; }
.b-empty p { margin: 12px 0 24px; color: var(--muted); }

/* ---------- Article ---------- */
.b-art-head { padding: clamp(40px, 4.4vw, 72px) 0 clamp(36px, 4vw, 56px); border-bottom: 1px solid #122c4820; }
.b-back { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.b-back a { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); font-weight: 700; }
.b-back a:hover { text-decoration: underline; text-underline-offset: 4px; }
.b-back a .u-i { width: 18px; height: 18px; }
.b-back i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }
.b-art-head h1 { max-width: 1000px; margin-top: 22px; font-size: clamp(38px, 4.2vw, 64px); line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.b-art-head .u-lead { max-width: 720px; margin-top: 22px; color: var(--muted); }
.b-byline { display: flex; align-items: center; gap: 14px; margin-top: 30px; font-size: 15px; line-height: 1.35; }
.b-byline img { flex: none; width: 46px; height: 46px; border-radius: 50%; }
.b-byline span { display: block; color: var(--muted); }

.b-art-body { padding: clamp(40px, 4.4vw, 72px) 0 var(--u-pad); }
.b-art-grid { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: clamp(40px, 6vw, 110px); align-items: start; }
.b-toc { position: sticky; top: 150px; font-size: 15px; }
.b-toc[hidden] + .b-prose { grid-column: 1 / -1; max-width: 760px; }
.b-toc h2 { margin-bottom: 16px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.b-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid #122c4829; }
.b-toc a { display: block; margin-left: -1px; padding: 8px 0 8px 18px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.35; }
.b-toc a:hover { color: var(--ink); }
.b-toc a.is-on { border-color: var(--blue); color: var(--ink); font-weight: 700; }

.b-prose { font-size: 18px; line-height: 1.7; }
.b-prose > * + * { margin-top: 22px; }
.b-prose h2 { margin-top: 60px; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.15; letter-spacing: -.03em; scroll-margin-top: 140px; text-wrap: balance; }
.b-prose h3 { margin-top: 36px; font-size: 22px; letter-spacing: -.02em; }
.b-prose a { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.b-prose ul, .b-prose ol { margin-bottom: 0; padding-left: 24px; }
.b-prose li + li { margin-top: 10px; }
.b-prose li::marker { color: var(--blue); font-weight: 700; }
.b-key { padding: 30px 32px; border-radius: var(--u-radius); background: var(--mint); color: var(--navy); }
.b-key h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -.015em; }
.b-key ul { list-style: none; padding: 0; margin: 0; font-size: 17px; line-height: 1.5; }
.b-key li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.b-key li .u-i { margin-top: 3px; stroke-width: 2.4; }
.b-note { position: relative; padding: 34px 32px 28px; border-radius: var(--u-radius); background: var(--soft); font-size: 17px; line-height: 1.6; }
.b-prose .b-note { margin-top: 40px; }
.b-note strong:first-child { position: absolute; top: -.9em; left: 32px; padding: .35em .8em; border-radius: 6px; background: var(--green); color: var(--navy); font-size: 14px; rotate: -2deg; }
.b-table { overflow-x: auto; border-radius: var(--u-radius); background: #fff; box-shadow: inset 0 0 0 1px #122c4818; }
.b-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.b-table th, .b-table td { padding: 18px 22px; text-align: left; vertical-align: top; }
.b-table thead th { background: var(--navy); color: #fff; font-size: 15px; }
.b-table tbody tr + tr { border-top: 1px solid #122c4818; }
.b-table tbody th { width: 28%; }
.b-table td:last-child { background: #a9f5cd40; }
.b-prose .u-questions { margin-top: 30px; }
.b-prose .u-questions summary { font-size: 19px; }
.b-sample { padding: 34px 32px; border: 1px dashed #122c4855; border-radius: var(--u-radius); }
.b-sample h2 { margin: 0 0 10px; font-size: 22px; }
.b-sample p { color: var(--muted); }

.b-related { padding: var(--u-pad) 0; background: linear-gradient(180deg, #eef2f5 0%, #e3eaf1 100%); }
.b-related-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .b-art-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
  .b-topic img { width: 66%; }
}
@media (max-width: 1000px) {
  .b-shell { width: calc(100% - 64px); }
  .b-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-art-grid { grid-template-columns: minmax(0, 1fr); }
  .b-toc { display: none; }
  .b-asked-copy { position: static; }
}
@media (max-width: 760px) {
  .b-shell { width: calc(100% - 40px); }
  .b-hero h1 { font-size: 40px; }
  .b-h2 { font-size: 34px; }
  .b-topic-grid, .b-asked-grid, .b-offer-grid, .b-controls { grid-template-columns: minmax(0, 1fr); }
  .b-topic { min-height: 250px; }
  .b-topic img { width: 52%; }
  .b-asked-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .b-asked-list li::before { font-size: 30px; }
  .b-asked-list h3, .b-row h3 { font-size: 20px; }
  .b-row { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .b-row .u-round { display: none; }
  .b-offer li { padding: 20px 22px; }
  .b-art-head h1 { font-size: 34px; }
  .b-prose { font-size: 17px; }
  .b-key, .b-note, .b-sample { padding-inline: 22px; }
  .b-note strong:first-child { left: 22px; }
}
