/* ============================================================================
   Section 7: Ask the ledger (graphRAG console)
   landing/assets/css/landing-graphrag.css

   Tokens are inherited from landing-trace.css:
     --glass-dark, --glass-dark-strong, --hairline-light,
     --shadow-2, --radius-sm/md/lg, --ease, --ink, --ember-coral

   ONE deviation from the spec:
     spec used `var(--section-pad)` which is NOT defined in this project.
     replaced with `var(--section-pad-desktop)`, plus the spec's own
     mobile override at the bottom. (section-pad-tablet is unused here
     because the console stacks at 899px, not 768px.)
   ============================================================================ */

/* ---------- Section 7: Ask the ledger ---------- */
.ask { --night-panel: rgba(18,16,26,.78); padding-block: var(--section-pad-desktop); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The Step 3 CSRD pill, generalised. Section 8 reuses it. */
.pill-planned {
  display: inline-block; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: var(--ember-coral, #C8442B); font: 500 13px/18px 'Inter', sans-serif;
}

.console {
  max-width: 1200px; margin: 0 auto; color: #fff; overflow: hidden;
  background: var(--glass-dark);
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--hairline-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
}
.console__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 24px; background: var(--glass-dark-strong); border-bottom: 1px solid var(--hairline-light);
}
.console__title { font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.console__body { display: grid; grid-template-columns: 5fr 7fr; }
.console__foot {
  margin: 0; padding: 14px 24px; border-top: 1px solid var(--hairline-light);
  font: 500 13px/18px 'Inter', sans-serif; color: rgba(255,255,255,.78);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px);
}

/* Question rows: same grammar as Step 5 ledger tabs */
.qlist { display: flex; flex-direction: column; border-right: 1px solid var(--hairline-light); }
.q {
  position: relative; display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; align-items: center;
  width: 100%; min-height: 88px; padding: 16px 24px 16px 28px; text-align: left; font: inherit; color: #fff;
  background: transparent; border: 0; border-bottom: 1px solid var(--hairline-light); cursor: pointer;
  transition: background .2s var(--ease);
}
.q:last-child { border-bottom: 0; }
.q::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #fff; transform: scaleY(0); transition: transform .28s var(--ease); }
.q:hover { background: rgba(255,255,255,.06); }
.q[aria-selected="true"] { background: rgba(255,255,255,.10); }
.q[aria-selected="true"]::before { transform: scaleY(1); }
.q:focus-visible { outline-offset: -3px; }
.q__n { font: 600 14px/20px 'Outfit', sans-serif; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.78); }
.q__t { font: 500 18px/26px 'Outfit', sans-serif; }

/* Answer pane: fixed min-height so nothing jumps between answers */
.answer { background: var(--night-panel); padding: 32px 40px 36px; min-height: 480px; }
.qline { display: flex; align-items: baseline; gap: 16px; padding: 14px 16px; border: 1px solid var(--hairline-light); border-radius: var(--radius-sm); background: rgba(255,255,255,.04); min-height: 52px; }
.qline__label { flex: none; font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.qline__text { font: 400 16px/24px 'Inter', sans-serif; color: #fff; }
.qline__text.is-placeholder { color: rgba(255,255,255,.72); }
.console[data-state="typing"] .qline__text::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 2px; background: #fff; vertical-align: -2px; } /* static, never blinks */

/* The lookup rule sweeps once, never loops */
.lookup { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 24px; min-height: 30px; font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.lookup i { position: relative; display: block; height: 2px; overflow: hidden; background: rgba(255,255,255,.22); }
.lookup i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.console[data-state="lookup"] .lookup i::after { transform: scaleX(1); transition: transform .65s var(--ease); }
.console[data-state="done"] .lookup i::after { transform: scaleX(1); }

/* Reply: a statement, not a bubble */
.reply__box { padding: 4px 0; }
.reply__box > p:first-child { margin: 0 0 16px; }
.reply__tag { font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.reply__lead { margin: 0; font: 600 24px/32px 'Outfit', sans-serif; text-wrap: balance; }
.reply__fig { margin: 16px 0 0; font: 600 64px/68px 'Outfit', sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.reply__fig small { font: 500 20px/28px 'Outfit', sans-serif; letter-spacing: 0; color: rgba(255,255,255,.78); }
.reply__sub { margin: 6px 0 0; font: 300 16px/24px 'Inter', sans-serif; color: rgba(255,255,255,.9); }

.evidence { margin: 24px 0 0; padding: 0; }
.evidence__row {
  display: grid; grid-template-columns: 112px 1fr; align-items: center; min-height: 48px;
  border-top: 1px solid var(--hairline-light);
  animation: rowIn .3s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 120ms);
}
.evidence__row dt { font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.evidence__row dd { margin: 0; font: 400 16px/24px 'Inter', sans-serif; font-variant-numeric: tabular-nums; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* Refusal: first-class state. Hatched ground, dashed empty slot, never a zero. */
.reply__box.is-refusal {
  padding: 24px; border: 1px dashed rgba(255,255,255,.5); border-radius: var(--radius-md);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px);
}
.reply__fig.is-empty span:first-child { display: inline-block; min-width: 160px; text-align: center; border-bottom: 2px dashed rgba(255,255,255,.7); }

@media (max-width: 899px) {
  .console__body { grid-template-columns: 1fr; }
  .qlist { border-right: 0; border-bottom: 1px solid var(--hairline-light); }
  .answer { min-height: 440px; }
}
@media (max-width: 767px) {
  .ask { padding-block: var(--section-pad-mobile); }
  .q { min-height: 72px; padding: 12px 16px 12px 20px; }
  .q__t { font-size: 16px; line-height: 24px; }
  .answer { padding: 24px 20px 28px; }
  .qline { flex-direction: column; gap: 4px; }
  .reply__lead { font-size: 20px; line-height: 28px; }
  .reply__fig { font-size: 44px; line-height: 48px; }
  .evidence__row { grid-template-columns: 1fr; padding: 10px 0; }
  .console__bar { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .q, .q::before, .lookup i::after { transition: none !important; }
  .evidence__row { animation: none; }
}