/* ==========================================================================
   Totality Estates — Interior page layouts
   Depends on tokens.css + components.css.
   ========================================================================== */

/* ---- Off-Plan Properties listing ---- */
.te-offplan { background: var(--te-surface); }
.te-offplan__body {
  max-width: var(--te-content-max); margin-inline: auto;
  padding: clamp(36px, 5vw, 60px) var(--te-gutter) clamp(56px, 8vw, 88px);
}
.te-offplan__head { margin-bottom: 28px; }
.te-offplan__chips { margin: 0 0 34px; }
.te-offplan__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px;
}
.te-offplan__pagination { margin-top: 44px; }
.te-offplan__empty { margin-top: 40px; font-size: var(--te-fs-18); color: var(--te-muted); text-align: center; }
.te-offplan__empty[hidden] { display: none; }

/* ---- Long-form prose (SEO content blocks) ---- */
.te-prose { max-width: 900px; }
.te-prose__title { font-size: var(--te-fs-d3); line-height: 1.1; margin: 0 0 20px; }
.te-prose__lead { font-size: var(--te-fs-20); line-height: 1.6; color: var(--te-muted); margin: 0 0 28px; }
.te-prose h3 { font-size: var(--te-fs-24); line-height: 1.25; margin: 40px 0 12px; }
.te-prose p { font-size: var(--te-fs-18); line-height: 1.7; color: var(--te-body); margin: 0 0 16px; }

.te-faqhead { text-align: center; margin-bottom: 36px; }
.te-faqhead__title { font-size: var(--te-fs-d3); margin: 0; }
.te-faq--wide { max-width: 860px; margin-inline: auto; }

/* ---- Off-plan buyer's guide (structured editorial) ---- */
.te-offplan-guide .te-section__inner { max-width: 1080px; }
.te-guide__head { max-width: 760px; margin: 0 0 clamp(32px, 4vw, 48px); }
.te-guide__eyebrow { display: inline-block; font-size: var(--te-fs-13); letter-spacing: 0.14em; text-transform: uppercase; color: var(--te-accent); font-weight: 600; margin-bottom: 14px; }
.te-guide__title { font-size: var(--te-fs-d3); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 18px; }
.te-guide__lead { font-size: var(--te-fs-20); line-height: 1.6; color: var(--te-muted); margin: 0; }
.te-guide__h { font-size: var(--te-fs-24); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 14px; }
.te-guide__intro { max-width: 820px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.te-guide__intro p,
.te-guide__col p,
.te-guide__block > p { font-size: var(--te-fs-18); line-height: 1.7; color: var(--te-body); margin: 0 0 16px; }
.te-guide__block { margin-bottom: clamp(36px, 4.5vw, 56px); }
.te-guide__note { font-size: var(--te-fs-17); line-height: 1.7; color: var(--te-muted); margin: 20px 0 0; max-width: 820px; }
.te-guide__note--tight { margin-top: 16px; }

/* Benefit cards */
.te-gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.te-gcard { padding: 24px; border: 1px solid var(--te-border); border-radius: 16px; background: var(--te-surface); }
.te-gcard__ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--te-accent-tint); color: var(--te-accent); margin-bottom: 16px; }
.te-gcard__h { font-size: var(--te-fs-18); line-height: 1.3; margin: 0 0 8px; }
.te-gcard__p { font-size: var(--te-fs-16); line-height: 1.6; color: var(--te-muted); margin: 0; }

/* Two-column narrative */
.te-guide__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 4vw, 48px); margin-bottom: clamp(36px, 4.5vw, 56px); }

/* Area chips */
.te-guide__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.te-guide__chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 1px solid var(--te-border); border-radius: 999px; font-size: var(--te-fs-15); color: var(--te-ink); transition: border-color 0.15s ease, color 0.15s ease; }
.te-guide__chip:hover { border-color: var(--te-accent); color: var(--te-accent); }
.te-guide__chip svg { color: var(--te-accent); }

/* Pre-signing checklist panel */
.te-guide__panel { padding: clamp(28px, 3.5vw, 40px); border-radius: 20px; background: var(--te-accent-tint); border: 1px solid var(--te-accent-tint-border); margin-bottom: clamp(36px, 4.5vw, 56px); }
.te-guide__panel .te-guide__h { margin-bottom: 20px; }
.te-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px 28px; }
.te-checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--te-fs-16); line-height: 1.55; color: var(--te-body); }
.te-checklist__ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--te-accent); color: #fff; margin-top: 1px; }

/* Numbered "good deal" grid */
.te-gnums { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.te-gnum { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border: 1px solid var(--te-border); border-radius: 14px; }
.te-gnum__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--te-ink); color: #fff; font-weight: 700; font-size: 15px; }
.te-gnum__p { margin: 0; font-size: var(--te-fs-16); line-height: 1.55; color: var(--te-body); }

/* ==========================================================================
   Blog — category rail, landing grid, single article, newsletter
   ========================================================================== */
.te-catrail { background: var(--te-white); border-bottom: 1px solid var(--te-divider); }
.te-catrail__inner {
  max-width: var(--te-content-max); margin-inline: auto;
  padding: 14px var(--te-gutter);
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
}
.te-catrail__inner::-webkit-scrollbar { display: none; }
.te-catchip {
  padding: 8px 16px; border-radius: var(--te-r-8); font-size: 14.5px;
  white-space: nowrap; background: var(--te-fill); color: var(--te-body);
  transition: background var(--te-hover-transition), color var(--te-hover-transition);
}
.te-catchip:hover { color: var(--te-ink); }
.te-catchip.is-active { background: var(--te-accent); color: var(--te-white); }
.te-catchip.is-active:hover { color: var(--te-white); }

.te-blogpage__body {
  max-width: var(--te-content-max); margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) var(--te-gutter) clamp(56px, 8vw, 88px);
}
.te-bloghead { margin-bottom: 8px; }
.te-blog-title { font-size: clamp(29px, 4.4vw, 46px); line-height: 1.1; margin: 0; }
.te-blog-lead { font-size: var(--te-fs-18); color: var(--te-muted); margin: 8px 0 0; }

.te-blog-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 34px 28px; margin-top: 28px;
}
.te-bcard { display: flex; flex-direction: column; gap: 14px; }
.te-bcard__thumb {
  position: relative; height: 190px; border-radius: var(--te-r-12);
  overflow: hidden; background: var(--te-photo-base); display: block;
}
.te-bcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.te-bcard__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--te-badge-fill); color: var(--te-white);
  font-size: 12.5px; padding: 5px 11px; border-radius: var(--te-r-6);
}
.te-bcard__title { margin: 0; padding: 0 18px; font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-19); line-height: 1.35; }
.te-bcard__title a { color: var(--te-ink); }
.te-bcard__title a:hover { color: var(--te-accent); }
.te-bcard__excerpt { margin: 0; padding: 0 18px; font-size: var(--te-fs-16); line-height: 1.6; color: var(--te-muted); }
.te-bcard__meta { font-size: 14.5px; color: var(--te-label); margin-top: auto; padding: 0 18px 18px; }
.te-blog-pagination { margin-top: 44px; }

/* Newsletter */
.te-newsletter { border-top: 1px solid var(--te-divider); }
.te-newsletter__inner {
  max-width: 720px; margin-inline: auto; text-align: center;
  padding: clamp(48px, 7vw, 72px) var(--te-gutter);
}
.te-newsletter__title { font-size: clamp(25px, 3.4vw, 36px); margin: 0; }
.te-newsletter__lead { font-size: 17.5px; line-height: 1.6; color: var(--te-muted); margin: 16px 0 0; }
.te-newsletter__form { margin-top: 28px; text-align: left; }
.te-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.te-field label { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 8px; }
.te-field label .req { color: var(--te-error); }
.te-field input {
  width: 100%; border: 1px solid var(--te-border); border-radius: var(--te-r-9);
  padding: 14px 16px; font-size: var(--te-fs-16); background: var(--te-white); color: var(--te-ink);
}
.te-field input:focus { outline: none; border-color: var(--te-accent); }
.te-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: var(--te-fs-15); color: var(--te-muted); }
.te-consent input { width: 16px; height: 16px; margin-top: 3px; flex-shrink: 0; }
.te-newsletter__submit {
  width: 100%; margin-top: 22px; background: var(--te-accent); color: var(--te-white);
  border: 0; border-radius: var(--te-r-10); padding: 17px; font-size: 17.5px; font-weight: 600; cursor: pointer;
}
.te-newsletter__submit:hover { background: var(--te-accent-hover); }

/* ---- Single article ---- */
.te-article-single { padding: clamp(40px, 6vw, 72px) var(--te-gutter); }
.te-article-single__inner { max-width: 820px; margin-inline: auto; }
.te-article-single__kicker { font-size: var(--te-fs-14); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--te-accent); }
.te-article-single__title { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; margin: 14px 0 0; }
.te-article-single__meta { margin: 18px 0 0; font-size: var(--te-fs-15); color: var(--te-label); display: flex; flex-wrap: wrap; gap: 8px 16px; }
.te-article-single__hero { margin: 32px 0; border-radius: var(--te-r-16); overflow: hidden; aspect-ratio: 16 / 9; }
.te-article-single__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.te-article-body { font-size: var(--te-fs-18); line-height: 1.75; color: var(--te-body); }
.te-article-body h2 { font-size: var(--te-fs-d6); margin: 40px 0 14px; }
.te-article-body h3 { font-size: var(--te-fs-24); margin: 32px 0 12px; }
.te-article-body p { margin: 0 0 20px; }
.te-article-body a { color: var(--te-accent); text-decoration: underline; }
.te-article-body img { max-width: 100%; height: auto; border-radius: var(--te-r-12); margin: 20px 0; }
.te-article-body ul, .te-article-body ol { margin: 0 0 20px; padding-left: 22px; }
.te-article-body li { margin-bottom: 8px; }
.te-article-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 600; }

/* Listen-to-article player */
.te-tts { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.te-tts[hidden] { display: none; }
.te-tts__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--te-fill); border: 1px solid var(--te-border); border-radius: var(--te-r-pill);
  padding: 10px 20px; font-family: var(--te-font-body); font-size: var(--te-fs-15); font-weight: 600;
  color: var(--te-ink); cursor: pointer;
  transition: background var(--te-hover-transition), border-color var(--te-hover-transition), color var(--te-hover-transition);
}
.te-tts__btn:hover { border-color: var(--te-border-hover); }
.te-tts__btn[aria-pressed="true"] { background: var(--te-accent-tint); border-color: var(--te-accent-tint-border); color: var(--te-accent); }
.te-tts__icon { font-size: 12px; line-height: 1; }
.te-tts__status { font-size: var(--te-fs-14); color: var(--te-muted); }

/* ---- FAQ page (left-aligned) ---- */
.te-faqpage .te-section__head { text-align: left; margin-inline: 0; max-width: 820px; margin-bottom: 0; }
.te-faqpage .te-section__title { margin-bottom: 14px; }
.te-faqpage .te-section__sub { margin-inline: 0; line-height: 1.6; max-width: 560px; }
.te-faqpage .te-faqhub__otherh { font-size: var(--te-fs-13); text-transform: uppercase; letter-spacing: 0.12em; color: var(--te-muted); font-weight: 700; margin: 0 0 14px; }
.te-faqpage__chips { justify-content: flex-start; margin: 0 0 40px; }
.te-faqpage__topics { margin: 0 0 8px; }
.te-faqpage__topics .te-arealink__n { color: var(--te-muted); font-weight: 500; margin-left: 3px; }
.te-faqpage__mosth { font-size: var(--te-fs-13); text-transform: uppercase; letter-spacing: 0.12em; color: var(--te-muted); font-weight: 700; margin: 0 0 16px; }
.te-faqpage .te-faq { max-width: none; margin-inline: 0; }
.te-faqpage__layout { margin-top: 30px; }
.te-faq__item[hidden] { display: none; }

/* Legal / policy pages */
.te-legal { max-width: 760px; margin: 0; }
.te-legal__updated { color: var(--te-muted); font-size: var(--te-fs-14); margin: 0 0 30px; }
.te-legal__lead { font-size: 17.5px; line-height: 1.7; color: var(--te-body); margin: 0 0 24px; }
.te-legal h2 { font-size: 21px; line-height: 1.3; margin: 38px 0 12px; color: var(--te-ink); }
.te-legal h3 { font-size: 17px; margin: 22px 0 8px; color: var(--te-ink); }
.te-legal p, .te-legal li { font-size: 16.5px; line-height: 1.72; color: var(--te-body); }
.te-legal p { margin: 0 0 14px; }
.te-legal ul { padding-left: 20px; margin: 10px 0 18px; }
.te-legal li { margin: 6px 0; }
.te-legal a { color: var(--te-accent); }
.te-legal strong { color: var(--te-ink); }
.te-legal__contact { background: var(--te-surface, #f7f9fc); border: 1px solid var(--te-border, #eef2f7); border-radius: 14px; padding: 18px 20px; margin-top: 30px; }
.te-legal__contact p { margin: 4px 0; }

/* ---- Answer-first guide pages (rental yields, payment plans, buying costs) ---- */
.te-answer { max-width: 820px; margin: 0; }
.te-answer__updated { color: var(--te-muted); font-size: var(--te-fs-14); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 20px; }
.te-answer__lead { font-size: var(--te-fs-20); line-height: 1.62; color: var(--te-body); margin: 0 0 26px; }
.te-answer h2 { font-size: var(--te-fs-24); line-height: 1.25; margin: 40px 0 12px; color: var(--te-ink); }
.te-answer p { font-size: var(--te-fs-18); line-height: 1.72; color: var(--te-body); margin: 0 0 16px; }
.te-answer ul { padding-left: 20px; margin: 10px 0 20px; }
.te-answer li { font-size: var(--te-fs-18); line-height: 1.7; color: var(--te-body); margin: 8px 0; }
.te-answer strong { color: var(--te-ink); }
.te-answer a { color: var(--te-accent); }
.te-answer__tablewrap { overflow-x: auto; margin: 18px 0 28px; -webkit-overflow-scrolling: touch; }
.te-answer table { width: 100%; border-collapse: collapse; font-size: var(--te-fs-16); }
.te-answer th, .te-answer td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--te-border); }
.te-answer thead th { background: var(--te-surface, #f7f9fc); font-weight: 700; color: var(--te-ink); white-space: nowrap; }
.te-answer tbody tr:last-child td { border-bottom: none; }
.te-answer__cta { margin-top: 34px; padding: 20px 22px; background: var(--te-surface, #f7f9fc); border: 1px solid var(--te-border); border-radius: 14px; }
.te-answer__cta p { margin: 0; }

/* ---- Monthly market-report posts (.totality-report): let dense tables scroll on mobile instead of cramming ---- */
@media (max-width: 640px) {
  .totality-report table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .totality-report th, .totality-report td { white-space: nowrap; }
}

/* ==========================================================================
   Search results page ([te_search_results])
   ========================================================================== */
.te-searchpage { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.te-searchpage__inner { max-width: 1160px; margin: 0 auto; padding: 0 var(--te-gutter, 20px); }
.te-searchpage__title { font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-d2, 34px); line-height: 1.15; margin: 10px 0 22px; color: var(--te-ink); }
.te-searchform {
  display: flex; align-items: center; gap: 10px;
  background: var(--te-surface, #fff); border: 1px solid var(--te-border); border-radius: 14px;
  padding: 8px 8px 8px 16px; max-width: 620px; box-shadow: 0 6px 20px rgba(10,16,28,0.05);
}
.te-searchform svg { color: var(--te-muted); flex: none; }
.te-searchform input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--te-ink); padding: 10px 0; min-width: 0; }
.te-searchform button {
  flex: none; border: 0; cursor: pointer; background: var(--te-accent); color: #fff;
  font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 10px;
}
.te-searchform button:hover { filter: brightness(1.05); }
.te-searchpage__count { color: var(--te-muted); font-size: var(--te-fs-15, 15px); margin: 16px 0 26px; }

.te-search__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 24px; }
.te-scard {
  display: flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--te-border); border-radius: var(--te-r-12, 14px);
  overflow: hidden; background: var(--te-surface, #fff);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.te-scard:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(10,16,28,0.10); border-color: var(--te-border-strong, #d7deea); }
.te-scard__thumb {
  position: relative; display: block; aspect-ratio: 16 / 10;
  background-size: cover; background-position: center; background-color: var(--te-photo-base, #eef2f7);
}
.te-scard__thumb[data-empty] { background: linear-gradient(135deg, #1b2740 0%, #2a3a5c 100%); }
.te-scard__badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(14,22,38,0.86); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 5px 11px; border-radius: 999px;
}
.te-scard__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.te-scard__title { margin: 0; font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-18, 18px); line-height: 1.3; color: var(--te-ink); }
.te-scard:hover .te-scard__title { color: var(--te-accent); }
.te-scard__meta { font-size: 13px; color: var(--te-accent); font-weight: 600; }
.te-scard__ex { font-size: var(--te-fs-15, 15px); line-height: 1.6; color: var(--te-muted); margin-top: 2px; }

.te-search__pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.te-search__pagination .page-numbers {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border: 1px solid var(--te-border); border-radius: 10px;
  color: var(--te-ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.te-search__pagination .page-numbers.current { background: var(--te-accent); color: #fff; border-color: var(--te-accent); }
.te-search__pagination a.page-numbers:hover { border-color: var(--te-accent); color: var(--te-accent); }

.te-search__none { max-width: 620px; margin-top: 8px; }
.te-search__none p { font-size: var(--te-fs-18, 18px); line-height: 1.7; color: var(--te-body); }
.te-search__suggest { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.te-search__suggest a {
  border: 1px solid var(--te-border); border-radius: 999px; padding: 9px 16px;
  font-size: 14px; font-weight: 600; color: var(--te-ink); text-decoration: none; background: var(--te-surface, #fff);
}
.te-search__suggest a:hover { border-color: var(--te-accent); color: var(--te-accent); }

@media (max-width: 560px) {
  .te-search__grid { grid-template-columns: 1fr; }
  .te-searchform button { padding: 12px 16px; }
}
