/* Habitas Guides: guides hub and guide pages. Scoped under .hhg; same palette as the listing pages. */

.hhg {
  --hhg-ink: #1c1917;
  --hhg-text: #3f3a36;
  --hhg-muted: #78716c;
  --hhg-line: #e7e2dc;
  --hhg-soft: #f7f4ef;
  --hhg-cream: #fbf8f3;
  --hhg-gold: #c9a96e;
  --hhg-gold-dark: #a9894f;
  --hhg-espresso: #3b2a20;
  --hhg-nav: 80px; /* height of the theme's fixed top menu */

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--hhg-ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hhg *, .hhg *::before, .hhg *::after { box-sizing: border-box; }
:where(.hhg) :is(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
:where(.hhg) a { color: inherit; text-decoration: none; }
.hhg-ico { width: 18px; height: 18px; flex: none; }
.hhg-wrap { width: min(1216px, 100% - 48px); margin-inline: auto; }

/* ---------- Page heading ---------- */
.hhg-hero {
  position: relative;
  padding: calc(var(--hhg-nav) + 40px) 0 44px;
  background-color: var(--hhg-cream);
  background-image: linear-gradient(var(--hhg-line) 1px, transparent 1px), linear-gradient(90deg, var(--hhg-line) 1px, transparent 1px);
  background-size: 72px 72px;
  border-bottom: 1px solid var(--hhg-line);
}
.hhg-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251, 248, 243, .55) 0%, var(--hhg-cream) 92%); pointer-events: none; }
.hhg-hero .hhg-wrap { position: relative; z-index: 1; }
.hhg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--hhg-muted); }
.hhg-crumbs a:hover { color: var(--hhg-ink); }
.hhg-crumbs .hhg-ico { width: 13px; height: 13px; }
.hhg-crumbs [aria-current] { color: var(--hhg-ink); }
.hhg-h1 {
  margin-top: 20px; max-width: 860px;
  font-family: "Playfair Display", Georgia, serif; font-weight: 500;
  font-size: clamp(32px, 3.8vw, 48px); line-height: 1.12; letter-spacing: -0.01em;
}
.hhg-lead { margin-top: 16px; max-width: 760px; font-size: 18px; line-height: 1.65; color: var(--hhg-text); }
.hhg-meta { margin-top: 14px; font-size: 13px; color: var(--hhg-muted); }
.hhg-badge {
  display: inline-block; margin-left: 10px; padding: 2px 8px; vertical-align: middle;
  border-radius: 6px; background: #fdecc8; color: #7a5c27;
  font-family: "Inter", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

.hhg-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hhg-jump a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--hhg-line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 500; color: var(--hhg-text); transition: border-color .15s, color .15s;
}
.hhg-jump a:hover { border-color: var(--hhg-gold); color: var(--hhg-ink); }
.hhg-jump .hhg-ico { width: 16px; height: 16px; color: var(--hhg-gold-dark); }

/* ---------- Hub ---------- */
.hhg-hub { padding: 24px 0 80px; }
.hhg-topic { padding: 48px 0; border-bottom: 1px solid var(--hhg-line); scroll-margin-top: calc(var(--hhg-nav) + 16px); }
.hhg-topic-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.hhg-topic-title { display: flex; align-items: center; gap: 14px; }
.hhg-topic-icon {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px;
  border-radius: 12px; background: var(--hhg-soft); color: var(--hhg-gold-dark);
}
.hhg-topic-icon .hhg-ico { width: 24px; height: 24px; }
.hhg-topic h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; }
.hhg-start {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  height: 44px; padding: 0 8px 0 18px; border: 1px solid var(--hhg-line); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: border-color .15s;
}
.hhg-start span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hhg-espresso); color: #fff; transition: background .15s; }
.hhg-start span .hhg-ico { width: 15px; height: 15px; }
.hhg-start:hover { border-color: var(--hhg-espresso); }
.hhg-start:hover span { background: var(--hhg-gold); }
.hhg-topic-text { margin-top: 18px; max-width: 900px; color: var(--hhg-text); font-size: 15.5px; line-height: 1.75; }

.hhg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.hhg-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px;
  border: 1px solid var(--hhg-line); border-radius: 14px; background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.hhg-card:hover { border-color: #d9cfc3; box-shadow: 0 14px 34px rgba(28, 25, 23, .08); transform: translateY(-2px); }
.hhg-card h3 { font-size: 16.5px; font-weight: 600; line-height: 1.35; color: var(--hhg-ink); }
.hhg-card p { flex: 1; font-size: 14.5px; line-height: 1.6; color: var(--hhg-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hhg-card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--hhg-ink); }
.hhg-card-more .hhg-ico { width: 15px; height: 15px; transition: transform .2s; }
.hhg-card:hover .hhg-card-more { color: var(--hhg-gold-dark); }
.hhg-card:hover .hhg-card-more .hhg-ico { transform: translateX(3px); }

/* ---------- Guide page ---------- */
.hhg-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; padding: 48px 0 80px; }
.hhg-side { position: sticky; top: calc(var(--hhg-nav) + 24px); }
.hhg-nav { padding: 18px; border-radius: 16px; background: var(--hhg-espresso); color: #efe6da; }
.hhg-nav summary { display: flex; flex-direction: column; gap: 2px; padding: 2px 6px 12px; list-style: none; cursor: default; }
.hhg-nav summary::-webkit-details-marker { display: none; }
.hhg-nav summary span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #bfae96; }
.hhg-nav summary em { font-style: normal; font-size: 14px; color: #fff; }
.hhg-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.hhg-nav li a {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px;
  font-size: 14px; line-height: 1.35; color: #e6dccd; transition: background .15s, color .15s;
}
.hhg-nav li a span { flex: 1; min-width: 0; }
.hhg-nav li a .hhg-ico { width: 16px; height: 16px; color: #bfae96; }
.hhg-nav li a .hhg-ico:last-child { width: 14px; height: 14px; opacity: .6; }
.hhg-nav li a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.hhg-nav li a.is-current { background: var(--hhg-gold); color: var(--hhg-espresso); font-weight: 600; }
.hhg-nav li a.is-current .hhg-ico { color: var(--hhg-espresso); }
.hhg-nav-all { display: inline-flex; align-items: center; gap: 6px; margin: 14px 6px 2px; font-size: 14px; font-weight: 600; color: #fff; }
.hhg-nav-all .hhg-ico { width: 14px; height: 14px; }
.hhg-nav-all:hover { color: var(--hhg-gold); }

.hhg-article { max-width: 760px; }

/* Article text */
.hhg-prose { color: var(--hhg-text); font-size: 16.5px; line-height: 1.8; }
.hhg-prose > * + * { margin-top: 18px; }
.hhg-prose h2 { margin-top: 44px; font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 28px; line-height: 1.25; color: var(--hhg-ink); }
.hhg-prose h3 { margin-top: 30px; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--hhg-ink); }
.hhg-prose > :first-child { margin-top: 0; }
.hhg-prose a { color: var(--hhg-gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.hhg-prose a:hover { color: var(--hhg-espresso); }
.hhg-prose strong { color: var(--hhg-ink); font-weight: 600; }
.hhg-prose ul, .hhg-prose ol { padding-left: 22px; }
.hhg-prose li + li { margin-top: 8px; }
.hhg-prose li::marker { color: var(--hhg-gold-dark); }

.hhg-prose .hhg-answer {
  padding: 22px 24px; border-left: 3px solid var(--hhg-gold); border-radius: 0 12px 12px 0;
  background: var(--hhg-cream); font-size: 17px; color: var(--hhg-ink);
}

.hhg-prose ol.hhg-steps { list-style: none; padding: 0; counter-reset: step; }
.hhg-prose ol.hhg-steps > li { position: relative; padding: 0 0 0 56px; counter-increment: step; }
.hhg-prose ol.hhg-steps > li + li { margin-top: 26px; }
.hhg-prose ol.hhg-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--hhg-espresso); color: #fff; font-size: 15px; font-weight: 600;
}
.hhg-prose ol.hhg-steps > li h3 { margin: 4px 0 6px; }

.hhg-prose .hhg-box { padding: 22px 24px; border: 1px solid var(--hhg-line); border-radius: 14px; background: #fff; }
.hhg-prose .hhg-box h3 { margin-top: 0; }
.hhg-prose .hhg-box-warn { border-color: #ecd9b6; background: #fffaf1; }

.hhg-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.hhg-prose th, .hhg-prose td { padding: 12px 14px; border-bottom: 1px solid var(--hhg-line); text-align: left; vertical-align: top; }
.hhg-prose thead th { background: var(--hhg-soft); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hhg-muted); }
.hhg-prose td:first-child { font-weight: 500; color: var(--hhg-ink); }
.hhg-prose .hhg-table { overflow-x: auto; border: 1px solid var(--hhg-line); border-radius: 12px; }
.hhg-prose .hhg-table tr:last-child td { border-bottom: 0; }

.hhg-disclaimer { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--hhg-line); font-size: 14px; line-height: 1.7; font-style: italic; color: var(--hhg-muted); }

.hhg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hhg-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px;
  border-radius: 10px; font-size: 15px; font-weight: 600; transition: background .15s, border-color .15s, color .15s;
}
.hhg-btn-gold { background: var(--hhg-gold); color: #fff; }
.hhg-btn-gold:hover { background: var(--hhg-gold-dark); }
.hhg-btn-outline { border: 1px solid var(--hhg-line); background: #fff; color: var(--hhg-ink); }
.hhg-btn-outline:hover { border-color: var(--hhg-ink); }
.hhg-btn-light { background: #fff; color: var(--hhg-espresso); }
.hhg-btn-light:hover { background: var(--hhg-cream); }

.hhg-faq { margin-top: 56px; }
.hhg-faq h2 { margin-bottom: 18px; font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 28px; }
.hhg-faq details { border-bottom: 1px solid var(--hhg-line); }
.hhg-faq details:first-of-type { border-top: 1px solid var(--hhg-line); }
.hhg-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 2px; list-style: none; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--hhg-ink);
}
.hhg-faq summary::-webkit-details-marker { display: none; }
.hhg-faq summary .hhg-ico { width: 18px; height: 18px; color: var(--hhg-muted); transition: transform .2s; }
.hhg-faq details[open] summary { color: var(--hhg-gold-dark); }
.hhg-faq details[open] summary .hhg-ico { transform: rotate(45deg); }
.hhg-faq details p { padding: 0 2px 20px; font-size: 15.5px; line-height: 1.75; color: var(--hhg-text); }

.hhg-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 48px; }
.hhg-label { margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--hhg-muted); }
.hhg-foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hhg-foot a { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; color: var(--hhg-text); }
.hhg-foot a .hhg-ico { width: 14px; height: 14px; }
.hhg-foot a:hover { color: var(--hhg-gold-dark); text-decoration: underline; }

/* ---------- "Still not sure?" call to action ---------- */
.hhg-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 56px;
  padding: 36px 40px; border-radius: 18px; background: var(--hhg-espresso); color: #efe6da;
}
.hhg-cta h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 28px; line-height: 1.2; color: #fff; }
.hhg-cta p { margin-top: 8px; max-width: 560px; font-size: 15px; line-height: 1.6; color: #dccfbd; }
.hhg-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hhg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hhg-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 860px) {
  .hhg-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .hhg-side { position: static; order: 2; } /* readers reach the article first on phones */
  .hhg-nav summary { cursor: pointer; }
  .hhg-nav:not([open]) summary { padding-bottom: 2px; }
  .hhg-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
}
@media (max-width: 640px) {
  .hhg-wrap { width: calc(100% - 32px); }
  .hhg-hero { padding: calc(var(--hhg-nav) + 24px) 0 30px; background-size: 48px 48px; }
  .hhg-lead { font-size: 16.5px; }
  .hhg-jump { gap: 6px; }
  .hhg-jump a { height: 36px; padding: 0 12px; font-size: 13px; }
  .hhg-topic { padding: 36px 0; }
  .hhg-topic-head { flex-direction: column; }
  .hhg-cards { grid-template-columns: 1fr; gap: 12px; }
  .hhg-prose { font-size: 16px; }
  .hhg-prose h2, .hhg-faq h2 { font-size: 24px; }
  .hhg-prose ol.hhg-steps > li { padding-left: 48px; }
  .hhg-foot { grid-template-columns: 1fr; }
}