/* CampusConnect — light/dark appearance and lively campus interactions.
   Loaded after style.css and design-refresh.css. All motion respects user preference. */

/* Header appearance control */
.cc-theme-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;width:42px;height:42px;flex-shrink:0;border:1px solid #e4e8f1;border-radius:13px;background:#fff;color:#405070;box-shadow:0 2px 12px #26334b09}
.cc-theme-toggle:hover{transform:translateY(-2px);background:#f2f4ff;border-color:#cbd4ff;box-shadow:0 9px 23px #4b5de71c}
.cc-theme-toggle .icon{width:19px;height:19px;transition:transform .4s ease}
.cc-theme-toggle:hover .icon{transform:rotate(-18deg)}
.cc-theme-toggle:active{transform:translateY(0) scale(.96)}
.cc-theme-label{display:none}
.cc-theme-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:17px}
.cc-theme-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 9px;border:1px solid #e4e9f4;border-radius:14px;background:#f9fafd;text-align:center;font-size:11px;font-weight:800;color:#697792}
.cc-theme-card .icon{height:23px;width:23px;color:#6475aa}
.cc-theme-card[aria-pressed="true"]{background:#ecf0ff;border:1.5px solid #6779eb;color:#3d51ca;box-shadow:0 4px 14px #4059c41a}
.cc-theme-card[aria-pressed="true"] .icon{color:#4f63e5}
.cc-theme-card:hover{transform:translateY(-2px);border-color:#8ea0f7}
.cc-appearance-panel{margin-bottom:20px}
.cc-appearance-panel h3{font-size:17px}
.cc-appearance-panel .setting-note{margin-bottom:4px}

/* Discovery and honest student onboarding */
.cc-activity-grid{display:grid;grid-template-columns:1.12fr .88fr;gap:20px;margin:0 0 32px}
.cc-discovery,.cc-journey{position:relative;overflow:hidden;border:1px solid #e3e8f4;border-radius:22px;padding:26px;box-shadow:0 8px 25px #26386009}
.cc-discovery{background:linear-gradient(130deg,#ecf0ff 0%,#fafbff 60%,#ffffff 100%)}
.cc-discovery:after{content:'';position:absolute;right:-65px;top:-80px;width:180px;height:180px;border:36px solid #dce3ff7d;border-radius:50%;pointer-events:none}
.cc-journey{background:#fff}
.cc-panel-topline{display:flex;align-items:center;gap:9px;margin-bottom:14px;font-size:10px;letter-spacing:1.1px;font-weight:800;color:#6072a4;text-transform:uppercase}
.cc-panel-topline .icon{height:15px;width:15px;color:#596be1}
.cc-panel-head{display:flex;align-items:start;justify-content:space-between;gap:12px}
.cc-discovery h3,.cc-journey h3{font-size:21px;line-height:1.35;letter-spacing:-.65px}
.cc-discovery>p,.cc-journey>p{color:#7e8ca3;font-size:12px;line-height:1.7;margin-top:8px;max-width:540px}
.cc-topic-row{display:flex;flex-wrap:wrap;gap:8px;margin:19px 0}
.cc-topic-chip{background:#fff;border:1px solid #d9e1f4;color:#52617d;padding:8px 12px;border-radius:999px;font-size:11px;font-weight:700}
.cc-topic-chip:hover{border-color:#8291e7;transform:translateY(-2px)}
.cc-topic-chip[aria-pressed="true"]{background:#4b5de7;border-color:#4b5de7;color:#fff;box-shadow:0 5px 14px #4b5de731}
.cc-match{position:relative;z-index:1;display:flex;align-items:center;gap:12px;padding:15px;background:#ffffffd9;border:1px solid #e1e7f5;border-radius:15px;box-shadow:0 6px 15px #233c5c08;animation:cc-match-in .28s ease both}
.cc-match .avatar{width:41px;height:41px}
.cc-match-info{flex:1;min-width:0}
.cc-match-info strong{display:block;font-size:12px;color:#26364f}
.cc-match-info small{display:block;font-size:10px;color:#8793aa;margin-top:4px}
.cc-match button{display:inline-flex;align-items:center;justify-content:center;width:37px;height:37px;border-radius:10px;background:#eef1ff;color:#4b5de7;flex-shrink:0}
.cc-match button:hover{background:#dce4ff;transform:translateX(2px)}
.cc-match button .icon{width:16px;height:16px}
.cc-discovery-foot{font-size:10px;color:#8b96ab;margin-top:13px}
.cc-journey-pct{background:#eff2ff;color:#5063d6;border-radius:12px;padding:10px 12px;font-size:18px;line-height:1.1;font-weight:800;white-space:nowrap}
.cc-progress-track{width:100%;height:7px;background:#edf0f8;border-radius:100px;overflow:hidden;margin:21px 0 17px}
.cc-progress-fill{height:100%;background:linear-gradient(90deg,#5364e8,#71c3b0);border-radius:100px;width:var(--cc-progress,0%);transition:width .7s cubic-bezier(.2,.7,.2,1)}
.cc-steps{display:flex;flex-direction:column;gap:5px}
.cc-step{display:flex;width:100%;align-items:center;gap:12px;padding:11px 10px;border-radius:12px;text-align:left}
.cc-step:hover{background:#f3f5ff;transform:translateX(3px)}
.cc-step-mark{display:inline-flex;align-items:center;justify-content:center;width:31px;height:31px;flex-shrink:0;border-radius:10px;background:#eff2fc;color:#7888b4;border:1px solid #e4e9f7}
.cc-step.done .cc-step-mark{background:#e5f7ed;color:#268a66;border-color:#c6edd9}
.cc-step-mark .icon{height:16px;width:16px}
.cc-step b{font-size:12px;font-weight:700;color:#354258}
.cc-step small{display:block;font-size:10px;color:#8b97ab;margin-top:3px}
.cc-step-chevron{margin-left:auto;color:#9daac2;width:15px;height:15px}
.cc-step.done .cc-step-chevron{color:#64ab91}
.cc-journey-foot{margin-top:13px;color:#99a4b6;font-size:10px;line-height:1.5}

/* Micro interactions that communicate affordances */
.nav-item .icon{transition:transform .2s ease}
.nav-item:hover .icon{transform:translateX(2px)}
.quick-card .quick-icon{transition:transform .32s ease,box-shadow .32s ease}
.quick-card:hover .quick-icon{transform:rotate(-5deg) scale(1.08);box-shadow:0 8px 18px #4555b41a}
.quick-card .quick-arrow{transition:transform .23s ease}
.quick-card:hover .quick-arrow{transform:translateX(5px)}
.student-card,.note-card,.university-card,.cc-discovery,.cc-journey{transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.student-card:hover,.note-card:hover{transform:translateY(-3px);box-shadow:0 19px 36px #2b3b6312;border-color:#bec9f3}
.btn .icon{transition:transform .2s ease}
.btn:hover .icon{transform:translateX(2px)}
.post-actions button .icon{transition:transform .2s ease}
.post-actions button:hover .icon{transform:scale(1.17)}
.cc-hero-art>img{animation:cc-scene 24s ease-in-out infinite alternate}
.cc-pill .cc-pulse{animation:cc-pulse 2.4s ease-in-out infinite}
.cc-hero-copy h1 em{background:linear-gradient(110deg,#5669e5,#798af3,#4d60da);background-size:180% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;animation:cc-glide 9s ease-in-out infinite alternate}
.cc-hero-copy .cc-pill{box-shadow:0 0 0 0 #4b5de700}
#toast.show{animation:cc-toast-in .25s ease both}

/* Content reveals: gated by JS; never leave pages invisible without JS. */
html.cc-motion-ready .cc-reveal{opacity:0;transform:translateY(17px);transition:opacity .62s ease,transform .62s cubic-bezier(.17,.67,.32,1);transition-delay:var(--cc-stagger,0ms)}
html.cc-motion-ready .cc-reveal.is-visible{opacity:1;transform:translateY(0)}
@keyframes cc-scene{0%{transform:scale(1.02) translate(0,0)}100%{transform:scale(1.12) translate(-2%,1%)}}
@keyframes cc-glide{0%{background-position:0% 50%}100%{background-position:100% 50%}}
@keyframes cc-pulse{0%,100%{box-shadow:0 0 0 0 #5a70ee50}50%{box-shadow:0 0 0 6px #5a70ee07}}
@keyframes cc-match-in{from{opacity:.5;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes cc-toast-in{from{opacity:0;transform:translateX(-50%) translateY(12px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}

/* Dark appearance: full coverage of original prototype and refresh layers. */
html[data-theme="dark"]{color-scheme:dark;--ink:#edf2ff;--muted:#a1adc7;--line:#2a3b56;--bg:#0c1424;--nav:#101d34;--blue:#7889ff}
html[data-theme="dark"] body{color:#edf2ff;background:radial-gradient(circle at 75% -180px,#172650 0,transparent 560px),#0c1424}
html[data-theme="dark"] #sidebar{background:#0d1b31;box-shadow:20px 0 72px #0107139c;color:#b6c5e2}
html[data-theme="dark"] .nav-item:hover{background:#273b5b}
html[data-theme="dark"] .nav-item.active{background:#5968dc;color:#fff}
html[data-theme="dark"] .campus-card{background:#1b304e;border-color:#2a4062}
html[data-theme="dark"] #topbar{background:#111d30e8;border-color:#2a3951}
html[data-theme="dark"] .breadcrumb{color:#afc1e0}
html[data-theme="dark"] .breadcrumb span{color:#7f90ac}
html[data-theme="dark"] .mobile-menu,html[data-theme="dark"] .top-search,html[data-theme="dark"] .notification,html[data-theme="dark"] .cc-theme-toggle{background:#1c2a42;border-color:#30405b;color:#d8e3ff}
html[data-theme="dark"] .cc-theme-toggle:hover,html[data-theme="dark"] .mobile-menu:hover{background:#263857;border-color:#5367a0}
html[data-theme="dark"] .top-search input{color:#ecf2ff}
html[data-theme="dark"] .top-search kbd{border-color:#3d4d67;color:#c4cfe5}
html[data-theme="dark"] .page-heading p,html[data-theme="dark"] .muted,html[data-theme="dark"] .small.muted{color:#9aabc9}
html[data-theme="dark"] .date-pill{background:#16243a;border-color:#33415a;color:#b6c6e2}
html[data-theme="dark"] .section-head a,html[data-theme="dark"] .text-link{color:#a8b4ff}
html[data-theme="dark"] .panel,html[data-theme="dark"] .student-card,html[data-theme="dark"] .note-card,html[data-theme="dark"] .university-card,html[data-theme="dark"] .cc-journey{background:#17243a;border-color:#2d3e58;box-shadow:0 8px 24px #01091720}
html[data-theme="dark"] .university-card:first-child{background:linear-gradient(135deg,#192a46,#1d2948);border-color:#4c5d96}
html[data-theme="dark"] .university-card:has(.btn:disabled){background:#121f34}
html[data-theme="dark"] .university-card:has(.btn:disabled) .uni-logo{color:#8795b0}
html[data-theme="dark"] .btn{background:#253650;border-color:#3c4c66;color:#e6eeff}
html[data-theme="dark"] .btn:hover{background:#31445f}
html[data-theme="dark"] .btn.primary{background:#6878ed;border-color:#6878ed;color:#fff}
html[data-theme="dark"] .btn.primary:hover{background:#7b8bff}
html[data-theme="dark"] .btn.soft{background:#29385b;border-color:#34456e;color:#b4c4ff}
html[data-theme="dark"] .btn.danger{color:#ffacb1}
html[data-theme="dark"] .cc-hero{background:linear-gradient(145deg,#192743,#142035 95%);border-color:#314365;box-shadow:0 22px 65px #030b1961}
html[data-theme="dark"] .cc-hero-copy>p{color:#bbc7e0}
html[data-theme="dark"] .cc-pill{background:#27375d;border-color:#43578e;color:#bbcbff}
html[data-theme="dark"] .cc-supporting{color:#a3b4d2}
html[data-theme="dark"] .cc-hero-actions .btn.secondary{background:#263854;border-color:#3e5273;color:#e5edff}
html[data-theme="dark"] .cc-hero-actions .btn.secondary:hover{background:#30456b}
html[data-theme="dark"] .cc-feature-label{color:#99acd2}
html[data-theme="dark"] .quick-card{background:#19263d;border-color:#2c3d59;box-shadow:0 6px 20px #0003}
html[data-theme="dark"] .quick-card:hover{background:#1e2d48;border-color:#5a6b9c;box-shadow:0 16px 38px #0004}
html[data-theme="dark"] .quick-card h3,html[data-theme="dark"] .student-card h3,html[data-theme="dark"] .note-card h3{color:#eaf0ff}
html[data-theme="dark"] .quick-card p,html[data-theme="dark"] .student-card p,html[data-theme="dark"] .note-card p,html[data-theme="dark"] .university-card p{color:#acbad2}
html[data-theme="dark"] .quick-icon,html[data-theme="dark"] .quick-card:nth-child(2) .quick-icon,html[data-theme="dark"] .quick-card:nth-child(3) .quick-icon,html[data-theme="dark"] .section-icon{background:#2a3b60;color:#afbeff}
html[data-theme="dark"] .cc-activity-grid .quick-icon{background:#2a3b60}
html[data-theme="dark"] .post-compose{border-color:#2c3e57}
html[data-theme="dark"] .post-compose button{background:#23334e;color:#bac6db}
html[data-theme="dark"] .post{border-color:#2d3e57}
html[data-theme="dark"] .post p{color:#b5c3dd}
html[data-theme="dark"] .person-row small,html[data-theme="dark"] .post-actions button,html[data-theme="dark"] .setting-note,html[data-theme="dark"] .file-hint{color:#9eafc8}
html[data-theme="dark"] .post-tag,html[data-theme="dark"] .badge.blue{color:#aabaff;background:#26375b}
html[data-theme="dark"] .badge.purple{background:#30284f;color:#ccafff}
html[data-theme="dark"] .badge.orange{background:#453823;color:#f3c184}
html[data-theme="dark"] .badge.green{background:#1a403c;color:#a8e8ce}
html[data-theme="dark"] .badge{border:1px solid #ffffff10}
html[data-theme="dark"] .event-row{border-color:#304059}
html[data-theme="dark"] .event-row h3{color:#e8eefc}
html[data-theme="dark"] .event-row p{color:#a4b2cc}
html[data-theme="dark"] .date-box{background:#28385a;color:#bdc9ff}
html[data-theme="dark"] .community-note,html[data-theme="dark"] .cc-uni-note{background:#202f4c;border-color:#324767;color:#bccdf0}
html[data-theme="dark"] .community-note h3{color:#e7efff}
html[data-theme="dark"] .community-note p{color:#b2c1d9}
html[data-theme="dark"] .cc-area-note{color:#9badce}
html[data-theme="dark"] select,html[data-theme="dark"] input,html[data-theme="dark"] textarea{background:#17263e;border:1px solid #384a66;color:#edf3ff}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#8294b0;opacity:1}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{border-color:#8e9dfb;box-shadow:0 0 0 3px #8e9dfb28}
html[data-theme="dark"] .top-search input{background:transparent;border:0;box-shadow:none}
html[data-theme="dark"] .toolbar input,html[data-theme="dark"] .toolbar select{background:#1a2a43}
html[data-theme="dark"] .field,html[data-theme="dark"] .form-stack label{color:#bbcae2}
html[data-theme="dark"] .tab{color:#a7b5d0}
html[data-theme="dark"] .tabs{border-color:#30405b}
html[data-theme="dark"] .tab.active{color:#b1baff;border-color:#a3b0ff}
html[data-theme="dark"] .tags span{background:#293953;color:#c1cce1}
html[data-theme="dark"] .note-art,html[data-theme="dark"] .note-art.purple,html[data-theme="dark"] .note-art.green,html[data-theme="dark"] .note-art.gold{background:#253b5a;color:#d6e0f8}
html[data-theme="dark"] .note-art .paper{background:#dfe7f4;color:#2d405f}
html[data-theme="dark"] .note-art .badge{background:#23324ee8!important;color:#e2eaff!important}
html[data-theme="dark"] .price small{color:#abbad3}
html[data-theme="dark"] .empty{background:#17243a;border-color:#38506c;color:#a8b6cd}
html[data-theme="dark"] .empty h3{color:#e6eeff}
html[data-theme="dark"] .join-card{background:linear-gradient(125deg,#223254,#2a2850);border-color:#35456c}
html[data-theme="dark"] .join-card p{color:#b1bbd6}
html[data-theme="dark"] .demo-banner{background:#322b22;border-color:#58452e;color:#eed0a2}
html[data-theme="dark"] .conversation-list,html[data-theme="dark"] .conversation,html[data-theme="dark"] .chat-header,html[data-theme="dark"] .chat-form{border-color:#2f405a}
html[data-theme="dark"] .conversation.active{background:#293858}
html[data-theme="dark"] .conversation:hover{background:#233350}
html[data-theme="dark"] .conversation p{color:#a4b3ca}
html[data-theme="dark"] .bubble{background:#2b3951;color:#e0e8f8}
html[data-theme="dark"] .bubble.self{background:#596cdb;color:#fff}
html[data-theme="dark"] .comment{background:#26364f;color:#d5e3fc}
html[data-theme="dark"] .detail-info{background:#263650;color:#c4d0e5}
html[data-theme="dark"] .preview-page{background:#e5e7e5;border-color:#73829d;color:#26334a}
html[data-theme="dark"] .modal{background:#182740;color:#edf2ff;box-shadow:0 30px 80px #0008}
html[data-theme="dark"] .modal p{color:#b4c4df}
html[data-theme="dark"] .modal-close{background:#2d3c56;color:#ebf2ff}
html[data-theme="dark"] .modal-overlay{background:#050b16bd}
html[data-theme="dark"] .verification-step{color:#c1cce1}
html[data-theme="dark"] .verification-step b{background:#30415e;color:#cdd8fa}
html[data-theme="dark"] #toast{background:#314568;color:#f5f8ff}
html[data-theme="dark"] footer{color:#92a4c0}
html[data-theme="dark"] footer a{color:#afbbdc}

/* Discovery cards and appearance controls in dark mode */
html[data-theme="dark"] .cc-discovery{background:linear-gradient(140deg,#263658,#1b2944 60%,#19273d);border-color:#3a4d73;box-shadow:0 12px 35px #0004}
html[data-theme="dark"] .cc-discovery:after{border-color:#6577ba16}
html[data-theme="dark"] .cc-journey{background:#18263e}
html[data-theme="dark"] .cc-panel-topline{color:#b4c5f5}
html[data-theme="dark"] .cc-panel-topline .icon{color:#a6b7ff}
html[data-theme="dark"] .cc-discovery>p,html[data-theme="dark"] .cc-journey>p{color:#afbed6}
html[data-theme="dark"] .cc-topic-chip{background:#293a56;color:#d5e0f7;border-color:#3f5476}
html[data-theme="dark"] .cc-topic-chip:hover{background:#344a70}
html[data-theme="dark"] .cc-topic-chip[aria-pressed="true"]{background:#6c7df2;border-color:#6c7df2;color:white}
html[data-theme="dark"] .cc-match{background:#1a2b47e8;border-color:#455a7f}
html[data-theme="dark"] .cc-match-info strong{color:#ebf3ff}
html[data-theme="dark"] .cc-match-info small,html[data-theme="dark"] .cc-discovery-foot{color:#a9b9d4}
html[data-theme="dark"] .cc-match button{background:#33466d;color:#c0cbff}
html[data-theme="dark"] .cc-journey-pct{background:#29395f;color:#afbeff}
html[data-theme="dark"] .cc-progress-track{background:#30415f}
html[data-theme="dark"] .cc-step:hover{background:#263751}
html[data-theme="dark"] .cc-step b{color:#e7edfc}
html[data-theme="dark"] .cc-step small,html[data-theme="dark"] .cc-journey-foot{color:#a4b2cd}
html[data-theme="dark"] .cc-step-mark{background:#2c3d5c;border-color:#3d5071;color:#acbce3}
html[data-theme="dark"] .cc-step.done .cc-step-mark{background:#21463e;border-color:#3b6859;color:#a0dfc7}
html[data-theme="dark"] .cc-theme-card{background:#1c2d46;border-color:#384b68;color:#c3d0e5}
html[data-theme="dark"] .cc-theme-card .icon{color:#adb9e2}
html[data-theme="dark"] .cc-theme-card[aria-pressed="true"]{background:#34416b;border-color:#93a0ff;color:#e5eaff}
html[data-theme="dark"] .cc-theme-card[aria-pressed="true"] .icon{color:#cbd2ff}

/* Adaptive layout */
@media(max-width:1050px){.cc-activity-grid{grid-template-columns:1fr 1fr;gap:14px}.cc-discovery,.cc-journey{padding:22px}}
@media(max-width:860px){.cc-activity-grid{grid-template-columns:1fr}.cc-discovery,.cc-journey{padding:24px}.cc-activity-grid .cc-journey{order:1}}
@media(max-width:700px){.cc-theme-toggle{width:38px;height:38px;border-radius:11px}.cc-discovery,.cc-journey{border-radius:17px;padding:22px}.cc-discovery h3,.cc-journey h3{font-size:19px}.cc-activity-grid{margin-bottom:25px}.cc-theme-card{padding:13px 7px}.cc-theme-card-grid{gap:7px}.cc-theme-card .icon{width:19px;height:19px}}
@media(max-width:440px){.cc-match{padding:12px;gap:9px}.cc-match .avatar{width:37px;height:37px}.cc-match-info small{font-size:9px}.cc-topic-row{gap:6px}.cc-topic-chip{padding:7px 10px}.cc-discovery,.cc-journey{padding:18px}}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
  html.cc-motion-ready .cc-reveal{opacity:1!important;transform:none!important}
}

/* Final interaction and color-contrast refinements */
body,#topbar,.panel,.quick-card,.student-card,.note-card,.university-card,.cc-journey,.cc-discovery,.cc-theme-toggle,.cc-theme-card,.cc-topic-chip{transition:background-color .28s ease,border-color .28s ease,color .28s ease,box-shadow .28s ease,transform .22s ease}
html[data-theme="dark"] .cc-hero-copy h1 em{background-image:linear-gradient(110deg,#a9baff,#dbd6ff,#adcaff)}
html[data-theme="dark"] .avatar{border-color:#293953}
html[data-theme="dark"] .verified{color:#9aafff}
html[data-theme="dark"] .nav-label{color:#9cadd0}
html[data-theme="dark"] .cc-journey .cc-step-chevron{color:#9faed1}
html[data-theme="dark"] .cc-discovery .cc-panel-topline{color:#bdc9fc}
@media(prefers-reduced-motion:reduce){body,#topbar,.panel,.quick-card,.student-card,.note-card,.university-card,.cc-journey,.cc-discovery,.cc-theme-toggle,.cc-theme-card,.cc-topic-chip{transition:none!important}}
