/* =====================================================================
   ASK SRIT — full-screen AI page (Home Page 2)
   ===================================================================== */
.aq-lock { overflow: hidden; }
.aq {
  --aq-bg: #f6f8fc; --aq-card: #fff; --aq-line: #e3e9f1; --aq-deep: #1e40af; --aq-soft: #eef3ff;
  position: fixed; inset: 0; z-index: 400; display: grid; grid-template-columns: 280px minmax(0, 1fr);
  background: var(--aq-bg); color: var(--ink); font-family: var(--text);
}
.aq.open .aq-main { animation: aq-up .45s var(--ease) both; }
.aq[hidden] { display: none; }
.aq button { font-family: inherit; color: inherit; cursor: pointer; }

/* ---------- sidebar ---------- */
.aq-side { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; padding: 22px 18px; background: #fff; border-right: 1px solid var(--aq-line); }
.aq-logo img { width: 128px; height: auto; display: block; margin: 0 6px 18px; }
.aq-new { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--aq-line); border-radius: 12px; background: var(--aq-bg); font-weight: 600; font-size: .92rem; transition: border-color .2s, background .2s; }
.aq-new span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 1rem; line-height: 1; }
.aq-new:hover { border-color: var(--aq-deep); background: #fff; }
.aq-h { margin: 22px 8px 8px; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.aq-h.center { text-align: center; margin: 34px 0 14px; }
.aq-nav { display: grid; gap: 2px; }
.aq-nav button, .aq-recent button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: .9rem; color: var(--ink-2); transition: background .2s, color .2s; }
.aq-nav button:hover, .aq-recent button:hover { background: var(--aq-soft); color: var(--aq-deep); }
.aq-nav i { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--aq-bg); font-style: normal; font-size: .85rem; color: var(--aq-deep); }
.aq-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aq-recent button { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; }
.aq-recent .empty { padding: 6px 10px; font-size: .84rem; color: var(--mute); }
.aq-trust { margin-top: auto; padding: 16px 12px 4px; border-top: 1px solid var(--aq-line); }
.aq-trust .aq-h { margin: 0 0 8px; }
.aq-trust ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); }
.aq-trust li::before { content: "✓"; margin-right: 8px; color: var(--aq-deep); font-weight: 600; }

/* ---------- main column ---------- */
.aq-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.aq-top { display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--aq-line); background: rgba(255,255,255,.85); backdrop-filter: blur(10px); }
.aq-back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--aq-line); border-radius: 999px; background: #fff; font-size: .86rem; font-weight: 500; transition: border-color .2s; }
.aq-back:hover { border-color: var(--ink); }
.aq-title { display: flex; align-items: baseline; gap: 10px; margin-inline: auto; min-width: 0; }
.aq-title b { font-family: var(--head); font-size: 1.02rem; letter-spacing: .02em; }
.aq-title small { font-size: .8rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aq-dot { width: 8px; height: 8px; border-radius: 50%; background: #FFD60A; box-shadow: 0 0 0 4px rgba(255, 214, 10,.16); align-self: center; }
.aq-tools { display: flex; gap: 8px; }
.aq-tool { height: 38px; padding: 0 14px; border: 1px solid var(--aq-line); border-radius: 999px; background: #fff; font-size: .84rem; font-weight: 500; }
.aq-tool.icon { width: 38px; padding: 0; }
.aq-tool:hover { border-color: var(--ink); }

.aq-scroll { overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 24px; scroll-behavior: smooth; }
.aq-welcome, .aq-thread { width: min(860px, 100%); margin-inline: auto; }
.aq-welcome { display: none; text-align: center; padding-top: clamp(0px, 3vh, 32px); }
.aq.is-fresh .aq-welcome { display: block; animation: aq-up .6s var(--ease) both; }

/* orb */
.aq-orb { position: relative; width: 76px; height: 76px; margin: 0 auto 22px; }
.aq-orb span { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #3b82f6, var(--lime), #1e40af, #3b82f6); filter: blur(10px); opacity: .55; animation: aq-spin 6s linear infinite; }
.aq-orb span + span { inset: 10px; filter: blur(4px); opacity: .8; animation-duration: 9s; animation-direction: reverse; }
.aq-orb i { position: absolute; inset: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(30,64,175,.12); }
.aq-orb i::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; color: var(--aq-deep); font-size: 1.1rem; }
.aq-k { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--aq-deep); }
.aq-welcome h2 { margin-top: 10px; font-family: var(--head); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.aq-lead { max-width: 580px; margin: 14px auto 0; font-size: 1.02rem; line-height: 1.6; color: var(--ink-2); }

/* how SRIT helps you — cards */
.aq-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; text-align: left; }
.aq-help button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 20px; border: 1px solid var(--aq-line); border-radius: 16px; background: #fff; transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.aq-help button:hover, .aq-help button:focus-visible { border-color: var(--aq-deep); transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(15,23,32,.35); }
.aq-hi { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 10px; background: var(--ink); color: var(--lime); font-size: .95rem; }
.aq-help small { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.aq-help b { font-family: var(--head); font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.aq-help em { font-style: normal; font-size: .86rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- messages ---------- */
.aq-thread { display: grid; gap: 22px; }
.aq-msg { display: flex; gap: 14px; animation: aq-up .45s var(--ease) both; }
.aq-msg.user { justify-content: flex-end; }
.aq-msg.user .aq-bub { max-width: min(620px, 85%); padding: 13px 18px; border-radius: 18px 18px 4px 18px; background: var(--ink); color: #fff; font-size: .98rem; line-height: 1.5; }
.aq-av { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: .9rem; }
.aq-msg.bot .aq-bub { flex: 1; min-width: 0; padding: 20px 22px; border: 1px solid var(--aq-line); border-radius: 4px 18px 18px 18px; background: #fff; }
.aq-tag { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; background: var(--aq-soft); color: var(--aq-deep); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.aq-tag.muted { background: var(--aq-bg); color: var(--mute); }
.aq-p { font-size: 1rem; line-height: 1.7; color: var(--ink); }
.aq-p b { font-weight: 600; }
.aq-cur { display: inline-block; width: 8px; height: 1em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--aq-deep); animation: aq-blink .8s steps(2) infinite; }

/* thinking */
.aq-think { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aq-think li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--mute); opacity: .45; transition: opacity .3s, color .3s; }
.aq-think li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
.aq-think li.on { opacity: 1; color: var(--ink-2); }
.aq-think li.on::before { animation: aq-spin .7s linear infinite; }
.aq-think li.done::before { content: "✓"; display: grid; place-items: center; border: 0; background: var(--lime); color: var(--ink); font-size: .62rem; font-weight: 700; animation: none; }

/* answer extras appear after the text has streamed */
.aq-ex { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.aq-ex.in { opacity: 1; transform: none; }

/* How SRIT can help you */
.aq-helpbox { margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, #f3f7ff, #f7fbef); border: 1px solid #dfe8f7; }
.aq-hb-k { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--aq-deep); }
.aq-hb-k::before { content: "✦"; color: var(--aq-deep); }
.aq-helpbox ol { margin: 0; padding: 0; list-style: none; counter-reset: aq; display: grid; gap: 12px; }
.aq-helpbox li { position: relative; display: grid; gap: 2px; padding-left: 38px; counter-increment: aq; }
.aq-helpbox li::before { content: counter(aq); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: .76rem; font-weight: 600; }
.aq-helpbox li b { font-size: .95rem; font-weight: 600; }
.aq-helpbox li span { font-size: .88rem; line-height: 1.55; color: var(--ink-2); }
.aq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.aq-stats div { padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid #e3eaf6; }
.aq-stats dt { font-family: var(--head); font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; color: var(--aq-deep); }
.aq-stats dd { margin: 2px 0 0; font-size: .78rem; color: var(--ink-2); line-height: 1.4; }

.aq-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.aq-links a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--aq-soft); color: var(--aq-deep); font-size: .86rem; font-weight: 600; }
.aq-links a:hover { background: #dfe8ff; }

.aq-src { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--aq-line); border-radius: 14px; transition: border-color .2s, background .2s; }
.aq-src:hover { border-color: var(--aq-deep); background: #fafcff; }
.aq-src img { width: 72px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; }
.aq-src span { display: grid; min-width: 0; }
.aq-src small { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.aq-src b { font-size: .94rem; font-weight: 600; }
.aq-src em { font-style: normal; font-size: .82rem; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aq-src i { margin-left: auto; font-style: normal; color: var(--aq-deep); }

.aq-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.aq-acts > * { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; font-size: .86rem; font-weight: 500; border: 1px solid transparent; }
.aq-pri { background: var(--ink); color: #fff !important; }
.aq-pri:hover { background: var(--aq-deep); }
.aq-sec { border-color: var(--aq-line) !important; background: #fff; }
.aq-sec:hover { border-color: var(--ink) !important; }
.aq-ghost { background: none; color: var(--ink-2) !important; }
.aq-ghost:hover { background: var(--aq-bg); }
.aq-fk { margin: 18px 0 8px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.aq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.aq-chips button { padding: 8px 14px; border: 1px solid var(--aq-line); border-radius: 999px; background: var(--aq-bg); font-size: .86rem; text-align: left; transition: border-color .2s, background .2s, color .2s; }
.aq-chips button:hover { border-color: var(--aq-deep); background: #fff; color: var(--aq-deep); }
.aq-fb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--aq-line); font-size: .82rem; color: var(--mute); }
.aq-fb button { padding: 4px 12px; border: 1px solid var(--aq-line); border-radius: 999px; background: #fff; font-size: .8rem; }
.aq-fb button:hover { border-color: var(--ink); }

/* ---------- composer ---------- */
.aq-dock { padding: 12px clamp(16px, 4vw, 40px) 16px; background: linear-gradient(to top, var(--aq-bg) 70%, rgba(246,248,252,0)); }
.aq-input { display: flex; align-items: center; gap: 10px; width: min(860px, 100%); margin-inline: auto; height: 60px; padding: 0 8px 0 20px; border: 1px solid #d6dfeb; border-radius: 999px; background: #fff; box-shadow: 0 16px 36px -22px rgba(15,23,32,.45); transition: border-color .2s, box-shadow .2s; }
.aq-input:focus-within { border-color: var(--aq-deep); box-shadow: 0 0 0 4px rgba(30,64,175,.1), 0 16px 36px -22px rgba(15,23,32,.45); }
.aq-spark { color: var(--aq-deep); }
.aq-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 1rem; color: var(--ink); }
.aq-mic, .aq-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; }
.aq-mic { background: var(--aq-bg); }
.aq-mic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.aq-mic.on { background: #fee2e2; color: #b91c1c; }
.aq-send { background: var(--ink); color: var(--lime) !important; font-size: 1.1rem; transition: background .2s, transform .2s; }
.aq-send:hover { background: var(--aq-deep); transform: translateX(2px); }
.aq.is-busy .aq-send { opacity: .5; pointer-events: none; }

.aq-note { width: min(860px, 100%); margin: 10px auto 0; text-align: center; font-size: .76rem; color: var(--mute); }
.aq-note span { margin-left: 8px; color: #a3acb9; }

.aq-toast { position: fixed; left: 50%; bottom: 110px; z-index: 2; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .86rem; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .25s, transform .25s; }
.aq-toast.on { opacity: 1; transform: translate(-50%, 0); }

@keyframes aq-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes aq-spin { to { transform: rotate(360deg); } }
@keyframes aq-blink { 50% { opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .aq { grid-template-columns: minmax(0, 1fr); }
  .aq-side { display: none; }
  .aq-help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .aq-top { gap: 10px; height: 60px; }
  .aq-back { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  .aq-back span { font-size: 1rem; }
  .aq-title { margin-inline: 0 auto; }
  .aq-title small { display: none; }
  .aq-tool:not(.icon) { display: none; }
  .aq-help { grid-template-columns: minmax(0, 1fr); }
  .aq-help button { padding: 16px; }
  .aq-msg { gap: 10px; }
  .aq-av { width: 28px; height: 28px; font-size: .8rem; }
  .aq-msg.bot .aq-bub { padding: 16px; }
  .aq-stats { grid-template-columns: minmax(0, 1fr); }
  .aq-input { height: 54px; padding-left: 16px; }
  .aq-note span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aq, .aq-ex, .aq-msg, .aq-welcome { transition: none !important; animation: none !important; }
  .aq-orb span, .aq-think li::before { animation: none !important; }
}
