/* Vouch intelligence environment — the dashboard used across the site.
   Built in the design language of the working Vouch business dashboards:
   a white-labelled sidebar, KPI strip with one inverted card, theme bars,
   evidence-labelled panels and Ask Vouch. Every instance is labelled sample data. */

.env {
  --acc: #0F3D2E;
  --acc-2: color-mix(in srgb, var(--acc) 82%, #fff);
  --acc-soft: color-mix(in srgb, var(--acc) 9%, #fff);
  --acc-line: color-mix(in srgb, var(--acc) 18%, #fff);
  --canvas: #F3F4EF;
  position: relative; background: var(--canvas); border-radius: 20px; overflow: hidden; color: var(--ink);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(3, 27, 18, 0.08);
  font-size: 13px; line-height: 1.4; letter-spacing: -0.005em; text-align: left;
  transition: --acc 0.6s ease;
}
@property --acc { syntax: "<color>"; inherits: true; initial-value: #0F3D2E; }

.env-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: #FAFAF7; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; }
.env-bar .dots { display: flex; gap: 6px; }
.env-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.env-bar .url { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-bar .url b { color: var(--ink-2); font-weight: 500; }
.env-bar .sample { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-weight: 600; font-size: 10.5px; letter-spacing: 0.02em; white-space: nowrap; }

.env-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.env.no-side .env-body { grid-template-columns: minmax(0, 1fr); }
.env.no-side .env-side { display: none; }

/* Sidebar */
.env-side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.env-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); }
.env-logo { width: 32px; height: 32px; border-radius: 9px; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; letter-spacing: -0.02em; flex: none; transition: background-color 0.6s ease; }
.env-brand > div { min-width: 0; }
.env-brand b { display: block; font-weight: 560; font-size: 12.5px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-brand small { display: block; font-size: 10.5px; color: var(--ink-3); }
.env-brand small em { font-style: normal; font-weight: 600; color: var(--ink-2); }
.env-nav-label { font-size: 10px; color: var(--ink-4); font-weight: 500; padding: 0 8px; }
.env-nav { display: grid; gap: 2px; }
.env-nav span { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 12px; white-space: nowrap; }
.env-nav span i { width: 6px; height: 6px; border-radius: 2px; border: 1.4px solid currentColor; opacity: 0.55; flex: none; }
.env-nav span.on { background: var(--acc-soft); color: var(--acc); }
.env-nav span.on i { background: currentColor; opacity: 1; }
.env-ask { margin-top: auto; background: var(--acc); color: #fff; border-radius: 12px; padding: 12px; display: grid; gap: 3px; transition: background-color 0.6s ease; }
.env-ask b { font-weight: 560; font-size: 12px; }
.env-ask small { font-size: 10.5px; color: rgba(255, 255, 255, 0.72); }
.env-sources { display: grid; gap: 5px; padding: 0 6px; font-size: 10.5px; color: var(--ink-3); }
.env-sources div { display: flex; justify-content: space-between; gap: 8px; }
.env-sources div b { font-weight: 600; letter-spacing: 0.03em; font-size: 9.5px; }
.env-sources .live b { color: var(--green-ink); }
.env-sources .demo b { color: var(--amber); }

/* Main */
.env-main { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.env-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.env-top h4 { font-size: 15px; font-weight: 560; letter-spacing: -0.03em; white-space: nowrap; }
.env-askbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.env-askbar svg { width: 13px; height: 13px; color: var(--acc); flex: none; }
.env-askbar span { overflow: hidden; text-overflow: ellipsis; }
.env-chip { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

.env-kpis { display: grid; grid-template-columns: repeat(var(--kpis, 4), minmax(0, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px 10px; display: grid; gap: 6px; min-width: 0; position: relative; overflow: hidden; }
.kpi small { font-size: 10.5px; color: var(--ink-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 25px; font-weight: 560; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .v sub { font-size: 12px; vertical-align: baseline; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-left: 1px; }
.kpi .d { font-size: 10.5px; font-weight: 600; color: var(--green-ink); }
.kpi .d.neg { color: var(--rose); }
.kpi svg { position: absolute; right: 10px; bottom: 10px; width: 52px; height: 20px; overflow: visible; }
.kpi svg path { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.kpi.inv { background: var(--acc); border-color: transparent; color: #fff; transition: background-color 0.6s ease; }
.kpi.inv::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 7px); pointer-events: none; }
.kpi.inv small, .kpi.inv .v sub { color: rgba(255, 255, 255, 0.7); }
.kpi.inv .d { color: var(--lime); }
.kpi.inv svg path { stroke: var(--lime); opacity: 0.9; }

.env-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.env-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.env-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.env-card h5 { margin: 0; font-size: 12.5px; font-weight: 560; letter-spacing: -0.02em; }
.env-card header small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.prov { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: var(--paper-2); color: var(--ink-3); white-space: nowrap; }
.prov::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.prov.obs { background: var(--green-soft); color: var(--green-ink); }
.prov.ai { background: var(--acc-soft); color: var(--acc); }
.prov.demo { background: var(--amber-soft); color: var(--amber); }

/* Trend */
.trend { position: relative; height: 128px; }
.trend svg { width: 100%; height: 100%; overflow: visible; }
.trend .grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend .area { fill: var(--acc-soft); }
.trend .line { fill: none; stroke: var(--acc); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.trend .line2 { fill: none; stroke: var(--rose); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0.55; stroke-dasharray: 3 3; }
.trend-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-4); margin-top: 2px; }
.trend-legend { display: flex; gap: 14px; font-size: 10.5px; color: var(--ink-3); }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 10px; height: 2px; border-radius: 2px; background: var(--acc); }
.trend-legend i.neg { background: var(--rose); opacity: 0.6; }
.trend-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 9px; }
.trend-stats div { display: grid; gap: 1px; }
.trend-stats div + div { border-left: 1px solid var(--line); padding-left: 10px; }
.trend-stats b { font-size: 16px; font-weight: 560; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.trend-stats small { font-size: 10px; color: var(--ink-3); }

/* Themes & locations bars */
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 30px 34px; gap: 8px; align-items: center; font-size: 11.5px; }
.bar .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .t { height: 7px; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--paper-2) 0 2px, #F8F9F5 2px 5px); overflow: hidden; }
.bar .t i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--acc); transition: width 1.1s var(--spring-soft), background-color 0.6s ease; transition-delay: calc(var(--k, 0) * 90ms); }
.bar.warn .t i { background: var(--rose); }
.bar.mid .t i { background: color-mix(in srgb, var(--acc) 55%, #fff); }
.bar .s { text-align: right; font-weight: 560; font-variant-numeric: tabular-nums; }
.bar .dl { text-align: right; font-size: 10.5px; font-weight: 600; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.bar .dl.neg { color: var(--rose); }
.bar .dl.flat { color: var(--ink-4); }
.env.is-hidden-bars .bar .t i { width: 0 !important; }

/* Brief */
.env-brief { background: var(--acc); border-color: transparent; color: #fff; position: relative; overflow: hidden; transition: background-color 0.6s ease; }
.env-brief::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.02), 0 0 0 44px rgba(255, 255, 255, 0.02); }
.env-brief h5 { color: #fff; display: flex; align-items: center; gap: 8px; }
.env-brief h5 svg { width: 13px; height: 13px; color: var(--lime); }
.env-brief header small { color: rgba(255, 255, 255, 0.6); }
.env-brief p { font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.92); letter-spacing: -0.01em; }
.env-brief p mark { background: none; color: var(--lime); font-weight: 500; }
.env-actions { display: grid; gap: 6px; }
.env-actions div { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); font-size: 11.5px; color: rgba(255, 255, 255, 0.9); }
.env-actions div b { flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 10px; display: grid; place-items: center; font-weight: 600; }

/* Voice */
.voice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.voice div { background: var(--canvas); border-radius: 10px; padding: 10px 11px; display: grid; gap: 6px; align-content: start; }
.voice small { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.voice q { font-size: 11.5px; line-height: 1.42; color: var(--ink); quotes: "\201C" "\201D"; }

/* Feed (home stage) */
.feed { display: grid; gap: 7px; }
.feed-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 11px; border-radius: 10px; background: var(--canvas); align-items: center; }
.feed-item q { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink); quotes: "\201C" "\201D"; line-height: 1.4; }
.feed-item .bubbles i { width: 8px; height: 8px; border-width: 1.3px; }
.feed-item .verified { font-size: 10px; }
.feed-item .verified svg { width: 12px; height: 12px; }
.feed-item .tags { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; }
.feed-item .tags span { font-size: 9.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--ink-2); }
.feed-item .tags span.neg { color: var(--rose); }
.feed-item .tags span.pos { color: var(--green-ink); }
.feed-item.landing { animation: feed-in 0.9s var(--spring) both; }
@keyframes feed-in { from { transform: translateY(-14px) scale(0.98); box-shadow: 0 0 0 2px var(--lime); } 60% { box-shadow: 0 0 0 2px var(--lime); } to { transform: none; box-shadow: 0 0 0 0 transparent; } }

/* Swap choreography when the environment re-configures */
@media (prefers-reduced-motion: no-preference) {
  .env .swap { animation: swap-in 0.9s var(--spring-soft) both; animation-delay: calc(var(--k, 0) * 80ms); }
  @keyframes swap-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
  .env-nav span.swap { animation-delay: calc(var(--k, 0) * 50ms); }
}

/* Layout variants */
.env.compact .env-body { grid-template-columns: 168px minmax(0, 1fr); }
.env.compact .env-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.env.mini { font-size: 12px; }
.env.mini .env-grid { grid-template-columns: minmax(0, 1fr); }
.env.mini [data-panel] header small, .env.compact [data-panel="themes"] header small { display: none; }
.env.compact .bar { grid-template-columns: minmax(0, 92px) minmax(0, 1fr) 24px 26px; }
.env.mini .env-main { padding: 14px; }

/* Industry switcher above the hero environment */
.env-tabs {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.env-tabs::-webkit-scrollbar { display: none; }
.env-tabs button {
  position: relative; z-index: 1; border: 0; background: transparent; height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; letter-spacing: -0.01em; transition: color 0.25s ease;
}
.env-tabs button[aria-selected="true"] { color: #fff; }
.env-tabs .thumb { position: absolute; z-index: 0; top: 5px; left: 0; height: 38px; border-radius: 999px; background: var(--forest); transition: transform 0.7s var(--spring), width 0.7s var(--spring), background-color 0.5s ease; }

.env-showcase { display: grid; gap: 22px; justify-items: center; }
.env-showcase .env { width: 100%; }
.env-caption { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; width: 100%; font-size: 0.86rem; color: var(--ink-3); }
.env-caption b { color: var(--ink); font-weight: 500; }

/* Responsive collapse: the environment simplifies rather than shrinking text */
@media (max-width: 1100px) {
  .env-body, .env.compact .env-body { grid-template-columns: minmax(0, 1fr); }
  .env-side { display: none; }
}
@media (max-width: 760px) {
  .env-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .env-grid, .env.compact .env-grid { grid-template-columns: minmax(0, 1fr); }
  .voice { grid-template-columns: minmax(0, 1fr); }
  .env-top .env-chip { display: none; }
  .env [data-hide-sm] { display: none; }
  .env-bar .url { text-align: left; }
  .env-bar .dots { display: none; }
  .bar { grid-template-columns: minmax(0, 92px) minmax(0, 1fr) 28px 30px; }
}

/* Three environments side by side (home) */
.env-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
.env-trio figure { margin: 0; display: grid; gap: 16px; }
.env-trio .env { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.env-trio figcaption { display: grid; gap: 2px; font-size: 0.95rem; }
.env-trio figcaption b { font-weight: 500; color: var(--on-deep); }
.env-trio figcaption span { color: var(--on-deep-3); font-size: 0.88rem; }
.side-biz .mini-dash.env { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.5); }
@media (max-width: 900px) {
  .env-trio { grid-template-columns: repeat(3, minmax(280px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 24px; scrollbar-width: none; }
  .env-trio::-webkit-scrollbar { display: none; }
  .env-trio figure { scroll-snap-align: start; }
}
