/* Housing guides (/housing…). Builds on app.css and pathways.css (hero,
   sections, sources box, route cards, agency cards); only the parts that are
   new live here. Colours come from the tokens in app.css, so dark mode
   follows automatically. */

.hhero { padding-bottom: 72px; }
.hhero h1 { max-width: 15em; }
.hpage .pwsec:first-child { margin-top: 40px; }
.hjump { margin: 36px 0 -8px; }
.hjump .pill:hover { border-color: var(--line-strong); }
.hpage .pwsec[id] { scroll-margin-top: 16px; }

/* ---------- Fact lists ---------- */
.hfacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 52em; }
.hfacts li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 14px 42px; line-height: 1.5; }
.hfacts li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.hfacts li.tip { background: var(--mint-soft); border-color: transparent; }
.hfacts li.tip::before { background: var(--mint); }
.tipl { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mint); margin-inline-end: 2px; }
.hfacts .src, .htable .src, .pwfine .src, .hreport .src { white-space: nowrap; }

/* ---------- Deposit table ---------- */
.htable { overflow-x: auto; margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; max-width: 52em; }
.htable table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.htable th, .htable td { text-align: start; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.htable tbody tr:last-child th, .htable tbody tr:last-child td { border-bottom: 0; }
.htable thead th { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.htable tbody th { font-weight: 700; white-space: nowrap; }
.htable td:last-child { white-space: nowrap; }
@media (max-width: 640px) { .htable tbody th { white-space: normal; } .htable td:last-child { white-space: normal; } }

/* ---------- Official rent ---------- */
.hrent { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow); max-width: 52em; }
.hrent p { margin: 0 0 8px; }
.hbig span { display: block; font-family: var(--serif); font-size: 3.2rem; line-height: 1; letter-spacing: -.02em; }
.hbig small { color: var(--ink-soft); font-size: .86rem; }
@media (max-width: 560px) { .hrent { grid-template-columns: 1fr; gap: 12px; padding: 18px; } }

/* ---------- Scams ---------- */
.hscam { background: var(--coral-soft); border-radius: 22px; padding: 22px 24px; max-width: 52em; }
.hscam h3 { margin: 0 0 12px; font-size: 1.1rem; }
.hscam .hfacts li { border-color: transparent; }
.hscam .hfacts li::before { background: var(--coral-deep); }
.hreport { margin: 14px 0 0; }
.hsub { margin: 32px 0 12px; font-size: 1.15rem; }
.hcheck { margin: 0; padding: 0; list-style: none; counter-reset: hc; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hcheck li { counter-increment: hc; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.hcheck li::before { content: counter(hc); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.hcheck p { margin: 0 0 8px; }
.hcheck small { color: var(--ink-soft); font-size: .8rem; line-height: 1.5; }
.hcheck small a { color: var(--ink-soft); }

/* ---------- Portals and sister site ---------- */
.hportals { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.hportals li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; }
.hportals a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.hportals a:hover b { text-decoration: underline; }
.hportals svg, .hsister svg { width: 12px; height: 12px; }
.hportals small { color: var(--ink-soft); font-size: .86rem; }
.hadv { font-weight: 700; color: var(--coral-deep); }
.hsister { margin-top: 18px; background: var(--blue-soft); border-radius: 18px; padding: 16px 18px; display: grid; gap: 6px; max-width: 52em; }
.hsister p { margin: 0; }
.hsister a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.hsister small { color: var(--ink-soft); }

/* ---------- Overview cards ---------- */
.hcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.hcard { display: grid; grid-template-columns: 1fr auto; gap: 10px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.hcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.hctext { display: grid; gap: 8px; align-content: start; }
.hctext b { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.hcard .cc { width: 28px; height: 22px; border-radius: 7px; font-size: .6rem; box-shadow: none; }
.hctext small { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.hcstat span { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); }
.hcard .go { align-self: end; color: var(--coral-deep); font-size: 1.2rem; transition: transform .2s; }
.hcard:hover .go { transform: translateX(4px); }
.how3 strong { display: block; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 760px) { .hpage .how3 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hcard { transition: none; } }
.hauth { margin-top: 18px; max-width: 52em; background: var(--mint-soft); border-radius: 22px; padding: 18px 22px; }
.hauth h3 { margin: 0 0 8px; font-size: 1.05rem; }
.hauth ul { margin: 0; padding-inline-start: 20px; }
.hauth li { margin-bottom: 4px; }
.hauth a { display: inline-flex; gap: 5px; align-items: center; }
.hauth svg { width: 12px; height: 12px; }

/* ---------- Settling in: topic tabs and hub rows ---------- */
.htabs { margin: 32px 0 0; }
.hsrow { grid-template-columns: 1fr; }
.hsrow .hctext b a { color: inherit; text-decoration: none; }
.hsrow .hctext b a:hover { text-decoration: underline; }
.htopics { display: flex; flex-wrap: wrap; gap: 8px; }
.htopics a { font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--blue-soft); border-radius: 999px; padding: 6px 12px; }
.htopics a:hover { text-decoration: underline; }
.htabs + .pwsec { margin-top: 24px; }
.htabs + .hjump { margin-top: 20px; }
