/* T-Squared conversion layer
   Chat quote helper (every page) and the lawn quiz (/lawn-quiz). Everything is prefixed tq- so it can sit on top of
   index.html's inline styles, landing-pages.css and suburb-pages.css without
   touching them. */

:root {
  --tq-green: #3d664e;
  --tq-green-dk: #2c4a39;
  --tq-green-lt: #447e5c;
  --tq-sand: #c9af8e;
  --tq-sand-lt: #efe6d8;
  --tq-cream: #fbfaf9;
  --tq-ink: #1d2630;
  --tq-muted: #67737e;
  --tq-line: #e3decf;
  --tq-card: #ffffff;
  --tq-radius: 18px;
  --tq-shadow: 0 24px 60px rgba(20, 32, 24, 0.22), 0 4px 14px rgba(20, 32, 24, 0.08);
}

/* ─────────────────────────── Chat launcher ─────────────────────────── */

.tq-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--tq-green);
  color: #fff;
  font: 600 15px/1 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.01em;
  box-shadow: 0 14px 34px rgba(20, 32, 24, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.tq-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(20, 32, 24, 0.38); }
.tq-launch:focus-visible { outline: 3px solid var(--tq-sand); outline-offset: 3px; }
.tq-launch-av {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tq-cream);
  color: var(--tq-green);
  font-weight: 800;
  font-size: 14px;
}
.tq-launch-av img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--tq-cream);   /* lifts the green logo off the green button */
}
.tq-launch-av::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid var(--tq-green);
}
.tq-launch.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* Sit above the sticky call bar on suburb pages. */
.tq-has-bar .tq-launch { bottom: 20px; }
@media (max-width: 720px) {
  .tq-launch { right: 14px; bottom: 14px; padding: 8px 14px 8px 8px; font-size: 14px; }
  /* The sticky bar already says "Get my price", so the launcher shrinks to a
     round chat icon above it and steps aside while the quote card is in view. */
  .tq-has-bar .tq-launch { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 6px; }
  .tq-has-bar .tq-launch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tq-has-bar .tq-launch-av { width: 44px; height: 44px; font-size: 16px; }
  .tq-launch.is-dodging { opacity: 0; pointer-events: none; transform: translateY(8px); }
}

/* Teaser bubble, shown once per visit. */
.tq-teaser {
  position: fixed;
  right: 20px;
  bottom: 82px;
  z-index: 1199;
  max-width: 260px;
  padding: 14px 36px 14px 16px;
  border-radius: 16px 16px 4px 16px;
  background: var(--tq-card);
  color: var(--tq-ink);
  font: 500 14px/1.45 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: var(--tq-shadow);
  cursor: pointer;
  animation: tq-pop 0.35s ease both;
}
.tq-teaser strong { color: var(--tq-green); }
.tq-teaser-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tq-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 720px) {
  .tq-teaser { right: 14px; bottom: 72px; }
  .tq-has-bar .tq-teaser { bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
}

/* ─────────────────────────── Chat panel ─────────────────────────── */

.tq-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1201;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 28px);
  height: min(620px, calc(100vh - 40px));
  border-radius: 22px;
  overflow: hidden;
  background: var(--tq-cream);
  color: var(--tq-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: var(--tq-shadow);
  animation: tq-pop 0.28s ease both;
}
.tq-chat[hidden] { display: none; }
@media (max-width: 520px) {
  .tq-chat {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
  }
}

.tq-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(160deg, var(--tq-green) 0%, var(--tq-green-dk) 100%);
  color: #fff;
}
.tq-chat-head .tq-launch-av { width: 40px; height: 40px; font-size: 15px; flex: none; }
.tq-chat-title { flex: 1; min-width: 0; }
.tq-chat-title strong { display: block; font-size: 16px; letter-spacing: -0.01em; }
.tq-chat-title span { display: block; font-size: 12.5px; color: #d8e2c5; margin-top: 2px; }
.tq-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex: none;
}
.tq-icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
.tq-icon-btn:focus-visible { outline: 2px solid var(--tq-sand); outline-offset: 2px; }

.tq-chat-quick {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--tq-line);
}
.tq-chat-quick a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border-radius: 10px;
  background: var(--tq-sand-lt);
  color: var(--tq-green-dk);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.tq-chat-quick a:hover { background: #e6d8c3; text-decoration: none; }

.tq-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.tq-msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  animation: tq-rise 0.25s ease both;
  overflow-wrap: anywhere;
}
.tq-msg a { color: var(--tq-green); font-weight: 600; text-decoration: underline; }
.tq-msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--tq-line); border-bottom-left-radius: 4px; }
.tq-msg-me { align-self: flex-end; background: var(--tq-green); color: #fff; border-bottom-right-radius: 4px; }
.tq-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.tq-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b8c2bb; animation: tq-dot 1s infinite ease-in-out; }
.tq-typing i:nth-child(2) { animation-delay: 0.15s; }
.tq-typing i:nth-child(3) { animation-delay: 0.3s; }

.tq-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; animation: tq-rise 0.25s ease both; }
.tq-chip {
  padding: 9px 14px;
  border: 1.5px solid var(--tq-green);
  border-radius: 999px;
  background: #fff;
  color: var(--tq-green);
  font-weight: 600; font-size: 14px; line-height: 1.2;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.tq-chip:hover, .tq-chip:focus-visible { background: var(--tq-green); color: #fff; text-decoration: none; outline: none; }
.tq-chip-ghost { border-color: var(--tq-line); color: var(--tq-muted); }
.tq-chip-ghost:hover { background: var(--tq-line); color: var(--tq-ink); }

.tq-chat-foot { padding: 10px 12px 12px; background: #fff; border-top: 1px solid var(--tq-line); }
.tq-chat-form { display: flex; gap: 8px; }
.tq-chat-form input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--tq-line);
  border-radius: 12px;
  background: var(--tq-cream);
  color: var(--tq-ink);
  font-weight: 500; font-size: 16px; line-height: 1;
  font-family: inherit;
}
.tq-chat-form input:focus { outline: none; border-color: var(--tq-green); background: #fff; }
.tq-chat-form input:disabled { opacity: 0.55; }
.tq-send {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--tq-green);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.tq-send:disabled { background: #b8c2bb; cursor: default; }
.tq-chat-fine { margin: 8px 2px 0; font-size: 11.5px; color: var(--tq-muted); text-align: center; }
.tq-chat-fine a { color: var(--tq-muted); text-decoration: underline; }

/* ─────────────────────────── Promo cards ───────────────────────────
   The lawn quiz card at the end of blog posts. */

.tq-promos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.tq-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 24px;
  border-radius: var(--tq-radius);
  overflow: hidden;
  color: var(--tq-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--tq-line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tq-promo:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 32, 24, 0.12); text-decoration: none; }
.tq-promo-dark { background: linear-gradient(155deg, var(--tq-green) 0%, var(--tq-green-dk) 100%); color: #fff; border-color: transparent; }
.tq-promo-tag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tq-sand-lt);
  color: var(--tq-green-dk);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tq-promo-dark .tq-promo-tag { background: rgba(255, 255, 255, 0.14); color: #f1eadf; }
.tq-promo h3 { margin: 4px 0 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.02em; color: inherit; }
.tq-promo p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--tq-muted); }
.tq-promo-dark p { color: #d8e2c5; }
.tq-promo-go { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 0.95rem; color: var(--tq-green); }
.tq-promo-dark .tq-promo-go { color: var(--tq-sand); }
/* Quiz card: white with brand-green text so it stands out at the end of a post. */
.tq-promo-quiz { border: 2px solid var(--tq-green); color: var(--tq-green); box-shadow: 0 14px 34px rgba(20, 32, 24, 0.10); }
.tq-promo-quiz h3 { color: var(--tq-green-dk); }
.tq-promo-quiz p { color: var(--tq-green); }
.tq-promo-quiz .tq-promo-tag { background: var(--tq-green); color: #fff; }
.tq-promo-quiz .tq-promo-art { opacity: 0.18; }
.tq-promo-art { position: absolute; right: -14px; top: -14px; font-size: 84px; opacity: 0.12; pointer-events: none; }

.tq-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tq-green); }

.blog-article .tq-promos { margin: 40px 0 8px; }

/* ─────────────────────────── Shared page shell ─────────────────────────── */

.tq-page { padding: 120px 20px 80px; background: radial-gradient(1200px 500px at 50% -120px, #e8efe6 0%, var(--tq-cream) 70%); }
.tq-wrap { max-width: 1080px; margin: 0 auto; }
.tq-hero { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.tq-hero h1 { margin: 10px 0 12px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.035em; color: var(--tq-ink); }
.tq-hero h1 em { font-style: normal; color: var(--tq-green); }
.tq-hero p { margin: 0 auto; max-width: 560px; font-size: 1.08rem; color: var(--tq-muted); }
.tq-meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px; font-size: 13.5px; color: var(--tq-muted); font-weight: 500; }
.tq-meta-row span::before { content: "✓ "; color: var(--tq-green); font-weight: 700; }

.tq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--tq-green);
  color: #fff;
  font-weight: 700; font-size: 15px; line-height: 1;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tq-btn:hover { background: var(--tq-green-lt); text-decoration: none; transform: translateY(-1px); }
.tq-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.tq-btn-sand { background: var(--tq-sand); color: var(--tq-ink); }
.tq-btn-sand:hover { background: #d6bf9f; }
.tq-btn-line { background: transparent; color: var(--tq-green); box-shadow: inset 0 0 0 1.5px var(--tq-green); }
.tq-btn-line:hover { background: var(--tq-green); color: #fff; }

.tq-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tq-field label { font-size: 13px; font-weight: 600; color: var(--tq-ink); }
.tq-field input {
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid var(--tq-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tq-ink);
  font-weight: 500; font-size: 16px; line-height: 1;
  font-family: inherit;
}
.tq-field input:focus { outline: none; border-color: var(--tq-green); box-shadow: 0 0 0 4px rgba(61, 102, 78, 0.12); }
.tq-field input[aria-invalid="true"] { border-color: #c2410c; }
.tq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tq-fine { margin: 10px 0 0; font-size: 12.5px; color: var(--tq-muted); line-height: 1.5; }
.tq-fine a { color: var(--tq-muted); text-decoration: underline; }
.tq-msgline { margin: 10px 0 0; font-size: 14px; font-weight: 500; }
.tq-msgline.is-bad { color: #b42318; }
.tq-msgline.is-ok { color: var(--tq-green); }

/* ─────────────────────────── Lawn quiz ─────────────────────────── */

.tq-quiz {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tq-line);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(20, 32, 24, 0.10);
  overflow: hidden;
}
.tq-quiz-top { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--tq-line); }
.tq-quiz-back {
  border: 0;
  background: none;
  padding: 6px 4px;
  color: var(--tq-muted);
  font-weight: 600; font-size: 14px; line-height: 1;
  font-family: inherit;
  cursor: pointer;
}
.tq-quiz-back:disabled { visibility: hidden; }
.tq-progress { flex: 1; height: 8px; border-radius: 999px; background: #eef0ec; overflow: hidden; }
.tq-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--tq-green-lt), var(--tq-green)); transition: width 0.35s ease; }
.tq-step-count { font-size: 13px; font-weight: 600; color: var(--tq-muted); min-width: 42px; text-align: right; }
.tq-quiz-body { padding: 34px 32px 36px; }
.tq-q { animation: tq-rise 0.3s ease both; }
.tq-q h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 1.85rem); letter-spacing: -0.025em; line-height: 1.2; }
.tq-q-hint { margin: 0 0 22px; color: var(--tq-muted); font-size: 0.96rem; }
.tq-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tq-opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--tq-line);
  border-radius: 16px;
  background: var(--tq-cream);
  color: var(--tq-ink);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.tq-opt:hover { border-color: var(--tq-green); background: #fff; transform: translateY(-1px); }
.tq-opt:focus-visible { outline: 3px solid rgba(61, 102, 78, 0.35); outline-offset: 2px; }
.tq-opt[aria-pressed="true"] { border-color: var(--tq-green); background: #eef4ef; box-shadow: inset 0 0 0 1px var(--tq-green); }
.tq-opt-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; font-size: 24px; box-shadow: 0 1px 0 var(--tq-line); }
.tq-opt strong { display: block; font-size: 15.5px; letter-spacing: -0.01em; }
.tq-opt span span { display: block; margin-top: 3px; font-size: 13px; color: var(--tq-muted); line-height: 1.4; }
@media (max-width: 620px) {
  .tq-quiz-body { padding: 26px 18px 28px; }
  .tq-quiz-top { padding: 14px 16px; }
  .tq-opts { grid-template-columns: 1fr; }
}

.tq-result { animation: tq-rise 0.35s ease both; }
.tq-result-hero {
  margin: -34px -32px 28px;
  padding: 34px 32px 30px;
  background: linear-gradient(160deg, var(--tq-green) 0%, var(--tq-green-dk) 100%);
  color: #fff;
  text-align: center;
}
@media (max-width: 620px) { .tq-result-hero { margin: -26px -18px 24px; padding: 28px 18px 24px; } }
.tq-result-hero .tq-eyebrow { color: var(--tq-sand); }
.tq-result-hero h2 { margin: 10px 0 6px; font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: -0.035em; line-height: 1.05; color: #fff; }
.tq-result-hero p { margin: 0 auto; max-width: 480px; color: #d8e2c5; }
.tq-dials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.tq-dial { padding: 14px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); }
.tq-dial b { display: block; font-size: 1.15rem; color: #fff; letter-spacing: -0.02em; }
.tq-dial small { display: block; margin-top: 3px; font-size: 12px; color: #cfdac6; }
.tq-dial.is-now { background: var(--tq-sand); }
.tq-dial.is-now b { color: var(--tq-ink); }
.tq-dial.is-now small { color: #4a3f31; }
@media (max-width: 520px) { .tq-dials { grid-template-columns: 1fr; } }

.tq-why { display: grid; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.tq-why li { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--tq-cream); border: 1px solid var(--tq-line); font-size: 14.5px; line-height: 1.5; }
.tq-why li b { display: block; margin-bottom: 2px; }
.tq-why-ico { flex: none; font-size: 20px; line-height: 1.3; }

.tq-plan { padding: 24px; border-radius: 20px; background: var(--tq-sand-lt); border: 1px solid #e2d3bd; }
.tq-plan h3 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: -0.02em; }
.tq-plan > p { margin: 0 0 18px; color: #5b5145; }
.tq-plan-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; }
.tq-plan-grid .tq-btn { grid-column: 1 / -1; }
@media (max-width: 620px) { .tq-plan-grid { grid-template-columns: 1fr; } }
.tq-alt { margin: 22px 0 0; text-align: center; font-size: 14.5px; color: var(--tq-muted); }
.tq-alt a { color: var(--tq-green); font-weight: 600; }

/* ─────────────────────────── Motion ─────────────────────────── */

@keyframes tq-pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes tq-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tq-dot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tq-launch, .tq-teaser, .tq-chat, .tq-msg, .tq-chips, .tq-q, .tq-result, .tq-promo { animation: none !important; transition: none !important; }
  .tq-typing i { animation: none; }
}

/* ─────────────────────────── Print ─────────────────────────── */

@media print {
  .tq-launch, .tq-teaser, .tq-chat, .tq-no-print { display: none !important; }
}
