/* ==========================================================================
   RadcliffeAI Analysis — tool and report styling
   ========================================================================== */

/* ------------------------------------------------------------ running state */
.ai-orb {
  width: 132px;
  height: 132px;
  margin: 0 auto;
  position: relative;
}
.ai-orb i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(247, 247, 245, 0.16);
  animation: orb 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.ai-orb i:nth-child(2) { animation-delay: 0.55s; }
.ai-orb i:nth-child(3) { animation-delay: 1.1s; }
.ai-orb::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(6px);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes orb {
  0%   { transform: scale(0.42); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.16); opacity: 1; }
}

.ai-steps {
  list-style: none;
  padding: 0;
  margin: 34px auto 0;
  max-width: 420px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.ai-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--paper-faint);
  transition: color 0.4s ease;
}
.ai-steps li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex: none;
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.ai-steps li.is-on { color: var(--paper); }
.ai-steps li.is-on::before { background: var(--grad); border-color: transparent; transform: scale(1.35); }
.ai-steps li.is-done { color: var(--paper-dim); }
.ai-steps li.is-done::before { background: var(--teal); border-color: transparent; }

/* ------------------------------------------------------------------ report */
.report {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    radial-gradient(1100px 460px at 82% -12%, rgba(20, 134, 140, 0.14), transparent 62%),
    radial-gradient(760px 380px at 4% 108%, rgba(11, 37, 69, 0.4), transparent 60%),
    var(--ink-card);
  overflow: hidden;
  isolation: isolate;
}

/* Persistent watermark. Sits inside the report itself so a screenshot or a
   shared image still carries the mark. */
.report__wm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.055;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  transform: rotate(-24deg) scale(1.5);
}
.report__wm span {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  white-space: nowrap;
  letter-spacing: 0.12em;
  color: var(--paper);
  text-align: center;
}
.report__wmmark {
  position: absolute;
  right: clamp(16px, 2.4vw, 30px);
  bottom: clamp(16px, 2.4vw, 30px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.68);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.report__wmmark img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.report__wmmark b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.report__wmmark i {
  font-style: normal;
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
  display: block;
}

.report__in { position: relative; z-index: 2; padding: clamp(24px, 3.4vw, 48px); }

.report__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(20px, 3vw, 46px);
  align-items: center;
  padding-bottom: clamp(24px, 3vw, 38px);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .report__top { grid-template-columns: 1fr; } }

.report__tool {
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal-lift);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.report__subject { font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.04; }
.report__resolved { font-size: 0.86rem; color: var(--paper-faint); margin-top: 10px; }
.report__headline {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.4;
  margin-top: 18px;
  max-width: 46ch;
}

/* ------------------------------------------------------------------ gauges */
.gauge { position: relative; width: 168px; height: 168px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-linecap: round; }
.gauge .track { stroke: rgba(247, 247, 245, 0.1); }
.gauge .bar { stroke: url(#rbGrad); }
.gauge__val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}
.gauge__val b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1;
}
.gauge__val span {
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.meters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 26px);
  padding: clamp(26px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) { .meters { grid-template-columns: 1fr; } }

.meter { display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: start; }
.meter .gauge { width: 92px; height: 92px; }
.meter .gauge__val b { font-size: 1.4rem; }
.meter .gauge__val span { display: none; }
.meter h4 { font-size: 1.02rem; margin-bottom: 6px; }
.meter p { font-size: 0.86rem; color: var(--paper-dim); margin: 0; }
.meter ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 5px; }
.meter ul li {
  font-size: 0.79rem;
  color: var(--paper-faint);
  padding-left: 14px;
  position: relative;
}
.meter ul li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal-lift);
}
.conf {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--paper-faint);
  margin-left: 8px;
  vertical-align: middle;
}
.conf--low { border-color: rgba(224, 101, 91, 0.45); color: #E0655B; }

/* -------------------------------------------------------------------- gaps */
.gapsec { padding: clamp(26px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); }
.gap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.gap:first-of-type { border-top: 0; }
.gap__sev {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  height: fit-content;
  white-space: nowrap;
}
.gap__sev--critical { border-color: transparent; background: #E0655B; color: #160908; }
.gap__sev--important { border-color: rgba(230, 178, 76, 0.55); color: #E6B24C; }
.gap__sev--minor { color: var(--paper-faint); }
.gap h4 { font-size: 1.08rem; margin-bottom: 8px; }
.gap p { font-size: 0.9rem; color: var(--paper-dim); margin: 0 0 10px; }
.gap__fix {
  font-size: 0.85rem;
  border-left: 2px solid var(--teal-lift);
  padding-left: 14px;
  color: var(--paper);
}
.gap__fix a { color: var(--teal-lift); }
@media (max-width: 560px) { .gap { grid-template-columns: 1fr; } }

.strengths { display: flex; flex-wrap: wrap; gap: 10px; }
.strengths span {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  color: var(--paper-dim);
}

.report__foot {
  padding-top: clamp(24px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.report__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.report__stamp { font-size: 0.74rem; color: var(--paper-faint); }

/* -------------------------------------------------------------------- print */
@media print {
  body { background: #fff; color: #111; padding: 0; }
  .topbar, .bottomnav, .navsheet, .wipe, .foot, .cursor-ring, .cursor-dot,
  #audit-form-band, #audit-faq, .report__actions, .crumb, .glow, .vrail { display: none !important; }
  .report {
    border-color: #ddd;
    background: #fff;
    color: #111;
    page-break-inside: avoid;
  }
  .report__wm { opacity: 0.07; }
  .report__wm span, .report__subject, .report__headline, .gauge__val b, .meter h4, .gap h4 { color: #111 !important; }
  .meter p, .gap p, .report__resolved, .meter ul li { color: #444 !important; }
  .gauge .track { stroke: #e5e5e5; }
  .band { padding: 0 !important; }
  a[href]::after { content: ""; }
}

/* ---------------------------------------------------------- evidence list */
/* The sources behind the score. Without these the number is an opinion. */
.evidence__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.evidence__list li { margin: 0; }
.evidence__list a {
  display: grid;
  grid-template-columns: minmax(90px, 150px) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 13px 16px;
  background: var(--ink-card);
  text-decoration: none;
  transition: background-color 0.35s ease;
}
.evidence__list a:hover { background: var(--ink-raise); }
.evidence__pub { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-lift); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence__title { font-size: 0.88rem; color: var(--paper-dim); line-height: 1.5; }
.evidence__q { margin-top: 14px; font-size: 0.8rem; color: var(--paper-faint); }
.evidence__q summary { cursor: pointer; }
.evidence__q ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.evidence--off .lede { border-left: 2px solid var(--warn, #E6B24C); padding-left: 14px; }
@media (max-width: 560px) { .evidence__list a { grid-template-columns: 1fr; gap: 4px; } }
