/**
 * My Agent — brand landing (same grammar as Today / login).
 * Glass on campus photo · Fraunces display · Manrope UI · orange·slate·white
 */

body.assistant-confidence-page {
  --ag-orange: #f68b1e;
  --ag-orange-deep: #e96703;
  --ag-slate: #2c3e50;
  --ag-text: #1a1a2e;
  --ag-muted: #6b7280;
  --ag-bg: #ffffff;
  --ag-bg-soft: #f5f6f8;
  --ag-border: #e8e8e8;
  --ag-font: var(--unimart-font-sans, "Manrope", sans-serif);
  --ag-display: var(--unimart-font-display, "Fraunces", Georgia, serif);
}

body.assistant-confidence-page.commerce-2040-page {
  background: var(--ag-bg-soft) !important;
}

body.assistant-confidence-page .um-assistant__messages {
  background: transparent;
}

body.assistant-confidence-page .confidence-agent-landing.ag-brand {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  font-family: var(--ag-font);
}

/* ── Briefing scene ── */
.ag-brief {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 0 0 0.85rem;
}

.ag-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ag-scene__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.03);
  background: var(--ag-slate);
}

.ag-scene__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(44, 62, 80, 0.8) 0%,
      rgba(44, 62, 80, 0.48) 50%,
      rgba(246, 139, 30, 0.28) 100%
    ),
    linear-gradient(180deg, rgba(44, 62, 80, 0.2) 0%, rgba(44, 62, 80, 0.55) 100%);
}

.ag-shell {
  position: relative;
  z-index: 1;
  width: min(28rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ag-glass {
  border-radius: 20px;
  padding: 1.15rem 1.15rem 1.05rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 18px 40px rgba(26, 26, 46, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  color: #fff;
  animation: agGlassIn 0.5s ease-out both;
}

.ag-glass--panel {
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--ag-text);
  box-shadow: 0 16px 36px rgba(26, 26, 46, 0.16);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  animation-delay: 0.06s;
}

@keyframes agGlassIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ag-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

body.assistant-confidence-page .ag-prompt,
.ag-prompt {
  margin: 0 !important;
  font-family: var(--ag-display) !important;
  font-size: clamp(1.35rem, 5vw, 1.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  color: #fff !important;
  text-shadow: 0 2px 16px rgba(44, 62, 80, 0.28);
}

.ag-accent {
  color: var(--ag-orange) !important;
  font-style: italic;
  font-weight: 700;
}

.ag-hook {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
}

.ag-campus {
  margin: 0.5rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.ag-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ag-chip:hover,
.ag-chip:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

/* Starred next step on light glass */
.ag-starred {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  padding: 0.15rem 0.1rem;
}

.ag-starred__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--ag-orange), var(--ag-orange-deep));
  color: #fff;
  flex-shrink: 0;
}

.ag-starred__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ag-starred__title {
  font-family: var(--ag-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ag-slate);
  line-height: 1.2;
}

.ag-starred__why {
  font-size: 0.72rem;
  color: var(--ag-muted);
  line-height: 1.3;
}

.ag-starred__go {
  flex-shrink: 0;
  color: var(--ag-orange);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Depth surface (desktop / tablet details) ── */
.ag-depth {
  background: var(--ag-bg);
  border-radius: 20px 20px 0 0;
  margin: -0.25rem 0 0;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 -8px 28px rgba(44, 62, 80, 0.06);
  width: min(36rem, 100%);
  margin-inline: auto;
}

.ag-depth .today-flat__search--compact {
  margin-bottom: 0.85rem;
}

.ag-depth .today-flat__submit {
  background: linear-gradient(135deg, var(--ag-orange), var(--ag-orange-deep));
}

.ag-depth .today-flat__layer-title {
  font-family: var(--ag-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ag-slate);
}

.ag-depth .today-flat__row {
  border-radius: 12px;
  border: 1px solid var(--ag-border);
  background: var(--ag-bg-soft);
}

.ag-depth .today-flat__row-action {
  color: var(--ag-orange);
  font-weight: 700;
}

/* Composer polish on brand page — clear ask surface */
body.assistant-confidence-page .um-assistant__composer--confidence .um-assistant__composer-inner {
  border-radius: 999px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  min-height: 3.15rem;
  background: #ffffff;
}

body.assistant-confidence-page .um-assistant__msg--user .um-assistant__bubble {
  background: linear-gradient(135deg, var(--ag-orange), var(--ag-orange-deep)) !important;
  color: #fff !important;
}

/* Mobile: lean glass — hide depth, center brief */
@media (max-width: 991.98px) {
  body.assistant-confidence-page .um-assistant__welcome {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
    padding: 0;
  }

  body.assistant-confidence-page .um-assistant__messages {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent !important;
  }

  body.assistant-confidence-page .confidence-agent-landing.ag-brand {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
  }

  .ag-brief {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding-bottom: 0.5rem;
  }

  .ag-shell {
    width: min(22rem, calc(100% - 1.5rem));
  }

  .ag-depth {
    display: none;
  }

  body.assistant-confidence-page .um-assistant__composer-disclaimer {
    display: none;
  }

  body.assistant-confidence-page .um-assistant__messages:has(.um-assistant__msg) {
    justify-content: flex-start;
  }

  body.assistant-confidence-page .um-assistant__messages:has(.um-assistant__msg) .ag-brief {
    display: none;
  }
}

@media (min-width: 992px) {
  .ag-brief {
    padding-top: 0.5rem;
  }

  .ag-shell {
    width: min(32rem, calc(100% - 2rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-glass { animation: none; }
}
