/* ============================================================================
 * site-analyze.css — S4b "Analyze" spotlight. Plain-language BI: a left rail of
 * value props + the Ajinomoto 94% proof, and a live data-analyst board where a
 * natural-language question becomes a chart, a headline number and the exact
 * rows behind it. Pure vector / real content — reuses the Nama light system.
 * ========================================================================== */

.s-analyze .az-wrap {
  display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 40px; align-items: start;
}

/* ── left rail ── */
.az-rail { display: flex; flex-direction: column; gap: 22px; padding-top: 4px; }
.az-vp { display: flex; gap: 13px; align-items: flex-start; }
.az-vp-ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: #EFF6FF; display: grid; place-items: center;
}
.az-vp-ic svg { width: 18px; height: 18px; color: #2684FF; }
.az-vp div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.az-vp b { font-size: 15px; font-weight: 700; color: #0B1220; letter-spacing: -0.005em; }
.az-vp span { font-size: 13.5px; line-height: 1.45; color: #52525B; text-wrap: pretty; }

.az-proof {
  display: flex; align-items: center; gap: 14px; margin-top: 4px; padding-top: 22px;
  border-top: 1px solid #E4E4E7;
}
.az-proof-n { font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: #0B1220; flex: none; }
.az-proof-n i { color: #2684FF; font-style: normal; }
.az-proof-l { font-size: 13px; line-height: 1.4; color: #71717A; }
.az-proof-l b { color: #3F3F46; font-weight: 700; }

/* ── the data-analyst board ── */
.az-board {
  background: #FFFFFF; border: 1px solid #E4E4E7; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px -38px rgba(15, 23, 42, 0.26);
}

/* prompt bar */
.az-ask {
  display: flex; align-items: center; gap: 11px; padding: 15px 18px;
  border-bottom: 1px solid #EEF0F4; background: #FBFCFE;
}
.az-ask-ic {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: #2684FF; display: grid; place-items: center;
  box-shadow: 0 8px 18px -8px rgba(38, 132, 255, 0.6);
}
.az-ask-ic svg { width: 16px; height: 16px; color: #FFFFFF; }
.az-q { font-size: 15px; font-weight: 600; color: #0B1220; flex: 1; min-width: 0; text-wrap: pretty; }
.az-reads {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 11.5px; font-weight: 600; color: #475569;
  background: #F1F5FB; border: 1px solid #E4E9F2; border-radius: 999px; padding: 4px 11px;
}
.az-reads svg { width: 13px; height: 13px; color: #16A34A; flex: none; }
.az-reads i { color: #94A3B8; font-style: normal; font-weight: 600; }

/* output: chart + side */
/* dashboard: KPI strip → (bar + donut) → trend line */
.az-dash { display: flex; flex-direction: column; }
.az-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #EEF0F4; }
.az-tile { padding: 14px 18px; border-right: 1px solid #EEF0F4; }
.az-tile:last-child { border-right: none; }
.az-tile-n { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: #0B1220; line-height: 1; }
.az-tile-n i { font-style: normal; color: #2684FF; font-size: 16px; }
.az-tile-n.up { color: #15803D; }
.az-tile-l { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: #9CA1AB; }

.az-charts { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.az-panel { padding: 16px 18px; border-right: 1px solid #EEF0F4; }
.az-panel:last-child { border-right: none; }
.az-panel-wide { border-right: none; border-top: 1px solid #EEF0F4; }
.az-p-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: #0B1220; }
.az-p-b { margin-left: auto; font-size: 10.5px; font-weight: 600; color: #9CA1AB; white-space: nowrap; }
.az-p-b.spike { color: #B45309; }

.az-bars { display: flex; flex-direction: column; gap: 11px; }
.az-bar { display: flex; align-items: center; gap: 11px; }
.az-bl { font-size: 12.5px; color: #52525B; width: 92px; flex: none; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.az-bt { flex: 1; height: 20px; border-radius: 6px; background: #EEF1F6; overflow: hidden; }
.az-bt i {
  display: block; height: 100%; width: var(--w); border-radius: 6px;
  background: linear-gradient(90deg, #2684FF, #4F9BFF);
  transition: width 1s cubic-bezier(.22,.7,.3,1);
}
.az-bar.lo .az-bt i { background: #B7D3FB; }
.az-bp { font-size: 13px; font-weight: 700; color: #0B1220; width: 36px; flex: none; }

/* donut / pie — claims by line of business */
.az-donut-wrap { display: flex; align-items: center; gap: 16px; }
.az-donut { width: 104px; height: 104px; flex: none; }
.az-donut .az-seg { stroke-linecap: butt; }
.az-donut-n { fill: #0B1220; font-size: 21px; font-weight: 700; text-anchor: middle; }
.az-donut-cl { fill: #9CA1AB; font-size: 8px; font-weight: 600; text-anchor: middle; letter-spacing: 0.04em; text-transform: uppercase; }
.az-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.az-lg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #52525B; white-space: nowrap; }
.az-lg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.az-lg b { margin-left: auto; padding-left: 12px; color: #0B1220; font-weight: 700; font-variant-numeric: tabular-nums; }

/* trend line — paid claims by month */
.az-trend { position: relative; }
.az-line { width: 100%; height: 88px; display: block; }
.az-dot { position: absolute; width: 9px; height: 9px; border-radius: 999px; background: #2684FF;
  border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(38,132,255,0.18); transform: translate(-50%, -50%); }
.az-months { display: flex; justify-content: space-between; margin-top: 7px; font-size: 10.5px; font-weight: 600; color: #9CA1AB; }

/* footer chips */
.az-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 18px; border-top: 1px solid #EEF0F4; background: #FBFCFE; }
.az-fchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: #F4F4F5; color: #52525B; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.az-fchip svg { width: 12px; height: 12px; flex: none; color: #94A3B8; }
.az-fchip.ok { background: #ECFDF3; color: #15803D; }
.az-fchip.ok svg { color: #16A34A; }

/* ── live fill: bars start at 0 only when JS will animate them ── */
.s-analyze.az-armed .az-bt i { width: 0; }
.s-analyze.az-armed.az-in .az-bt i { width: var(--w); }

/* donut scales in, trend line draws, area + dot fade in */
.s-analyze.az-armed .az-donut { opacity: 0; transform: scale(.85); transform-origin: center; }
.s-analyze.az-armed.az-in .az-donut { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.s-analyze.az-armed .az-stroke { stroke-dasharray: 340; stroke-dashoffset: 340; }
.s-analyze.az-armed.az-in .az-stroke { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease .25s; }
.s-analyze.az-armed .az-area, .s-analyze.az-armed .az-dot { opacity: 0; }
.s-analyze.az-armed.az-in .az-area { opacity: 1; transition: opacity .6s ease .55s; }
.s-analyze.az-armed.az-in .az-dot { opacity: 1; transition: opacity .35s ease 1.15s; }

/* ── responsive ── */
/* stack the chart full-width below the headline once the board gets tight,
   so the bars always have room to read */
@media (max-width: 1080px) {
  .az-charts { grid-template-columns: 1fr; }
  .az-panel { border-right: none; }
  .az-panel:not(:last-child) { border-bottom: 1px solid #EEF0F4; }
}
@media (max-width: 920px) {
  .s-analyze .az-wrap { grid-template-columns: 1fr; gap: 30px; }
  .az-rail { flex-direction: row; flex-wrap: wrap; gap: 18px 26px; }
  .az-vp { flex: 1 1 240px; }
  .az-proof { flex-basis: 100%; border-top: none; padding-top: 0; margin-top: 0; }
}
@media (max-width: 560px) {
  .az-kpis { grid-template-columns: 1fr 1fr; }
  .az-tile:nth-child(2) { border-right: none; }
  .az-tile:last-child { grid-column: 1 / -1; border-top: 1px solid #EEF0F4; }
  .az-reads { display: none; }
  .az-bl { width: 84px; }
}
