@font-face {
  font-family: "Ball-Pen";
  src: url("./assets/fonts/Ball-Pen-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tungsten";
  src: url("./assets/fonts/Tungsten-Medium.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat-custom";
  src: url("./assets/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --piv-navy: #0c2c5e;
  --piv-teal: #05518f;
  --piv-teal-light: #7ecdee;
  --piv-orange: #f69220;
  --piv-orange-hover: #e47911;
  --piv-text: #0c2c5e;
  --piv-muted: #5f6f78;
  --piv-panel: #ffffff;
  --font-display: "Montserrat", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--piv-text);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.piv-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 90px;
  padding: 0.7rem 2rem;
  background: transparent;
  color: #fff;
}

.piv-logo img {
  height: 56px;
  width: auto;
  display: block;
}

.piv-nav-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.45rem;
  flex-wrap: nowrap;
  padding-right: 0.35rem;
}

.piv-nav-links a {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.piv-nav-links a:hover {
  color: var(--piv-orange);
}

.piv-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.piv-search {
  width: 18px;
  height: 18px;
  color: #fff;
  flex: 0 0 auto;
}

.piv-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.5rem 1.35rem;
  border-radius: 0.25rem;
  background: var(--piv-orange);
  color: #fff;
  border: 0;
  cursor: pointer;
}

.piv-btn:hover {
  background: var(--piv-orange-hover);
  color: #fff;
}

.piv-btn-light {
  background: #fff;
  color: var(--piv-navy);
}

.demo-banner {
  position: fixed;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  max-width: min(340px, calc(100vw - 5.5rem));
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--piv-navy);
  font-size: 0.62rem;
  box-shadow: 0 4px 14px rgba(12, 44, 94, 0.1);
  pointer-events: none;
}

.demo-banner a,
.mode-pill {
  pointer-events: auto;
}

.demo-banner a {
  color: var(--piv-teal);
  font-weight: 700;
}

.mode-pill {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(12, 44, 94, 0.08);
  color: var(--piv-navy);
}

.mode-pill.live {
  background: rgba(39, 174, 96, 0.15);
  color: #1e7a45;
}

.mode-pill.demo {
  background: rgba(246, 146, 32, 0.18);
  color: #b35e00;
}

.piv-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.piv-hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #08254a;
}

.piv-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.piv-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 37, 74, 0.48);
}

.piv-hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 7rem 1.25rem 6.5rem;
  max-width: 920px;
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.1;
}

.hero-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.75rem 0 0;
}

.pre-ttl {
  display: block;
  margin: 0;
  font-family: "Tungsten", "Montserrat", sans-serif;
  color: #7ecdee;
  letter-spacing: 27px;
  font-size: clamp(1.75rem, 4vw, 50px);
  font-weight: 400;
  text-transform: uppercase;
}

.mid-ttl {
  display: block;
  font-family: "Montserrat-custom", "Montserrat", sans-serif;
  font-size: clamp(3rem, 8.5vw, 90px);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 0 0 #7ecdee;
  line-height: 1;
  margin: 0;
}

.cursive-ttl {
  display: block;
  position: static;
  transform: none;
  margin: 0.65rem 0 0;
  font-family: "Ball-Pen", cursive;
  color: #f69220;
  font-weight: 400;
  font-size: clamp(3.8rem, 10.5vw, 120px);
  line-height: 0.85;
  white-space: nowrap;
}

.box-ttl {
  display: inline-block;
  position: static;
  top: auto;
  margin: 1.1rem 0 0;
  padding: 10px 20px;
  border: 1px solid #fff;
  font-family: "Montserrat-custom", "Montserrat", sans-serif;
  font-size: clamp(0.68rem, 1.1vw, 16px);
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

.piv-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.piv-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2rem;
}

.piv-hero-cta-row .piv-btn {
  margin-top: 0;
}

.piv-btn-hero {
  padding: 0.5rem 1.625rem;
  font-size: 1.125rem;
}

.piv-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: none;
}

.piv-quiz-strip {
  padding: 3rem 1.25rem;
  background: linear-gradient(135deg, #eef6fb 0%, #fff 100%);
  border-bottom: 1px solid #dce7ed;
}

.piv-quiz-strip-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.piv-quiz-strip .eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--piv-teal);
}

.piv-quiz-strip h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--piv-navy);
}

.piv-quiz-strip p {
  margin: 0;
  max-width: 560px;
  color: var(--piv-muted);
  line-height: 1.55;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 65px;
  z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 65' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 65V38c240-38 480-38 720 0s480 38 720 0v27H0z'/%3E%3C/svg%3E")
    center bottom / 100% 100% no-repeat;
}

.piv-intro {
  padding: 4rem 1.25rem;
  background: var(--piv-panel);
  text-align: center;
}

.piv-intro-inner {
  max-width: 820px;
  margin: 0 auto;
}

.piv-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}

.piv-intro h2 span {
  color: var(--piv-teal);
}

.piv-intro p {
  margin: 0;
  color: var(--piv-muted);
  line-height: 1.65;
  font-size: 1.05rem;
}

.piv-services {
  padding: 4rem 1.25rem 5rem;
}

.piv-section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.piv-section-head .eyebrow,
.piv-split-copy .eyebrow,
.piv-experience .eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--piv-teal);
}

.piv-section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--piv-navy);
}

.piv-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}

.piv-service-card {
  background: #fff;
  border: 1px solid #e2eaed;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(10, 37, 51, 0.06);
}

.piv-service-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.piv-service-card h3 {
  margin: 1rem 1rem 0.35rem;
  font-size: 1rem;
  color: var(--piv-navy);
}

.piv-service-card p {
  margin: 0 1rem 1.2rem;
  color: var(--piv-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.piv-parallax {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 3rem 1.25rem;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.piv-parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 51, 0.72);
}

.piv-parallax-copy {
  position: relative;
  max-width: 760px;
  text-align: center;
}

.piv-parallax-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.piv-parallax-copy p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.95;
}

.piv-benefits {
  padding: 4rem 1.25rem;
  background: var(--piv-navy);
  color: #fff;
}

.piv-benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}

.piv-benefit-grid article {
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.piv-benefit-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--piv-orange);
}

.piv-benefit-grid p {
  margin: 0;
  line-height: 1.55;
  opacity: 0.92;
  font-size: 0.92rem;
}

.piv-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.piv-split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.piv-split-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
  background: #fff;
}

.piv-split-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.piv-split-copy ul {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--piv-muted);
  line-height: 1.65;
}

.piv-experience {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--piv-panel);
}

.piv-experience > img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.piv-experience-copy {
  padding: 2.5rem;
}

.piv-experience-copy h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.piv-pillars {
  display: grid;
  gap: 1rem;
}

.piv-pillars h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--piv-teal);
}

.piv-pillars p {
  margin: 0;
  color: var(--piv-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.piv-cta {
  text-align: center;
  padding: 4rem 1.25rem;
  background: linear-gradient(135deg, var(--piv-teal) 0%, var(--piv-navy) 100%);
  color: #fff;
}

.piv-cta h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.piv-footer {
  padding: 2.5rem 1.25rem;
  background: var(--piv-navy);
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.footer-logo {
  height: 34px;
  margin-bottom: 1rem;
}

.piv-footer p {
  margin: 0.35rem 0;
  font-size: 0.82rem;
}

.piv-footer .disclaimer {
  max-width: 760px;
  margin: 1rem auto 0;
  opacity: 0.7;
  line-height: 1.5;
}

/* —— Floating chat —— */
.chat-widget {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.chat-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(145deg, var(--piv-teal-light), var(--piv-teal));
  color: #fff;
  box-shadow: 0 10px 28px rgba(10, 37, 51, 0.28);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.chat-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(42, 143, 156, 0.45);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.fab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.chat-panel {
  width: min(380px, calc(100vw - 1.5rem));
  height: min(560px, calc(100vh - 7rem));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(10, 37, 51, 0.28);
  border: 1px solid #d8e4e8;
  animation: panelIn 0.22s ease both;
  transition: width 0.2s ease, height 0.2s ease;
}

.chat-panel.expanded {
  width: min(760px, calc(100vw - 1.5rem));
  height: min(640px, calc(100vh - 6.5rem));
}

.chat-panel.fullscreen {
  position: fixed;
  inset: 0.75rem;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 14px;
  z-index: 60;
}

.chat-widget:has(.chat-panel.fullscreen) {
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: stretch;
  justify-content: stretch;
  right: auto;
  bottom: auto;
  padding: 0;
}

.chat-widget:has(.chat-panel.fullscreen) .chat-fab {
  display: none;
}

.chat-panel[hidden] {
  display: none !important;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(115deg, var(--piv-navy) 0%, var(--piv-teal) 100%);
  color: #fff;
}

.chat-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ddea0;
}

.chat-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
}

#chat-expand,
#chat-fullscreen,
#chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

#chat-expand:hover,
#chat-fullscreen:hover,
#chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

#chat-fullscreen {
  font-size: 0.95rem;
}

#chat-close {
  font-size: 1.4rem;
}

.chat-panel-header strong {
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.chat-panel-header p {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  opacity: 0.85;
}

/* —— Wellness Quiz modal —— */
body.quiz-open {
  overflow: hidden;
}

.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.quiz-modal[hidden] {
  display: none !important;
}

.quiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 37, 74, 0.55);
}

.quiz-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.35rem 1.25rem;
  box-shadow: 0 24px 60px rgba(8, 37, 74, 0.25);
}

.quiz-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--piv-muted);
}

.quiz-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--piv-teal);
}

.quiz-dialog h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.35rem;
  color: var(--piv-navy);
}

.quiz-subtitle,
.quiz-progress {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--piv-muted);
}

.quiz-step {
  margin: 0.75rem 0 0.65rem;
  font-size: 1rem;
  color: var(--piv-navy);
}

.quiz-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dce7ea;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
}

.quiz-option:has(input:checked) {
  border-color: var(--piv-teal);
  background: #f0f8fb;
}

.quiz-option input {
  margin-top: 0.15rem;
}

.quiz-disclaimer {
  margin: 0.85rem 0 0;
  font-size: 0.68rem;
  color: var(--piv-muted);
  line-height: 1.4;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
}

.quiz-plan-meta {
  font-size: 0.82rem;
  color: var(--piv-teal);
}

.quiz-plan-body {
  margin: 0.65rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--piv-text);
}

.quiz-capture {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e4edf0;
}

.quiz-capture h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.quiz-capture label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--piv-navy);
}

.quiz-capture input {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #c9d8dc;
  border-radius: 8px;
  font: inherit;
}

.quiz-success h3 {
  margin: 0 0 0.5rem;
  color: var(--piv-navy);
}

.quiz-lead-id {
  font-size: 0.75rem;
  color: var(--piv-muted);
}

.quiz-loading,
.quiz-error {
  color: var(--piv-muted);
  font-size: 0.88rem;
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: #f7fafb;
}

.bubble {
  flex: 0 0 auto;
  max-width: 92%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: var(--piv-navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #dce7ea;
  border-bottom-left-radius: 4px;
  max-width: 100%;
  white-space: normal;
}

.bubble.assistant .md-p {
  margin: 0 0 0.45rem;
}

.bubble.assistant .md-p:last-child {
  margin-bottom: 0;
}

.bubble.assistant .md-h {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--piv-navy);
}

.bubble.assistant .md-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
}

.bubble.assistant code {
  font-size: 0.78em;
  background: #eef3f5;
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
}

.bubble.assistant a {
  color: var(--piv-teal);
  text-decoration: underline;
  word-break: break-word;
}

.md-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin: 0.35rem 0 0.55rem;
  border: 1px solid #d5e2e8;
  border-radius: 10px;
  background: #fff;
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.35;
  min-width: 480px;
}

.md-table th,
.md-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #e4edf0;
  vertical-align: top;
}

.md-table th {
  background: var(--piv-navy);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.md-table td {
  white-space: normal;
  max-width: 12rem;
  line-height: 1.45;
}

.md-table td br,
.md-table th br,
.md-p br,
.md-list br {
  display: block;
  margin-top: 0.35rem;
  content: "";
}

.md-table tr:last-child td {
  border-bottom: 0;
}

.md-table tr:nth-child(even) td {
  background: #f7fafb;
}

.chat-panel.expanded .md-table,
.chat-panel.fullscreen .md-table {
  font-size: 0.78rem;
  min-width: 560px;
}

.bubble.streaming {
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.streaming::after {
  content: "▋";
  display: inline-block;
  margin-left: 0.12rem;
  color: var(--piv-teal);
  animation: stream-cursor 1s step-end infinite;
}

@keyframes stream-cursor {
  50% {
    opacity: 0;
  }
}

.bubble.pending {
  opacity: 1;
  font-style: normal;
  background: linear-gradient(110deg, #eef4f8 0%, #f8fbfc 45%, #eef4f8 90%);
  background-size: 200% 100%;
  animation: thinking-shimmer 1.8s ease-in-out infinite;
}

.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex-shrink: 0;
}

.thinking-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--piv-teal);
  animation: thinking-bounce 1.2s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.thinking-label {
  color: var(--piv-navy);
  font-size: 0.82rem;
  font-weight: 500;
  animation: thinking-fade 0.35s ease;
}

@keyframes thinking-fade {
  from {
    opacity: 0.35;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thinking-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  35% {
    transform: translateY(-0.28rem);
    opacity: 1;
  }
}

@keyframes thinking-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  padding: 0.7rem;
  border-top: 1px solid #dde7ea;
  background: #fff;
}

.chat-composer input {
  border: 1px solid #c9d8dc;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}

.chat-composer input:focus {
  outline: 2px solid rgba(42, 143, 156, 0.25);
  border-color: var(--piv-teal);
}

.chat-composer button {
  border: 0;
  border-radius: 10px;
  padding: 0 0.95rem;
  background: var(--piv-orange);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
}

.chat-composer button:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 1100px) {
  .piv-nav-links {
    display: none;
  }
}

@media (max-width: 991px) {
  .pre-ttl {
    font-size: 30px;
    letter-spacing: 14px;
  }

  .hero-title-block {
    margin-top: 0.55rem;
  }

  .mid-ttl {
    font-size: 50px;
  }

  .cursive-ttl {
    font-size: 65px;
    margin-top: 0.5rem;
  }

  .box-ttl {
    margin-top: 0.85rem;
    letter-spacing: 1px;
    font-size: 12px;
    padding: 8px 14px;
  }

  .piv-btn-hero {
    margin-top: 1.5rem;
  }
}

@media (max-width: 900px) {
  .piv-nav {
    grid-template-columns: auto auto;
  }

  .demo-banner {
    bottom: 5.5rem;
    max-width: calc(100vw - 5.5rem);
  }

  .piv-split,
  .piv-experience {
    grid-template-columns: 1fr;
  }
}

/* —— Opening market intel page —— */
.intel-page {
  background: #f4f8fa;
}

.intel-nav {
  position: sticky;
  background: var(--piv-navy);
}

.intel-strip {
  background: linear-gradient(135deg, #0c2c5e 0%, #05518f 100%);
  color: #fff;
}

.intel-strip .eyebrow {
  color: var(--piv-teal-light);
}

.intel-strip h2,
.intel-strip p {
  color: #fff;
}

.intel-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.intel-hero {
  padding: 1rem 0 1.5rem;
}

.intel-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--piv-navy);
}

.intel-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--piv-muted);
  line-height: 1.55;
}

.intel-panel,
.intel-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 30px rgba(12, 44, 94, 0.08);
  margin-bottom: 1.25rem;
}

.intel-form {
  display: grid;
  gap: 1rem;
}

.intel-field span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--piv-navy);
}

.intel-field input[type="text"] {
  width: 100%;
  border: 1px solid #c5d8e3;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.intel-field-range input[type="range"] {
  width: 100%;
  accent-color: var(--piv-teal);
}

.intel-presets span {
  display: block;
  font-size: 0.78rem;
  color: var(--piv-muted);
  margin-bottom: 0.4rem;
}

.intel-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.intel-preset-btn {
  border: 1px solid #c5d8e3;
  background: #f7fafb;
  color: var(--piv-navy);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.intel-preset-btn:hover {
  border-color: var(--piv-teal);
}

.intel-status {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.intel-status-loading {
  background: #e8f4fb;
  color: var(--piv-navy);
}

.intel-status-error {
  background: #fdecec;
  color: #8b2e2e;
}

.intel-score-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(12, 44, 94, 0.08);
  margin-bottom: 1.25rem;
}

.intel-score-ring {
  --score-color: var(--piv-teal);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.intel-score-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: #fff;
  border-radius: 50%;
}

.intel-score-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intel-score-num,
.intel-score-grade {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.intel-score-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--piv-navy);
}

.intel-score-grade {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--piv-muted);
  margin-top: 0.15rem;
}

.intel-score-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.intel-meta {
  font-size: 0.82rem;
  color: var(--piv-muted);
}

.intel-disclaimer {
  font-size: 0.72rem;
  color: var(--piv-muted);
  margin-top: 0.75rem;
}

.intel-why-card {
  margin-bottom: 1rem;
}

.intel-score-headline {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--piv-teal, #0e7c86);
  line-height: 1.4;
}

.intel-score-summary {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--piv-text);
}

.intel-score-drivers {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.intel-driver-positive {
  color: #1f7a4a;
}

.intel-driver-limiting {
  color: #b45309;
}

.intel-driver-neutral {
  color: var(--piv-muted);
}

.intel-methodology {
  margin: 0;
  font-size: 0.74rem;
  color: var(--piv-muted);
  line-height: 1.45;
}

.intel-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
}

.intel-bars {
  display: grid;
  gap: 0.75rem;
}

.intel-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.intel-bar-track {
  height: 8px;
  background: #e8eef2;
  border-radius: 999px;
  overflow: hidden;
}

.intel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--piv-teal), var(--piv-teal-light));
  border-radius: 999px;
}

.intel-plays {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--piv-text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.intel-next {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--piv-muted);
}

.intel-next a {
  color: var(--piv-teal);
  font-weight: 600;
}

.intel-map-card iframe {
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: 10px;
}

.intel-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--piv-muted);
}

.intel-locations-panel {
  margin-bottom: 1rem;
}

.intel-locations-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.intel-locations-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.intel-locations-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--piv-muted);
}

.intel-locations-search {
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 320px;
}

.intel-location-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.intel-tab {
  border: 1px solid var(--piv-border, #d8e2ea);
  background: #fff;
  color: var(--piv-text);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.intel-tab.active {
  background: var(--piv-teal, #0e7c86);
  border-color: var(--piv-teal, #0e7c86);
  color: #fff;
}

.intel-location-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  max-height: 240px;
  overflow: auto;
  padding: 0.25rem;
  border: 1px solid var(--piv-border, #d8e2ea);
  border-radius: 10px;
  background: #fafcfd;
}

.intel-location-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  font: inherit;
}

.intel-location-item:hover {
  border-color: var(--piv-teal, #0e7c86);
}

.intel-location-item.selected {
  border-color: var(--piv-teal, #0e7c86);
  background: #e8f6f8;
}

.intel-location-name {
  font-weight: 600;
  font-size: 0.84rem;
}

.intel-location-city {
  font-size: 0.76rem;
  color: var(--piv-muted);
}

.intel-location-meta,
.intel-location-empty {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--piv-muted);
}

.intel-selected-note {
  margin: -0.35rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--piv-teal, #0e7c86);
}

.intel-progress {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--piv-border, #d8e2ea);
}

.intel-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.85rem;
}

.intel-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
}

.intel-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--piv-teal, #0e7c86), #7ecdee);
  transition: width 0.35s ease;
}

@media (max-width: 800px) {
  .intel-score-card,
  .intel-grid {
    grid-template-columns: 1fr;
  }
}
