/* Ask CampusAI on the homepage. The product's own chat (campusai-demo /ai, Oct 28, dark):
   the cr-* rules below are copied from src/components/features/chat/chat-redesign.css and
   the .upload-beam rules from src/app/globals.css, with every theme token resolved to the
   value the demo computes in dark. Only the panel around it is ours. */
.ask{max-width:980px;margin:0 auto;
  --color-surface:#221618;--color-surface-alt:#2a1d1f;--rule:rgba(255,255,255,.08);--well:rgba(255,255,255,.04);
  --color-primary:#E21833;--color-primary-pale:rgba(226,24,51,.12);--color-text-primary:#F7EFE6;--color-text-secondary:#d9d4ce;
  --color-text-muted:#BBA696;--color-text-dim:#9A8A7E;--color-academic:#6e9bf5;--color-social:#10b981;--color-social-soft:rgba(16,185,129,.10);
  --color-warning:#f59e0b;--cr-user-bg:rgba(255,255,255,.07);--cr-red:#ff4050;--cr-card-bg:#2a1d1f;
  --cr-card-shadow:0 0 0 1px rgba(255,255,255,.08),0 18px 54px rgba(0,0,0,.5);
  --cr-pill-bg:linear-gradient(180deg,rgba(217,32,46,.1),rgba(217,32,46,.04)),#170d0f;--cr-pill-border:rgba(255,64,80,.28);--cr-pill-border-hover:rgba(255,64,80,.5);
  --cr-pill-glow:0 0 0 1px rgba(217,32,46,.06),0 6px 22px rgba(217,32,46,.16),inset 0 1px 0 rgba(255,255,255,.04);
  --cr-pill-glow-hover:0 0 0 1px rgba(217,32,46,.12),0 10px 30px rgba(217,32,46,.28),inset 0 1px 0 rgba(255,255,255,.06);
  --cr-done:#10b981;--cr-shimmer-hi:#fff;--glow-primary-rgb:217,32,46}
.asknote{max-width:640px;margin:14px auto 0;text-align:center;font-size:14px;line-height:1.55;color:var(--muted)}

/* the panel: the product's page background, frameless */
.apanel{position:relative;border-radius:22px;overflow:hidden;color:var(--color-text-primary);font-family:"Inter",-apple-system,BlinkMacSystemFont,sans-serif;
  background:radial-gradient(70% 60% at 62% 38%,rgba(150,18,36,.32),transparent 70%),radial-gradient(60% 50% at 10% 0%,rgba(60,40,20,.25),transparent 70%),#0a0607;
  box-shadow:0 50px 120px -40px rgba(226,24,51,.28),0 0 0 1px rgba(255,255,255,.07)}
.ahead{display:flex;align-items:center;gap:10px;padding:14px 22px;border-bottom:1px solid var(--rule)}
.ahead .orbmark{width:28px;height:28px;border-radius:50%;border:1px solid var(--rule);background:var(--well);display:grid;place-items:center;color:var(--color-primary)}
.ahead b{font-size:16px;font-weight:600}
.ahead .who{margin-left:auto;font-size:12.5px;color:var(--color-text-muted)}
.athread{position:relative;height:540px;overflow-y:auto;padding:22px 26px 6px;display:flex;flex-direction:column;gap:20px;overscroll-behavior:contain;container-type:inline-size}
/* nothing in the thread may shrink to fit it: a turn taller than the thread used to squeeze its
   follow-up row to 20px, which hid the next question behind the composer */
.athread>*,.cr-col>*{flex-shrink:0}

/* the welcome, as the product's empty chat */
.aempty{margin:auto 0;text-align:center;padding:0 0 10px}
.aempty .aorbig{width:150px;height:150px;margin:0 auto 6px;display:block;mix-blend-mode:screen;border-radius:50%}
.aempty h3{font-family:"Inter",sans-serif;font-size:30px;font-weight:700;letter-spacing:-.01em;color:#f2f1ef}
.aempty p{color:rgba(255,255,255,.55);font-size:15px;margin-top:6px}
.astarts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:640px;margin:22px auto 0}

/* You */
.cr-user{align-self:flex-end;max-width:85%;background:var(--cr-user-bg);color:var(--color-text-primary);border-radius:18px;border-top-right-radius:6px;padding:8px 14px;font-size:15.5px;line-height:1.6}

/* a turn: the shell beside the record and the answer */
.cr-turn{display:flex;gap:10px}
.cr-av{flex:none;width:28px;height:28px;border-radius:50%;border:1px solid var(--rule);background:var(--well);display:grid;place-items:center;margin-top:2px}
.cr-av img{width:16px;height:16px;display:block}
.cr-turn.waiting .cr-av{box-shadow:0 0 0 1px rgba(226,24,51,.35),0 0 14px rgba(226,24,51,.35)}
.cr-turn.waiting .cr-av img{animation:crBreathe 1.6s ease-in-out infinite}
@keyframes crBreathe{50%{transform:scale(1.15)}}
.cr-col{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding-top:2px}
.cr-step b{display:block;font-size:15px;font-weight:500}
.cr-step small{display:block;font-size:13.5px;color:var(--color-text-muted);margin-top:1px}
.cr-shimmer{background:linear-gradient(90deg,var(--color-text-muted) 0%,var(--color-text-muted) 35%,var(--cr-shimmer-hi) 50%,var(--color-text-muted) 65%,var(--color-text-muted) 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:crShimmer 1.8s linear infinite}
@keyframes crShimmer{from{background-position:100% 0}to{background-position:-50% 0}}
.cr-record-btn{display:inline-flex;align-items:center;gap:6px;padding:2px 0;background:none;border:0;cursor:pointer;font-family:inherit;font-size:12.5px;color:var(--color-text-muted);transition:color 150ms ease;align-self:flex-start}
.cr-record-btn:hover{color:var(--color-text-secondary)}
.cr-record-time{color:var(--color-text-dim);font-variant-numeric:tabular-nums}
.cr-record-btn svg{transition:transform 200ms ease}
.cr-record-btn[aria-expanded="true"] svg{transform:rotate(90deg)}
.cr-record-list{list-style:none;margin:6px 0 4px;padding:0 0 0 12px;display:grid;gap:7px;border-left:1px solid var(--rule)}
.cr-record-list[hidden]{display:none}
.cr-record-list li{display:flex;gap:8px;font-size:12.5px;color:var(--color-text-secondary)}
.cr-record-list svg{color:var(--cr-done);margin-top:3px;flex:none}
.cr-record-detail{color:var(--color-text-muted);font-size:12px;margin-top:1px}

/* The answer */
.cr-answer{position:relative;font-size:15.5px;line-height:1.68;color:var(--color-text-primary);text-wrap:pretty}
.cr-answer p{margin:0 0 .75em}
.cr-answer>:last-child{margin-bottom:0}
.cr-answer strong{font-weight:600;color:var(--color-text-primary)}
.cr-answer ul{margin:.25em 0 .85em;padding-left:1.25em;list-style:disc}
.cr-answer li{margin:.3em 0;padding-left:.15em}
.cr-answer li::marker{color:var(--color-text-dim)}

/* Names in an answer, and the card each one opens */
.cr-name{font-weight:600;color:var(--color-text-primary);border-radius:4px;padding:0 2px;margin:0 -2px;-webkit-box-decoration-break:clone;box-decoration-break:clone;cursor:pointer;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--color-primary) 45%,transparent);text-decoration-thickness:2px;text-underline-offset:3px;transition:background-color 150ms ease,text-decoration-color 150ms ease;outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
@media (hover:hover) and (pointer:fine){.cr-name:hover{background:var(--color-primary-pale);text-decoration-color:var(--color-primary)}}
.cr-name[data-open="true"]{background:var(--color-primary-pale);text-decoration-color:var(--color-primary)}
.cr-name:focus-visible{box-shadow:0 0 0 2px var(--color-primary)}
.cr-peek-card{position:absolute;z-index:30;overflow:hidden;width:340px;max-width:calc(100% - 24px);border-radius:14px;background:var(--cr-card-bg);box-shadow:var(--cr-card-shadow);color:var(--color-text-primary);
  opacity:0;transform:translateY(4px) scale(.98);transform-origin:top left;transition:opacity 160ms ease,transform 200ms cubic-bezier(.23,1,.32,1);pointer-events:none}
.cr-peek-card.on{opacity:1;transform:none;pointer-events:auto}
.cr-peek-pad{padding:14px}
.cr-card{display:flex;flex-direction:column;gap:7px}
.cr-card-head{display:flex;align-items:center;gap:8px}
.cr-card-top{display:flex;gap:12px;align-items:flex-start}
.cr-card-main{flex:1;min-width:0}
.cr-card-logo{flex:none;width:24px;height:24px;border-radius:6px;background:#fff;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(0,0,0,.06)}
.cr-card-logo img{width:84%;height:84%;object-fit:contain}
.cr-card-org{font-size:12.5px;font-weight:500;color:var(--color-text-secondary)}
.cr-card-fit{font-size:12px;font-weight:600;color:var(--color-warning)}
.cr-card-fit::before{content:"\00b7";color:var(--color-text-dim);font-weight:400;margin-right:7px}
.cr-card-title{font-size:14.5px;font-weight:600;color:var(--color-text-primary);line-height:1.3}
.cr-card-meta{font-size:12px;color:var(--color-text-muted);margin-top:2px}
.cr-card-why{margin:0;font-size:12.5px;line-height:1.5;color:var(--color-text-secondary)}
.cr-card-why b{color:var(--color-text-primary);font-weight:600}
.cr-card-match{display:inline-flex;align-self:flex-start;font-size:11px;font-weight:600;padding:3px 6px;border-radius:6px;color:var(--color-social);background:var(--color-social-soft)}
.cr-star{flex:none;width:30px;height:30px;margin:-4px -6px -4px auto;border:0;background:transparent;border-radius:8px;display:grid;place-items:center;color:var(--color-text-muted);cursor:pointer;transition:background 150ms ease,color 150ms ease}
.cr-star:hover{background:var(--well);color:var(--color-text-primary)}
.cr-star.on{color:var(--color-primary)}
.cr-star.on svg{fill:currentColor}
.cr-date{flex:none;width:44px;height:46px;border-radius:10px;border:1px solid var(--rule);background:var(--well);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.cr-date-wd{font-size:10px;font-weight:700;color:var(--color-academic)}
.cr-date-day{font-size:18px;font-weight:700;color:var(--color-text-primary);line-height:1}
.cr-org-logo{flex:none;width:44px;height:44px;border-radius:10px;display:grid;place-items:center;color:#fff;font-size:18px;font-weight:700;overflow:hidden;background:linear-gradient(135deg,#1f8a6a,#145c48)}
.cr-org-logo.img{background:#fff;border:1px solid rgba(0,0,0,.06)}
.cr-org-logo.img img{width:100%;height:100%;object-fit:cover}
.cr-org-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.cr-org-tag{font-size:11px;font-weight:600;color:var(--cr-red);background:var(--color-primary-pale);padding:1px 6px;border-radius:4px}
.cr-course-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
.cr-course-code{font-size:14.5px;font-weight:600;color:var(--color-academic)}
.cr-acts{display:grid;grid-template-columns:minmax(max-content,1fr) 1fr;gap:8px;margin-top:4px}
.cr-act{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;white-space:nowrap;padding:8px 14px;border-radius:10px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;color:var(--color-text-primary);background:transparent;border:1px solid rgba(255,255,255,.14);transition:background 150ms ease,border-color 150ms ease,transform 150ms ease}
.cr-act:hover{background:var(--well)}
.cr-act:active{transform:scale(.97)}
.cr-act:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}
.cr-act.primary{color:var(--cr-red);background:var(--color-primary-pale);border-color:color-mix(in srgb,var(--color-primary) 35%,transparent)}
.cr-act.primary:hover{background:color-mix(in srgb,var(--color-primary) 18%,transparent);border-color:color-mix(in srgb,var(--color-primary) 55%,transparent)}
.cr-act.primary.done{color:var(--cr-done);background:color-mix(in srgb,var(--cr-done) 10%,transparent);border-color:color-mix(in srgb,var(--cr-done) 35%,transparent)}
.cr-say{font-size:12px;color:var(--color-text-muted);margin:2px 0 0}
.cr-say:empty{display:none}

/* Follow-up pills, each with its own moving light */
.cr-pills-row{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;padding:8px 2px 12px}
.cr-pills-row::-webkit-scrollbar{display:none}
.cr-pill{position:relative;flex:none;display:inline-flex;align-items:center;gap:11px;padding:9px 15px;border-radius:16px;cursor:pointer;text-align:left;font-family:inherit;background:var(--cr-pill-bg);border:1px solid var(--cr-pill-border);box-shadow:var(--cr-pill-glow);color:var(--color-text-primary);transition:transform 160ms cubic-bezier(.23,1,.32,1),box-shadow 200ms ease,border-color 200ms ease;--chat-beam-radius:16px}
.cr-pill:hover{border-color:var(--cr-pill-border-hover);box-shadow:var(--cr-pill-glow-hover)}
.cr-pill:hover .cr-pill-arrow{transform:translateX(3px)}
.cr-pill:active{transform:scale(.97)}
.cr-pill:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}
.cr-pill-full{width:100%;min-width:0}
.cr-pill-lines{display:flex;flex-direction:column;min-width:0;flex:1}
.cr-pill-label{font-size:13.5px;font-weight:600;white-space:nowrap}
.cr-pill-full .cr-pill-label{white-space:normal;line-height:1.35}
.cr-pill-sub{font-size:11.5px;color:var(--color-text-muted);margin-top:1px;white-space:nowrap}
.cr-pill-icon{color:var(--cr-red);flex:none}
.cr-pill-arrow{color:var(--cr-red);font-size:14px;transition:transform 160ms ease}
.upload-beam{position:absolute;inset:0;pointer-events:none;border-radius:inherit;border:var(--beam-width,1.5px) solid transparent;
  -webkit-mask:linear-gradient(transparent,transparent),linear-gradient(#fff,#fff);mask:linear-gradient(transparent,transparent),linear-gradient(#fff,#fff);
  -webkit-mask-clip:padding-box,border-box;mask-clip:padding-box,border-box;-webkit-mask-composite:source-in;mask-composite:intersect}
@supports (offset-path:rect(0 auto auto 0 round 14px)){
  .upload-beam::after{content:"";position:absolute;aspect-ratio:1;width:var(--beam-size,72px);
    background:radial-gradient(circle at center,rgba(var(--beam-rgb,var(--glow-primary-rgb)),var(--beam-alpha,.9)) 0%,rgba(var(--beam-rgb,var(--glow-primary-rgb)),calc(var(--beam-alpha,.9)*.38)) 30%,transparent 64%);
    offset-anchor:50% 50%;offset-path:rect(0 auto auto 0 round var(--chat-beam-radius,14px));offset-rotate:0deg;animation:chatBeamTravel var(--chat-beam-duration,5s) linear infinite;animation-delay:var(--beam-delay,0s)}
}
@keyframes chatBeamTravel{to{offset-distance:100%}}

/* The composer, as the product's */
.ainput{display:flex;align-items:center;gap:6px;margin:6px 22px 0;padding:8px;background:var(--well);border:1px solid var(--rule);border-radius:15px}
.ainput .clip,.ainput .mic{flex:none;width:32px;height:32px;display:grid;place-items:center;color:var(--color-text-muted)}
.ainput input{flex:1;min-width:0;border:none;outline:none;background:transparent;font-family:inherit;font-size:14px;color:var(--color-text-primary);padding:8px 2px}
.ainput input::placeholder{color:var(--color-text-muted)}
.ainput .send{flex:none;width:34px;height:34px;border-radius:10px;border:none;display:grid;place-items:center;background:transparent;color:var(--color-text-muted)}
.afoot{text-align:center;font-size:11px;color:var(--color-text-muted);padding:9px 16px 14px}

/* the autoplay cursor */
.cr-cursor{position:absolute;z-index:40;left:0;top:0;width:22px;height:22px;margin:-2px 0 0 -3px;pointer-events:none;opacity:0;transition:left 760ms cubic-bezier(.65,0,.25,1),top 760ms cubic-bezier(.65,0,.25,1),opacity 260ms ease;filter:drop-shadow(0 2px 6px rgba(0,0,0,.6))}
.cr-cursor.on{opacity:1}
.cr-cursor svg{display:block;transition:transform 120ms ease}
.cr-cursor.press svg{animation:crPress 260ms ease}
@keyframes crPress{40%{transform:scale(.82)}}
.cr-ripple{position:absolute;left:1px;top:1px;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;border:2px solid rgba(255,64,80,.85);opacity:0}
.cr-cursor.press .cr-ripple{animation:crRipple 520ms ease-out}
@keyframes crRipple{from{opacity:.9;transform:scale(.3)}to{opacity:0;transform:scale(1.6)}}
.cr-pressing{transform:scale(.97)!important}
@media(max-width:640px){
  .athread{height:500px;padding:18px 14px 6px}
  .cr-turn{gap:8px}
  .astarts{grid-template-columns:1fr}
  .aempty .aorbig{width:110px;height:110px}
  .aempty h3{font-size:24px}
  .ainput{margin:6px 12px 0}
  .ahead{padding:12px 16px}
  .ahead .who{display:none}
  .cr-answer{font-size:15px}
  /* follow-ups stack full width on a phone instead of a sideways strip that cuts them off */
  .cr-pills-row{flex-direction:column;overflow:visible;padding:10px 0 14px}
  .cr-pills-row .cr-pill{width:100%}
  .cr-pills-row .cr-pill-label{white-space:normal;line-height:1.35}
}
@media (prefers-reduced-motion:reduce){
  .cr-shimmer{animation:none;color:var(--color-text-muted);background:none}
  .cr-name,.cr-pill,.cr-act,.cr-peek-card{transition:none}
  .upload-beam{display:none!important}
  .cr-turn.waiting .cr-av img{animation:none}
}
