/* Chipter 3: shared surface, typography and interaction tokens. */
:root{--cc-primary:#2454e8;--cc-bg:#f6f8fc;--cc-surface:#fff;--cc-text:#172033;--cc-muted:#65718a;--cc-border:#e4e9f2;--cv-radius:22px;--cv-space:24px;--cv-soft:#edf2ff;--cv-shadow:0 12px 38px #17203308;--cc-radius:var(--cv-radius)}
:root[data-theme=dark]{--cc-bg:#0b1020;--cc-surface:#151c2e;--cc-text:#f4f7ff;--cc-muted:#a3aec5;--cc-border:#29344d;--cv-soft:#202f53;--cv-shadow:none}
body{background:var(--cc-bg);color:var(--cc-text);font-family:Roboto,system-ui,sans-serif;font-size:15px;line-height:1.55;letter-spacing:.005em}h1,h2,h3{letter-spacing:-.035em;color:var(--cc-text)}h1{font-size:clamp(26px,3vw,38px);line-height:1.14;font-weight:700}h2{font-size:22px}button,a,input,textarea{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #7395ff;outline-offset:3px}button,a.button{transition:background .18s,box-shadow .18s,transform .18s}button:disabled{opacity:.6;cursor:wait}.button,.btn{border-radius:12px;min-height:42px;font-weight:500;box-shadow:none}.button.primary,.btn-primary{background:#2454e8;color:#fff;border-color:#2454e8}.button.secondary,.btn-secondary{background:var(--cv-soft);color:var(--cc-text);border:1px solid var(--cc-border)}input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select,.form-control{border-radius:12px;background:var(--cc-bg);border:1px solid var(--cc-border);color:var(--cc-text);max-width:100%;min-width:0}textarea{resize:vertical}img,video{max-width:100%}.card,.post,.post-item,.profile_question_form,.modal-content,.content-card{border:1px solid var(--cc-border);border-radius:var(--cv-radius);background:var(--cc-surface);box-shadow:var(--cv-shadow);color:var(--cc-text)}.card-header{background:transparent;border-bottom-color:var(--cc-border)}.modal-content{overflow:hidden}.modal-header,.modal-footer{border-color:var(--cc-border)}.dropdown-menu{background:var(--cc-surface);border:1px solid var(--cc-border);border-radius:14px;box-shadow:var(--cv-shadow)}.dropdown-item{color:var(--cc-text)}.dropdown-item:hover{background:var(--cv-soft)}
.cc-topbar{background:var(--cc-surface);border-bottom:1px solid var(--cc-border);box-shadow:none}.cc-topbar-inner{max-width:1440px}.cc-search{border:1px solid var(--cc-border);border-radius:14px}.cc-brand{letter-spacing:-.045em}.cc-sidebar-inner{background:transparent}.cc-nav-link{border-radius:13px;margin-bottom:4px}.cc-nav-link.active,.cc-nav-link[aria-current=page]{background:var(--cv-soft);color:var(--cc-primary);font-weight:700}.cc-eyebrow,.cv-kicker{text-transform:uppercase;font-size:10px;font-weight:700;letter-spacing:.18em;color:var(--cc-muted);margin:0 0 10px}.cc-sidebar-footer{border-top:1px solid var(--cc-border);padding-top:20px}.cc-compose-button{border-radius:14px!important}.wrap.content-page{max-width:1440px;padding-inline:28px}.main-column{gap:24px}.sn-content .main-content{min-width:0;width:100%}.cv-page-heading{padding:4px 0 24px}.cv-page-heading h1{margin:0 0 12px}.cv-page-heading>p:last-child{color:var(--cc-muted);margin-bottom:0}.cv-tabs{display:flex;gap:6px;padding:5px;background:var(--cc-surface);border:1px solid var(--cc-border);border-radius:16px;margin-bottom:20px;overflow-x:auto}.cv-tabs button,.cv-tabs a{flex:1;border:0;background:transparent;color:var(--cc-muted);padding:12px 16px;border-radius:11px;white-space:nowrap;font-weight:500;text-align:center}.cv-tabs button[aria-pressed=true],.cv-tabs a[aria-current=page]{background:var(--cv-soft);color:var(--cc-primary)}.cv-tabs small{display:block;font-size:11px;font-weight:400;color:var(--cc-muted)}.cv-feed-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0}.cv-context-card{background:var(--cc-surface);border:1px solid var(--cc-border);border-radius:24px;padding:24px;position:sticky;top:100px}.cv-context-card p{color:var(--cc-muted)}.cv-context-card a{display:block;margin-top:18px}.cv-orbit{display:inline-grid;place-items:center;width:64px;height:64px;background:var(--cv-soft);color:var(--cc-primary);border-radius:21px;font-size:40px;margin-bottom:22px}.cv-empty{text-align:center;padding:40px 24px;border:1px dashed var(--cc-border);border-radius:var(--cv-radius);background:var(--cc-surface)}.cv-empty p{max-width:350px;margin:12px auto 24px;color:var(--cc-muted)}.cv-people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.cv-person{display:flex;align-items:center;gap:15px;padding:24px;border:1px solid var(--cc-border);border-radius:20px;background:var(--cc-surface);color:var(--cc-text);min-width:0}.cv-person img{width:54px;height:54px;border-radius:18px;object-fit:cover}.cv-person span{min-width:0;overflow-wrap:anywhere}.cv-person strong,.cv-person small{display:block}.cv-person small{color:var(--cc-muted)}.cv-legacy-link{display:inline-block;margin-top:24px;color:var(--cc-muted)}#cv-more{margin:24px auto;display:block}#cv-more[hidden],[hidden]{display:none!important}#cv-error{padding:14px 18px;background:var(--cv-soft);border:1px solid var(--cc-border);border-radius:12px;margin:15px 0;color:var(--cc-text)}
/* Profile composition retains original upload/crop controls and server actions. */
.cv-profile-hero .profile-cover-img{height:250px;background-color:var(--cv-soft)}.cv-profile-hero .profile-info{padding:0 28px 24px}.cv-profile-hero .profile-photo{border-radius:28px;border:5px solid var(--cc-surface)}.cv-profile-hero .profile-photo-container{margin-top:-40px}.cv-profile-hero .profile-main-info-container{padding-top:22px}.cv-profile-handle{color:var(--cc-muted);margin:8px 0 16px}.cv-profile-stats{display:flex;gap:30px;flex-wrap:wrap;margin:20px 0 0;padding:22px 0 0;border-top:1px solid var(--cc-border)}.cv-profile-stats a{color:var(--cc-muted);font-size:12px}.cv-profile-stats strong{display:block;font-size:24px;color:var(--cc-text);letter-spacing:-.04em}.cv-profile-bio{white-space:pre-line;color:var(--cc-muted);max-width:640px}.cv-section-heading{display:flex;align-items:center;gap:12px;padding:8px 0 20px}.cv-section-heading::before{content:'';width:5px;height:28px;border-radius:4px;background:var(--cc-primary)}.cv-section-heading h1,.cv-section-heading h2{margin:0}.cv-page-actions{display:flex;flex-wrap:wrap;gap:10px}.cv-post-shell{border-radius:22px!important;overflow-wrap:anywhere}.cv-post-shell .post-footer{border-top:1px solid var(--cc-border)}.cv-call-panel{max-width:520px;margin:30px auto;text-align:center;padding:40px 24px;border-radius:28px;background:var(--cc-surface);border:1px solid var(--cc-border)}.cv-call-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.cv-call-state{color:var(--cc-muted);min-height:48px}
@media(min-width:1100px){.cv-feed-page .sn-content{max-width:700px}.cv-feed-page .cv-context{flex:1;min-width:210px}.cc-sidebar{flex:0 0 218px;max-width:218px}.cv-feed-page .main-column{flex-wrap:nowrap}.cv-connections-page .sn-content{max-width:920px}}@media(max-width:1099px){.cv-context{display:none}.wrap.content-page{padding-inline:20px}.main-column{gap:16px}}@media(max-width:767px){:root{--cv-radius:18px;--cv-space:16px}.wrap.content-page{padding-inline:12px;padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}.main-column{gap:0}.cv-page-heading{padding:12px 4px 20px}.cv-page-heading h1{font-size:29px}.cv-tabs button,.cv-tabs a{padding:10px 12px}.cv-tabs small{font-size:10px}.cv-people-grid{grid-template-columns:1fr;gap:12px}.cv-person{padding:18px}.cv-profile-hero .profile-cover-img{height:170px}.cv-profile-hero .profile-info{padding:0 16px 20px}.cv-profile-hero .profile-main-info-container{padding-top:10px}.profile-actions-block{flex-wrap:wrap;gap:8px}.cv-profile-stats{gap:24px}.cv-profile-hero .profile-photo{border-radius:22px}.cc-bottom-nav{padding-bottom:env(safe-area-inset-bottom,0px);background:var(--cc-surface);border:1px solid var(--cc-border);border-radius:20px 20px 0 0}.modal-dialog{margin:12px;max-width:calc(100vw - 24px)}.cv-call-panel{padding:30px 18px}body{overflow-x:clip}.main-content,.sn-content,.row.content-block{min-width:0}input,select,textarea{font-size:16px!important}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.cv-nav-section{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--cc-muted);padding:20px 14px 6px;margin:0}.cv-nav-section:first-child{padding-top:0}.cc-sidebar .cc-eyebrow{display:none}
.cv-crop-dialog{padding:24px;border:1px solid var(--cc-border);border-radius:24px;background:var(--cc-surface);color:var(--cc-text);max-width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}.cv-crop-dialog::backdrop{background:#0b1020a8;backdrop-filter:blur(4px)}.cv-crop-dialog canvas{display:block;width:100%;max-height:55dvh;object-fit:contain;touch-action:none;border-radius:14px;cursor:move}.cv-crop-dialog input{display:block;width:100%;margin:24px 0}.cv-crop-dialog .cv-call-actions{justify-content:flex-end}
:root[data-theme=dark]{--cc-primary:#9eb8ff}:root[data-theme=dark] .cv-tabs button[aria-pressed=true],:root[data-theme=dark] .cv-tabs a[aria-current=page]{color:#b5c8ff}
.cv-chat-list{padding:6px!important}.cv-chat-row{display:flex;position:relative;gap:8px;padding:18px 16px;border-bottom:1px solid var(--cc-border)}.cv-chat-row:last-child{border-bottom:0}.cv-chat-person{display:flex;gap:16px;align-items:center;flex:1;min-width:0;color:var(--cc-text)}.cv-chat-person>img{border-radius:18px;object-fit:cover;flex:none}.cv-chat-text{display:flex;flex:1;flex-direction:column;min-width:0;gap:5px}.cv-chat-text>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cc-muted);font-size:13px}.cv-chat-meta{display:flex;flex-direction:column;align-items:end;gap:8px;flex:none}.cv-chat-meta time{font-size:11px;color:var(--cc-muted)}.cv-unread{display:grid;place-items:center;min-width:22px;height:22px;border-radius:9px;background:#2454e8;color:white;font-size:11px}.cv-chat-menu{position:relative}.cv-chat-menu summary{cursor:pointer;list-style:none;color:var(--cc-muted);padding:6px}.cv-chat-menu[open]{background:var(--cc-surface);z-index:2}.cv-chat-menu button,.cv-chat-menu a{display:block;margin:8px}.cv-chat-row:hover{background:var(--cv-soft);border-radius:16px}@media(max-width:480px){.cv-chat-row{padding:16px 8px}.cv-chat-person{gap:10px}.cv-chat-person>img{width:44px;height:44px;border-radius:14px}.cv-chat-meta time{max-width:65px;text-align:right;line-height:1.35}.cv-chat-text strong{font-size:14px}}
