/* Ask Mila page (/ai) - design mock, A-154 */
.ai { padding: calc(var(--header-h) + clamp(32px, 5vw, 72px)) 0 clamp(56px, 7vw, 96px); position: relative; }
.ai::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; z-index: -1;
  background: radial-gradient(60% 80% at 80% 0%, var(--green-tint), transparent 70%);
}
.ai-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

/* Intro */
.ai-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.ai-intro h1 { margin: 22px 0 20px; font: 600 clamp(34px, 4vw, 56px)/1.05 var(--f-display); letter-spacing: -0.02em; max-width: 14ch; }
.ai-knows { margin-top: 36px; border-top: 1px solid var(--line-2); padding-top: 20px; }
.ai-k-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.ai-knows ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ai-knows li { display: grid; gap: 2px; padding-left: 18px; position: relative; }
.ai-knows li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 2px; background: var(--green); }
.ai-knows b { font-weight: 600; font-size: 16px; }
.ai-knows span { color: var(--mute); font-size: 15px; line-height: 1.45; }

/* Chat panel */
.ai-chat {
  background: var(--paper); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px);
  box-shadow: 0 30px 80px -40px rgba(11, 18, 15, .35); display: flex; flex-direction: column; min-width: 0;
  height: min(760px, calc(100vh - var(--header-h) - 64px)); overflow: hidden;
}
.ai-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ai-head b { display: block; font: 600 18px/1.2 var(--f-display); }
.ai-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); letter-spacing: .04em; }
.ai-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }

/* Voice orb: Mila has no face, this is her presence */
.ai-orb { position: relative; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8fe3a0, var(--green) 55%, var(--green-deep)); display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: none; }
.ai-orb i { width: 3px; border-radius: 2px; background: #fff; height: 10px; transform: scaleY(.55); }
.ai-orb.is-speaking i { animation: ai-wave 0.9s var(--ease) infinite; }
.ai-orb i:nth-child(2) { height: 18px; animation-delay: .2s; }
.ai-orb i:nth-child(3) { animation-delay: .4s; }
@keyframes ai-wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }

.ai-log { padding: 22px; display: grid; gap: 16px; align-content: start; flex: 1; overflow-y: auto; }
.msg { max-width: 88%; }
.msg p { margin: 0; font-size: 16px; line-height: 1.55; }
.msg--mila { justify-self: start; }
.msg--mila > p { background: var(--bg); border: 1px solid var(--line); padding: 14px 16px; border-radius: 4px var(--r) var(--r) var(--r); }
.msg--you { justify-self: end; }
.msg--you p { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--r) 4px var(--r) var(--r); }

/* Finding card: the chart Mila shows with an answer */
.fcard { margin: 12px 0 0; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px 18px; background: var(--paper); }
.fcard figcaption { display: grid; gap: 4px; margin-bottom: 14px; }
.fcard figcaption .mono { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-deep); }
.fcard figcaption b { font: 600 17px/1.25 var(--f-display); }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.bar span { font-size: 14px; color: var(--ink-2); }
.bar em { font: 500 14px var(--f-mono); font-style: normal; color: var(--ink-2); }
.bar i { grid-column: 1 / -1; height: 10px; border-radius: 6px; background: var(--line); position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 6px; background: var(--mute); opacity: .55; }
.bar.is-hi span, .bar.is-hi em { color: var(--ink); font-weight: 600; }
.bar.is-hi i::after { background: var(--green); opacity: 1; }

/* Thinking dots */
.msg--thinking p { display: inline-flex; gap: 5px; align-items: center; height: 46px; padding: 0 18px !important; }
.msg--thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: ai-dot 1.2s infinite; }
.msg--thinking i:nth-child(2) { animation-delay: .15s; }
.msg--thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* White paper card */
.fcard--wp ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }

/* Suggested questions */
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--ink); border-radius: 999px; padding: 9px 14px; font: 500 14px var(--f-body); cursor: pointer; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--green); background: var(--green-tint); }

/* Input row */
.ai-input { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.ai-input input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); padding: 0 16px; font: 400 16px var(--f-body); }
.ai-input input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.ai-send { width: 52px; height: 52px; flex: none; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-send svg { width: 16px; height: 16px; }
.ai-talk svg { width: 18px; height: 18px; }
.ai-talk:hover svg { transform: none; }
.ai-talk.is-on { --b-bg: var(--ink); --b-bd: var(--ink); --b-fg: var(--paper); box-shadow: none; }
.ai-talk:disabled { opacity: .6; cursor: progress; }
.ai-fine { margin: 0; padding: 0 22px 14px; font-size: 12px; color: var(--mute); }

@media (max-width: 960px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-intro { position: static; }
  .ai-chat { height: auto; overflow: visible; }
  .ai-log { overflow: visible; }
  .ai-chat { overflow: clip; }
  .ai-input { position: sticky; bottom: 0; z-index: 2; background: var(--paper); border-radius: 0 0 calc(var(--r) + 4px) calc(var(--r) + 4px); box-shadow: 0 -12px 24px -16px rgba(11, 18, 15, .25); }
  .ai-knows { display: none; }
}
@media (max-width: 560px) {
  .ai-log { padding: 16px; }
  .msg { max-width: 100%; }
  .ai-suggest { padding: 12px 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .ai-input { flex-wrap: wrap; padding: 12px; }
  .ai-talk { width: 100%; justify-content: center; order: 3; }
}
