/* =====================================================================
   Ask your report
   DI's thinking gradient (teal, cyan, mint) appears only while DI works.
   ===================================================================== */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
:root { --cyan: #22b8cf; --mint: #7fdcb8; }

.ask { position: relative; padding-block: clamp(36px, 5vw, 64px) clamp(72px, 9vw, 120px); overflow: clip; }
.ask-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: end; gap: 16px 56px; margin-bottom: clamp(28px, 3.5vw, 44px); }
.ask-head .kicker { grid-column: 1 / -1; margin-bottom: 0; }
.ask-head h1 { font-size: clamp(3.4rem, 7.4vw, 7.2rem); line-height: 0.9; letter-spacing: -0.05em; }
.ask-head .lede { font-size: clamp(1.05rem, 1.35vw, 1.25rem); color: var(--ink-2); max-width: 30rem; }
.ask-side { padding-bottom: 0.5em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ask-stage { position: relative; }

.aura { position: absolute; inset: -12% -6%; pointer-events: none; z-index: 0; opacity: 0.45; transition: opacity 0.9s var(--ease); }
.aura i { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; animation: drift 18s ease-in-out infinite alternate; }
.aura.is-off i { animation-play-state: paused; }
.aura i:nth-child(1) { width: 46%; height: 60%; left: 4%; top: 18%; background: rgb(11 138 132 / 0.45); }
.aura i:nth-child(2) { width: 40%; height: 55%; left: 38%; top: 6%; background: rgb(34 184 207 / 0.35); animation-duration: 22s; }
.aura i:nth-child(3) { width: 42%; height: 56%; right: 2%; top: 30%; background: rgb(127 220 184 / 0.45); animation-duration: 26s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(4%, -6%) scale(1.12); } }
.ask-stage:has(.workspace[data-busy="true"]) .aura { opacity: 0.95; }

.workspace { position: relative; z-index: 1; background: var(--surface); border-radius: 28px; box-shadow: 0 40px 90px -50px rgb(14 42 51 / 0.55), 0 0 0 1px var(--rule); }
.workspace::before { content: ''; position: absolute; inset: -2px; border-radius: 30px; padding: 2px; background: conic-gradient(from var(--spin), var(--teal), var(--cyan), var(--mint), var(--teal)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none; }
.workspace[data-busy="true"]::before { opacity: 1; animation: spin 2.4s linear infinite; }
@keyframes spin { to { --spin: 360deg; } }

.ws-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--page); border-radius: 999px; }
.seg button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-quiet button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(14 42 51 / 0.18); }

.ws-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); height: clamp(500px, 62vh, 640px); }
.doc-pane { position: relative; overflow: auto; padding: 32px 28px; background: #edf1f1 radial-gradient(rgb(23 34 44 / 0.07) 1px, transparent 1px) 0 0 / 18px 18px; border-bottom-left-radius: 28px; }
.doc-pane::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(180deg, transparent, rgb(34 184 207 / 0.16) 70%, rgb(11 138 132 / 0.7)); opacity: 0; pointer-events: none; }
.doc-pane.is-scanning::after { animation: scan 1.3s var(--ease) infinite; }
@keyframes scan { 0% { opacity: 0; transform: translateY(-90px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(560px); } }

.doc { margin-inline: auto; background: var(--sheet); color: #262a2e; border-radius: 4px; box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 24px 50px -28px rgb(14 42 51 / 0.45); }
.doc-printed { width: min(100%, 460px); padding: 22px 24px 18px; font-size: 0.8rem; }
.dp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1.5px solid #262a2e; }
.dp-head b { display: block; font-size: 0.95rem; }
.dp-head small { display: block; color: #62666a; font-size: 0.7rem; }
.dp-logo { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 5px solid #8a6f4e; background: #efe6d6; }
.dp-id { margin-left: auto; text-align: right; }
.dp-id b { font: 600 0.8rem/1.2 var(--mono); }
.dp-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.dp-meta dt { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: #62666a; }
.dp-meta dd { margin: 0; font-weight: 600; }
.dp-title { font-weight: 700; padding: 7px 0; border-block: 1px solid #d9d4c8; margin-bottom: 4px; }
.dp-table { width: 100%; border-collapse: collapse; }
.dp-table th { text-align: left; font-size: 0.66rem; font-weight: 600; color: #62666a; padding: 6px; }
.dp-table td { white-space: nowrap; padding: 7px 6px; border-bottom: 1px dotted #d9d4c8; font-family: var(--mono); font-size: 0.74rem; transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.dp-table td:first-child { font-family: var(--sans); font-size: 0.8rem; }
.dp-table .v { font-weight: 700; }
.dp-table i { font-style: normal; font-size: 0.62rem; color: #62666a; }
.dp-table tr.is-review .v { filter: blur(1.3px); }
.dp-foot { display: flex; justify-content: space-between; margin-top: 12px; color: #6f7377; font-size: 0.66rem; }

.doc-pdf { width: min(100%, 440px); overflow: hidden; border-radius: 8px; font-size: 0.8rem; }
.pd-band { background: #2f4a7a; color: #fff; padding: 16px 20px; }
.pd-band b { display: block; font-size: 1rem; }
.pd-band small { opacity: 0.9; font-size: 0.72rem; }
.pd-meta { display: flex; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #e3e3e3; color: #555; font-size: 0.74rem; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 20px; }
.pd-card { border: 1px solid #e3e6ee; border-radius: 10px; padding: 10px 12px; transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.pd-card span { display: block; color: #5e6672; font-size: 0.72rem; }
.pd-card b { font-size: 1.05rem; }
.pd-card b small { font-size: 0.7rem; font-weight: 500; color: #5e6672; }
.pd-card > small { display: block; color: #666c75; font-size: 0.68rem; }
.pd-card.is-review b { filter: blur(1.4px); }

.doc-photo-wrap { perspective: 1400px; padding-top: 8px; }
.doc-photo { transform: rotateX(14deg) rotateZ(-3.5deg); filter: sepia(0.14) contrast(0.95) brightness(0.98); box-shadow: 0 40px 60px -30px rgb(14 42 51 / 0.6); background: linear-gradient(160deg, #fffaf0, #f4ecdb); }
.doc-photo .dp-table tr.is-review .v { filter: blur(2.4px); }

.doc-claim { width: min(100%, 460px); padding: 22px 24px; font-size: 0.85rem; }
.cl-head { display: flex; align-items: flex-end; padding-bottom: 12px; border-bottom: 1.5px solid #262a2e; }
.cl-head small { display: block; color: #62666a; font-size: 0.72rem; }
.cl-head b { font: 800 1.2rem/1.2 var(--display); }
.cl-patient { color: #5a5e62; font-size: 0.75rem; margin: 10px 0 8px; }
.cl-line { display: flex; justify-content: space-between; padding: 9px 6px; border-bottom: 1px dotted #d9d4c8; transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.cl-line b { font-family: var(--mono); }
.cl-total { border-top: 1.5px solid #262a2e; border-bottom: 0; font-weight: 700; }
.cl-att-title { margin: 18px 0 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #62666a; }
.cl-att { list-style: none; margin: 0; padding: 0; }
.cl-att li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 6px; transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.cl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.cl-att li.is-gap .cl-dot { background: var(--amber-line); }
.cl-att small { font: 500 0.7rem/1 var(--mono); color: #62666a; }
.cl-att li.is-gap small { color: var(--amber); }

/* lit: the line behind an answer; read: DI passing over it while thinking */
.doc [data-row].is-read, .doc [data-row].is-read td { background: rgb(34 184 207 / 0.12); }
.doc [data-row].is-lit td, .doc .pd-card.is-lit, .doc .cl-line.is-lit, .doc .cl-att li.is-lit { background: var(--teal-soft); }
.doc tr.is-lit td:first-child, .doc .cl-line.is-lit, .doc .cl-att li.is-lit { box-shadow: inset 3px 0 0 var(--teal); }
.doc .pd-card.is-lit { box-shadow: 0 0 0 2px var(--teal); }
.doc [data-row].is-held td, .doc .pd-card.is-held, .doc .cl-line.is-held, .doc .cl-att li.is-held { background: var(--amber-soft); }
.doc tr.is-held td:first-child, .doc .cl-line.is-held, .doc .cl-att li.is-held { box-shadow: inset 3px 0 0 var(--amber-line); }
.doc .pd-card.is-held { box-shadow: 0 0 0 2px var(--amber-line); }

.chat-pane { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--rule); }
.log { flex: 1; overflow: auto; padding: 24px 24px 8px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-you { justify-content: flex-end; }
.msg-you .say { background: var(--page); padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-weight: 500; }
.msg-di .say { flex: 1; padding-top: 3px; font-size: 1rem; line-height: 1.65; color: var(--ink); }
.msg-di .say p + p { margin-top: 8px; }
.msg-di.is-held .say { border-left: 3px solid var(--amber-line); padding-left: 12px; }
.avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-deep); color: #fff; font: 800 14px/1 var(--display); padding-bottom: 2px; }
.workspace[data-busy="true"] .msg-di:last-child .avatar { background: conic-gradient(from var(--spin), var(--teal), var(--cyan), var(--mint), var(--teal)); animation: spin 1.6s linear infinite; }
.say[lang="hi"], .chip[lang="hi"] { font-family: var(--hindi); }
.thinking { font-weight: 600; background: linear-gradient(90deg, var(--ink-3) 20%, var(--teal) 40%, var(--cyan) 50%, var(--ink-3) 70%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -250% 0; } }
.say[aria-busy="true"] p:last-child::after { content: ''; display: inline-block; width: 0.55em; height: 1em; margin-left: 2px; vertical-align: -0.12em; border-radius: 2px; background: linear-gradient(180deg, var(--cyan), var(--teal)); animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* the chip stays small; its hit area is 44px tall */
.cite::before { content: ''; position: absolute; inset: -10px 0; }
.cite { position: relative; display: inline-flex; align-items: center; margin: 0 2px 0 0; padding: 2px 8px; min-height: 24px; border: 0; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); font: 600 0.72rem/1 var(--mono); cursor: pointer; vertical-align: 0.08em; animation: pop 0.35s var(--ease) both; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.cite:hover, .cite.is-on { background: var(--teal-deep); color: #fff; }
.cite.is-held { background: var(--amber-soft); color: var(--amber); }
.cite.is-held:hover, .cite.is-held.is-on { background: var(--amber-line); color: #3b2500; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px 8px; }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); }
.chip:hover:not(:disabled) { background: var(--teal-soft); border-color: var(--teal); }
.chip:disabled { opacity: 0.45; cursor: default; }
.demo-note { padding: 4px 24px 18px; font-size: 0.8rem; color: var(--ink-3); }

/* phone only: the cited line, shown under the conversation */
.peek { display: none; }
.peek .cite::before { display: none; }
.peek .pk-txt { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.peek .pk-txt b { font-weight: 600; }
.peek .pk-v { font: 700 0.95rem/1.2 var(--mono); }
.peek .pk-txt small { flex-basis: 100%; font: 500 0.75rem/1.3 var(--mono); color: var(--ink-3); }
.peek > .cite { grid-area: tag; margin-top: 1px; }
.peek .pk-txt { grid-area: txt; }
.peek .pk-go { grid-area: go; justify-self: start; min-height: 40px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }

.step-hero .chapter { font-size: clamp(2.8rem, 5.2vw, 5rem); line-height: 0.95; letter-spacing: -0.045em; margin-bottom: 24px; }

@media (max-width: 900px) {
  .ask-head { grid-template-columns: 1fr; }
  .ws-body { grid-template-columns: 1fr; height: auto; }
  .doc-pane { height: 380px; border-bottom-left-radius: 0; padding: 20px 16px; }
  .chat-pane { border-left: 0; border-top: 1px solid var(--rule); }
  .log { max-height: 420px; min-height: 220px; padding: 20px 18px 8px; }
  .chips { padding: 10px 18px 6px; }
  .peek:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'tag txt' '. go'; align-items: start; gap: 8px 10px; margin: 6px 18px 4px; padding: 10px 12px; border-radius: 16px; background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); animation: pop 0.3s var(--ease) both; }
  .peek.is-held { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber-line); }
  .seg button { min-height: 40px; }
  .demo-note { padding: 4px 18px 16px; }
  .seg button { padding: 0 12px; font-size: 0.85rem; }
  .ws-bar { padding: 12px; }
  .doc-printed, .doc-claim { padding: 16px 14px; }
  .dp-table td, .dp-table th { padding: 6px 3px; font-size: 0.68rem; }
  .dp-table td:first-child { font-size: 0.72rem; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .aura i, .workspace::before, .thinking, .doc-pane.is-scanning::after, .cite, .peek { animation: none; }
}
